From 361c74fc4474b03951e8f5ae0968383e510f0ae4 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 22 Jun 2023 11:48:34 -0500 Subject: [PATCH 001/102] query: user<>clPool positions breakdown for superfluid (#5600) (#5607) * add user-pool position breakdown for superfluid * fix godoc * add basic test * slightly expand test * remove defense in depth * use osmoutils * error with locked but non superfluid positions (cherry picked from commit bab837cbac92f08661d8474101b46597b2a379e5) Co-authored-by: Adam Tucker --- proto/osmosis/superfluid/query.proto | 21 + proto/osmosis/superfluid/superfluid.proto | 12 + x/superfluid/keeper/grpc_query.go | 70 +++ x/superfluid/keeper/grpc_query_test.go | 104 ++++ x/superfluid/types/expected_keepers.go | 2 + x/superfluid/types/query.pb.go | 678 ++++++++++++++++++---- x/superfluid/types/query.pb.gw.go | 123 ++++ x/superfluid/types/superfluid.pb.go | 449 ++++++++++++-- 8 files changed, 1295 insertions(+), 164 deletions(-) diff --git a/proto/osmosis/superfluid/query.proto b/proto/osmosis/superfluid/query.proto index bbece7ea026..2e5997155b8 100644 --- a/proto/osmosis/superfluid/query.proto +++ b/proto/osmosis/superfluid/query.proto @@ -124,6 +124,14 @@ service Query { option (google.api.http).get = "/osmosis/superfluid/v1beta1/" "unpool_whitelist"; } + + rpc UserSuperfluidPositionsPerConcentratedPoolBreakdown( + UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) + returns (UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) { + option (google.api.http).get = "/osmosis/superfluid/v1beta1/" + "user_superfluid_positions_per_pool/" + "{delegator_address}/{concentrated_pool_id}"; + } } message QueryParamsRequest {} @@ -282,3 +290,16 @@ message QueryTotalDelegationByDelegatorResponse { message QueryUnpoolWhitelistRequest {} message QueryUnpoolWhitelistResponse { repeated uint64 pool_ids = 1; } + +//=============================== +// UserSuperfluidPositionsPerConcentratedPoolBreakdown +message UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest { + string delegator_address = 1; + uint64 concentrated_pool_id = 2 + [ (gogoproto.moretags) = "yaml:\"concentrated_pool_id\"" ]; +} + +message UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse { + repeated ConcentratedPoolUserPositionRecord cl_pool_user_position_records = 1 + [ (gogoproto.nullable) = false ]; +} diff --git a/proto/osmosis/superfluid/superfluid.proto b/proto/osmosis/superfluid/superfluid.proto index 01f61cff40a..cdd64c5667c 100644 --- a/proto/osmosis/superfluid/superfluid.proto +++ b/proto/osmosis/superfluid/superfluid.proto @@ -81,3 +81,15 @@ message LockIdIntermediaryAccountConnection { } message UnpoolWhitelistedPools { repeated uint64 ids = 1; } + +message ConcentratedPoolUserPositionRecord { + string validator_address = 1; + uint64 position_id = 2; + uint64 lock_id = 3; + cosmos.base.v1beta1.Coin delegation_amount = 4 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin" + ]; + cosmos.base.v1beta1.Coin equivalent_staked_amount = 5 + [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin" ]; +} diff --git a/x/superfluid/keeper/grpc_query.go b/x/superfluid/keeper/grpc_query.go index 59d33caf159..7f05e897ddd 100644 --- a/x/superfluid/keeper/grpc_query.go +++ b/x/superfluid/keeper/grpc_query.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "fmt" "strings" "time" @@ -18,6 +19,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" "github.com/cosmos/cosmos-sdk/types/query" + cltypes "github.com/osmosis-labs/osmosis/v16/x/concentrated-liquidity/types" lockuptypes "github.com/osmosis-labs/osmosis/v16/x/lockup/types" "github.com/osmosis-labs/osmosis/v16/x/superfluid/types" ) @@ -278,6 +280,74 @@ func (q Querier) SuperfluidDelegationsByDelegator(goCtx context.Context, req *ty return &res, nil } +// UserSuperfluidPositionsPerConcentratedPoolBreakdown returns all the cl superfluid positions for the specified delegator in the specified concentrated liquidity pool. +func (q Querier) UserSuperfluidPositionsPerConcentratedPoolBreakdown(goCtx context.Context, req *types.UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) (*types.UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddress) + if err != nil { + return nil, err + } + + // Get the position IDs for the specified pool ID and user address. + positions, err := q.Keeper.clk.GetUserPositions(ctx, delAddr, req.ConcentratedPoolId) + if err != nil { + return nil, err + } + + // Query each position ID and determine if it has a lock ID associated with it, which implies the position is superfluid staked. + // Construct a response with the position ID, lock ID, the amount of cl shares staked, and what those shares are worth in staked osmo tokens. + var clPoolUserPositionRecords []types.ConcentratedPoolUserPositionRecord + for _, pos := range positions { + lockId, err := q.Keeper.clk.GetLockIdFromPositionId(ctx, pos.PositionId) + switch err.(type) { + case cltypes.PositionIdToLockNotFoundError: + continue + case nil: + lock, err := q.Keeper.lk.GetLockByID(ctx, lockId) + if err != nil { + return nil, err + } + + syntheticLock, err := q.Keeper.lk.GetSyntheticLockupByUnderlyingLockId(ctx, lockId) + if err != nil { + return nil, err + } + + if syntheticLock.UnderlyingLockId == 0 { + return nil, fmt.Errorf("synthetic lockup with underlying lock ID %d not found", lockId) + } + + valAddr, err := ValidatorAddressFromSyntheticDenom(syntheticLock.SynthDenom) + if err != nil { + return nil, err + } + + baseDenom := lock.Coins.GetDenomByIndex(0) + lockedCoins := sdk.NewCoin(baseDenom, lock.GetCoins().AmountOf(baseDenom)) + equivalentAmount, err := q.Keeper.GetSuperfluidOSMOTokens(ctx, baseDenom, lockedCoins.Amount) + if err != nil { + return nil, err + } + coin := sdk.NewCoin(appparams.BaseCoinUnit, equivalentAmount) + + clPoolUserPositionRecords = append(clPoolUserPositionRecords, types.ConcentratedPoolUserPositionRecord{ + ValidatorAddress: valAddr, + PositionId: pos.PositionId, + LockId: lockId, + DelegationAmount: lockedCoins, + EquivalentStakedAmount: &coin, + }) + default: + continue + } + } + + return &types.UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse{ + ClPoolUserPositionRecords: clPoolUserPositionRecords, + }, nil +} + // SuperfluidUndelegationsByDelegator returns total amount undelegating by delegator. func (q Querier) SuperfluidUndelegationsByDelegator(goCtx context.Context, req *types.SuperfluidUndelegationsByDelegatorRequest) (*types.SuperfluidUndelegationsByDelegatorResponse, error) { if req == nil { diff --git a/x/superfluid/keeper/grpc_query_test.go b/x/superfluid/keeper/grpc_query_test.go index c99ec2f3872..68fc3a40fb4 100644 --- a/x/superfluid/keeper/grpc_query_test.go +++ b/x/superfluid/keeper/grpc_query_test.go @@ -6,6 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/osmosis-labs/osmosis/osmoutils" + cltypes "github.com/osmosis-labs/osmosis/v16/x/concentrated-liquidity/types" "github.com/osmosis-labs/osmosis/v16/x/superfluid/types" ) @@ -269,6 +271,108 @@ func (s *KeeperTestSuite) TestGRPCQuerySuperfluidDelegationsDontIncludeUnbonding s.Require().Equal(totalSuperfluidDelegationsRes.TotalDelegations, sdk.NewInt(30000000)) } +func (s *KeeperTestSuite) TestUserSuperfluidPositionsPerConcentratedPoolBreakdown() { + s.SetupTest() + + // Setup 2 validators. + valAddrs := s.SetupValidators([]stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}) + + // Set staking parameters (needed since stake is not a valid quote denom). + stakingParams := s.App.StakingKeeper.GetParams(s.Ctx) + stakingParams.BondDenom = "uosmo" + s.App.StakingKeeper.SetParams(s.Ctx, stakingParams) + + coins := sdk.NewCoins(sdk.NewCoin("token0", sdk.NewInt(1000000000000)), sdk.NewCoin(s.App.StakingKeeper.BondDenom(s.Ctx), sdk.NewInt(1000000000000))) + + // Prepare 2 concentrated pools. + clPool := s.PrepareConcentratedPoolWithCoinsAndFullRangePosition(coins[0].Denom, coins[1].Denom) + clPoolId := clPool.GetId() + denom := cltypes.GetConcentratedLockupDenomFromPoolId(1) + + clPool2 := s.PrepareConcentratedPoolWithCoinsAndFullRangePosition(coins[0].Denom, coins[1].Denom) + clPoolId2 := clPool2.GetId() + denom2 := cltypes.GetConcentratedLockupDenomFromPoolId(2) + + // Add both pools as superfluid assets. + err := s.App.SuperfluidKeeper.AddNewSuperfluidAsset(s.Ctx, types.SuperfluidAsset{ + Denom: denom, + AssetType: types.SuperfluidAssetTypeConcentratedShare, + }) + s.Require().NoError(err) + + err = s.App.SuperfluidKeeper.AddNewSuperfluidAsset(s.Ctx, types.SuperfluidAsset{ + Denom: denom2, + AssetType: types.SuperfluidAssetTypeConcentratedShare, + }) + s.Require().NoError(err) + + duration := s.App.StakingKeeper.GetParams(s.Ctx).UnbondingTime + + // Create 4 positions in pool 1 that are superfluid delegated. + expectedPositionIds := []uint64{} + expectedLockIds := []uint64{} + expectedTotalSharesLocked := sdk.Coins{} + for i := 0; i < 4; i++ { + posId, _, _, _, lockId, err := s.App.ConcentratedLiquidityKeeper.CreateFullRangePositionLocked(s.Ctx, clPoolId, s.TestAccs[0], coins, duration) + s.Require().NoError(err) + + lock, err := s.App.LockupKeeper.GetLockByID(s.Ctx, lockId) + s.Require().NoError(err) + + err = s.App.SuperfluidKeeper.SuperfluidDelegate(s.Ctx, lock.Owner, lock.ID, valAddrs[0].String()) + s.Require().NoError(err) + + expectedPositionIds = append(expectedPositionIds, posId) + expectedLockIds = append(expectedLockIds, lockId) + expectedTotalSharesLocked = expectedTotalSharesLocked.Add(lock.Coins[0]) + } + + // Create 1 position in pool 1 that is not superfluid delegated. + _, _, _, _, err = s.App.ConcentratedLiquidityKeeper.CreateFullRangePosition(s.Ctx, clPoolId, s.TestAccs[0], coins) + s.Require().NoError(err) + + // Create 4 positions in pool 2 that are superfluid delegated. + for i := 0; i < 4; i++ { + _, _, _, _, lockId, err := s.App.ConcentratedLiquidityKeeper.CreateFullRangePositionLocked(s.Ctx, clPoolId2, s.TestAccs[0], coins, duration) + s.Require().NoError(err) + + lock, err := s.App.LockupKeeper.GetLockByID(s.Ctx, lockId) + s.Require().NoError(err) + + err = s.App.SuperfluidKeeper.SuperfluidDelegate(s.Ctx, lock.Owner, lock.ID, valAddrs[0].String()) + s.Require().NoError(err) + } + + // Create 1 position in pool 2 that is not superfluid delegated. + _, _, _, _, err = s.App.ConcentratedLiquidityKeeper.CreateFullRangePosition(s.Ctx, clPoolId2, s.TestAccs[0], coins) + s.Require().NoError(err) + + res, err := s.queryClient.UserSuperfluidPositionsPerConcentratedPoolBreakdown(sdk.WrapSDKContext(s.Ctx), &types.UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest{ + DelegatorAddress: s.TestAccs[0].String(), + ConcentratedPoolId: clPoolId, + }) + s.Require().NoError(err) + + // The result should only have the four superfluid positions that were initially created + s.Require().Equal(4, len(res.ClPoolUserPositionRecords)) + s.Require().Equal(4, len(expectedPositionIds)) + s.Require().Equal(4, len(expectedLockIds)) + + actualPositionIds := []uint64{} + actualLockIds := []uint64{} + actualTotalSharesLocked := sdk.Coins{} + for _, record := range res.ClPoolUserPositionRecords { + s.Require().Equal(record.ValidatorAddress, valAddrs[0].String()) // User 0 only used this validator + actualPositionIds = append(actualPositionIds, record.PositionId) + actualLockIds = append(actualLockIds, record.LockId) + actualTotalSharesLocked = actualTotalSharesLocked.Add(record.DelegationAmount) + } + + s.Require().True(osmoutils.ContainsDuplicateDeepEqual([]interface{}{expectedPositionIds, actualPositionIds})) + s.Require().True(osmoutils.ContainsDuplicateDeepEqual([]interface{}{expectedLockIds, actualLockIds})) + s.Require().Equal(expectedTotalSharesLocked, actualTotalSharesLocked) +} + func (s *KeeperTestSuite) TestGRPCQueryTotalDelegationByDelegator() { s.SetupTest() diff --git a/x/superfluid/types/expected_keepers.go b/x/superfluid/types/expected_keepers.go index b2e367de537..f4481e83f9d 100644 --- a/x/superfluid/types/expected_keepers.go +++ b/x/superfluid/types/expected_keepers.go @@ -118,4 +118,6 @@ type ConcentratedKeeper interface { PositionHasActiveUnderlyingLock(ctx sdk.Context, positionId uint64) (bool, uint64, error) HasAnyPositionForPool(ctx sdk.Context, poolId uint64) (bool, error) WithdrawPosition(ctx sdk.Context, owner sdk.AccAddress, positionId uint64, requestedLiquidityAmountToWithdraw sdk.Dec) (amtDenom0, amtDenom1 sdk.Int, err error) + GetUserPositions(ctx sdk.Context, addr sdk.AccAddress, poolId uint64) ([]model.Position, error) + GetLockIdFromPositionId(ctx sdk.Context, positionId uint64) (uint64, error) } diff --git a/x/superfluid/types/query.pb.go b/x/superfluid/types/query.pb.go index c0c99d64f65..34b493c9606 100644 --- a/x/superfluid/types/query.pb.go +++ b/x/superfluid/types/query.pb.go @@ -1575,6 +1575,112 @@ func (m *QueryUnpoolWhitelistResponse) GetPoolIds() []uint64 { return nil } +// =============================== +// UserSuperfluidPositionsPerConcentratedPoolBreakdown +type UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + ConcentratedPoolId uint64 `protobuf:"varint,2,opt,name=concentrated_pool_id,json=concentratedPoolId,proto3" json:"concentrated_pool_id,omitempty" yaml:"concentrated_pool_id"` +} + +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) Reset() { + *m = UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest{} +} +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) String() string { + return proto.CompactTextString(m) +} +func (*UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) ProtoMessage() {} +func (*UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e3d9448e4ed3943f, []int{32} +} +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest.Merge(m, src) +} +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) XXX_Size() int { + return m.Size() +} +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest proto.InternalMessageInfo + +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) GetDelegatorAddress() string { + if m != nil { + return m.DelegatorAddress + } + return "" +} + +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) GetConcentratedPoolId() uint64 { + if m != nil { + return m.ConcentratedPoolId + } + return 0 +} + +type UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse struct { + ClPoolUserPositionRecords []ConcentratedPoolUserPositionRecord `protobuf:"bytes,1,rep,name=cl_pool_user_position_records,json=clPoolUserPositionRecords,proto3" json:"cl_pool_user_position_records"` +} + +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) Reset() { + *m = UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse{} +} +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) String() string { + return proto.CompactTextString(m) +} +func (*UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) ProtoMessage() {} +func (*UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e3d9448e4ed3943f, []int{33} +} +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse.Merge(m, src) +} +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) XXX_Size() int { + return m.Size() +} +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse proto.InternalMessageInfo + +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) GetClPoolUserPositionRecords() []ConcentratedPoolUserPositionRecord { + if m != nil { + return m.ClPoolUserPositionRecords + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "osmosis.superfluid.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "osmosis.superfluid.QueryParamsResponse") @@ -1608,129 +1714,141 @@ func init() { proto.RegisterType((*QueryTotalDelegationByDelegatorResponse)(nil), "osmosis.superfluid.QueryTotalDelegationByDelegatorResponse") proto.RegisterType((*QueryUnpoolWhitelistRequest)(nil), "osmosis.superfluid.QueryUnpoolWhitelistRequest") proto.RegisterType((*QueryUnpoolWhitelistResponse)(nil), "osmosis.superfluid.QueryUnpoolWhitelistResponse") + proto.RegisterType((*UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest)(nil), "osmosis.superfluid.UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest") + proto.RegisterType((*UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse)(nil), "osmosis.superfluid.UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse") } func init() { proto.RegisterFile("osmosis/superfluid/query.proto", fileDescriptor_e3d9448e4ed3943f) } var fileDescriptor_e3d9448e4ed3943f = []byte{ - // 1859 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4d, 0x6c, 0xd4, 0xda, - 0x15, 0x8e, 0x27, 0x79, 0x09, 0x39, 0x91, 0x48, 0x72, 0xa1, 0x2f, 0x89, 0x81, 0x09, 0xcf, 0xc9, - 0x4b, 0xd2, 0x3c, 0xb0, 0x49, 0x28, 0x21, 0x40, 0x41, 0xcc, 0x10, 0x02, 0x91, 0x92, 0x86, 0x4e, - 0x48, 0x90, 0xfa, 0x23, 0xcb, 0x19, 0xdf, 0x4c, 0xac, 0x78, 0xec, 0xc9, 0x5c, 0x4f, 0x60, 0x84, - 0x50, 0xa5, 0x54, 0x95, 0x8a, 0xba, 0x68, 0x25, 0x56, 0xdd, 0x75, 0x0b, 0x8b, 0x76, 0xd9, 0x4d, - 0x37, 0x55, 0x37, 0x48, 0x55, 0x25, 0xa4, 0x6e, 0xaa, 0x2e, 0xa0, 0x82, 0x2e, 0xdb, 0x4d, 0x97, - 0xad, 0x54, 0x55, 0xbe, 0xf7, 0xfa, 0x67, 0x66, 0x6c, 0x8f, 0x27, 0x50, 0x78, 0xab, 0x8c, 0x7d, - 0xcf, 0xdf, 0x77, 0xfe, 0xae, 0xcf, 0x09, 0x64, 0x6d, 0x52, 0xb6, 0x89, 0x41, 0x14, 0x52, 0xab, - 0xe0, 0xea, 0x8e, 0x59, 0x33, 0x74, 0x65, 0xbf, 0x86, 0xab, 0x75, 0xb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, 0xd0, 0xc9, 0x57, 0x5b, 0x8d, 0x32, 0xab, 0x0f, 0x3d, 0xee, 0xfc, 0xbd, - 0x97, 0x6f, 0xb3, 0xc2, 0xab, 0xb7, 0x59, 0xe1, 0x6f, 0x6f, 0xb3, 0xc2, 0x2f, 0xde, 0x65, 0xbb, - 0x5e, 0xbd, 0xcb, 0x76, 0xfd, 0xe5, 0x5d, 0xb6, 0xeb, 0x7b, 0x0b, 0xa1, 0xd1, 0x85, 0x4b, 0x3c, - 0x6f, 0x6a, 0xdb, 0xc4, 0x17, 0x7f, 0x30, 0xb7, 0xa0, 0x3c, 0x0a, 0x2b, 0xa1, 0xe3, 0xcc, 0x76, - 0x2f, 0xfd, 0x0f, 0xee, 0xc5, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x92, 0xb0, 0x15, 0x99, 0x3f, - 0x1f, 0x00, 0x00, + // 2024 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4f, 0x6c, 0x14, 0xd7, + 0x19, 0xf7, 0xac, 0x1d, 0x1b, 0x3e, 0x24, 0x30, 0x0f, 0x1a, 0xec, 0x01, 0x76, 0xc9, 0x98, 0xd8, + 0xae, 0x13, 0x76, 0x82, 0x29, 0x8e, 0x03, 0x05, 0x65, 0x17, 0xe3, 0xc4, 0x12, 0xc4, 0xce, 0x82, + 0x41, 0xea, 0x1f, 0x8d, 0xc6, 0x33, 0xcf, 0xcb, 0xc8, 0xb3, 0xf3, 0xd6, 0xf3, 0x66, 0x4d, 0x56, + 0x88, 0x56, 0xa2, 0xaa, 0xd4, 0xa8, 0x87, 0x56, 0xca, 0xa9, 0xb7, 0x5e, 0x93, 0x43, 0x7b, 0xec, + 0xa5, 0x3d, 0x54, 0xbd, 0xa4, 0xad, 0x2a, 0x45, 0xea, 0xa5, 0xea, 0x81, 0x54, 0xd0, 0x63, 0x7b, + 0xc9, 0xb1, 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 0x0f, 0x43, 0x39, 0x1b, 0xcc, 0x82, 0x1a, + 0xde, 0x6d, 0x61, 0x1a, 0x68, 0xeb, 0x70, 0xac, 0xe3, 0x2d, 0x6d, 0x12, 0x8f, 0x62, 0xb4, 0x0c, + 0xe3, 0xdc, 0xd2, 0x29, 0xe5, 0x8c, 0x32, 0x7f, 0x68, 0x51, 0x2d, 0xef, 0x8f, 0x4c, 0x99, 0x9f, + 0xa9, 0x8e, 0x7d, 0xfe, 0xb8, 0x34, 0x52, 0x13, 0xfc, 0xda, 0x3c, 0x4c, 0x56, 0x28, 0xc5, 0xc1, + 0xed, 0x76, 0x13, 0x0b, 0x25, 0xe8, 0x38, 0xbc, 0x62, 0x63, 0x8f, 0x34, 0x98, 0xb0, 0x83, 0x35, + 0xfe, 0xa0, 0x7d, 0x17, 0x8e, 0xa6, 0x38, 0x85, 0xe2, 0x55, 0x00, 0x33, 0x7c, 0x69, 0x04, 0xed, + 0x26, 0x66, 0xfc, 0x87, 0x17, 0xe7, 0x64, 0xca, 0x6f, 0xc5, 0x3f, 0x13, 0x21, 0x07, 0xcd, 0xe8, + 0xa7, 0x86, 0x60, 0xb2, 0xe2, 0xba, 0x8c, 0x14, 0x63, 0xbd, 0x03, 0x47, 0x53, 0xef, 0x84, 0xc2, + 0x0a, 0x8c, 0xb3, 0x53, 0x21, 0xd2, 0xd1, 0xf9, 0x43, 0x8b, 0x33, 0x7d, 0x28, 0x8b, 0x20, 0xf3, + 0x83, 0x5a, 0x19, 0x5e, 0x65, 0xaf, 0x6f, 0xb6, 0xdc, 0xc0, 0x69, 0xba, 0x0e, 0xf6, 0xf3, 0x81, + 0xff, 0x54, 0x81, 0x13, 0xfb, 0x0e, 0x08, 0x73, 0x9a, 0xa0, 0x86, 0xfa, 0x0d, 0xbc, 0xdb, 0x72, + 0xf6, 0x4c, 0x17, 0x7b, 0x81, 0xd1, 0x88, 0xb9, 0x44, 0x30, 0x16, 0x65, 0x26, 0xae, 0xd3, 0x06, + 0xb9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x7f, 0x6e, 0xf2, 0x84, 0x3b, 0x76, 0x99, 0x3b, 0x76, 0x90, 0x93, 0xeb, 0x8e, 0x70, 0xe6, 0x4a, + 0xa5, 0x73, 0x34, 0x7e, 0x51, 0xa3, 0xc9, 0x86, 0x31, 0xe2, 0xca, 0x22, 0xac, 0x3f, 0x90, 0x0d, + 0x88, 0x0f, 0xab, 0x1b, 0x9f, 0x3f, 0x29, 0x2a, 0x5f, 0x3c, 0x29, 0x2a, 0xff, 0x78, 0x52, 0x54, + 0x7e, 0xfe, 0xb4, 0x38, 0xf2, 0xc5, 0xd3, 0xe2, 0xc8, 0xdf, 0x9e, 0x16, 0x47, 0xbe, 0xb3, 0x94, + 0x9a, 0xc2, 0x85, 0x39, 0xe7, 0x5c, 0x73, 0x8b, 0xc6, 0xb6, 0xed, 0x9d, 0x5f, 0xd2, 0x3f, 0x4a, + 0x5b, 0xc8, 0x26, 0xf3, 0xad, 0x71, 0xf6, 0x9f, 0x11, 0x2e, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, + 0x0f, 0x2b, 0xbf, 0xb6, 0x0a, 0x22, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1781,6 +1899,7 @@ type QueryClient interface { TotalDelegationByDelegator(ctx context.Context, in *QueryTotalDelegationByDelegatorRequest, opts ...grpc.CallOption) (*QueryTotalDelegationByDelegatorResponse, error) // Returns a list of whitelisted pool ids to unpool. UnpoolWhitelist(ctx context.Context, in *QueryUnpoolWhitelistRequest, opts ...grpc.CallOption) (*QueryUnpoolWhitelistResponse, error) + UserSuperfluidPositionsPerConcentratedPoolBreakdown(ctx context.Context, in *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest, opts ...grpc.CallOption) (*UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse, error) } type queryClient struct { @@ -1926,6 +2045,15 @@ func (c *queryClient) UnpoolWhitelist(ctx context.Context, in *QueryUnpoolWhitel return out, nil } +func (c *queryClient) UserSuperfluidPositionsPerConcentratedPoolBreakdown(ctx context.Context, in *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest, opts ...grpc.CallOption) (*UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse, error) { + out := new(UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) + err := c.cc.Invoke(ctx, "/osmosis.superfluid.Query/UserSuperfluidPositionsPerConcentratedPoolBreakdown", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Params returns the total set of superfluid parameters. @@ -1964,6 +2092,7 @@ type QueryServer interface { TotalDelegationByDelegator(context.Context, *QueryTotalDelegationByDelegatorRequest) (*QueryTotalDelegationByDelegatorResponse, error) // Returns a list of whitelisted pool ids to unpool. UnpoolWhitelist(context.Context, *QueryUnpoolWhitelistRequest) (*QueryUnpoolWhitelistResponse, error) + UserSuperfluidPositionsPerConcentratedPoolBreakdown(context.Context, *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) (*UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -2015,6 +2144,9 @@ func (*UnimplementedQueryServer) TotalDelegationByDelegator(ctx context.Context, func (*UnimplementedQueryServer) UnpoolWhitelist(ctx context.Context, req *QueryUnpoolWhitelistRequest) (*QueryUnpoolWhitelistResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnpoolWhitelist not implemented") } +func (*UnimplementedQueryServer) UserSuperfluidPositionsPerConcentratedPoolBreakdown(ctx context.Context, req *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) (*UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UserSuperfluidPositionsPerConcentratedPoolBreakdown not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -2290,6 +2422,24 @@ func _Query_UnpoolWhitelist_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Query_UserSuperfluidPositionsPerConcentratedPoolBreakdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).UserSuperfluidPositionsPerConcentratedPoolBreakdown(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.superfluid.Query/UserSuperfluidPositionsPerConcentratedPoolBreakdown", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UserSuperfluidPositionsPerConcentratedPoolBreakdown(ctx, req.(*UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "osmosis.superfluid.Query", HandlerType: (*QueryServer)(nil), @@ -2354,6 +2504,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "UnpoolWhitelist", Handler: _Query_UnpoolWhitelist_Handler, }, + { + MethodName: "UserSuperfluidPositionsPerConcentratedPoolBreakdown", + Handler: _Query_UserSuperfluidPositionsPerConcentratedPoolBreakdown_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "osmosis/superfluid/query.proto", @@ -3558,6 +3712,78 @@ func (m *QueryUnpoolWhitelistResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ConcentratedPoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ConcentratedPoolId)) + i-- + dAtA[i] = 0x10 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ClPoolUserPositionRecords) > 0 { + for iNdEx := len(m.ClPoolUserPositionRecords) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ClPoolUserPositionRecords[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -4057,6 +4283,37 @@ func (m *QueryUnpoolWhitelistResponse) Size() (n int) { return n } +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.ConcentratedPoolId != 0 { + n += 1 + sovQuery(uint64(m.ConcentratedPoolId)) + } + return n +} + +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ClPoolUserPositionRecords) > 0 { + for _, e := range m.ClPoolUserPositionRecords { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -7193,6 +7450,191 @@ func (m *QueryUnpoolWhitelistResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConcentratedPoolId", wireType) + } + m.ConcentratedPoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ConcentratedPoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UserSuperfluidPositionsPerConcentratedPoolBreakdownResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClPoolUserPositionRecords", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClPoolUserPositionRecords = append(m.ClPoolUserPositionRecords, ConcentratedPoolUserPositionRecord{}) + if err := m.ClPoolUserPositionRecords[len(m.ClPoolUserPositionRecords)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/superfluid/types/query.pb.gw.go b/x/superfluid/types/query.pb.gw.go index 8b4b78a59c9..0bd57b079ae 100644 --- a/x/superfluid/types/query.pb.gw.go +++ b/x/superfluid/types/query.pb.gw.go @@ -555,6 +555,82 @@ func local_request_Query_UnpoolWhitelist_0(ctx context.Context, marshaler runtim } +func request_Query_UserSuperfluidPositionsPerConcentratedPoolBreakdown_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["delegator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + } + + protoReq.DelegatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + } + + val, ok = pathParams["concentrated_pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "concentrated_pool_id") + } + + protoReq.ConcentratedPoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "concentrated_pool_id", err) + } + + msg, err := client.UserSuperfluidPositionsPerConcentratedPoolBreakdown(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_UserSuperfluidPositionsPerConcentratedPoolBreakdown_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UserSuperfluidPositionsPerConcentratedPoolBreakdownRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["delegator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + } + + protoReq.DelegatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + } + + val, ok = pathParams["concentrated_pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "concentrated_pool_id") + } + + protoReq.ConcentratedPoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "concentrated_pool_id", err) + } + + msg, err := server.UserSuperfluidPositionsPerConcentratedPoolBreakdown(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -883,6 +959,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_UserSuperfluidPositionsPerConcentratedPoolBreakdown_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_UserSuperfluidPositionsPerConcentratedPoolBreakdown_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_UserSuperfluidPositionsPerConcentratedPoolBreakdown_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1204,6 +1303,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_UserSuperfluidPositionsPerConcentratedPoolBreakdown_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_UserSuperfluidPositionsPerConcentratedPoolBreakdown_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_UserSuperfluidPositionsPerConcentratedPoolBreakdown_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1235,6 +1354,8 @@ var ( pattern_Query_TotalDelegationByDelegator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"osmosis", "superfluid", "v1beta1", "total_delegation_by_delegator", "delegator_address"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_UnpoolWhitelist_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "superfluid", "v1beta1", "unpool_whitelist"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_UserSuperfluidPositionsPerConcentratedPoolBreakdown_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"osmosis", "superfluid", "v1beta1", "user_superfluid_positions_per_pool", "delegator_address", "concentrated_pool_id"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1265,4 +1386,6 @@ var ( forward_Query_TotalDelegationByDelegator_0 = runtime.ForwardResponseMessage forward_Query_UnpoolWhitelist_0 = runtime.ForwardResponseMessage + + forward_Query_UserSuperfluidPositionsPerConcentratedPoolBreakdown_0 = runtime.ForwardResponseMessage ) diff --git a/x/superfluid/types/superfluid.pb.go b/x/superfluid/types/superfluid.pb.go index 875b81e3bd0..bc460c7c634 100644 --- a/x/superfluid/types/superfluid.pb.go +++ b/x/superfluid/types/superfluid.pb.go @@ -392,6 +392,82 @@ func (m *UnpoolWhitelistedPools) GetIds() []uint64 { return nil } +type ConcentratedPoolUserPositionRecord struct { + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + PositionId uint64 `protobuf:"varint,2,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` + LockId uint64 `protobuf:"varint,3,opt,name=lock_id,json=lockId,proto3" json:"lock_id,omitempty"` + DelegationAmount types.Coin `protobuf:"bytes,4,opt,name=delegation_amount,json=delegationAmount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"delegation_amount"` + EquivalentStakedAmount *types.Coin `protobuf:"bytes,5,opt,name=equivalent_staked_amount,json=equivalentStakedAmount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"equivalent_staked_amount,omitempty"` +} + +func (m *ConcentratedPoolUserPositionRecord) Reset() { *m = ConcentratedPoolUserPositionRecord{} } +func (m *ConcentratedPoolUserPositionRecord) String() string { return proto.CompactTextString(m) } +func (*ConcentratedPoolUserPositionRecord) ProtoMessage() {} +func (*ConcentratedPoolUserPositionRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_79d3c29d82dbb734, []int{6} +} +func (m *ConcentratedPoolUserPositionRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConcentratedPoolUserPositionRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConcentratedPoolUserPositionRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ConcentratedPoolUserPositionRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConcentratedPoolUserPositionRecord.Merge(m, src) +} +func (m *ConcentratedPoolUserPositionRecord) XXX_Size() int { + return m.Size() +} +func (m *ConcentratedPoolUserPositionRecord) XXX_DiscardUnknown() { + xxx_messageInfo_ConcentratedPoolUserPositionRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_ConcentratedPoolUserPositionRecord proto.InternalMessageInfo + +func (m *ConcentratedPoolUserPositionRecord) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +func (m *ConcentratedPoolUserPositionRecord) GetPositionId() uint64 { + if m != nil { + return m.PositionId + } + return 0 +} + +func (m *ConcentratedPoolUserPositionRecord) GetLockId() uint64 { + if m != nil { + return m.LockId + } + return 0 +} + +func (m *ConcentratedPoolUserPositionRecord) GetDelegationAmount() types.Coin { + if m != nil { + return m.DelegationAmount + } + return types.Coin{} +} + +func (m *ConcentratedPoolUserPositionRecord) GetEquivalentStakedAmount() *types.Coin { + if m != nil { + return m.EquivalentStakedAmount + } + return nil +} + func init() { proto.RegisterEnum("osmosis.superfluid.SuperfluidAssetType", SuperfluidAssetType_name, SuperfluidAssetType_value) proto.RegisterType((*SuperfluidAsset)(nil), "osmosis.superfluid.SuperfluidAsset") @@ -400,6 +476,7 @@ func init() { proto.RegisterType((*SuperfluidDelegationRecord)(nil), "osmosis.superfluid.SuperfluidDelegationRecord") proto.RegisterType((*LockIdIntermediaryAccountConnection)(nil), "osmosis.superfluid.LockIdIntermediaryAccountConnection") proto.RegisterType((*UnpoolWhitelistedPools)(nil), "osmosis.superfluid.UnpoolWhitelistedPools") + proto.RegisterType((*ConcentratedPoolUserPositionRecord)(nil), "osmosis.superfluid.ConcentratedPoolUserPositionRecord") } func init() { @@ -407,52 +484,56 @@ func init() { } var fileDescriptor_79d3c29d82dbb734 = []byte{ - // 714 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x4f, 0x13, 0x41, - 0x14, 0xef, 0xb6, 0x15, 0xe8, 0x60, 0xb4, 0x2c, 0x04, 0x4b, 0x13, 0xb6, 0xb8, 0x18, 0x69, 0x20, - 0xec, 0xa6, 0x98, 0x70, 0xe0, 0x56, 0x8a, 0x26, 0x24, 0x88, 0x64, 0xd1, 0x98, 0x78, 0x69, 0xa6, - 0x3b, 0xc3, 0x76, 0xd2, 0xd9, 0x9d, 0x65, 0x67, 0xb6, 0xda, 0x9b, 0x07, 0x0f, 0x1c, 0xfd, 0x08, - 0x24, 0xde, 0xfc, 0x10, 0x9e, 0x39, 0x72, 0x34, 0x1e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, 0xef, 0x1d, 0x1c, 0x76, 0x61, - 0x80, 0xcb, 0x8a, 0x5a, 0x07, 0x8f, 0xc6, 0xe0, 0x2d, 0xe6, 0xd9, 0xd8, 0x13, 0x01, 0x14, 0x18, - 0xc5, 0x9e, 0xf9, 0x6a, 0xf1, 0xe4, 0x93, 0x96, 0xdb, 0x3e, 0x38, 0xbb, 0xd4, 0x94, 0xf3, 0x4b, - 0x4d, 0xf9, 0x71, 0xa9, 0x29, 0x1f, 0xaf, 0xb4, 0xdc, 0xf9, 0x95, 0x96, 0xfb, 0x7a, 0xa5, 0xe5, - 0xde, 0x6c, 0x66, 0x06, 0x90, 0x3c, 0x15, 0xeb, 0x14, 0x76, 0xf8, 0xf0, 0x62, 0xf6, 0x1b, 0x9b, - 0xe6, 0xbb, 0xec, 0x5b, 0x29, 0x87, 0xd2, 0x99, 0x90, 0x8f, 0xd3, 0x93, 0x5f, 0x01, 0x00, 0x00, - 0xff, 0xff, 0xce, 0x2c, 0x7a, 0x08, 0x4e, 0x05, 0x00, 0x00, + // 771 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x4d, 0x4f, 0xeb, 0x46, + 0x14, 0x8d, 0x93, 0xf0, 0x91, 0xa1, 0x6a, 0x83, 0x41, 0x34, 0x44, 0xc2, 0xa6, 0xa6, 0x2a, 0x11, + 0x08, 0x5b, 0xa1, 0x12, 0x0b, 0x76, 0x21, 0xb4, 0x52, 0x24, 0x4a, 0x23, 0x53, 0x54, 0xa9, 0x9b, + 0x68, 0xe2, 0x19, 0x9c, 0x51, 0xc6, 0x1e, 0xe3, 0x19, 0xa7, 0xcd, 0xae, 0x8b, 0x4a, 0x65, 0xd9, + 0x9f, 0x80, 0xd4, 0x5d, 0x7f, 0x44, 0xd7, 0x2c, 0x59, 0x56, 0x5d, 0xd0, 0x0a, 0x36, 0x5d, 0xf3, + 0x0b, 0x2a, 0x8f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, 0x44, 0xd6, 0xc1, 0xe2, 0x08, 0xd2, 0x1e, + 0x44, 0x28, 0x94, 0x34, 0x2a, 0xf6, 0xc2, 0x08, 0xd2, 0x16, 0x42, 0x61, 0x0c, 0xb9, 0x30, 0x72, + 0x71, 0x8f, 0xa0, 0x5a, 0x69, 0x53, 0x69, 0x94, 0xed, 0x05, 0xb9, 0xef, 0x20, 0xe3, 0x4f, 0x05, + 0x68, 0xdf, 0x72, 0x8f, 0x7d, 0x75, 0x19, 0x91, 0x11, 0xa4, 0xd8, 0x17, 0xdf, 0x44, 0x54, 0x90, + 0x80, 0x12, 0x1c, 0xda, 0xd8, 0x61, 0x21, 0x52, 0x3f, 0x03, 0x1f, 0xe1, 0x80, 0x39, 0x83, 0x9e, + 0x1f, 0x79, 0x7d, 0x1c, 0xca, 0xae, 0x25, 0x7b, 0x49, 0xc6, 0x4e, 0x65, 0x68, 0xca, 0xa8, 0x98, + 0x67, 0xe4, 0x00, 0xe0, 0x65, 0xc5, 0x64, 0xe3, 0xca, 0x51, 0xfb, 0xe6, 0x4e, 0x2f, 0xfc, 0x7d, + 0xa7, 0x7f, 0xe1, 0x12, 0x31, 0x88, 0xfa, 0xa6, 0xc3, 0x3c, 0x2b, 0x1d, 0x45, 0xf2, 0xb3, 0xc7, + 0xd1, 0xd0, 0x8a, 0xef, 0x92, 0x9b, 0xc7, 0xd8, 0x79, 0xbc, 0xd3, 0x97, 0xc7, 0xd0, 0xa3, 0x87, + 0xc6, 0xb4, 0x92, 0x61, 0xe7, 0xca, 0x1a, 0x8f, 0x45, 0x50, 0x9f, 0x5e, 0xd7, 0x31, 0xa6, 0xd8, + 0x95, 0x46, 0x48, 0xc9, 0xef, 0x82, 0x65, 0x94, 0xc4, 0x58, 0x28, 0xef, 0x06, 0x73, 0x9e, 0xde, + 0x5b, 0x35, 0x03, 0x5a, 0x49, 0x3c, 0x4e, 0x1e, 0x41, 0x4a, 0xd0, 0x93, 0xe4, 0x44, 0x52, 0x35, + 0x03, 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e9, 0xf1, 0x58, 0x4f, 0x51, 0xea, 0x01, 0x93, 0x50, + 0x07, 0xe5, 0xc5, 0x96, 0x9e, 0x88, 0x9d, 0x69, 0x94, 0xf2, 0x87, 0x36, 0xca, 0xdc, 0xfb, 0x30, + 0xca, 0xce, 0x2f, 0x0a, 0x58, 0x99, 0xf1, 0xe1, 0x53, 0x37, 0xc0, 0xfa, 0x8c, 0xf0, 0x29, 0x14, + 0x64, 0x84, 0xab, 0x05, 0x55, 0xcb, 0xff, 0xa7, 0x33, 0xf8, 0xa4, 0x7b, 0x36, 0x80, 0x21, 0xae, + 0x2a, 0x6a, 0x03, 0x7c, 0x3e, 0x03, 0xcf, 0x8f, 0x3c, 0xc9, 0x2c, 0xd6, 0xcb, 0x57, 0xbf, 0x6b, + 0x85, 0xa3, 0xee, 0xcd, 0xbd, 0xa6, 0xdc, 0xde, 0x6b, 0xca, 0xbf, 0xf7, 0x9a, 0xf2, 0xdb, 0x83, + 0x56, 0xb8, 0x7d, 0xd0, 0x0a, 0x7f, 0x3d, 0x68, 0x85, 0x1f, 0x0e, 0x72, 0x0a, 0xd3, 0x8f, 0xf6, + 0x1e, 0x85, 0x7d, 0x3e, 0xd9, 0x58, 0xa3, 0xe6, 0x81, 0xf5, 0x53, 0xfe, 0xd5, 0x92, 0xaa, 0xfb, + 0xf3, 0xf2, 0x99, 0xf8, 0xf2, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x42, 0x5c, 0x66, 0xaa, 0xd8, + 0x06, 0x00, 0x00, } func (this *SuperfluidAsset) Equal(that interface{}) bool { @@ -739,6 +820,68 @@ func (m *UnpoolWhitelistedPools) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *ConcentratedPoolUserPositionRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ConcentratedPoolUserPositionRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConcentratedPoolUserPositionRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.EquivalentStakedAmount != nil { + { + size, err := m.EquivalentStakedAmount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSuperfluid(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + { + size, err := m.DelegationAmount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSuperfluid(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.LockId != 0 { + i = encodeVarintSuperfluid(dAtA, i, uint64(m.LockId)) + i-- + dAtA[i] = 0x18 + } + if m.PositionId != 0 { + i = encodeVarintSuperfluid(dAtA, i, uint64(m.PositionId)) + i-- + dAtA[i] = 0x10 + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintSuperfluid(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintSuperfluid(dAtA []byte, offset int, v uint64) int { offset -= sovSuperfluid(v) base := offset @@ -859,6 +1002,31 @@ func (m *UnpoolWhitelistedPools) Size() (n int) { return n } +func (m *ConcentratedPoolUserPositionRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovSuperfluid(uint64(l)) + } + if m.PositionId != 0 { + n += 1 + sovSuperfluid(uint64(m.PositionId)) + } + if m.LockId != 0 { + n += 1 + sovSuperfluid(uint64(m.LockId)) + } + l = m.DelegationAmount.Size() + n += 1 + l + sovSuperfluid(uint64(l)) + if m.EquivalentStakedAmount != nil { + l = m.EquivalentStakedAmount.Size() + n += 1 + l + sovSuperfluid(uint64(l)) + } + return n +} + func sovSuperfluid(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1644,6 +1812,195 @@ func (m *UnpoolWhitelistedPools) Unmarshal(dAtA []byte) error { } return nil } +func (m *ConcentratedPoolUserPositionRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSuperfluid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConcentratedPoolUserPositionRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConcentratedPoolUserPositionRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSuperfluid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSuperfluid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSuperfluid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) + } + m.PositionId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSuperfluid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PositionId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LockId", wireType) + } + m.LockId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSuperfluid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LockId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegationAmount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSuperfluid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSuperfluid + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSuperfluid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DelegationAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EquivalentStakedAmount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSuperfluid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSuperfluid + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSuperfluid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.EquivalentStakedAmount == nil { + m.EquivalentStakedAmount = &types.Coin{} + } + if err := m.EquivalentStakedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSuperfluid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSuperfluid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipSuperfluid(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From fff520d2837e45c519a9d5395918cebcdee148ce Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 22 Jun 2023 21:40:01 -0400 Subject: [PATCH 002/102] Remove unused state-sync github action (#5604) (#5605) (cherry picked from commit 7c28d79b86964f9f8610ec5d506f47f64f43fc56) Co-authored-by: Niccolo Raspa <6024049+niccoloraspa@users.noreply.github.com> --- .github/workflows/statesync.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/statesync.yml diff --git a/.github/workflows/statesync.yml b/.github/workflows/statesync.yml deleted file mode 100644 index 766dd1170d4..00000000000 --- a/.github/workflows/statesync.yml +++ /dev/null @@ -1,25 +0,0 @@ -# This is a basic workflow that is manually triggered - -name: State Sync - -# Controls when the action will run. Workflow runs when manually triggered using the UI -# or API. -on: [workflow_dispatch] - -# This workflow tests state sync against the Notional archive server. -# To decentralize this workflow, add additional nodes to scripts/statesync.sh - -jobs: - build: - runs-on: ubuntu-latest - name: osmosis state sync - steps: - - uses: actions/checkout@v3 - - - name: 🐿 Setup Golang - uses: actions/setup-go@v4 - with: - go-version: '^1.20' - - - name: state sync - run: bash scripts/statesync.sh From 201a3a70ce0a78cadb26b31ec3bbdd55b8b66835 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 22 Jun 2023 22:01:23 -0400 Subject: [PATCH 003/102] fix: remove duplicate suite (#5610) (#5613) (cherry picked from commit 7ed01124aa798932a8465e18c80f1b87ffdc533f) Co-authored-by: Roman --- .../swaps_tick_cross_test.go | 46 +++++++------------ 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/x/concentrated-liquidity/swaps_tick_cross_test.go b/x/concentrated-liquidity/swaps_tick_cross_test.go index c9fbcb2f2c6..fafb8407066 100644 --- a/x/concentrated-liquidity/swaps_tick_cross_test.go +++ b/x/concentrated-liquidity/swaps_tick_cross_test.go @@ -2,10 +2,8 @@ package concentrated_liquidity_test import ( "fmt" - "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/suite" "github.com/osmosis-labs/osmosis/osmoutils" "github.com/osmosis-labs/osmosis/v16/x/concentrated-liquidity/math" @@ -13,16 +11,6 @@ import ( "github.com/osmosis-labs/osmosis/v16/x/concentrated-liquidity/types" ) -// SwapTickCrossTestSuite tests that the ticks are -// updated correctly after swapping in various scenarios. -type SwapTickCrossTestSuite struct { - KeeperTestSuite -} - -func TestSwapTickCrossTestSuite(t *testing.T) { - suite.Run(t, new(SwapTickCrossTestSuite)) -} - const ( tickSpacingOne = 1 tickSpacing100 = 100 @@ -42,7 +30,7 @@ var ( ) // CreatePositionTickSpacingsFromCurrentTick creates a position with the passed in tick spacings away from the current tick. -func (s *SwapTickCrossTestSuite) CreatePositionTickSpacingsFromCurrentTick(poolId uint64, tickSpacingsAwayFromCurrentTick uint64) positionMeta { +func (s *KeeperTestSuite) CreatePositionTickSpacingsFromCurrentTick(poolId uint64, tickSpacingsAwayFromCurrentTick uint64) positionMeta { pool, err := s.App.ConcentratedLiquidityKeeper.GetPoolById(s.Ctx, poolId) s.Require().NoError(err) @@ -68,7 +56,7 @@ func (s *SwapTickCrossTestSuite) CreatePositionTickSpacingsFromCurrentTick(poolI } // tickToSqrtPrice a helper to convert a tick to a sqrt price. -func (s *SwapTickCrossTestSuite) tickToSqrtPrice(tick int64) sdk.Dec { +func (s *KeeperTestSuite) tickToSqrtPrice(tick int64) sdk.Dec { _, sqrtPrice, err := math.TickToSqrtPrice(tick) s.Require().NoError(err) return sqrtPrice @@ -76,7 +64,7 @@ func (s *SwapTickCrossTestSuite) tickToSqrtPrice(tick int64) sdk.Dec { // validateIteratorLeftZeroForOne is a helper to validate the next initialized tick iterator // in the left (zfo) direction of the swap. -func (s *SwapTickCrossTestSuite) validateIteratorLeftZeroForOne(poolId uint64, expectedTick int64) { +func (s *KeeperTestSuite) validateIteratorLeftZeroForOne(poolId uint64, expectedTick int64) { pool, err := s.App.ConcentratedLiquidityKeeper.GetPoolById(s.Ctx, poolId) s.Require().NoError(err) @@ -94,7 +82,7 @@ func (s *SwapTickCrossTestSuite) validateIteratorLeftZeroForOne(poolId uint64, e // validateIteratorRightOneForZero is a helper to validate the next initialized tick iterator // in the right (ofz) direction of the swap. -func (s *SwapTickCrossTestSuite) validateIteratorRightOneForZero(poolId uint64, expectedTick int64) { +func (s *KeeperTestSuite) validateIteratorRightOneForZero(poolId uint64, expectedTick int64) { pool, err := s.App.ConcentratedLiquidityKeeper.GetPoolById(s.Ctx, poolId) s.Require().NoError(err) @@ -112,7 +100,7 @@ func (s *SwapTickCrossTestSuite) validateIteratorRightOneForZero(poolId uint64, } // assertPositionInRange a helper to assert that a position with the given lowerTick and upperTick is in range. -func (s *SwapTickCrossTestSuite) assertPositionInRange(poolId uint64, lowerTick int64, upperTick int64) { +func (s *KeeperTestSuite) assertPositionInRange(poolId uint64, lowerTick int64, upperTick int64) { pool, err := s.App.ConcentratedLiquidityKeeper.GetPoolById(s.Ctx, poolId) s.Require().NoError(err) @@ -121,7 +109,7 @@ func (s *SwapTickCrossTestSuite) assertPositionInRange(poolId uint64, lowerTick } // assertPositionOutOfRange a helper to assert that a position with the given lowerTick and upperTick is out of range. -func (s *SwapTickCrossTestSuite) assertPositionOutOfRange(poolId uint64, lowerTick int64, upperTick int64) { +func (s *KeeperTestSuite) assertPositionOutOfRange(poolId uint64, lowerTick int64, upperTick int64) { pool, err := s.App.ConcentratedLiquidityKeeper.GetPoolById(s.Ctx, poolId) s.Require().NoError(err) @@ -131,7 +119,7 @@ func (s *SwapTickCrossTestSuite) assertPositionOutOfRange(poolId uint64, lowerTi // assertPositionRangeConditional a helper to assert that a position with the given lowerTick and upperTick is in or out of range // depending on the isOutOfRangeExpected flag. -func (s *SwapTickCrossTestSuite) assertPositionRangeConditional(poolId uint64, isOutOfRangeExpected bool, lowerTick int64, upperTick int64) { +func (s *KeeperTestSuite) assertPositionRangeConditional(poolId uint64, isOutOfRangeExpected bool, lowerTick int64, upperTick int64) { if isOutOfRangeExpected { s.assertPositionOutOfRange(poolId, lowerTick, upperTick) } else { @@ -141,7 +129,7 @@ func (s *SwapTickCrossTestSuite) assertPositionRangeConditional(poolId uint64, i // swapZeroForOneLeft swaps amount in the left (zfo) direction of the swap. // Asserts that no error is returned. -func (s *SwapTickCrossTestSuite) swapZeroForOneLeft(poolId uint64, amount sdk.Coin) { +func (s *KeeperTestSuite) swapZeroForOneLeft(poolId uint64, amount sdk.Coin) { pool, err := s.App.ConcentratedLiquidityKeeper.GetPoolById(s.Ctx, poolId) s.Require().NoError(err) @@ -152,7 +140,7 @@ func (s *SwapTickCrossTestSuite) swapZeroForOneLeft(poolId uint64, amount sdk.Co // swapOneForZeroRight swaps amount in the right (ofz) direction of the swap. // Asserts that no error is returned. -func (s *SwapTickCrossTestSuite) swapOneForZeroRight(poolId uint64, amount sdk.Coin) { +func (s *KeeperTestSuite) swapOneForZeroRight(poolId uint64, amount sdk.Coin) { pool, err := s.App.ConcentratedLiquidityKeeper.GetPoolById(s.Ctx, poolId) s.Require().NoError(err) @@ -167,7 +155,7 @@ func (s *SwapTickCrossTestSuite) swapOneForZeroRight(poolId uint64, amount sdk.C // t tick spacings away from the current tick. // // Returns the pool id and the narrow range position metadata. -func (s *SwapTickCrossTestSuite) setupPoolAndPositions(testTickSpacing uint64, positionTickSpacingsFromCurrTick []uint64, initialCoins sdk.Coins) (uint64, []positionMeta) { +func (s *KeeperTestSuite) setupPoolAndPositions(testTickSpacing uint64, positionTickSpacingsFromCurrTick []uint64, initialCoins sdk.Coins) (uint64, []positionMeta) { pool := s.PrepareCustomConcentratedPool(s.TestAccs[0], ETH, USDC, testTickSpacing, sdk.ZeroDec()) poolId := pool.GetId() @@ -203,7 +191,7 @@ func (s *SwapTickCrossTestSuite) setupPoolAndPositions(testTickSpacing uint64, p } // assertPoolLiquidityEquals a helper to assert that the liquidity of a pool is equal to the expected value. -func (s *SwapTickCrossTestSuite) assertPoolLiquidityEquals(poolId uint64, expectedLiquidity sdk.Dec) { +func (s *KeeperTestSuite) assertPoolLiquidityEquals(poolId uint64, expectedLiquidity sdk.Dec) { pool, err := s.App.ConcentratedLiquidityKeeper.GetPoolById(s.Ctx, poolId) s.Require().NoError(err) @@ -211,7 +199,7 @@ func (s *SwapTickCrossTestSuite) assertPoolLiquidityEquals(poolId uint64, expect } // assertPoolTickEquals a helper to assert that the current tick of a pool is equal to the expected value. -func (s *SwapTickCrossTestSuite) assertPoolTickEquals(poolId uint64, expectedTick int64) { +func (s *KeeperTestSuite) assertPoolTickEquals(poolId uint64, expectedTick int64) { pool, err := s.App.ConcentratedLiquidityKeeper.GetPoolById(s.Ctx, poolId) s.Require().NoError(err) @@ -227,7 +215,7 @@ func (s *SwapTickCrossTestSuite) assertPoolTickEquals(poolId uint64, expectedTic // bucket. // // Note, that this logic runs quote estimation. Our frontend logic runs a similar algorithm. -func (s *SwapTickCrossTestSuite) computeSwapAmounts(poolId uint64, curSqrtPrice sdk.Dec, expectedTickToSwapTo int64, isZeroForOne bool, shouldStayWithinTheSameBucket bool) (sdk.Dec, sdk.Dec, sdk.Dec) { +func (s *KeeperTestSuite) computeSwapAmounts(poolId uint64, curSqrtPrice sdk.Dec, expectedTickToSwapTo int64, isZeroForOne bool, shouldStayWithinTheSameBucket bool) (sdk.Dec, sdk.Dec, sdk.Dec) { pool, err := s.App.ConcentratedLiquidityKeeper.GetPoolById(s.Ctx, poolId) s.Require().NoError(err) @@ -388,7 +376,7 @@ func (s *SwapTickCrossTestSuite) computeSwapAmounts(poolId uint64, curSqrtPrice // tick we already crossed (be off by 1). As a result, inactive positions are treated as active // The solution is to avoid tick update if the swap state's tick is smaller than the tick computed // from the sqrt price. That is, if we already seen a further tick, we do not update it to an earlier one. -func (s *SwapTickCrossTestSuite) TestSwapOutGivenIn_Tick_Initialization_And_Crossing() { +func (s *KeeperTestSuite) TestSwapOutGivenIn_Tick_Initialization_And_Crossing() { s.Setup() // testCase defines the test case configuration @@ -884,7 +872,7 @@ func (s *SwapTickCrossTestSuite) TestSwapOutGivenIn_Tick_Initialization_And_Cros // when there are contiguous ticks initialized on a swap range in a pool with tick spacing of 1. // For position layout, see diagram above the definition of defaultTickSpacingsAway variable. // For specific test vectors, follow the table-driven names below. -func (s *SwapTickCrossTestSuite) TestSwapOutGivenIn_Contiguous_Initialized_TickSpacingOne() { +func (s *KeeperTestSuite) TestSwapOutGivenIn_Contiguous_Initialized_TickSpacingOne() { // defines an individual test case type continugousTestCase struct { // This defines how many ticks away from current the swap should reach @@ -1076,7 +1064,7 @@ func (s *SwapTickCrossTestSuite) TestSwapOutGivenIn_Contiguous_Initialized_TickS // TestSwapOutGivenIn_SwapToAllowedBoundaries tests edge case behavior of swapping // to min and max ticks. -func (s *SwapTickCrossTestSuite) TestSwapOutGivenIn_SwapToAllowedBoundaries() { +func (s *KeeperTestSuite) TestSwapOutGivenIn_SwapToAllowedBoundaries() { const shouldStayWithinTheSameBucket = false var ( @@ -1177,7 +1165,7 @@ func (s *SwapTickCrossTestSuite) TestSwapOutGivenIn_SwapToAllowedBoundaries() { // Then, it swaps to lower edge of one position and runs some assertion on the way // that liquidiy is calculated for that position as well as the adjacent position on the swap path. // It then repeats this for the other direction. -func (s *SwapTickCrossTestSuite) TestSwapOutGivenIn_GetLiquidityFromAmountsPositionBounds() { +func (s *KeeperTestSuite) TestSwapOutGivenIn_GetLiquidityFromAmountsPositionBounds() { s.SetupTest() // See definiton of defaultTickSpacingsAway for position layout diagram. From 88eeb275f7bdccd9dd0749c566558fc1b9c63c54 Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 23 Jun 2023 10:29:02 -0400 Subject: [PATCH 004/102] chore: remove tf bank hooks from v16.x (#5614) --- app/keepers/keepers.go | 5 - .../osmosis/tokenfactory/v1beta1/query.proto | 19 - proto/osmosis/tokenfactory/v1beta1/tx.proto | 27 +- x/tokenfactory/client/cli/query.go | 31 - x/tokenfactory/client/cli/tx.go | 33 +- x/tokenfactory/keeper/before_send.go | 133 ----- x/tokenfactory/keeper/before_send_test.go | 126 ---- x/tokenfactory/keeper/grpc_query.go | 8 - x/tokenfactory/keeper/msg_server.go | 28 - x/tokenfactory/types/codec.go | 2 - x/tokenfactory/types/msgs.go | 43 -- x/tokenfactory/types/query.pb.go | 463 ++------------- x/tokenfactory/types/query.pb.gw.go | 101 ---- x/tokenfactory/types/tx.pb.go | 545 ++---------------- 14 files changed, 106 insertions(+), 1458 deletions(-) delete mode 100644 x/tokenfactory/keeper/before_send.go delete mode 100644 x/tokenfactory/keeper/before_send_test.go diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index a602a98e888..97c97fcf085 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -676,11 +676,6 @@ func (appKeepers *AppKeepers) SetupHooks() { // e.g. *app.StakingKeeper doesn't appear // Recall that SetHooks is a mutative call. - appKeepers.BankKeeper.SetHooks( - banktypes.NewMultiBankHooks( - appKeepers.TokenFactoryKeeper.Hooks(), - ), - ) appKeepers.StakingKeeper.SetHooks( stakingtypes.NewMultiStakingHooks( diff --git a/proto/osmosis/tokenfactory/v1beta1/query.proto b/proto/osmosis/tokenfactory/v1beta1/query.proto index a7ccd584985..afc9f7f3c1c 100644 --- a/proto/osmosis/tokenfactory/v1beta1/query.proto +++ b/proto/osmosis/tokenfactory/v1beta1/query.proto @@ -32,14 +32,6 @@ service Query { option (google.api.http).get = "/osmosis/tokenfactory/v1beta1/denoms_from_creator/{creator}"; } - - // BeforeSendHookAddress defines a gRPC query method for - // getting the address registered for the before send hook. - rpc BeforeSendHookAddress(QueryBeforeSendHookAddressRequest) - returns (QueryBeforeSendHookAddressResponse) { - option (google.api.http).get = - "/osmosis/tokenfactory/v1beta1/denoms/{denom}/before_send_hook"; - } } // QueryParamsRequest is the request type for the Query/Params RPC method. @@ -77,14 +69,3 @@ message QueryDenomsFromCreatorRequest { message QueryDenomsFromCreatorResponse { repeated string denoms = 1 [ (gogoproto.moretags) = "yaml:\"denoms\"" ]; } - -message QueryBeforeSendHookAddressRequest { - string denom = 1 [ (gogoproto.moretags) = "yaml:\"denom\"" ]; -} - -// QueryBeforeSendHookAddressResponse defines the response structure for the -// DenomBeforeSendHook gRPC query. -message QueryBeforeSendHookAddressResponse { - string cosmwasm_address = 1 - [ (gogoproto.moretags) = "yaml:\"cosmwasm_address\"" ]; -} \ No newline at end of file diff --git a/proto/osmosis/tokenfactory/v1beta1/tx.proto b/proto/osmosis/tokenfactory/v1beta1/tx.proto index 99199660b92..5fabed3e301 100644 --- a/proto/osmosis/tokenfactory/v1beta1/tx.proto +++ b/proto/osmosis/tokenfactory/v1beta1/tx.proto @@ -16,8 +16,6 @@ service Msg { rpc ChangeAdmin(MsgChangeAdmin) returns (MsgChangeAdminResponse); rpc SetDenomMetadata(MsgSetDenomMetadata) returns (MsgSetDenomMetadataResponse); - rpc SetBeforeSendHook(MsgSetBeforeSendHook) - returns (MsgSetBeforeSendHookResponse); rpc ForceTransfer(MsgForceTransfer) returns (MsgForceTransferResponse); } @@ -91,18 +89,19 @@ message MsgChangeAdmin { // MsgChangeAdmin message. message MsgChangeAdminResponse {} -// MsgSetBeforeSendHook is the sdk.Msg type for allowing an admin account to -// assign a CosmWasm contract to call with a BeforeSend hook -message MsgSetBeforeSendHook { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - string denom = 2 [ (gogoproto.moretags) = "yaml:\"denom\"" ]; - string cosmwasm_address = 3 - [ (gogoproto.moretags) = "yaml:\"cosmwasm_address\"" ]; -} - -// MsgSetBeforeSendHookResponse defines the response structure for an executed -// MsgSetBeforeSendHook message. -message MsgSetBeforeSendHookResponse {} +// // MsgSetBeforeSendHook is the sdk.Msg type for allowing an admin account to +// // assign a CosmWasm contract to call with a BeforeSend hook +// message MsgSetBeforeSendHook { +// string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; +// string denom = 2 [ (gogoproto.moretags) = "yaml:\"denom\"" ]; +// string cosmwasm_address = 3 +// [ (gogoproto.moretags) = "yaml:\"cosmwasm_address\"" ]; +// } + +// // MsgSetBeforeSendHookResponse defines the response structure for an +// executed +// // MsgSetBeforeSendHook message. +// message MsgSetBeforeSendHookResponse {} // MsgSetDenomMetadata is the sdk.Msg type for allowing an admin account to set // the denom's bank metadata diff --git a/x/tokenfactory/client/cli/query.go b/x/tokenfactory/client/cli/query.go index 8a4fa71c049..95700a16713 100644 --- a/x/tokenfactory/client/cli/query.go +++ b/x/tokenfactory/client/cli/query.go @@ -4,8 +4,6 @@ import ( // "strings" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" // "github.com/cosmos/cosmos-sdk/client/flags" @@ -47,32 +45,3 @@ func GetCmdDenomsFromCreator() (*osmocli.QueryDescriptor, *types.QueryDenomsFrom {{.CommandPrefix}}
`, }, &types.QueryDenomsFromCreatorRequest{} } - -// GetCmdDenomAuthorityMetadata returns the authority metadata for a queried denom -func GetCmdDenomBeforeSendHook() *cobra.Command { - cmd := &cobra.Command{ - Use: "denom-before-send-hook [denom] [flags]", - Short: "Get the BeforeSend hook for a specific denom", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.BeforeSendHookAddress(cmd.Context(), &types.QueryBeforeSendHookAddressRequest{ - Denom: args[0], - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/tokenfactory/client/cli/tx.go b/x/tokenfactory/client/cli/tx.go index e962ee22123..994af760e8d 100644 --- a/x/tokenfactory/client/cli/tx.go +++ b/x/tokenfactory/client/cli/tx.go @@ -1,9 +1,6 @@ package cli import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cobra" // "github.com/cosmos/cosmos-sdk/client/flags" @@ -20,7 +17,7 @@ func GetTxCmd() *cobra.Command { NewBurnCmd(), // NewForceTransferCmd(), NewChangeAdminCmd(), - NewSetBeforeSendHookCmd(), + // NewSetBeforeSendHookCmd(), ) return cmd @@ -53,31 +50,3 @@ func NewChangeAdminCmd() *cobra.Command { Short: "Changes the admin address for a factory-created denom. Must have admin authority to do so.", }) } - -// NewChangeAdminCmd broadcast MsgChangeAdmin -func NewSetBeforeSendHookCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "set-beforesend-hook [denom] [cosmwasm-address] [flags]", - Short: "Set a cosmwasm contract to be the beforesend hook for a factory-created denom. Must have admin authority to do so.", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) - - msg := types.NewMsgSetBeforeSendHook( - clientCtx.GetFromAddress().String(), - args[0], - args[1], - ) - - return tx.GenerateOrBroadcastTxWithFactory(clientCtx, txf, msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - return cmd -} diff --git a/x/tokenfactory/keeper/before_send.go b/x/tokenfactory/keeper/before_send.go deleted file mode 100644 index 4423e09626e..00000000000 --- a/x/tokenfactory/keeper/before_send.go +++ /dev/null @@ -1,133 +0,0 @@ -package keeper - -import ( - "encoding/json" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/osmosis-labs/osmosis/v16/x/tokenfactory/types" - - errorsmod "cosmossdk.io/errors" - wasmvmtypes "github.com/CosmWasm/wasmvm/types" -) - -func (k Keeper) setBeforeSendHook(ctx sdk.Context, denom string, cosmwasmAddress string) error { - // verify that denom is an x/tokenfactory denom - _, _, err := types.DeconstructDenom(denom) - if err != nil { - return err - } - - store := k.GetDenomPrefixStore(ctx, denom) - - // delete the store for denom prefix store when cosmwasm address is nil - if cosmwasmAddress == "" { - store.Delete([]byte(types.BeforeSendHookAddressPrefixKey)) - return nil - } - - _, err = sdk.AccAddressFromBech32(cosmwasmAddress) - if err != nil { - return err - } - - store.Set([]byte(types.BeforeSendHookAddressPrefixKey), []byte(cosmwasmAddress)) - - return nil -} - -func (k Keeper) GetBeforeSendHook(ctx sdk.Context, denom string) string { - store := k.GetDenomPrefixStore(ctx, denom) - - bz := store.Get([]byte(types.BeforeSendHookAddressPrefixKey)) - if bz == nil { - return "" - } - - return string(bz) -} - -func CWCoinsFromSDKCoins(in sdk.Coins) wasmvmtypes.Coins { - var cwCoins wasmvmtypes.Coins - for _, coin := range in { - cwCoins = append(cwCoins, CWCoinFromSDKCoin(coin)) - } - return cwCoins -} - -func CWCoinFromSDKCoin(in sdk.Coin) wasmvmtypes.Coin { - return wasmvmtypes.Coin{ - Denom: in.GetDenom(), - Amount: in.Amount.String(), - } -} - -// Hooks wrapper struct for bank keeper -type Hooks struct { - k Keeper -} - -var _ types.BankHooks = Hooks{} - -// Return the wrapper struct -func (k Keeper) Hooks() Hooks { - return Hooks{k} -} - -// TrackBeforeSend calls the before send listener contract surpresses any errors -func (h Hooks) TrackBeforeSend(ctx sdk.Context, from, to sdk.AccAddress, amount sdk.Coins) { - _ = h.k.callBeforeSendListener(ctx, from, to, amount, false) -} - -// TrackBeforeSend calls the before send listener contract returns any errors -func (h Hooks) BlockBeforeSend(ctx sdk.Context, from, to sdk.AccAddress, amount sdk.Coins) error { - return h.k.callBeforeSendListener(ctx, from, to, amount, true) -} - -// callBeforeSendListener iterates over each coin and sends corresponding sudo msg to the contract address stored in state. -// If blockBeforeSend is true, sudoMsg wraps BlockBeforeSendMsg, otherwise sudoMsg wraps TrackBeforeSendMsg. -func (k Keeper) callBeforeSendListener(ctx sdk.Context, from, to sdk.AccAddress, amount sdk.Coins, blockBeforeSend bool) error { - for _, coin := range amount { - cosmwasmAddress := k.GetBeforeSendHook(ctx, coin.Denom) - if cosmwasmAddress != "" { - cwAddr, err := sdk.AccAddressFromBech32(cosmwasmAddress) - if err != nil { - return err - } - - var msgBz []byte - - // get msgBz, either BlockBeforeSend or TrackBeforeSend - if blockBeforeSend { - msg := types.BlockBeforeSendSudoMsg{ - BlockBeforeSend: types.BlockBeforeSendMsg{ - From: from.String(), - To: to.String(), - Amount: CWCoinFromSDKCoin(coin), - }, - } - msgBz, err = json.Marshal(msg) - } else { - msg := types.TrackBeforeSendSudoMsg{ - TrackBeforeSend: types.TrackBeforeSendMsg{ - From: from.String(), - To: to.String(), - Amount: CWCoinFromSDKCoin(coin), - }, - } - msgBz, err = json.Marshal(msg) - } - if err != nil { - return err - } - - em := sdk.NewEventManager() - - _, err = k.contractKeeper.Sudo(ctx.WithEventManager(em), cwAddr, msgBz) - if err != nil { - return errorsmod.Wrapf(err, "failed to call before send hook for denom %s", coin.Denom) - } - } - } - return nil -} diff --git a/x/tokenfactory/keeper/before_send_test.go b/x/tokenfactory/keeper/before_send_test.go deleted file mode 100644 index 96dc740e93e..00000000000 --- a/x/tokenfactory/keeper/before_send_test.go +++ /dev/null @@ -1,126 +0,0 @@ -package keeper_test - -import ( - "fmt" - "os" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/osmosis-labs/osmosis/v16/x/tokenfactory/types" - - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -type SendMsgTestCase struct { - desc string - msg func(denom string) *banktypes.MsgSend - expectPass bool -} - -func (s *KeeperTestSuite) TestBeforeSendHook() { - s.SkipIfWSL() - for _, tc := range []struct { - desc string - wasmFile string - sendMsgs []SendMsgTestCase - }{ - { - desc: "should not allow sending 100 amount of *any* denom", - wasmFile: "./testdata/no100.wasm", - sendMsgs: []SendMsgTestCase{ - { - desc: "sending 1 of factorydenom should not error", - msg: func(factorydenom string) *banktypes.MsgSend { - return banktypes.NewMsgSend( - s.TestAccs[0], - s.TestAccs[1], - sdk.NewCoins(sdk.NewInt64Coin(factorydenom, 1)), - ) - }, - expectPass: true, - }, - { - desc: "sending 100 of non-factorydenom should not error", - msg: func(factorydenom string) *banktypes.MsgSend { - return banktypes.NewMsgSend( - s.TestAccs[0], - s.TestAccs[1], - sdk.NewCoins(sdk.NewInt64Coin(factorydenom, 1)), - ) - }, - expectPass: true, - }, - { - desc: "sending 100 of factorydenom should not work", - msg: func(factorydenom string) *banktypes.MsgSend { - return banktypes.NewMsgSend( - s.TestAccs[0], - s.TestAccs[1], - sdk.NewCoins(sdk.NewInt64Coin(factorydenom, 100)), - ) - }, - expectPass: false, - }, - { - desc: "sending 100 of factorydenom should not work", - msg: func(factorydenom string) *banktypes.MsgSend { - return banktypes.NewMsgSend( - s.TestAccs[0], - s.TestAccs[1], - sdk.NewCoins(sdk.NewInt64Coin("foo", 100)), - ) - }, - expectPass: false, - }, - { - desc: "having 100 coin within coins should not work", - msg: func(factorydenom string) *banktypes.MsgSend { - return banktypes.NewMsgSend( - s.TestAccs[0], - s.TestAccs[1], - sdk.NewCoins(sdk.NewInt64Coin(factorydenom, 100), sdk.NewInt64Coin("foo", 1)), - ) - }, - expectPass: false, - }, - }, - }, - } { - s.Run(fmt.Sprintf("Case %s", tc.desc), func() { - // setup test - s.SetupTest() - - // upload and instantiate wasm code - wasmCode, err := os.ReadFile(tc.wasmFile) - s.Require().NoError(err, "test: %v", tc.desc) - codeID, _, err := s.contractKeeper.Create(s.Ctx, s.TestAccs[0], wasmCode, nil) - s.Require().NoError(err, "test: %v", tc.desc) - cosmwasmAddress, _, err := s.contractKeeper.Instantiate(s.Ctx, codeID, s.TestAccs[0], s.TestAccs[0], []byte("{}"), "", sdk.NewCoins()) - s.Require().NoError(err, "test: %v", tc.desc) - - // create new denom - res, err := s.msgServer.CreateDenom(sdk.WrapSDKContext(s.Ctx), types.NewMsgCreateDenom(s.TestAccs[0].String(), "bitcoin")) - s.Require().NoError(err, "test: %v", tc.desc) - denom := res.GetNewTokenDenom() - - // mint enough coins to the creator - _, err = s.msgServer.Mint(sdk.WrapSDKContext(s.Ctx), types.NewMsgMint(s.TestAccs[0].String(), sdk.NewInt64Coin(denom, 1000000000))) - s.Require().NoError(err) - // mint some non token factory denom coins for testing - s.FundAcc(sdk.AccAddress(s.TestAccs[0].String()), sdk.Coins{sdk.NewInt64Coin("foo", 100000000000)}) - - // set beforesend hook to the new denom - _, err = s.msgServer.SetBeforeSendHook(sdk.WrapSDKContext(s.Ctx), types.NewMsgSetBeforeSendHook(s.TestAccs[0].String(), denom, cosmwasmAddress.String())) - s.Require().NoError(err, "test: %v", tc.desc) - - for _, sendTc := range tc.sendMsgs { - _, err := s.bankMsgServer.Send(sdk.WrapSDKContext(s.Ctx), sendTc.msg(denom)) - if sendTc.expectPass { - s.Require().NoError(err, "test: %v", sendTc.desc) - } else { - s.Require().Error(err, "test: %v", sendTc.desc) - } - } - }) - } -} diff --git a/x/tokenfactory/keeper/grpc_query.go b/x/tokenfactory/keeper/grpc_query.go index afe2170702d..01bd5b39e37 100644 --- a/x/tokenfactory/keeper/grpc_query.go +++ b/x/tokenfactory/keeper/grpc_query.go @@ -33,11 +33,3 @@ func (k Keeper) DenomsFromCreator(ctx context.Context, req *types.QueryDenomsFro denoms := k.getDenomsFromCreator(sdkCtx, req.GetCreator()) return &types.QueryDenomsFromCreatorResponse{Denoms: denoms}, nil } - -func (k Keeper) BeforeSendHookAddress(ctx context.Context, req *types.QueryBeforeSendHookAddressRequest) (*types.QueryBeforeSendHookAddressResponse, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - - cosmwasmAddress := k.GetBeforeSendHook(sdkCtx, req.GetDenom()) - - return &types.QueryBeforeSendHookAddressResponse{CosmwasmAddress: cosmwasmAddress}, nil -} diff --git a/x/tokenfactory/keeper/msg_server.go b/x/tokenfactory/keeper/msg_server.go index 9965c216da2..f97395ce945 100644 --- a/x/tokenfactory/keeper/msg_server.go +++ b/x/tokenfactory/keeper/msg_server.go @@ -204,31 +204,3 @@ func (server msgServer) SetDenomMetadata(goCtx context.Context, msg *types.MsgSe return &types.MsgSetDenomMetadataResponse{}, nil } - -func (server msgServer) SetBeforeSendHook(goCtx context.Context, msg *types.MsgSetBeforeSendHook) (*types.MsgSetBeforeSendHookResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - authorityMetadata, err := server.Keeper.GetAuthorityMetadata(ctx, msg.Denom) - if err != nil { - return nil, err - } - - if msg.Sender != authorityMetadata.GetAdmin() { - return nil, types.ErrUnauthorized - } - - err = server.Keeper.setBeforeSendHook(ctx, msg.Denom, msg.CosmwasmAddress) - if err != nil { - return nil, err - } - - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.TypeMsgSetBeforeSendHook, - sdk.NewAttribute(types.AttributeDenom, msg.GetDenom()), - sdk.NewAttribute(types.AttributeBeforeSendHookAddress, msg.GetCosmwasmAddress()), - ), - }) - - return &types.MsgSetBeforeSendHookResponse{}, nil -} diff --git a/x/tokenfactory/types/codec.go b/x/tokenfactory/types/codec.go index 4945c0f1c83..a81bd58a5f6 100644 --- a/x/tokenfactory/types/codec.go +++ b/x/tokenfactory/types/codec.go @@ -16,7 +16,6 @@ func RegisterCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgBurn{}, "osmosis/tokenfactory/burn", nil) cdc.RegisterConcrete(&MsgForceTransfer{}, "osmosis/tokenfactory/force-transfer", nil) cdc.RegisterConcrete(&MsgChangeAdmin{}, "osmosis/tokenfactory/change-admin", nil) - cdc.RegisterConcrete(&MsgSetBeforeSendHook{}, "osmosis/tokenfactory/set-beforesend-hook", nil) } func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { @@ -27,7 +26,6 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgBurn{}, // &MsgForceTransfer{}, &MsgChangeAdmin{}, - &MsgSetBeforeSendHook{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } diff --git a/x/tokenfactory/types/msgs.go b/x/tokenfactory/types/msgs.go index 9ee67c9a5eb..dfd7b614015 100644 --- a/x/tokenfactory/types/msgs.go +++ b/x/tokenfactory/types/msgs.go @@ -263,46 +263,3 @@ func (m MsgSetDenomMetadata) GetSigners() []sdk.AccAddress { sender, _ := sdk.AccAddressFromBech32(m.Sender) return []sdk.AccAddress{sender} } - -var _ sdk.Msg = &MsgSetBeforeSendHook{} - -// NewMsgSetBeforeSendHook creates a message to set a new before send hook -func NewMsgSetBeforeSendHook(sender string, denom string, cosmwasmAddress string) *MsgSetBeforeSendHook { - return &MsgSetBeforeSendHook{ - Sender: sender, - Denom: denom, - CosmwasmAddress: cosmwasmAddress, - } -} - -func (m MsgSetBeforeSendHook) Route() string { return RouterKey } -func (m MsgSetBeforeSendHook) Type() string { return TypeMsgSetBeforeSendHook } -func (m MsgSetBeforeSendHook) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(m.Sender) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid sender address (%s)", err) - } - - if m.CosmwasmAddress != "" { - _, err = sdk.AccAddressFromBech32(m.CosmwasmAddress) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid cosmwasm contract address (%s)", err) - } - } - - _, _, err = DeconstructDenom(m.Denom) - if err != nil { - return ErrInvalidDenom - } - - return nil -} - -func (m MsgSetBeforeSendHook) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) -} - -func (m MsgSetBeforeSendHook) GetSigners() []sdk.AccAddress { - sender, _ := sdk.AccAddressFromBech32(m.Sender) - return []sdk.AccAddress{sender} -} diff --git a/x/tokenfactory/types/query.pb.go b/x/tokenfactory/types/query.pb.go index d5265a1dbac..e86e6f4c5ab 100644 --- a/x/tokenfactory/types/query.pb.go +++ b/x/tokenfactory/types/query.pb.go @@ -297,96 +297,6 @@ func (m *QueryDenomsFromCreatorResponse) GetDenoms() []string { return nil } -type QueryBeforeSendHookAddressRequest struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty" yaml:"denom"` -} - -func (m *QueryBeforeSendHookAddressRequest) Reset() { *m = QueryBeforeSendHookAddressRequest{} } -func (m *QueryBeforeSendHookAddressRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBeforeSendHookAddressRequest) ProtoMessage() {} -func (*QueryBeforeSendHookAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6f22013ad0f72e3f, []int{6} -} -func (m *QueryBeforeSendHookAddressRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBeforeSendHookAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBeforeSendHookAddressRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBeforeSendHookAddressRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBeforeSendHookAddressRequest.Merge(m, src) -} -func (m *QueryBeforeSendHookAddressRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryBeforeSendHookAddressRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBeforeSendHookAddressRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBeforeSendHookAddressRequest proto.InternalMessageInfo - -func (m *QueryBeforeSendHookAddressRequest) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -// QueryBeforeSendHookAddressResponse defines the response structure for the -// DenomBeforeSendHook gRPC query. -type QueryBeforeSendHookAddressResponse struct { - CosmwasmAddress string `protobuf:"bytes,1,opt,name=cosmwasm_address,json=cosmwasmAddress,proto3" json:"cosmwasm_address,omitempty" yaml:"cosmwasm_address"` -} - -func (m *QueryBeforeSendHookAddressResponse) Reset() { *m = QueryBeforeSendHookAddressResponse{} } -func (m *QueryBeforeSendHookAddressResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBeforeSendHookAddressResponse) ProtoMessage() {} -func (*QueryBeforeSendHookAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6f22013ad0f72e3f, []int{7} -} -func (m *QueryBeforeSendHookAddressResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryBeforeSendHookAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBeforeSendHookAddressResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryBeforeSendHookAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBeforeSendHookAddressResponse.Merge(m, src) -} -func (m *QueryBeforeSendHookAddressResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryBeforeSendHookAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBeforeSendHookAddressResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBeforeSendHookAddressResponse proto.InternalMessageInfo - -func (m *QueryBeforeSendHookAddressResponse) GetCosmwasmAddress() string { - if m != nil { - return m.CosmwasmAddress - } - return "" -} - func init() { proto.RegisterType((*QueryParamsRequest)(nil), "osmosis.tokenfactory.v1beta1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "osmosis.tokenfactory.v1beta1.QueryParamsResponse") @@ -394,8 +304,6 @@ func init() { proto.RegisterType((*QueryDenomAuthorityMetadataResponse)(nil), "osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse") proto.RegisterType((*QueryDenomsFromCreatorRequest)(nil), "osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest") proto.RegisterType((*QueryDenomsFromCreatorResponse)(nil), "osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse") - proto.RegisterType((*QueryBeforeSendHookAddressRequest)(nil), "osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest") - proto.RegisterType((*QueryBeforeSendHookAddressResponse)(nil), "osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse") } func init() { @@ -403,50 +311,43 @@ func init() { } var fileDescriptor_6f22013ad0f72e3f = []byte{ - // 674 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x4e, 0x13, 0x5f, - 0x14, 0xee, 0xfc, 0x7e, 0x52, 0xc3, 0xf5, 0x1f, 0x5c, 0xf1, 0x5f, 0xc5, 0xa9, 0x5c, 0x09, 0x01, - 0x83, 0x1d, 0x8b, 0xc4, 0x18, 0x91, 0x40, 0x07, 0x45, 0x13, 0x24, 0xd1, 0x71, 0xa5, 0x9b, 0xe6, - 0xb6, 0xbd, 0x94, 0x86, 0xce, 0x9c, 0x32, 0xf7, 0x16, 0x6d, 0x08, 0x1b, 0x17, 0xae, 0x4d, 0x5c, - 0xfa, 0x0e, 0x3e, 0x07, 0x4b, 0x12, 0x36, 0xae, 0x1a, 0x05, 0xe3, 0x03, 0xf4, 0x09, 0x4c, 0xef, - 0x3d, 0x45, 0xa0, 0x65, 0xd2, 0xe2, 0xaa, 0x93, 0x73, 0xbe, 0xf3, 0x9d, 0xef, 0xbb, 0xe7, 0x9c, - 0x94, 0x8c, 0x83, 0xf4, 0x41, 0x96, 0xa4, 0xa3, 0x60, 0x4d, 0x04, 0x2b, 0x3c, 0xaf, 0x20, 0xac, - 0x39, 0x1b, 0xe9, 0x9c, 0x50, 0x3c, 0xed, 0xac, 0x57, 0x45, 0x58, 0x4b, 0x55, 0x42, 0x50, 0x40, - 0x87, 0x11, 0x99, 0x3a, 0x8c, 0x4c, 0x21, 0x32, 0x31, 0x54, 0x84, 0x22, 0x68, 0xa0, 0xd3, 0xfc, - 0x32, 0x35, 0x89, 0xe1, 0x22, 0x40, 0xb1, 0x2c, 0x1c, 0x5e, 0x29, 0x39, 0x3c, 0x08, 0x40, 0x71, - 0x55, 0x82, 0x40, 0x62, 0xf6, 0x6e, 0x5e, 0x53, 0x3a, 0x39, 0x2e, 0x85, 0x69, 0x75, 0xd0, 0xb8, - 0xc2, 0x8b, 0xa5, 0x40, 0x83, 0x11, 0x3b, 0x1d, 0xa9, 0x93, 0x57, 0xd5, 0x2a, 0x84, 0x25, 0x55, - 0x5b, 0x16, 0x8a, 0x17, 0xb8, 0xe2, 0x58, 0x35, 0x11, 0x59, 0x55, 0xe1, 0x21, 0xf7, 0x51, 0x0c, - 0x1b, 0x22, 0xf4, 0x75, 0x53, 0xc2, 0x2b, 0x1d, 0xf4, 0xc4, 0x7a, 0x55, 0x48, 0xc5, 0xde, 0x92, - 0xcb, 0x47, 0xa2, 0xb2, 0x02, 0x81, 0x14, 0xd4, 0x25, 0x71, 0x53, 0x7c, 0xdd, 0xba, 0x6d, 0x8d, - 0x9f, 0x9b, 0x1a, 0x4d, 0x45, 0x3d, 0x4e, 0xca, 0x54, 0xbb, 0x67, 0xb6, 0xeb, 0xc9, 0x98, 0x87, - 0x95, 0xec, 0x25, 0x61, 0x9a, 0xfa, 0xa9, 0x08, 0xc0, 0xcf, 0x1c, 0x37, 0x80, 0x02, 0xe8, 0x18, - 0xe9, 0x2b, 0x34, 0x01, 0xba, 0x51, 0xbf, 0x3b, 0xd0, 0xa8, 0x27, 0xcf, 0xd7, 0xb8, 0x5f, 0x7e, - 0xcc, 0x74, 0x98, 0x79, 0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f, 0x9b, 0x07, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x30, 0xc1, 0xbe, 0x16, 0x77, 0x07, - 0x00, 0x00, + // 572 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4f, 0x6b, 0x13, 0x41, + 0x14, 0xcf, 0x68, 0x1b, 0xe9, 0xf8, 0x07, 0x33, 0x16, 0xd1, 0x50, 0x37, 0x3a, 0x96, 0x92, 0x4a, + 0xdd, 0x31, 0xb5, 0x88, 0x58, 0x45, 0xb3, 0x15, 0x3d, 0x68, 0x41, 0xf7, 0xa6, 0x97, 0x30, 0x49, + 0xa7, 0xdb, 0xc5, 0xec, 0xce, 0x76, 0x67, 0x52, 0x0c, 0xa5, 0x17, 0x0f, 0x9e, 0x05, 0x8f, 0x7e, + 0x07, 0x3f, 0x47, 0x8f, 0x85, 0x5e, 0x3c, 0x2d, 0x92, 0x14, 0x3f, 0x40, 0x3e, 0x81, 0xec, 0xcc, + 0x24, 0xb6, 0x6e, 0x5c, 0xa2, 0x9e, 0xb2, 0xcc, 0xfb, 0xbd, 0xdf, 0x9f, 0xf7, 0x1e, 0x81, 0x55, + 0x2e, 0x02, 0x2e, 0x7c, 0x41, 0x24, 0x7f, 0xc7, 0xc2, 0x4d, 0xda, 0x92, 0x3c, 0xee, 0x92, 0x9d, + 0x5a, 0x93, 0x49, 0x5a, 0x23, 0xdb, 0x1d, 0x16, 0x77, 0xed, 0x28, 0xe6, 0x92, 0xa3, 0x39, 0x83, + 0xb4, 0x8f, 0x23, 0x6d, 0x83, 0x2c, 0xcf, 0x7a, 0xdc, 0xe3, 0x0a, 0x48, 0xd2, 0x2f, 0xdd, 0x53, + 0x9e, 0xf3, 0x38, 0xf7, 0xda, 0x8c, 0xd0, 0xc8, 0x27, 0x34, 0x0c, 0xb9, 0xa4, 0xd2, 0xe7, 0xa1, + 0x30, 0xd5, 0x5b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 0xe7, + 0xcb, 0xad, 0x4e, 0xd3, 0x6e, 0xf1, 0x60, 0x28, 0x70, 0xbb, 0x4d, 0x9b, 0x62, 0xa4, 0xb6, 0x53, + 0xbb, 0x47, 0xde, 0x9f, 0xd4, 0x94, 0xdd, 0x88, 0x89, 0x66, 0x51, 0xfd, 0x9b, 0xdd, 0xfd, 0x19, + 0x00, 0x00, 0xff, 0xff, 0x2b, 0xb6, 0xd7, 0x5e, 0xd8, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -470,9 +371,6 @@ type QueryClient interface { // DenomsFromCreator defines a gRPC query method for fetching all // denominations created by a specific admin/creator. DenomsFromCreator(ctx context.Context, in *QueryDenomsFromCreatorRequest, opts ...grpc.CallOption) (*QueryDenomsFromCreatorResponse, error) - // BeforeSendHookAddress defines a gRPC query method for - // getting the address registered for the before send hook. - BeforeSendHookAddress(ctx context.Context, in *QueryBeforeSendHookAddressRequest, opts ...grpc.CallOption) (*QueryBeforeSendHookAddressResponse, error) } type queryClient struct { @@ -510,15 +408,6 @@ func (c *queryClient) DenomsFromCreator(ctx context.Context, in *QueryDenomsFrom return out, nil } -func (c *queryClient) BeforeSendHookAddress(ctx context.Context, in *QueryBeforeSendHookAddressRequest, opts ...grpc.CallOption) (*QueryBeforeSendHookAddressResponse, error) { - out := new(QueryBeforeSendHookAddressResponse) - err := c.cc.Invoke(ctx, "/osmosis.tokenfactory.v1beta1.Query/BeforeSendHookAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // QueryServer is the server API for Query service. type QueryServer interface { // Params defines a gRPC query method that returns the tokenfactory module's @@ -530,9 +419,6 @@ type QueryServer interface { // DenomsFromCreator defines a gRPC query method for fetching all // denominations created by a specific admin/creator. DenomsFromCreator(context.Context, *QueryDenomsFromCreatorRequest) (*QueryDenomsFromCreatorResponse, error) - // BeforeSendHookAddress defines a gRPC query method for - // getting the address registered for the before send hook. - BeforeSendHookAddress(context.Context, *QueryBeforeSendHookAddressRequest) (*QueryBeforeSendHookAddressResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -548,9 +434,6 @@ func (*UnimplementedQueryServer) DenomAuthorityMetadata(ctx context.Context, req func (*UnimplementedQueryServer) DenomsFromCreator(ctx context.Context, req *QueryDenomsFromCreatorRequest) (*QueryDenomsFromCreatorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DenomsFromCreator not implemented") } -func (*UnimplementedQueryServer) BeforeSendHookAddress(ctx context.Context, req *QueryBeforeSendHookAddressRequest) (*QueryBeforeSendHookAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BeforeSendHookAddress not implemented") -} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -610,24 +493,6 @@ func _Query_DenomsFromCreator_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Query_BeforeSendHookAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBeforeSendHookAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BeforeSendHookAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/osmosis.tokenfactory.v1beta1.Query/BeforeSendHookAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BeforeSendHookAddress(ctx, req.(*QueryBeforeSendHookAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "osmosis.tokenfactory.v1beta1.Query", HandlerType: (*QueryServer)(nil), @@ -644,10 +509,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "DenomsFromCreator", Handler: _Query_DenomsFromCreator_Handler, }, - { - MethodName: "BeforeSendHookAddress", - Handler: _Query_BeforeSendHookAddress_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "osmosis/tokenfactory/v1beta1/query.proto", @@ -834,66 +695,6 @@ func (m *QueryDenomsFromCreatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *QueryBeforeSendHookAddressRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBeforeSendHookAddressRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBeforeSendHookAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryBeforeSendHookAddressResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryBeforeSendHookAddressResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBeforeSendHookAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CosmwasmAddress) > 0 { - i -= len(m.CosmwasmAddress) - copy(dAtA[i:], m.CosmwasmAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.CosmwasmAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -977,32 +778,6 @@ func (m *QueryDenomsFromCreatorResponse) Size() (n int) { return n } -func (m *QueryBeforeSendHookAddressRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryBeforeSendHookAddressResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CosmwasmAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1471,170 +1246,6 @@ func (m *QueryDenomsFromCreatorResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBeforeSendHookAddressRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBeforeSendHookAddressRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBeforeSendHookAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryBeforeSendHookAddressResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryBeforeSendHookAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBeforeSendHookAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CosmwasmAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CosmwasmAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/tokenfactory/types/query.pb.gw.go b/x/tokenfactory/types/query.pb.gw.go index 5d75e90baf7..0b895e7062b 100644 --- a/x/tokenfactory/types/query.pb.gw.go +++ b/x/tokenfactory/types/query.pb.gw.go @@ -159,60 +159,6 @@ func local_request_Query_DenomsFromCreator_0(ctx context.Context, marshaler runt } -func request_Query_BeforeSendHookAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBeforeSendHookAddressRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") - } - - protoReq.Denom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) - } - - msg, err := client.BeforeSendHookAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_BeforeSendHookAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryBeforeSendHookAddressRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") - } - - protoReq.Denom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) - } - - msg, err := server.BeforeSendHookAddress(ctx, &protoReq) - return msg, metadata, err - -} - // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -288,29 +234,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_BeforeSendHookAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_BeforeSendHookAddress_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BeforeSendHookAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -412,26 +335,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_BeforeSendHookAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_BeforeSendHookAddress_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_BeforeSendHookAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -441,8 +344,6 @@ var ( pattern_Query_DenomAuthorityMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "tokenfactory", "v1beta1", "denoms", "denom", "authority_metadata"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_DenomsFromCreator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"osmosis", "tokenfactory", "v1beta1", "denoms_from_creator", "creator"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_BeforeSendHookAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "tokenfactory", "v1beta1", "denoms", "denom", "before_send_hook"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -451,6 +352,4 @@ var ( forward_Query_DenomAuthorityMetadata_0 = runtime.ForwardResponseMessage forward_Query_DenomsFromCreator_0 = runtime.ForwardResponseMessage - - forward_Query_BeforeSendHookAddress_0 = runtime.ForwardResponseMessage ) diff --git a/x/tokenfactory/types/tx.pb.go b/x/tokenfactory/types/tx.pb.go index 15aa52c066d..4eda152540d 100644 --- a/x/tokenfactory/types/tx.pb.go +++ b/x/tokenfactory/types/tx.pb.go @@ -435,106 +435,6 @@ func (m *MsgChangeAdminResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgChangeAdminResponse proto.InternalMessageInfo -// MsgSetBeforeSendHook is the sdk.Msg type for allowing an admin account to -// assign a CosmWasm contract to call with a BeforeSend hook -type MsgSetBeforeSendHook struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty" yaml:"denom"` - CosmwasmAddress string `protobuf:"bytes,3,opt,name=cosmwasm_address,json=cosmwasmAddress,proto3" json:"cosmwasm_address,omitempty" yaml:"cosmwasm_address"` -} - -func (m *MsgSetBeforeSendHook) Reset() { *m = MsgSetBeforeSendHook{} } -func (m *MsgSetBeforeSendHook) String() string { return proto.CompactTextString(m) } -func (*MsgSetBeforeSendHook) ProtoMessage() {} -func (*MsgSetBeforeSendHook) Descriptor() ([]byte, []int) { - return fileDescriptor_283b6c9a90a846b4, []int{8} -} -func (m *MsgSetBeforeSendHook) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSetBeforeSendHook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSetBeforeSendHook.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSetBeforeSendHook) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSetBeforeSendHook.Merge(m, src) -} -func (m *MsgSetBeforeSendHook) XXX_Size() int { - return m.Size() -} -func (m *MsgSetBeforeSendHook) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSetBeforeSendHook.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSetBeforeSendHook proto.InternalMessageInfo - -func (m *MsgSetBeforeSendHook) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *MsgSetBeforeSendHook) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *MsgSetBeforeSendHook) GetCosmwasmAddress() string { - if m != nil { - return m.CosmwasmAddress - } - return "" -} - -// MsgSetBeforeSendHookResponse defines the response structure for an executed -// MsgSetBeforeSendHook message. -type MsgSetBeforeSendHookResponse struct { -} - -func (m *MsgSetBeforeSendHookResponse) Reset() { *m = MsgSetBeforeSendHookResponse{} } -func (m *MsgSetBeforeSendHookResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSetBeforeSendHookResponse) ProtoMessage() {} -func (*MsgSetBeforeSendHookResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_283b6c9a90a846b4, []int{9} -} -func (m *MsgSetBeforeSendHookResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSetBeforeSendHookResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSetBeforeSendHookResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSetBeforeSendHookResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSetBeforeSendHookResponse.Merge(m, src) -} -func (m *MsgSetBeforeSendHookResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSetBeforeSendHookResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSetBeforeSendHookResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSetBeforeSendHookResponse proto.InternalMessageInfo - // MsgSetDenomMetadata is the sdk.Msg type for allowing an admin account to set // the denom's bank metadata type MsgSetDenomMetadata struct { @@ -546,7 +446,7 @@ func (m *MsgSetDenomMetadata) Reset() { *m = MsgSetDenomMetadata{} } func (m *MsgSetDenomMetadata) String() string { return proto.CompactTextString(m) } func (*MsgSetDenomMetadata) ProtoMessage() {} func (*MsgSetDenomMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_283b6c9a90a846b4, []int{10} + return fileDescriptor_283b6c9a90a846b4, []int{8} } func (m *MsgSetDenomMetadata) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -598,7 +498,7 @@ func (m *MsgSetDenomMetadataResponse) Reset() { *m = MsgSetDenomMetadata func (m *MsgSetDenomMetadataResponse) String() string { return proto.CompactTextString(m) } func (*MsgSetDenomMetadataResponse) ProtoMessage() {} func (*MsgSetDenomMetadataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_283b6c9a90a846b4, []int{11} + return fileDescriptor_283b6c9a90a846b4, []int{9} } func (m *MsgSetDenomMetadataResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -638,7 +538,7 @@ func (m *MsgForceTransfer) Reset() { *m = MsgForceTransfer{} } func (m *MsgForceTransfer) String() string { return proto.CompactTextString(m) } func (*MsgForceTransfer) ProtoMessage() {} func (*MsgForceTransfer) Descriptor() ([]byte, []int) { - return fileDescriptor_283b6c9a90a846b4, []int{12} + return fileDescriptor_283b6c9a90a846b4, []int{10} } func (m *MsgForceTransfer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -702,7 +602,7 @@ func (m *MsgForceTransferResponse) Reset() { *m = MsgForceTransferRespon func (m *MsgForceTransferResponse) String() string { return proto.CompactTextString(m) } func (*MsgForceTransferResponse) ProtoMessage() {} func (*MsgForceTransferResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_283b6c9a90a846b4, []int{13} + return fileDescriptor_283b6c9a90a846b4, []int{11} } func (m *MsgForceTransferResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -740,8 +640,6 @@ func init() { proto.RegisterType((*MsgBurnResponse)(nil), "osmosis.tokenfactory.v1beta1.MsgBurnResponse") proto.RegisterType((*MsgChangeAdmin)(nil), "osmosis.tokenfactory.v1beta1.MsgChangeAdmin") proto.RegisterType((*MsgChangeAdminResponse)(nil), "osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse") - proto.RegisterType((*MsgSetBeforeSendHook)(nil), "osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook") - proto.RegisterType((*MsgSetBeforeSendHookResponse)(nil), "osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse") proto.RegisterType((*MsgSetDenomMetadata)(nil), "osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata") proto.RegisterType((*MsgSetDenomMetadataResponse)(nil), "osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse") proto.RegisterType((*MsgForceTransfer)(nil), "osmosis.tokenfactory.v1beta1.MsgForceTransfer") @@ -753,61 +651,57 @@ func init() { } var fileDescriptor_283b6c9a90a846b4 = []byte{ - // 863 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xbf, 0x6f, 0xdb, 0x46, - 0x14, 0x36, 0x93, 0xd4, 0x75, 0x2e, 0x75, 0x25, 0xd1, 0x6e, 0xa2, 0x30, 0x0a, 0x99, 0x1e, 0x90, - 0xa0, 0x2d, 0x2a, 0x12, 0x72, 0x8b, 0xa0, 0xd5, 0xd4, 0x28, 0x85, 0x90, 0xa1, 0x5a, 0x18, 0x4f, - 0x45, 0x00, 0xe1, 0x24, 0x9d, 0x18, 0x42, 0xe1, 0x9d, 0xcb, 0x3b, 0x45, 0xf1, 0x56, 0xa0, 0x5b, - 0xa7, 0x0e, 0xf9, 0x27, 0xb2, 0xb5, 0xff, 0x40, 0xe7, 0x8c, 0x19, 0x3b, 0x11, 0x81, 0x0d, 0xb4, - 0x3b, 0xff, 0x82, 0xe2, 0x7e, 0x90, 0x12, 0x29, 0xc1, 0x92, 0x86, 0xc0, 0x8b, 0x61, 0xde, 0x7d, - 0xdf, 0x77, 0xef, 0x7b, 0xf7, 0xde, 0x3b, 0x81, 0xfb, 0x94, 0x45, 0x94, 0x85, 0xcc, 0xe3, 0x74, - 0x82, 0xc9, 0x18, 0x0d, 0x39, 0x8d, 0x4f, 0xbd, 0x97, 0xad, 0x01, 0xe6, 0xa8, 0xe5, 0xf1, 0x57, - 0xee, 0x49, 0x4c, 0x39, 0x35, 0x1b, 0x1a, 0xe6, 0x2e, 0xc2, 0x5c, 0x0d, 0xb3, 0x0e, 0x03, 0x1a, - 0x50, 0x09, 0xf4, 0xc4, 0x7f, 0x8a, 0x63, 0xd5, 0x50, 0x14, 0x12, 0xea,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e9, 0x49, 0xab, 0x6e, 0x35, 0x70, 0x60, 0x4b, 0xed, + 0xd2, 0x99, 0x5b, 0x27, 0xc9, 0x87, 0x7d, 0x51, 0xde, 0xb1, 0x2f, 0x7b, 0x17, 0x23, 0xbd, 0x3a, + 0x87, 0xa4, 0x3e, 0xc7, 0xff, 0x81, 0xf9, 0xf7, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x3e, + 0x9e, 0xa1, 0x70, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -827,7 +721,6 @@ type MsgClient interface { Burn(ctx context.Context, in *MsgBurn, opts ...grpc.CallOption) (*MsgBurnResponse, error) ChangeAdmin(ctx context.Context, in *MsgChangeAdmin, opts ...grpc.CallOption) (*MsgChangeAdminResponse, error) SetDenomMetadata(ctx context.Context, in *MsgSetDenomMetadata, opts ...grpc.CallOption) (*MsgSetDenomMetadataResponse, error) - SetBeforeSendHook(ctx context.Context, in *MsgSetBeforeSendHook, opts ...grpc.CallOption) (*MsgSetBeforeSendHookResponse, error) ForceTransfer(ctx context.Context, in *MsgForceTransfer, opts ...grpc.CallOption) (*MsgForceTransferResponse, error) } @@ -884,15 +777,6 @@ func (c *msgClient) SetDenomMetadata(ctx context.Context, in *MsgSetDenomMetadat return out, nil } -func (c *msgClient) SetBeforeSendHook(ctx context.Context, in *MsgSetBeforeSendHook, opts ...grpc.CallOption) (*MsgSetBeforeSendHookResponse, error) { - out := new(MsgSetBeforeSendHookResponse) - err := c.cc.Invoke(ctx, "/osmosis.tokenfactory.v1beta1.Msg/SetBeforeSendHook", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *msgClient) ForceTransfer(ctx context.Context, in *MsgForceTransfer, opts ...grpc.CallOption) (*MsgForceTransferResponse, error) { out := new(MsgForceTransferResponse) err := c.cc.Invoke(ctx, "/osmosis.tokenfactory.v1beta1.Msg/ForceTransfer", in, out, opts...) @@ -909,7 +793,6 @@ type MsgServer interface { Burn(context.Context, *MsgBurn) (*MsgBurnResponse, error) ChangeAdmin(context.Context, *MsgChangeAdmin) (*MsgChangeAdminResponse, error) SetDenomMetadata(context.Context, *MsgSetDenomMetadata) (*MsgSetDenomMetadataResponse, error) - SetBeforeSendHook(context.Context, *MsgSetBeforeSendHook) (*MsgSetBeforeSendHookResponse, error) ForceTransfer(context.Context, *MsgForceTransfer) (*MsgForceTransferResponse, error) } @@ -932,9 +815,6 @@ func (*UnimplementedMsgServer) ChangeAdmin(ctx context.Context, req *MsgChangeAd func (*UnimplementedMsgServer) SetDenomMetadata(ctx context.Context, req *MsgSetDenomMetadata) (*MsgSetDenomMetadataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetDenomMetadata not implemented") } -func (*UnimplementedMsgServer) SetBeforeSendHook(ctx context.Context, req *MsgSetBeforeSendHook) (*MsgSetBeforeSendHookResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetBeforeSendHook not implemented") -} func (*UnimplementedMsgServer) ForceTransfer(ctx context.Context, req *MsgForceTransfer) (*MsgForceTransferResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ForceTransfer not implemented") } @@ -1033,24 +913,6 @@ func _Msg_SetDenomMetadata_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -func _Msg_SetBeforeSendHook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSetBeforeSendHook) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SetBeforeSendHook(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/osmosis.tokenfactory.v1beta1.Msg/SetBeforeSendHook", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetBeforeSendHook(ctx, req.(*MsgSetBeforeSendHook)) - } - return interceptor(ctx, in, info, handler) -} - func _Msg_ForceTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgForceTransfer) if err := dec(in); err != nil { @@ -1093,10 +955,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "SetDenomMetadata", Handler: _Msg_SetDenomMetadata_Handler, }, - { - MethodName: "SetBeforeSendHook", - Handler: _Msg_SetBeforeSendHook_Handler, - }, { MethodName: "ForceTransfer", Handler: _Msg_ForceTransfer_Handler, @@ -1380,73 +1238,6 @@ func (m *MsgChangeAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgSetBeforeSendHook) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSetBeforeSendHook) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSetBeforeSendHook) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CosmwasmAddress) > 0 { - i -= len(m.CosmwasmAddress) - copy(dAtA[i:], m.CosmwasmAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.CosmwasmAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintTx(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x12 - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgSetBeforeSendHookResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSetBeforeSendHookResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSetBeforeSendHookResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func (m *MsgSetDenomMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1714,36 +1505,6 @@ func (m *MsgChangeAdminResponse) Size() (n int) { return n } -func (m *MsgSetBeforeSendHook) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.CosmwasmAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgSetBeforeSendHookResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *MsgSetDenomMetadata) Size() (n int) { if m == nil { return 0 @@ -2592,202 +2353,6 @@ func (m *MsgChangeAdminResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSetBeforeSendHook) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSetBeforeSendHook: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSetBeforeSendHook: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CosmwasmAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CosmwasmAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSetBeforeSendHookResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSetBeforeSendHookResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSetBeforeSendHookResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *MsgSetDenomMetadata) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From c8c008b8314165c27093f3132a60d7728e0b6e9f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 11:00:39 -0400 Subject: [PATCH 005/102] Improve build Github Actions (#5603) (#5618) (cherry picked from commit 362af3158430c11963df78e44a0abf5dfe03690a) Co-authored-by: Niccolo Raspa <6024049+niccoloraspa@users.noreply.github.com> --- .github/workflows/build.yml | 58 +++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 307e57b0c5e..024a82b4105 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,31 +1,46 @@ -name: Compile Osmosis +# This workflow builds the osmosisd binary for amd64 and arm64 on Darwin and Linux. +# +# This workflow runs: +# - on pushes to main +# - on every pull requests +# - when manually triggered +# +# Caching strategy +# This code will store the Go modules cache based on the hash of your go.sum file, +# ensuring that the cache will be invalidated when your dependencies change. +# The cache will be stored on a per-branch basis, which should prevent cache pollution issues between different branches. + +name: Build Osmosis -# Controls when the action will run. -# This workflow runr on pushes to master & every Pull Requests. (Or when manually triggered) on: pull_request: + branches: + - "**" push: branches: - - main + - "main" + - "v[0-9]**" workflow_dispatch: -# This workflow makes x86_64 binaries for mac, windows, and linux. jobs: build: + name: osmosisd-${{ matrix.targetos }}-${{ matrix.arch }} runs-on: ubuntu-latest + strategy: matrix: - arch: [amd64] + arch: [amd64, arm64] targetos: [darwin, linux] include: - targetos: darwin arch: arm64 -# include: -# - targetos: windows -# arch: amd64 - name: osmosis ${{ matrix.arch }} for ${{ matrix.targetos }} + steps: - - uses: actions/checkout@v3 + # Checkout the code + - name: Checkout code + uses: actions/checkout@v3 + + # Get the git diff for the specified patterns - name: Get git diff uses: technote-space/get-diff-action@v6.1.2 with: @@ -35,8 +50,18 @@ jobs: go.mod go.sum Makefile - - - name: 🐿 Setup Golang + + # Cache the Go modules + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + # Setup Golang environment + - name: Setup Golang uses: actions/setup-go@v4 with: go-version: '^1.20' @@ -45,6 +70,7 @@ jobs: GOARCH: ${{ matrix.arch }} if: env.GIT_DIFF + # Compile Osmosis if there is a GIT_DIFF - name: Compile osmosis run: | go mod download @@ -52,8 +78,10 @@ jobs: GOWRK=off go build . if: env.GIT_DIFF - - uses: actions/upload-artifact@v3 + # Upload the compiled artifact if there is a GIT_DIFF + - name: Upload osmosisd artifact + uses: actions/upload-artifact@v3 with: - name: osmosisd ${{ matrix.targetos }} ${{ matrix.arch }} + name: osmosisd-${{ matrix.targetos }}-${{ matrix.arch }} path: cmd/osmosisd/osmosisd if: env.GIT_DIFF From da7005720d6310462b17698ab6d6b23d0a05bce8 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 18:31:50 +0200 Subject: [PATCH 006/102] [ci] Paralleze go tests github actions (#5602) (#5619) * Paralleze go tests * Speculative execution of go-split-test-files to save time * Revert "Speculative execution of go-split-test-files to save time" This reverts commit ca5ea6f20f4e23ba2e6af68db85295fb6f4d9540. (cherry picked from commit 35f54cb9b3b398176bfdbaf6c2fdb7dad1a5e2da) Co-authored-by: Niccolo Raspa <6024049+niccoloraspa@users.noreply.github.com> --- .github/workflows/test.yml | 165 ++++++++++++++++++++++++------------- 1 file changed, 109 insertions(+), 56 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5f983eaa7e1..1cee9a57f83 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,12 +12,14 @@ on: workflow_dispatch: jobs: - go: + get_diff: runs-on: ubuntu-latest steps: - - name: Check out repository code + - + name: Check out repository code uses: actions/checkout@v3 - - name: Get git diff + - + name: Get git diff uses: technote-space/get-diff-action@v6.1.2 with: PATTERNS: | @@ -28,110 +30,161 @@ jobs: Makefile Dockerfile .github/workflows/test.yml - - name: 🐿 Setup Golang + outputs: + git_diff: ${{ env.GIT_DIFF }} + + go-split-test-files: + needs: get_diff + if: needs.get_diff.outputs.git_diff + runs-on: ubuntu-latest + steps: + - + name: Check out repository code + uses: actions/checkout@v3 + - + name: 🐿 Setup Golang uses: actions/setup-go@v4 - if: env.GIT_DIFF with: go-version: "^1.20" - - name: Display go version - if: env.GIT_DIFF + - + name: Create a file with all core Cosmos SDK pkgs + run: go list ./... ./osmomath/... ./osmoutils/... ./x/ibc-hooks/... ./x/epochs | grep -E -v 'tests/simulator|e2e' > pkgs.txt + - + name: Split pkgs into 4 files + run: split -d -n l/4 pkgs.txt pkgs.txt.part. + - + uses: actions/upload-artifact@v3 + with: + name: "${{ github.sha }}-00" + path: ./pkgs.txt.part.00 + - + uses: actions/upload-artifact@v3 + with: + name: "${{ github.sha }}-01" + path: ./pkgs.txt.part.01 + - + uses: actions/upload-artifact@v3 + with: + name: "${{ github.sha }}-02" + path: ./pkgs.txt.part.02 + - + uses: actions/upload-artifact@v3 + with: + name: "${{ github.sha }}-03" + path: ./pkgs.txt.part.03 + + go: + needs: [go-split-test-files, get_diff] + if: needs.get_diff.outputs.git_diff + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + part: ["00", "01", "02", "03"] + steps: + - + name: Check out repository code + uses: actions/checkout@v3 + - + name: 🐿 Setup Golang + uses: actions/setup-go@v4 + with: + go-version: "^1.20" + - + name: Display go version run: go version - - name: Get data from build cache - if: env.GIT_DIFF + - + name: Get data from build cache uses: actions/cache@v3 with: - # In order: - # * Module download cache - # * Build cache (Linux) - # * Build cache (Mac) - # * Build cache (Windows) path: | ~/go/pkg/mod ~/.cache/go-build ~/Library/Caches/go-build ~\AppData\Local\go-build - key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | - ${{ runner.os }}-go-${{ matrix.go-version }}- - - name: Run unit tests - if: env.GIT_DIFF - run: make test-unit + ${{ runner.os }}-go- + - + uses: actions/download-artifact@v3 + with: + name: "${{ github.sha }}-${{ matrix.part }}" + - + name: Test & coverage report creation + run: | + VERSION=$(echo $(git describe --tags) | sed 's/^v//') || VERSION=${GITHUB_SHA} + TESTS=$(cat pkgs.txt.part.${{ matrix.part }}) + + VERSION=$VERSION SKIP_WASM_WSL_TESTS="false" go test -mod=readonly -tags='ledger test_ledger_mock norace' $TESTS e2e: + needs: get_diff + if: needs.get_diff.outputs.git_diff runs-on: ubuntu-latest timeout-minutes: 25 steps: - - name: 🐿 Setup Golang - uses: actions/setup-go@v4 - with: - go-version: "^1.20" - - name: Check out repository code + - + name: Check out repository code uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Get git diff - uses: technote-space/get-diff-action@v6.1.2 + - + name: 🐿 Setup Golang + uses: actions/setup-go@v4 with: - PATTERNS: | - **/**.wasm - **/**!(test).go - tests/**/**.go - go.mod - go.sum - Makefile - Dockerfile - - name: Get data from build cache + go-version: "^1.20" + - + name: Get data from build cache uses: actions/cache@v3 with: - # In order: - # * Module download cache - # * Build cache (Linux) - # * Build cache (Mac) - # * Build cache (Windows) path: | ~/go/pkg/mod ~/.cache/go-build ~/Library/Caches/go-build ~\AppData\Local\go-build - key: ${{ runner.os }}-go-docker-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + key: ${{ runner.os }}-go-docker-${{ hashFiles('**/go.sum') }} restore-keys: | - ${{ runner.os }}-go-docker-${{ matrix.go-version }}- - if: env.GIT_DIFF - - name: Set up QEMU + ${{ runner.os }}-go-docker- + - + name: Set up QEMU uses: docker/setup-qemu-action@v2 - if: env.GIT_DIFF - - name: Set up Docker Buildx + - + name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - if: env.GIT_DIFF - - name: Build e2e image + - + name: Build e2e image uses: docker/build-push-action@v4 with: load: true context: . tags: osmosis:debug - # Use experimental Cache backend API: https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#cache-backend-api + # Use experimental Cache backend API: + # https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#cache-backend-api cache-from: type=gha cache-to: type=gha,mode=max build-args: | BASE_IMG_TAG=debug - if: env.GIT_DIFF - - name: Test e2e and Upgrade + - + name: Test e2e and Upgrade run: make test-e2e-ci - if: env.GIT_DIFF - - name: Dump docker logs on failure + - + name: Dump docker logs on failure if: failure() uses: jwalton/gh-docker-logs@v2 with: dest: "./logs" - - name: Tar logs + - + name: Tar logs if: failure() run: tar cvzf ./logs.tgz ./logs - - name: Upload logs to GitHub + - + name: Upload logs to GitHub uses: actions/upload-artifact@v3 with: name: logs.tgz path: ./logs.tgz if: failure() - - name: 🧹 Clean up Osmosis Home + - + name: 🧹 Clean up Osmosis Home if: always() run: rm -rf $HOME/.osmosisd/ || true From e852b3298cbf102528385355a187c9a3c8d06d06 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 19:52:00 +0200 Subject: [PATCH 007/102] Ci improvements/remove double caching (#5620) (#5622) * Remove double caching from test github action * Remove double caching from build github action + separate go mod download * Update get-diff patterns in build action * remove duplicate caching in update-go-import github action * Rename github action * remove duplicate caching in test-e2e-makefile * remove duplicate caching in lint (cherry picked from commit 24f580da12272205fab04afbd97c7a87f5b7dc56) Co-authored-by: Niccolo Raspa <6024049+niccoloraspa@users.noreply.github.com> --- .github/workflows/build.yml | 53 ++++++++----------- .github/workflows/lint.yml | 49 ++++++++--------- .github/workflows/test-e2e-makefile.yml | 46 ++++++++-------- .github/workflows/test.yml | 33 +++--------- ...t_paths.yml => update-go-import-paths.yml} | 27 +++------- 5 files changed, 78 insertions(+), 130 deletions(-) rename .github/workflows/{import_paths.yml => update-go-import-paths.yml} (74%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 024a82b4105..9ae10708ee5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ # ensuring that the cache will be invalidated when your dependencies change. # The cache will be stored on a per-branch basis, which should prevent cache pollution issues between different branches. -name: Build Osmosis +name: Build osmosisd on: pull_request: @@ -22,6 +22,9 @@ on: - "v[0-9]**" workflow_dispatch: +env: + GO_VERSION: '1.20.5' + jobs: build: name: osmosisd-${{ matrix.targetos }}-${{ matrix.arch }} @@ -36,52 +39,42 @@ jobs: arch: arm64 steps: - # Checkout the code - - name: Checkout code + - + name: Check out repository code uses: actions/checkout@v3 - - # Get the git diff for the specified patterns - - name: Get git diff + - + name: Get git diff uses: technote-space/get-diff-action@v6.1.2 with: PATTERNS: | **/**.wasm - **/**!(test).go + **/**.go go.mod go.sum Makefile - - # Cache the Go modules - - name: Cache Go modules - uses: actions/cache@v2 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - # Setup Golang environment - - name: Setup Golang + .github/workflows/build.yml + - + name: 🐿 Setup Golang uses: actions/setup-go@v4 + if: env.GIT_DIFF with: - go-version: '^1.20' + go-version: ${{env.GO_VERSION}} env: GOOS: ${{ matrix.targetos }} GOARCH: ${{ matrix.arch }} + - + name: Download Dependencies + if: env.GIT_DIFF + run: go mod download + - + name: Build osmosisd if: env.GIT_DIFF - - # Compile Osmosis if there is a GIT_DIFF - - name: Compile osmosis run: | - go mod download - cd cmd/osmosisd - GOWRK=off go build . + GOWRK=off go build cmd/osmosisd/main.go + - + name: Upload osmosisd artifact if: env.GIT_DIFF - - # Upload the compiled artifact if there is a GIT_DIFF - - name: Upload osmosisd artifact uses: actions/upload-artifact@v3 with: name: osmosisd-${{ matrix.targetos }}-${{ matrix.arch }} path: cmd/osmosisd/osmosisd - if: env.GIT_DIFF diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0d82d05b3b5..bd5615a93a2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,18 +6,25 @@ on: - main - concentrated-liquidity-main +env: + GO_VERSION: '1.20.5' + jobs: golangci: name: Run golangci-lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - + - + name: Check out repository code + uses: actions/checkout@v3 + - name: 🐿 Setup Golang uses: actions/setup-go@v4 with: - go-version: '^1.20' - - uses: technote-space/get-diff-action@v6.1.2 + go-version: ${{env.GO_VERSION}} + - + uses: technote-space/get-diff-action@v6.1.2 + if: env.GIT_DIFF with: PATTERNS: | **/**.go @@ -25,46 +32,32 @@ jobs: go.sum .github/** Makefile - - name: Get data from build cache - uses: actions/cache@v3 - with: - # In order: - # * Module download cache - # * Linter cache (Linux) - # * Build cache (Linux) - # * Build cache (Mac) - # * Build cache (Windows) - path: | - ~/go/pkg/mod - ~/.cache/golangci-lint - ~/.cache/go-build - ~/Library/Caches/go-build - ~\AppData\Local\go-build - key: ${{ runner.os }}-go-linter-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-linter-${{ matrix.go-version }}- + - + name: Run golangci-lint if: env.GIT_DIFF - - name: Run golangci-lint run: make lint - if: env.GIT_DIFF documentation-linter: name: Run super-linter runs-on: ubuntu-latest steps: - - name: Checkout Code + - + name: Check out repository code uses: actions/checkout@v3 with: # Full git history is needed to get a proper list of changed files # within `super-linter`. fetch-depth: 0 - - uses: technote-space/get-diff-action@v6.1.2 + - + name: Get git diff + uses: technote-space/get-diff-action@v6.1.2 with: PATTERNS: | **/**.md go.mod go.sum Makefile - - name: Run documentation linter - run: make mdlint + - + name: Run documentation linter if: env.GIT_DIFF + run: make mdlint diff --git a/.github/workflows/test-e2e-makefile.yml b/.github/workflows/test-e2e-makefile.yml index b8ef0805c51..29af8effffd 100644 --- a/.github/workflows/test-e2e-makefile.yml +++ b/.github/workflows/test-e2e-makefile.yml @@ -4,20 +4,27 @@ on: push: branches: - "main" + +env: + GO_VERSION: '1.20.5' + jobs: e2e: runs-on: ubuntu-latest timeout-minutes: 25 steps: - - name: 🐿 Setup Golang + - + name: 🐿 Setup Golang uses: actions/setup-go@v4 with: - go-version: "^1.20" - - name: Check out repository code + go-version: ${{env.GO_VERSION}} + - + name: Check out repository code uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Get git diff + - + name: Get git diff uses: technote-space/get-diff-action@v6.1.2 with: PATTERNS: | @@ -26,30 +33,19 @@ jobs: Dockerfile go.mod go.sum - - name: Get data from build cache - uses: actions/cache@v3 - with: - # In order: - # * Module download cache - # * Build cache (Linux) - # * Build cache (Mac) - # * Build cache (Windows) - path: | - ~/go/pkg/mod - ~/.cache/go-build - ~/Library/Caches/go-build - ~\AppData\Local\go-build - key: ${{ runner.os }}-go-docker-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-docker-${{ matrix.go-version }}- - - name: Set up QEMU + - + name: Set up QEMU uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx + - + name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Build e2e init chain image + - + name: Build e2e init chain image run: make docker-build-e2e-init-chain - - name: Test e2e short + - + name: Test e2e short run: make test-e2e-short - - name: 🧹 Clean up Osmosis Home + - + name: 🧹 Clean up Osmosis Home if: always() run: rm -rf $HOME/.osmosisd/ || true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1cee9a57f83..e4b78c66071 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,6 +11,9 @@ on: - "v[0-9]**" workflow_dispatch: +env: + GO_VERSION: '1.20.5' + jobs: get_diff: runs-on: ubuntu-latest @@ -45,7 +48,7 @@ jobs: name: 🐿 Setup Golang uses: actions/setup-go@v4 with: - go-version: "^1.20" + go-version: ${{env.GO_VERSION}} - name: Create a file with all core Cosmos SDK pkgs run: go list ./... ./osmomath/... ./osmoutils/... ./x/ibc-hooks/... ./x/epochs | grep -E -v 'tests/simulator|e2e' > pkgs.txt @@ -89,22 +92,10 @@ jobs: name: 🐿 Setup Golang uses: actions/setup-go@v4 with: - go-version: "^1.20" + go-version: ${{env.GO_VERSION}} - name: Display go version run: go version - - - name: Get data from build cache - uses: actions/cache@v3 - with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - ~/Library/Caches/go-build - ~\AppData\Local\go-build - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - uses: actions/download-artifact@v3 with: @@ -132,19 +123,7 @@ jobs: name: 🐿 Setup Golang uses: actions/setup-go@v4 with: - go-version: "^1.20" - - - name: Get data from build cache - uses: actions/cache@v3 - with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - ~/Library/Caches/go-build - ~\AppData\Local\go-build - key: ${{ runner.os }}-go-docker-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-docker- + go-version: ${{env.GO_VERSION}} - name: Set up QEMU uses: docker/setup-qemu-action@v2 diff --git a/.github/workflows/import_paths.yml b/.github/workflows/update-go-import-paths.yml similarity index 74% rename from .github/workflows/import_paths.yml rename to .github/workflows/update-go-import-paths.yml index a07b711f623..a2b2a9e7696 100644 --- a/.github/workflows/import_paths.yml +++ b/.github/workflows/update-go-import-paths.yml @@ -21,6 +21,9 @@ on: default: 'update-paths' required: true +env: + GO_VERSION: '1.20.5' + jobs: update-import-paths: runs-on: ubuntu-latest @@ -31,35 +34,19 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ inputs.target-branch }} - - + - name: 🐿 Setup Golang uses: actions/setup-go@v4 with: - go-version: '^1.20' + go-version: ${{env.GO_VERSION}} - name: Display go version run: go version - - - name: Get data from build cache - uses: actions/cache@v3 - with: - # In order: - # * Module download cache - # * Build cache (Linux) - # * Build cache (Mac) - # * Build cache (Windows) - path: | - ~/go/pkg/mod - ~/.cache/go-build - ~/Library/Caches/go-build - ~\AppData\Local\go-build - key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-${{ matrix.go-version }}- - name: Run find & replace script run: ./scripts/replace_import_paths.sh ${{ inputs.version }} - - name: Create Pull Request + - + name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.COMMIT_TO_BRANCH }} From cacee3b8d7ce9694672f22dd7347aae66c11b437 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 12:17:13 +0200 Subject: [PATCH 008/102] Remove proto deserialization from HasPosition (#5616) (#5629) * Remove proto deserialization from HasPosition * regenerate go mod --------- Co-authored-by: alpo (cherry picked from commit 7df187a3ab9116621fbefadc71dfe19721e22f48) Co-authored-by: Dev Ojha --- go.mod | 2 +- go.sum | 2 ++ osmoutils/accum/accum.go | 17 +++--------- osmoutils/accum/accum_test.go | 10 +++---- osmoutils/store_helper.go | 3 ++- x/concentrated-liquidity/incentives.go | 30 +++++---------------- x/concentrated-liquidity/incentives_test.go | 11 +++----- x/concentrated-liquidity/position_test.go | 13 +++------ x/concentrated-liquidity/spread_rewards.go | 10 ++----- 9 files changed, 27 insertions(+), 71 deletions(-) diff --git a/go.mod b/go.mod index e3ac3740fbc..f860f36c4ce 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/ory/dockertest/v3 v3.10.0 github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 github.com/osmosis-labs/osmosis/osmomath v0.0.3-dev.0.20230621002052-afb82fbaa312 - github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230622012610-25ef7aa8f2a5 + github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230623115558-38aaab07d343 github.com/osmosis-labs/osmosis/x/epochs v0.0.0-20230328024000-175ec88e4304 github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.0-20230602130523-f9a94d8bbd10 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 8e51f1e7ee3..a2b7977c0dd 100644 --- a/go.sum +++ b/go.sum @@ -950,6 +950,8 @@ github.com/osmosis-labs/osmosis/osmomath v0.0.3-dev.0.20230621002052-afb82fbaa31 github.com/osmosis-labs/osmosis/osmomath v0.0.3-dev.0.20230621002052-afb82fbaa312/go.mod h1:JTym95/bqrSnG5MPcXr1YDhv43JdCeo3p+iDbazoX68= github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230622012610-25ef7aa8f2a5 h1:MTIKbW26Ire7kKL/JOPsXaVpbgTxfHdL8ySXHRcF3SM= github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230622012610-25ef7aa8f2a5/go.mod h1:FqFOfj9+e5S1I7hR3baGUHrqje3g32EOHAXoOf7R00M= +github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230623115558-38aaab07d343 h1:7V2b3+mSnLnK0Px+Dl3vnxAQgk4SV8e9ohfJ/tKsq0M= +github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230623115558-38aaab07d343/go.mod h1:FqFOfj9+e5S1I7hR3baGUHrqje3g32EOHAXoOf7R00M= github.com/osmosis-labs/osmosis/x/epochs v0.0.0-20230328024000-175ec88e4304 h1:RIrWLzIiZN5Xd2JOfSOtGZaf6V3qEQYg6EaDTAkMnCo= github.com/osmosis-labs/osmosis/x/epochs v0.0.0-20230328024000-175ec88e4304/go.mod h1:yPWoJTj5RKrXKUChAicp+G/4Ni/uVEpp27mi/FF/L9c= github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.0-20230602130523-f9a94d8bbd10 h1:XrES5AHZMZ/Y78boW35PTignkhN9h8VvJ1sP8EJDIu8= diff --git a/osmoutils/accum/accum.go b/osmoutils/accum/accum.go index 9df8056644f..c4fc46e2598 100644 --- a/osmoutils/accum/accum.go +++ b/osmoutils/accum/accum.go @@ -376,19 +376,10 @@ func (accum AccumulatorObject) GetPositionSize(name string) (sdk.Dec, error) { } // HasPosition returns true if a position with the given name exists, -// false otherwise. Returns error if internal database error occurs. -func (accum AccumulatorObject) HasPosition(name string) (bool, error) { - _, err := GetPosition(accum, name) - - if err != nil { - isNoPositionError := errors.Is(err, NoPositionError{Name: name}) - if isNoPositionError { - return false, nil - } - return false, err - } - - return true, nil +// false otherwise. +func (accum AccumulatorObject) HasPosition(name string) bool { + containsKey := accum.store.Has(FormatPositionPrefixKey(accum.name, name)) + return containsKey } // GetValue returns the current value of the accumulator. diff --git a/osmoutils/accum/accum_test.go b/osmoutils/accum/accum_test.go index ee90a26ad1b..5f1a9d898b8 100644 --- a/osmoutils/accum/accum_test.go +++ b/osmoutils/accum/accum_test.go @@ -1478,9 +1478,7 @@ func (suite *AccumTestSuite) TestHasPosition() { suite.Require().NoError(err) } - hasPosition, err := accObject.HasPosition(defaultPositionName) - suite.NoError(err) - + hasPosition := accObject.HasPosition(defaultPositionName) suite.Equal(tc.preCreatePosition, hasPosition) }) } @@ -1599,8 +1597,7 @@ func (suite *AccumTestSuite) TestGetTotalShares() { baseAmt := sdk.NewDec(int64(i)).Mul(sdk.NewDec(10)) // If addr doesn't have a position yet, we make one - positionExists, err := curAccum.HasPosition(curAddr) - suite.Require().NoError(err) + positionExists := curAccum.HasPosition(curAddr) if !positionExists { err = curAccum.NewPosition(curAddr, baseAmt, nil) suite.Require().NoError(err) @@ -1770,8 +1767,7 @@ func (suite *AccumTestSuite) TestDeletePosition() { } suite.Require().NoError(err) - hasPosition, err := accObject.HasPosition(tc.positionName) - suite.Require().NoError(err) + hasPosition := accObject.HasPosition(tc.positionName) suite.Require().False(hasPosition) // Check rewards. diff --git a/osmoutils/store_helper.go b/osmoutils/store_helper.go index 46d602e6b5c..1ba661d8d41 100644 --- a/osmoutils/store_helper.go +++ b/osmoutils/store_helper.go @@ -197,7 +197,8 @@ func GetDec(store store.KVStore, key []byte) (sdk.Dec, error) { } // Get returns a value at key by mutating the result parameter. Returns true if the value was found and the -// result mutated correctly. If the value is not in the store, returns false. Returns error only when database or serialization errors occur. (And when an error occurs, returns false) +// result mutated correctly. If the value is not in the store, returns false. +// Returns error only when database or serialization errors occur. (And when an error occurs, returns false) func Get(store store.KVStore, key []byte, result proto.Message) (found bool, err error) { b := store.Get(key) if b == nil { diff --git a/x/concentrated-liquidity/incentives.go b/x/concentrated-liquidity/incentives.go index 1edf6b0ba5a..94052875c68 100644 --- a/x/concentrated-liquidity/incentives.go +++ b/x/concentrated-liquidity/incentives.go @@ -273,10 +273,7 @@ func (k Keeper) claimAndResetFullRangeBalancerPool(ctx sdk.Context, clPoolId uin // Ensure that the given balancer pool has a record on the given uptime accumulator. // We expect this to have been set in a prior call to `prepareBalancerAsFullRange`, which // should precede all calls of `claimAndResetFullRangeBalancerPool` - recordExists, err := uptimeAccums[uptimeIndex].HasPosition(balancerPositionName) - if err != nil { - return sdk.Coins{}, err - } + recordExists := uptimeAccums[uptimeIndex].HasPosition(balancerPositionName) if !recordExists { return sdk.Coins{}, types.BalancerRecordNotFoundError{ClPoolId: clPoolId, BalancerPoolId: balPoolId, UptimeIndex: uint64(uptimeIndex)} } @@ -301,10 +298,7 @@ func (k Keeper) claimAndResetFullRangeBalancerPool(ctx sdk.Context, clPoolId uin totalRewards = totalRewards.Add(claimedRewards...) // Ensure record was deleted - recordExists, err = uptimeAccums[uptimeIndex].HasPosition(balancerPositionName) - if err != nil { - return sdk.Coins{}, err - } + recordExists = uptimeAccums[uptimeIndex].HasPosition(balancerPositionName) if recordExists { return sdk.Coins{}, types.BalancerRecordNotClearedError{ClPoolId: clPoolId, BalancerPoolId: balPoolId, UptimeIndex: uint64(uptimeIndex)} } @@ -752,10 +746,7 @@ func (k Keeper) initOrUpdatePositionUptimeAccumulators(ctx sdk.Context, poolId u for uptimeIndex, curUptimeAccum := range uptimeAccumulators { // If a record does not exist for this uptime accumulator, create a new position. // Otherwise, add to existing record. - recordExists, err := curUptimeAccum.HasPosition(positionName) - if err != nil { - return err - } + recordExists := curUptimeAccum.HasPosition(positionName) if !recordExists { // Liquidity cannot be negative for a new position @@ -812,10 +803,7 @@ func updateAccumAndClaimRewards(accum accum.AccumulatorObject, positionKey strin } // Check if position record was deleted after claiming rewards. - hasPosition, err := accum.HasPosition(positionKey) - if err != nil { - return sdk.Coins{}, sdk.DecCoins{}, err - } + hasPosition := accum.HasPosition(positionKey) // If position still exists, we update the position's accumulator value to be the current accumulator value minus the growth outside. if hasPosition { @@ -845,10 +833,7 @@ func moveRewardsToNewPositionAndDeleteOldAcc(accum accum.AccumulatorObject, oldP return types.ModifySamePositionAccumulatorError{PositionAccName: oldPositionName} } - hasPosition, err := accum.HasPosition(oldPositionName) - if err != nil { - return err - } + hasPosition := accum.HasPosition(oldPositionName) if !hasPosition { return fmt.Errorf("position %s does not exist", oldPositionName) } @@ -927,10 +912,7 @@ func (k Keeper) prepareClaimAllIncentivesForPosition(ctx sdk.Context, positionId for uptimeIndex, uptimeAccum := range uptimeAccumulators { // Check if the accumulator contains the position. // There should never be a case where you can have a position for 1 accumulator, and not the rest. - hasPosition, err := uptimeAccum.HasPosition(positionName) - if err != nil { - return sdk.Coins{}, sdk.Coins{}, err - } + hasPosition := uptimeAccum.HasPosition(positionName) // If the accumulator contains the position, claim the position's incentives. if hasPosition { diff --git a/x/concentrated-liquidity/incentives_test.go b/x/concentrated-liquidity/incentives_test.go index ef8c178ab0b..e9d481ad704 100644 --- a/x/concentrated-liquidity/incentives_test.go +++ b/x/concentrated-liquidity/incentives_test.go @@ -1840,9 +1840,7 @@ func (s *KeeperTestSuite) TestInitOrUpdatePositionUptimeAccumulators() { // Ensure records are properly updated for each supported uptime for uptimeIndex := range types.SupportedUptimes { - recordExists, err := uptimeAccums[uptimeIndex].HasPosition(positionName) - s.Require().NoError(err) - + recordExists := uptimeAccums[uptimeIndex].HasPosition(positionName) s.Require().True(recordExists) // Ensure position's record has correct values @@ -3172,9 +3170,7 @@ func (s *KeeperTestSuite) TestPrepareClaimAllIncentivesForPosition() { for _, uptimeAccum := range uptimeAccumulatorsPreClaim { newPositionName := string(types.KeyPositionId(positionIdOne)) // Check if the accumulator contains the position. - hasPosition, err := uptimeAccum.HasPosition(newPositionName) - s.Require().NoError(err) - + hasPosition := uptimeAccum.HasPosition(newPositionName) if hasPosition { position, err := accum.GetPosition(uptimeAccum, newPositionName) s.Require().NoError(err) @@ -4144,8 +4140,7 @@ func (s *KeeperTestSuite) TestMoveRewardsToNewPositionAndDeleteOldAcc() { s.Require().NoError(err) // Check the old accumulator is now deleted. - hasPosition, err := testAccumulator.HasPosition(oldPos) - s.Require().NoError(err) + hasPosition := testAccumulator.HasPosition(oldPos) s.Require().False(hasPosition) // Check that the new accumulator has the correct amount of rewards in unclaimed rewards. diff --git a/x/concentrated-liquidity/position_test.go b/x/concentrated-liquidity/position_test.go index afed248b0e7..874cb658724 100644 --- a/x/concentrated-liquidity/position_test.go +++ b/x/concentrated-liquidity/position_test.go @@ -35,8 +35,7 @@ func (s *KeeperTestSuite) AssertPositionsDoNotExist(positionIds []uint64) { oldPositionName := string(types.KeyPositionId(positionId)) for _, uptimeAccum := range uptimeAccumulators { // Check if the accumulator contains the position. - hasPosition, err := uptimeAccum.HasPosition(oldPositionName) - s.Require().NoError(err) + hasPosition := uptimeAccum.HasPosition(oldPositionName) s.Require().False(hasPosition) } @@ -57,9 +56,7 @@ func (s *KeeperTestSuite) GetTotalAccruedRewardsByAccumulator(positionId uint64, for i, uptimeAccum := range uptimeAccumulators { newPositionName := string(types.KeyPositionId(positionId)) // Check if the accumulator contains the position. - hasPosition, err := uptimeAccum.HasPosition(newPositionName) - s.Require().NoError(err) - + hasPosition := uptimeAccum.HasPosition(newPositionName) if requireHasPosition { s.Require().True(hasPosition) } @@ -296,8 +293,7 @@ func (s *KeeperTestSuite) TestInitOrUpdatePosition() { for uptimeIndex, uptime := range supportedUptimes { // Position-related checks - recordExists, err := newUptimeAccums[uptimeIndex].HasPosition(positionName) - s.Require().NoError(err) + recordExists := newUptimeAccums[uptimeIndex].HasPosition(positionName) s.Require().True(recordExists) // Ensure position's record has correct values @@ -1300,8 +1296,7 @@ func (s *KeeperTestSuite) TestFungifyChargedPositions_SwapAndClaimSpreadRewards( hasPosition := s.clk.HasPosition(s.Ctx, oldPositionId) s.Require().False(hasPosition) - hasSpreadRewardPositionTracker, err := spreadRewardAccum.HasPosition(types.KeySpreadRewardPositionAccumulator(oldPositionId)) - s.Require().NoError(err) + hasSpreadRewardPositionTracker := spreadRewardAccum.HasPosition(types.KeySpreadRewardPositionAccumulator(oldPositionId)) s.Require().False(hasSpreadRewardPositionTracker) } } diff --git a/x/concentrated-liquidity/spread_rewards.go b/x/concentrated-liquidity/spread_rewards.go index be3e2c314dc..2494052e7c8 100644 --- a/x/concentrated-liquidity/spread_rewards.go +++ b/x/concentrated-liquidity/spread_rewards.go @@ -58,10 +58,7 @@ func (k Keeper) initOrUpdatePositionSpreadRewardAccumulator(ctx sdk.Context, poo // Get the key for the position's accumulator in the spread reward accumulator. positionKey := types.KeySpreadRewardPositionAccumulator(positionId) - hasPosition, err := spreadRewardAccumulator.HasPosition(positionKey) - if err != nil { - return err - } + hasPosition := spreadRewardAccumulator.HasPosition(positionKey) spreadRewardGrowthOutside, err := k.getSpreadRewardGrowthOutside(ctx, poolId, lowerTick, upperTick) if err != nil { @@ -247,10 +244,7 @@ func (k Keeper) prepareClaimableSpreadRewards(ctx sdk.Context, positionId uint64 positionKey := types.KeySpreadRewardPositionAccumulator(positionId) // Check if the position exists in the spread reward accumulator. - hasPosition, err := spreadRewardAccumulator.HasPosition(positionKey) - if err != nil { - return nil, err - } + hasPosition := spreadRewardAccumulator.HasPosition(positionKey) if !hasPosition { return nil, types.SpreadRewardPositionNotFoundError{PositionId: positionId} } From 81785b739820f0a8ab5d70dbc881d1cad714d262 Mon Sep 17 00:00:00 2001 From: "Matt, Park" <45252226+mattverse@users.noreply.github.com> Date: Mon, 26 Jun 2023 19:52:13 +0900 Subject: [PATCH 009/102] Update swagger gen (#5626) --- client/docs/static/openapi/index.html | 16 +- client/docs/static/openapi/openapi.yaml | 343 +++++++++++++++++++--- client/docs/static/swagger/swagger.yaml | 371 +++++++++++++++++++++--- client/docs/statik/statik.go | 2 +- 4 files changed, 648 insertions(+), 84 deletions(-) diff --git a/client/docs/static/openapi/index.html b/client/docs/static/openapi/index.html index 2766b8917dd..2742c2d71a8 100644 --- a/client/docs/static/openapi/index.html +++ b/client/docs/static/openapi/index.html @@ -484,9 +484,8 @@ This is labeled an estimate, because the way it calculates the amount can lead rounding errors from the true delegated amount