From b1fb3db16b923cb63b7be711d00dcf0be3e823b9 Mon Sep 17 00:00:00 2001 From: yutianwu Date: Wed, 12 Jul 2023 09:24:07 +0800 Subject: [PATCH 1/4] feat: support cross chain for multiple blockchains --- types/cross_chain.go | 5 +- x/crosschain/keeper/config.go | 4 +- x/crosschain/keeper/grpc_query.go | 6 +- x/crosschain/keeper/keeper.go | 42 +- x/crosschain/types/keys.go | 5 - x/gov/keeper/crosschain.go | 1 + x/gov/testutil/expected_keepers.go | 46 - x/gov/testutil/expected_keepers_mocks.go | 1095 +++++----------------- x/gov/types/expected_keepers.go | 3 +- x/oracle/keeper/msg_server.go | 30 +- x/oracle/types/expected_keeper_mocks.go | 141 ++- x/oracle/types/expected_keepers.go | 6 +- 12 files changed, 360 insertions(+), 1024 deletions(-) delete mode 100644 x/gov/testutil/expected_keepers.go diff --git a/types/cross_chain.go b/types/cross_chain.go index 3a98517cda..521485f90d 100644 --- a/types/cross_chain.go +++ b/types/cross_chain.go @@ -38,8 +38,9 @@ type CrossChainApplication interface { } type CrossChainAppContext struct { - Sequence uint64 - Header *PackageHeader + SrcChainId ChainID + Sequence uint64 + Header *PackageHeader } type ExecuteResult struct { diff --git a/x/crosschain/keeper/config.go b/x/crosschain/keeper/config.go index a26c8dc750..ec51a1327f 100644 --- a/x/crosschain/keeper/config.go +++ b/x/crosschain/keeper/config.go @@ -4,7 +4,7 @@ import sdk "github.com/cosmos/cosmos-sdk/types" type crossChainConfig struct { srcChainID sdk.ChainID - destChainId sdk.ChainID + destBscChainId sdk.ChainID nameToChannelID map[string]sdk.ChannelID channelIDToName map[sdk.ChannelID]string channelIDToApp map[sdk.ChannelID]sdk.CrossChainApplication @@ -13,7 +13,7 @@ type crossChainConfig struct { func newCrossChainCfg() *crossChainConfig { config := &crossChainConfig{ srcChainID: 0, - destChainId: 0, + destBscChainId: 0, nameToChannelID: make(map[string]sdk.ChannelID), channelIDToName: make(map[sdk.ChannelID]string), channelIDToApp: make(map[sdk.ChannelID]sdk.CrossChainApplication), diff --git a/x/crosschain/keeper/grpc_query.go b/x/crosschain/keeper/grpc_query.go index b24e07faf2..c4533f7647 100644 --- a/x/crosschain/keeper/grpc_query.go +++ b/x/crosschain/keeper/grpc_query.go @@ -26,7 +26,7 @@ func (k Keeper) CrossChainPackage(c context.Context, req *types.QueryCrossChainP } ctx := sdk.UnwrapSDKContext(c) - pack, err := k.GetCrossChainPackage(ctx, sdk.ChannelID(req.ChannelId), req.Sequence) + pack, err := k.GetCrossChainPackage(ctx, k.GetDestBscChainID(), sdk.ChannelID(req.ChannelId), req.Sequence) if err != nil { return nil, err } @@ -42,7 +42,7 @@ func (k Keeper) SendSequence(c context.Context, req *types.QuerySendSequenceRequ } ctx := sdk.UnwrapSDKContext(c) - sequence := k.GetSendSequence(ctx, sdk.ChannelID(req.ChannelId)) + sequence := k.GetSendSequence(ctx, k.GetDestBscChainID(), sdk.ChannelID(req.ChannelId)) return &types.QuerySendSequenceResponse{ Sequence: sequence, @@ -56,7 +56,7 @@ func (k Keeper) ReceiveSequence(c context.Context, req *types.QueryReceiveSequen } ctx := sdk.UnwrapSDKContext(c) - sequence := k.GetReceiveSequence(ctx, sdk.ChannelID(req.ChannelId)) + sequence := k.GetReceiveSequence(ctx, k.GetDestBscChainID(), sdk.ChannelID(req.ChannelId)) return &types.QueryReceiveSequenceResponse{ Sequence: sequence, diff --git a/x/crosschain/keeper/keeper.go b/x/crosschain/keeper/keeper.go index 0d6ff7b3c7..419d43b1b6 100644 --- a/x/crosschain/keeper/keeper.go +++ b/x/crosschain/keeper/keeper.go @@ -92,15 +92,15 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error { } // CreateRawIBCPackageWithFee creates a cross chain package with given cross chain fee -func (k Keeper) CreateRawIBCPackageWithFee(ctx sdk.Context, channelID sdk.ChannelID, +func (k Keeper) CreateRawIBCPackageWithFee(ctx sdk.Context, destChainId sdk.ChainID, channelID sdk.ChannelID, packageType sdk.CrossChainPackageType, packageLoad []byte, relayerFee, ackRelayerFee *big.Int, ) (uint64, error) { - if packageType == sdk.SynCrossChainPackageType && k.GetChannelSendPermission(ctx, k.GetDestChainID(), channelID) != sdk.ChannelAllow { + if packageType == sdk.SynCrossChainPackageType && k.GetChannelSendPermission(ctx, destChainId, channelID) != sdk.ChannelAllow { return 0, fmt.Errorf("channel %d is not allowed to write syn package", channelID) } - sequence := k.GetSendSequence(ctx, channelID) - key := types.BuildCrossChainPackageKey(k.GetSrcChainID(), k.GetDestChainID(), channelID, sequence) + sequence := k.GetSendSequence(ctx, destChainId, channelID) + key := types.BuildCrossChainPackageKey(k.GetSrcChainID(), destChainId, channelID, sequence) kvStore := ctx.KVStore(k.storeKey) if kvStore.Has(key) { return 0, fmt.Errorf("duplicated sequence") @@ -116,11 +116,11 @@ func (k Keeper) CreateRawIBCPackageWithFee(ctx sdk.Context, channelID sdk.Channe kvStore.Set(key, append(packageHeader, packageLoad...)) - k.IncrSendSequence(ctx, channelID) + k.IncrSendSequence(ctx, destChainId, channelID) err := ctx.EventManager().EmitTypedEvent(&types.EventCrossChain{ SrcChainId: uint32(k.GetSrcChainID()), - DestChainId: uint32(k.GetDestChainID()), + DestChainId: uint32(destChainId), ChannelId: uint32(channelID), Sequence: sequence, PackageType: uint32(packageType), @@ -157,7 +157,7 @@ func (k Keeper) RegisterChannel(name string, id sdk.ChannelID, app sdk.CrossChai // IsDestChainSupported returns the support status of a dest chain func (k Keeper) IsDestChainSupported(chainID sdk.ChainID) bool { - return chainID == k.cfg.destChainId + return chainID == k.cfg.destBscChainId } // SetChannelSendPermission sets the channel send permission @@ -188,39 +188,39 @@ func (k Keeper) GetSrcChainID() sdk.ChainID { // SetDestChainID sets the destination chain id func (k Keeper) SetDestChainID(destChainId sdk.ChainID) { - k.cfg.destChainId = destChainId + k.cfg.destBscChainId = destChainId } -// GetDestChainID gets the destination chain id -func (k Keeper) GetDestChainID() sdk.ChainID { - return k.cfg.destChainId +// GetDestBscChainID gets the destination chain id of bsc +func (k Keeper) GetDestBscChainID() sdk.ChainID { + return k.cfg.destBscChainId } // GetCrossChainPackage returns the ibc package by sequence -func (k Keeper) GetCrossChainPackage(ctx sdk.Context, channelId sdk.ChannelID, sequence uint64) ([]byte, error) { +func (k Keeper) GetCrossChainPackage(ctx sdk.Context, destChainId sdk.ChainID, channelId sdk.ChannelID, sequence uint64) ([]byte, error) { kvStore := ctx.KVStore(k.storeKey) - key := types.BuildCrossChainPackageKey(k.GetSrcChainID(), k.GetDestChainID(), channelId, sequence) + key := types.BuildCrossChainPackageKey(k.GetSrcChainID(), destChainId, channelId, sequence) return kvStore.Get(key), nil } // GetSendSequence returns the sending sequence of the channel -func (k Keeper) GetSendSequence(ctx sdk.Context, channelID sdk.ChannelID) uint64 { - return k.getSequence(ctx, k.GetDestChainID(), channelID, types.PrefixForSendSequenceKey) +func (k Keeper) GetSendSequence(ctx sdk.Context, destChainId sdk.ChainID, channelID sdk.ChannelID) uint64 { + return k.getSequence(ctx, destChainId, channelID, types.PrefixForSendSequenceKey) } // IncrSendSequence increases the sending sequence of the channel -func (k Keeper) IncrSendSequence(ctx sdk.Context, channelID sdk.ChannelID) { - k.incrSequence(ctx, k.GetDestChainID(), channelID, types.PrefixForSendSequenceKey) +func (k Keeper) IncrSendSequence(ctx sdk.Context, destChainId sdk.ChainID, channelID sdk.ChannelID) { + k.incrSequence(ctx, destChainId, channelID, types.PrefixForSendSequenceKey) } // GetReceiveSequence returns the receiving sequence of the channel -func (k Keeper) GetReceiveSequence(ctx sdk.Context, channelID sdk.ChannelID) uint64 { - return k.getSequence(ctx, k.GetDestChainID(), channelID, types.PrefixForReceiveSequenceKey) +func (k Keeper) GetReceiveSequence(ctx sdk.Context, destChainId sdk.ChainID, channelID sdk.ChannelID) uint64 { + return k.getSequence(ctx, destChainId, channelID, types.PrefixForReceiveSequenceKey) } // IncrReceiveSequence increases the receiving sequence of the channel -func (k Keeper) IncrReceiveSequence(ctx sdk.Context, channelID sdk.ChannelID) { - k.incrSequence(ctx, k.GetDestChainID(), channelID, types.PrefixForReceiveSequenceKey) +func (k Keeper) IncrReceiveSequence(ctx sdk.Context, destChainId sdk.ChainID, channelID sdk.ChannelID) { + k.incrSequence(ctx, destChainId, channelID, types.PrefixForReceiveSequenceKey) } // getSequence returns the sequence with a prefix diff --git a/x/crosschain/types/keys.go b/x/crosschain/types/keys.go index 8b4ce08039..4f9e25115e 100644 --- a/x/crosschain/types/keys.go +++ b/x/crosschain/types/keys.go @@ -23,8 +23,6 @@ const ( MaxSideChainIdLength = 20 SequenceLength = 8 - - GovChannelId = sdk.ChannelID(9) ) var ( @@ -58,9 +56,6 @@ func (c *ChannelPermissionSetting) Check() error { if len(c.DestChainId) == 0 || len(c.DestChainId) > MaxSideChainIdLength { return fmt.Errorf("invalid dest chain id") } - if c.ChannelId == GovChannelId { - return fmt.Errorf("gov channel id is forbidden to set") - } if c.Permission != sdk.ChannelAllow && c.Permission != sdk.ChannelForbidden { return fmt.Errorf("permission %d is invalid", c.Permission) } diff --git a/x/gov/keeper/crosschain.go b/x/gov/keeper/crosschain.go index f245387a23..349c330b68 100644 --- a/x/gov/keeper/crosschain.go +++ b/x/gov/keeper/crosschain.go @@ -47,6 +47,7 @@ func (k Keeper) SyncParams(ctx sdk.Context, cpc govv1.CrossChainParamsChange) er _, err := k.crossChainKeeper.CreateRawIBCPackageWithFee( ctx, + k.crossChainKeeper.GetDestBscChainID(), types.SyncParamsChannelID, sdk.SynCrossChainPackageType, encodedPackage, diff --git a/x/gov/testutil/expected_keepers.go b/x/gov/testutil/expected_keepers.go deleted file mode 100644 index 68081e4203..0000000000 --- a/x/gov/testutil/expected_keepers.go +++ /dev/null @@ -1,46 +0,0 @@ -// This file only used to generate mocks - -package testutil - -import ( - "math/big" - - math "cosmossdk.io/math" - - sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - "github.com/cosmos/cosmos-sdk/x/gov/types" -) - -// AccountKeeper extends gov's actual expected AccountKeeper with additional -// methods used in tests. -type AccountKeeper interface { - types.AccountKeeper - - IterateAccounts(ctx sdk.Context, cb func(account authtypes.AccountI) (stop bool)) -} - -// BankKeeper extends gov's actual expected BankKeeper with additional -// methods used in tests. -type BankKeeper interface { - bankkeeper.Keeper -} - -// StakingKeeper extends gov's actual expected StakingKeeper with additional -// methods used in tests. -type StakingKeeper interface { - types.StakingKeeper - - BondDenom(ctx sdk.Context) string - TokensFromConsensusPower(ctx sdk.Context, power int64) math.Int -} - -// CrossChainKeeper defines the expected crossChain keeper -type CrossChainKeeper interface { - RegisterChannel(name string, id sdk.ChannelID, app sdk.CrossChainApplication) error - - CreateRawIBCPackageWithFee(ctx sdk.Context, channelID sdk.ChannelID, packageType sdk.CrossChainPackageType, - packageLoad []byte, relayerFee, ackRelayerFee *big.Int, - ) (uint64, error) -} diff --git a/x/gov/testutil/expected_keepers_mocks.go b/x/gov/testutil/expected_keepers_mocks.go index 9d0f6ecf2e..5d50b32bb6 100644 --- a/x/gov/testutil/expected_keepers_mocks.go +++ b/x/gov/testutil/expected_keepers_mocks.go @@ -5,20 +5,124 @@ package testutil import ( - context "context" big "math/big" reflect "reflect" math "cosmossdk.io/math" types "github.com/cosmos/cosmos-sdk/types" - query "github.com/cosmos/cosmos-sdk/types/query" types0 "github.com/cosmos/cosmos-sdk/x/auth/types" - keeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - types1 "github.com/cosmos/cosmos-sdk/x/bank/types" - types2 "github.com/cosmos/cosmos-sdk/x/staking/types" + types1 "github.com/cosmos/cosmos-sdk/x/staking/types" gomock "github.com/golang/mock/gomock" ) +// MockParamSubspace is a mock of ParamSubspace interface. +type MockParamSubspace struct { + ctrl *gomock.Controller + recorder *MockParamSubspaceMockRecorder +} + +// MockParamSubspaceMockRecorder is the mock recorder for MockParamSubspace. +type MockParamSubspaceMockRecorder struct { + mock *MockParamSubspace +} + +// NewMockParamSubspace creates a new mock instance. +func NewMockParamSubspace(ctrl *gomock.Controller) *MockParamSubspace { + mock := &MockParamSubspace{ctrl: ctrl} + mock.recorder = &MockParamSubspaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockParamSubspace) EXPECT() *MockParamSubspaceMockRecorder { + return m.recorder +} + +// Get mocks base method. +func (m *MockParamSubspace) Get(ctx types.Context, key []byte, ptr interface{}) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "Get", ctx, key, ptr) +} + +// Get indicates an expected call of Get. +func (mr *MockParamSubspaceMockRecorder) Get(ctx, key, ptr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockParamSubspace)(nil).Get), ctx, key, ptr) +} + +// Set mocks base method. +func (m *MockParamSubspace) Set(ctx types.Context, key []byte, param interface{}) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "Set", ctx, key, param) +} + +// Set indicates an expected call of Set. +func (mr *MockParamSubspaceMockRecorder) Set(ctx, key, param interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockParamSubspace)(nil).Set), ctx, key, param) +} + +// MockStakingKeeper is a mock of StakingKeeper interface. +type MockStakingKeeper struct { + ctrl *gomock.Controller + recorder *MockStakingKeeperMockRecorder +} + +// MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper. +type MockStakingKeeperMockRecorder struct { + mock *MockStakingKeeper +} + +// NewMockStakingKeeper creates a new mock instance. +func NewMockStakingKeeper(ctrl *gomock.Controller) *MockStakingKeeper { + mock := &MockStakingKeeper{ctrl: ctrl} + mock.recorder = &MockStakingKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { + return m.recorder +} + +// IterateBondedValidatorsByPower mocks base method. +func (m *MockStakingKeeper) IterateBondedValidatorsByPower(arg0 types.Context, arg1 func(int64, types1.ValidatorI) bool) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IterateBondedValidatorsByPower", arg0, arg1) +} + +// IterateBondedValidatorsByPower indicates an expected call of IterateBondedValidatorsByPower. +func (mr *MockStakingKeeperMockRecorder) IterateBondedValidatorsByPower(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateBondedValidatorsByPower", reflect.TypeOf((*MockStakingKeeper)(nil).IterateBondedValidatorsByPower), arg0, arg1) +} + +// IterateDelegations mocks base method. +func (m *MockStakingKeeper) IterateDelegations(ctx types.Context, delegator types.AccAddress, fn func(int64, types1.DelegationI) bool) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IterateDelegations", ctx, delegator, fn) +} + +// IterateDelegations indicates an expected call of IterateDelegations. +func (mr *MockStakingKeeperMockRecorder) IterateDelegations(ctx, delegator, fn interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateDelegations", reflect.TypeOf((*MockStakingKeeper)(nil).IterateDelegations), ctx, delegator, fn) +} + +// TotalBondedTokens mocks base method. +func (m *MockStakingKeeper) TotalBondedTokens(arg0 types.Context) math.Int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "TotalBondedTokens", arg0) + ret0, _ := ret[0].(math.Int) + return ret0 +} + +// TotalBondedTokens indicates an expected call of TotalBondedTokens. +func (mr *MockStakingKeeperMockRecorder) TotalBondedTokens(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalBondedTokens", reflect.TypeOf((*MockStakingKeeper)(nil).TotalBondedTokens), arg0) +} + // MockAccountKeeper is a mock of AccountKeeper interface. type MockAccountKeeper struct { ctrl *gomock.Controller @@ -84,18 +188,6 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name interface{}) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), name) } -// IterateAccounts mocks base method. -func (m *MockAccountKeeper) IterateAccounts(ctx types.Context, cb func(types0.AccountI) bool) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateAccounts", ctx, cb) -} - -// IterateAccounts indicates an expected call of IterateAccounts. -func (mr *MockAccountKeeperMockRecorder) IterateAccounts(ctx, cb interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateAccounts", reflect.TypeOf((*MockAccountKeeper)(nil).IterateAccounts), ctx, cb) -} - // SetModuleAccount mocks base method. func (m *MockAccountKeeper) SetModuleAccount(arg0 types.Context, arg1 types0.ModuleAccountI) { m.ctrl.T.Helper() @@ -131,960 +223,249 @@ func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { return m.recorder } -// AllBalances mocks base method. -func (m *MockBankKeeper) AllBalances(arg0 context.Context, arg1 *types1.QueryAllBalancesRequest) (*types1.QueryAllBalancesResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllBalances", arg0, arg1) - ret0, _ := ret[0].(*types1.QueryAllBalancesResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// AllBalances indicates an expected call of AllBalances. -func (mr *MockBankKeeperMockRecorder) AllBalances(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllBalances", reflect.TypeOf((*MockBankKeeper)(nil).AllBalances), arg0, arg1) -} - -// Balance mocks base method. -func (m *MockBankKeeper) Balance(arg0 context.Context, arg1 *types1.QueryBalanceRequest) (*types1.QueryBalanceResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Balance", arg0, arg1) - ret0, _ := ret[0].(*types1.QueryBalanceResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Balance indicates an expected call of Balance. -func (mr *MockBankKeeperMockRecorder) Balance(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Balance", reflect.TypeOf((*MockBankKeeper)(nil).Balance), arg0, arg1) -} - -// BlockedAddr mocks base method. -func (m *MockBankKeeper) BlockedAddr(addr types.AccAddress) bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BlockedAddr", addr) - ret0, _ := ret[0].(bool) - return ret0 -} - -// BlockedAddr indicates an expected call of BlockedAddr. -func (mr *MockBankKeeperMockRecorder) BlockedAddr(addr interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockedAddr", reflect.TypeOf((*MockBankKeeper)(nil).BlockedAddr), addr) -} - // BurnCoins mocks base method. -func (m *MockBankKeeper) BurnCoins(ctx types.Context, moduleName string, amt types.Coins) error { +func (m *MockBankKeeper) BurnCoins(ctx types.Context, name string, amt types.Coins) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BurnCoins", ctx, moduleName, amt) + ret := m.ctrl.Call(m, "BurnCoins", ctx, name, amt) ret0, _ := ret[0].(error) return ret0 } // BurnCoins indicates an expected call of BurnCoins. -func (mr *MockBankKeeperMockRecorder) BurnCoins(ctx, moduleName, amt interface{}) *gomock.Call { +func (mr *MockBankKeeperMockRecorder) BurnCoins(ctx, name, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BurnCoins", reflect.TypeOf((*MockBankKeeper)(nil).BurnCoins), ctx, moduleName, amt) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BurnCoins", reflect.TypeOf((*MockBankKeeper)(nil).BurnCoins), ctx, name, amt) } -// DelegateCoins mocks base method. -func (m *MockBankKeeper) DelegateCoins(ctx types.Context, delegatorAddr, moduleAccAddr types.AccAddress, amt types.Coins) error { +// GetAllBalances mocks base method. +func (m *MockBankKeeper) GetAllBalances(ctx types.Context, addr types.AccAddress) types.Coins { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DelegateCoins", ctx, delegatorAddr, moduleAccAddr, amt) - ret0, _ := ret[0].(error) + ret := m.ctrl.Call(m, "GetAllBalances", ctx, addr) + ret0, _ := ret[0].(types.Coins) return ret0 } -// DelegateCoins indicates an expected call of DelegateCoins. -func (mr *MockBankKeeperMockRecorder) DelegateCoins(ctx, delegatorAddr, moduleAccAddr, amt interface{}) *gomock.Call { +// GetAllBalances indicates an expected call of GetAllBalances. +func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelegateCoins", reflect.TypeOf((*MockBankKeeper)(nil).DelegateCoins), ctx, delegatorAddr, moduleAccAddr, amt) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAllBalances), ctx, addr) } -// DelegateCoinsFromAccountToModule mocks base method. -func (m *MockBankKeeper) DelegateCoinsFromAccountToModule(ctx types.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { +// GetBalance mocks base method. +func (m *MockBankKeeper) GetBalance(ctx types.Context, addr types.AccAddress, denom string) types.Coin { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DelegateCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) - ret0, _ := ret[0].(error) + ret := m.ctrl.Call(m, "GetBalance", ctx, addr, denom) + ret0, _ := ret[0].(types.Coin) return ret0 } -// DelegateCoinsFromAccountToModule indicates an expected call of DelegateCoinsFromAccountToModule. -func (mr *MockBankKeeperMockRecorder) DelegateCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelegateCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).DelegateCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) -} - -// DeleteSendEnabled mocks base method. -func (m *MockBankKeeper) DeleteSendEnabled(ctx types.Context, denoms ...string) { - m.ctrl.T.Helper() - varargs := []interface{}{ctx} - for _, a := range denoms { - varargs = append(varargs, a) - } - m.ctrl.Call(m, "DeleteSendEnabled", varargs...) -} - -// DeleteSendEnabled indicates an expected call of DeleteSendEnabled. -func (mr *MockBankKeeperMockRecorder) DeleteSendEnabled(ctx interface{}, denoms ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{ctx}, denoms...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSendEnabled", reflect.TypeOf((*MockBankKeeper)(nil).DeleteSendEnabled), varargs...) -} - -// DenomMetadata mocks base method. -func (m *MockBankKeeper) DenomMetadata(arg0 context.Context, arg1 *types1.QueryDenomMetadataRequest) (*types1.QueryDenomMetadataResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DenomMetadata", arg0, arg1) - ret0, _ := ret[0].(*types1.QueryDenomMetadataResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// DenomMetadata indicates an expected call of DenomMetadata. -func (mr *MockBankKeeperMockRecorder) DenomMetadata(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DenomMetadata", reflect.TypeOf((*MockBankKeeper)(nil).DenomMetadata), arg0, arg1) -} - -// DenomOwners mocks base method. -func (m *MockBankKeeper) DenomOwners(arg0 context.Context, arg1 *types1.QueryDenomOwnersRequest) (*types1.QueryDenomOwnersResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DenomOwners", arg0, arg1) - ret0, _ := ret[0].(*types1.QueryDenomOwnersResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// DenomOwners indicates an expected call of DenomOwners. -func (mr *MockBankKeeperMockRecorder) DenomOwners(arg0, arg1 interface{}) *gomock.Call { +// GetBalance indicates an expected call of GetBalance. +func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DenomOwners", reflect.TypeOf((*MockBankKeeper)(nil).DenomOwners), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockBankKeeper)(nil).GetBalance), ctx, addr, denom) } -// DenomsMetadata mocks base method. -func (m *MockBankKeeper) DenomsMetadata(arg0 context.Context, arg1 *types1.QueryDenomsMetadataRequest) (*types1.QueryDenomsMetadataResponse, error) { +// LockedCoins mocks base method. +func (m *MockBankKeeper) LockedCoins(ctx types.Context, addr types.AccAddress) types.Coins { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DenomsMetadata", arg0, arg1) - ret0, _ := ret[0].(*types1.QueryDenomsMetadataResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 + ret := m.ctrl.Call(m, "LockedCoins", ctx, addr) + ret0, _ := ret[0].(types.Coins) + return ret0 } -// DenomsMetadata indicates an expected call of DenomsMetadata. -func (mr *MockBankKeeperMockRecorder) DenomsMetadata(arg0, arg1 interface{}) *gomock.Call { +// LockedCoins indicates an expected call of LockedCoins. +func (mr *MockBankKeeperMockRecorder) LockedCoins(ctx, addr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DenomsMetadata", reflect.TypeOf((*MockBankKeeper)(nil).DenomsMetadata), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LockedCoins", reflect.TypeOf((*MockBankKeeper)(nil).LockedCoins), ctx, addr) } -// ExportGenesis mocks base method. -func (m *MockBankKeeper) ExportGenesis(arg0 types.Context) *types1.GenesisState { +// SendCoinsFromAccountToModule mocks base method. +func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx types.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ExportGenesis", arg0) - ret0, _ := ret[0].(*types1.GenesisState) + ret := m.ctrl.Call(m, "SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) + ret0, _ := ret[0].(error) return ret0 } -// ExportGenesis indicates an expected call of ExportGenesis. -func (mr *MockBankKeeperMockRecorder) ExportGenesis(arg0 interface{}) *gomock.Call { +// SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockBankKeeper)(nil).ExportGenesis), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) } -// GetAccountsBalances mocks base method. -func (m *MockBankKeeper) GetAccountsBalances(ctx types.Context) []types1.Balance { +// SendCoinsFromModuleToAccount mocks base method. +func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx types.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAccountsBalances", ctx) - ret0, _ := ret[0].([]types1.Balance) + ret := m.ctrl.Call(m, "SendCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) + ret0, _ := ret[0].(error) return ret0 } -// GetAccountsBalances indicates an expected call of GetAccountsBalances. -func (mr *MockBankKeeperMockRecorder) GetAccountsBalances(ctx interface{}) *gomock.Call { +// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountsBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAccountsBalances), ctx) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) } -// GetAllBalances mocks base method. -func (m *MockBankKeeper) GetAllBalances(ctx types.Context, addr types.AccAddress) types.Coins { +// SpendableCoins mocks base method. +func (m *MockBankKeeper) SpendableCoins(ctx types.Context, addr types.AccAddress) types.Coins { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAllBalances", ctx, addr) + ret := m.ctrl.Call(m, "SpendableCoins", ctx, addr) ret0, _ := ret[0].(types.Coins) return ret0 } -// GetAllBalances indicates an expected call of GetAllBalances. -func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call { +// SpendableCoins indicates an expected call of SpendableCoins. +func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAllBalances), ctx, addr) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr) } -// GetAllDenomMetaData mocks base method. -func (m *MockBankKeeper) GetAllDenomMetaData(ctx types.Context) []types1.Metadata { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAllDenomMetaData", ctx) - ret0, _ := ret[0].([]types1.Metadata) - return ret0 +// MockCrossChainKeeper is a mock of CrossChainKeeper interface. +type MockCrossChainKeeper struct { + ctrl *gomock.Controller + recorder *MockCrossChainKeeperMockRecorder } -// GetAllDenomMetaData indicates an expected call of GetAllDenomMetaData. -func (mr *MockBankKeeperMockRecorder) GetAllDenomMetaData(ctx interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllDenomMetaData", reflect.TypeOf((*MockBankKeeper)(nil).GetAllDenomMetaData), ctx) +// MockCrossChainKeeperMockRecorder is the mock recorder for MockCrossChainKeeper. +type MockCrossChainKeeperMockRecorder struct { + mock *MockCrossChainKeeper } -// GetAllSendEnabledEntries mocks base method. -func (m *MockBankKeeper) GetAllSendEnabledEntries(ctx types.Context) []types1.SendEnabled { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAllSendEnabledEntries", ctx) - ret0, _ := ret[0].([]types1.SendEnabled) - return ret0 +// NewMockCrossChainKeeper creates a new mock instance. +func NewMockCrossChainKeeper(ctrl *gomock.Controller) *MockCrossChainKeeper { + mock := &MockCrossChainKeeper{ctrl: ctrl} + mock.recorder = &MockCrossChainKeeperMockRecorder{mock} + return mock } -// GetAllSendEnabledEntries indicates an expected call of GetAllSendEnabledEntries. -func (mr *MockBankKeeperMockRecorder) GetAllSendEnabledEntries(ctx interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSendEnabledEntries", reflect.TypeOf((*MockBankKeeper)(nil).GetAllSendEnabledEntries), ctx) +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockCrossChainKeeper) EXPECT() *MockCrossChainKeeperMockRecorder { + return m.recorder } -// GetAuthority mocks base method. -func (m *MockBankKeeper) GetAuthority() string { +// CreateRawIBCPackageWithFee mocks base method. +func (m *MockCrossChainKeeper) CreateRawIBCPackageWithFee(ctx types.Context, destChainId types.ChainID, channelID types.ChannelID, packageType types.CrossChainPackageType, packageLoad []byte, relayerFee, ackRelayerFee *big.Int) (uint64, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAuthority") - ret0, _ := ret[0].(string) - return ret0 + ret := m.ctrl.Call(m, "CreateRawIBCPackageWithFee", ctx, destChainId, channelID, packageType, packageLoad, relayerFee, ackRelayerFee) + ret0, _ := ret[0].(uint64) + ret1, _ := ret[1].(error) + return ret0, ret1 } -// GetAuthority indicates an expected call of GetAuthority. -func (mr *MockBankKeeperMockRecorder) GetAuthority() *gomock.Call { +// CreateRawIBCPackageWithFee indicates an expected call of CreateRawIBCPackageWithFee. +func (mr *MockCrossChainKeeperMockRecorder) CreateRawIBCPackageWithFee(ctx, destChainId, channelID, packageType, packageLoad, relayerFee, ackRelayerFee interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthority", reflect.TypeOf((*MockBankKeeper)(nil).GetAuthority)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRawIBCPackageWithFee", reflect.TypeOf((*MockCrossChainKeeper)(nil).CreateRawIBCPackageWithFee), ctx, destChainId, channelID, packageType, packageLoad, relayerFee, ackRelayerFee) } -// GetBalance mocks base method. -func (m *MockBankKeeper) GetBalance(ctx types.Context, addr types.AccAddress, denom string) types.Coin { +// GetDestBscChainID mocks base method. +func (m *MockCrossChainKeeper) GetDestBscChainID() types.ChainID { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetBalance", ctx, addr, denom) - ret0, _ := ret[0].(types.Coin) + ret := m.ctrl.Call(m, "GetDestBscChainID") + ret0, _ := ret[0].(types.ChainID) return ret0 } -// GetBalance indicates an expected call of GetBalance. -func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call { +// GetDestBscChainID indicates an expected call of GetDestBscChainID. +func (mr *MockCrossChainKeeperMockRecorder) GetDestBscChainID() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockBankKeeper)(nil).GetBalance), ctx, addr, denom) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDestBscChainID", reflect.TypeOf((*MockCrossChainKeeper)(nil).GetDestBscChainID)) } -// GetBlockedAddresses mocks base method. -func (m *MockBankKeeper) GetBlockedAddresses() map[string]bool { +// RegisterChannel mocks base method. +func (m *MockCrossChainKeeper) RegisterChannel(name string, id types.ChannelID, app types.CrossChainApplication) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetBlockedAddresses") - ret0, _ := ret[0].(map[string]bool) + ret := m.ctrl.Call(m, "RegisterChannel", name, id, app) + ret0, _ := ret[0].(error) return ret0 } -// GetBlockedAddresses indicates an expected call of GetBlockedAddresses. -func (mr *MockBankKeeperMockRecorder) GetBlockedAddresses() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockedAddresses", reflect.TypeOf((*MockBankKeeper)(nil).GetBlockedAddresses)) -} - -// GetDenomMetaData mocks base method. -func (m *MockBankKeeper) GetDenomMetaData(ctx types.Context, denom string) (types1.Metadata, bool) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetDenomMetaData", ctx, denom) - ret0, _ := ret[0].(types1.Metadata) - ret1, _ := ret[1].(bool) - return ret0, ret1 -} - -// GetDenomMetaData indicates an expected call of GetDenomMetaData. -func (mr *MockBankKeeperMockRecorder) GetDenomMetaData(ctx, denom interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDenomMetaData", reflect.TypeOf((*MockBankKeeper)(nil).GetDenomMetaData), ctx, denom) -} - -// GetPaginatedTotalSupply mocks base method. -func (m *MockBankKeeper) GetPaginatedTotalSupply(ctx types.Context, pagination *query.PageRequest) (types.Coins, *query.PageResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetPaginatedTotalSupply", ctx, pagination) - ret0, _ := ret[0].(types.Coins) - ret1, _ := ret[1].(*query.PageResponse) - ret2, _ := ret[2].(error) - return ret0, ret1, ret2 -} - -// GetPaginatedTotalSupply indicates an expected call of GetPaginatedTotalSupply. -func (mr *MockBankKeeperMockRecorder) GetPaginatedTotalSupply(ctx, pagination interface{}) *gomock.Call { +// RegisterChannel indicates an expected call of RegisterChannel. +func (mr *MockCrossChainKeeperMockRecorder) RegisterChannel(name, id, app interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPaginatedTotalSupply", reflect.TypeOf((*MockBankKeeper)(nil).GetPaginatedTotalSupply), ctx, pagination) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterChannel", reflect.TypeOf((*MockCrossChainKeeper)(nil).RegisterChannel), name, id, app) } -// GetParams mocks base method. -func (m *MockBankKeeper) GetParams(ctx types.Context) types1.Params { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetParams", ctx) - ret0, _ := ret[0].(types1.Params) - return ret0 +// MockGovHooks is a mock of GovHooks interface. +type MockGovHooks struct { + ctrl *gomock.Controller + recorder *MockGovHooksMockRecorder } -// GetParams indicates an expected call of GetParams. -func (mr *MockBankKeeperMockRecorder) GetParams(ctx interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetParams", reflect.TypeOf((*MockBankKeeper)(nil).GetParams), ctx) +// MockGovHooksMockRecorder is the mock recorder for MockGovHooks. +type MockGovHooksMockRecorder struct { + mock *MockGovHooks } -// GetSendEnabledEntry mocks base method. -func (m *MockBankKeeper) GetSendEnabledEntry(ctx types.Context, denom string) (types1.SendEnabled, bool) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetSendEnabledEntry", ctx, denom) - ret0, _ := ret[0].(types1.SendEnabled) - ret1, _ := ret[1].(bool) - return ret0, ret1 +// NewMockGovHooks creates a new mock instance. +func NewMockGovHooks(ctrl *gomock.Controller) *MockGovHooks { + mock := &MockGovHooks{ctrl: ctrl} + mock.recorder = &MockGovHooksMockRecorder{mock} + return mock } -// GetSendEnabledEntry indicates an expected call of GetSendEnabledEntry. -func (mr *MockBankKeeperMockRecorder) GetSendEnabledEntry(ctx, denom interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSendEnabledEntry", reflect.TypeOf((*MockBankKeeper)(nil).GetSendEnabledEntry), ctx, denom) +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockGovHooks) EXPECT() *MockGovHooksMockRecorder { + return m.recorder } -// GetSupply mocks base method. -func (m *MockBankKeeper) GetSupply(ctx types.Context, denom string) types.Coin { +// AfterProposalDeposit mocks base method. +func (m *MockGovHooks) AfterProposalDeposit(ctx types.Context, proposalID uint64, depositorAddr types.AccAddress) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetSupply", ctx, denom) - ret0, _ := ret[0].(types.Coin) - return ret0 + m.ctrl.Call(m, "AfterProposalDeposit", ctx, proposalID, depositorAddr) } -// GetSupply indicates an expected call of GetSupply. -func (mr *MockBankKeeperMockRecorder) GetSupply(ctx, denom interface{}) *gomock.Call { +// AfterProposalDeposit indicates an expected call of AfterProposalDeposit. +func (mr *MockGovHooksMockRecorder) AfterProposalDeposit(ctx, proposalID, depositorAddr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSupply", reflect.TypeOf((*MockBankKeeper)(nil).GetSupply), ctx, denom) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterProposalDeposit", reflect.TypeOf((*MockGovHooks)(nil).AfterProposalDeposit), ctx, proposalID, depositorAddr) } -// HasBalance mocks base method. -func (m *MockBankKeeper) HasBalance(ctx types.Context, addr types.AccAddress, amt types.Coin) bool { +// AfterProposalFailedMinDeposit mocks base method. +func (m *MockGovHooks) AfterProposalFailedMinDeposit(ctx types.Context, proposalID uint64) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HasBalance", ctx, addr, amt) - ret0, _ := ret[0].(bool) - return ret0 + m.ctrl.Call(m, "AfterProposalFailedMinDeposit", ctx, proposalID) } -// HasBalance indicates an expected call of HasBalance. -func (mr *MockBankKeeperMockRecorder) HasBalance(ctx, addr, amt interface{}) *gomock.Call { +// AfterProposalFailedMinDeposit indicates an expected call of AfterProposalFailedMinDeposit. +func (mr *MockGovHooksMockRecorder) AfterProposalFailedMinDeposit(ctx, proposalID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasBalance", reflect.TypeOf((*MockBankKeeper)(nil).HasBalance), ctx, addr, amt) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterProposalFailedMinDeposit", reflect.TypeOf((*MockGovHooks)(nil).AfterProposalFailedMinDeposit), ctx, proposalID) } -// HasDenomMetaData mocks base method. -func (m *MockBankKeeper) HasDenomMetaData(ctx types.Context, denom string) bool { +// AfterProposalSubmission mocks base method. +func (m *MockGovHooks) AfterProposalSubmission(ctx types.Context, proposalID uint64) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HasDenomMetaData", ctx, denom) - ret0, _ := ret[0].(bool) - return ret0 + m.ctrl.Call(m, "AfterProposalSubmission", ctx, proposalID) } -// HasDenomMetaData indicates an expected call of HasDenomMetaData. -func (mr *MockBankKeeperMockRecorder) HasDenomMetaData(ctx, denom interface{}) *gomock.Call { +// AfterProposalSubmission indicates an expected call of AfterProposalSubmission. +func (mr *MockGovHooksMockRecorder) AfterProposalSubmission(ctx, proposalID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasDenomMetaData", reflect.TypeOf((*MockBankKeeper)(nil).HasDenomMetaData), ctx, denom) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterProposalSubmission", reflect.TypeOf((*MockGovHooks)(nil).AfterProposalSubmission), ctx, proposalID) } -// HasSupply mocks base method. -func (m *MockBankKeeper) HasSupply(ctx types.Context, denom string) bool { +// AfterProposalVote mocks base method. +func (m *MockGovHooks) AfterProposalVote(ctx types.Context, proposalID uint64, voterAddr types.AccAddress) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HasSupply", ctx, denom) - ret0, _ := ret[0].(bool) - return ret0 + m.ctrl.Call(m, "AfterProposalVote", ctx, proposalID, voterAddr) } -// HasSupply indicates an expected call of HasSupply. -func (mr *MockBankKeeperMockRecorder) HasSupply(ctx, denom interface{}) *gomock.Call { +// AfterProposalVote indicates an expected call of AfterProposalVote. +func (mr *MockGovHooksMockRecorder) AfterProposalVote(ctx, proposalID, voterAddr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasSupply", reflect.TypeOf((*MockBankKeeper)(nil).HasSupply), ctx, denom) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterProposalVote", reflect.TypeOf((*MockGovHooks)(nil).AfterProposalVote), ctx, proposalID, voterAddr) } -// InitGenesis mocks base method. -func (m *MockBankKeeper) InitGenesis(arg0 types.Context, arg1 *types1.GenesisState) { +// AfterProposalVotingPeriodEnded mocks base method. +func (m *MockGovHooks) AfterProposalVotingPeriodEnded(ctx types.Context, proposalID uint64) { m.ctrl.T.Helper() - m.ctrl.Call(m, "InitGenesis", arg0, arg1) + m.ctrl.Call(m, "AfterProposalVotingPeriodEnded", ctx, proposalID) } -// InitGenesis indicates an expected call of InitGenesis. -func (mr *MockBankKeeperMockRecorder) InitGenesis(arg0, arg1 interface{}) *gomock.Call { +// AfterProposalVotingPeriodEnded indicates an expected call of AfterProposalVotingPeriodEnded. +func (mr *MockGovHooksMockRecorder) AfterProposalVotingPeriodEnded(ctx, proposalID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockBankKeeper)(nil).InitGenesis), arg0, arg1) -} - -// InputOutputCoins mocks base method. -func (m *MockBankKeeper) InputOutputCoins(ctx types.Context, inputs []types1.Input, outputs []types1.Output) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "InputOutputCoins", ctx, inputs, outputs) - ret0, _ := ret[0].(error) - return ret0 -} - -// InputOutputCoins indicates an expected call of InputOutputCoins. -func (mr *MockBankKeeperMockRecorder) InputOutputCoins(ctx, inputs, outputs interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InputOutputCoins", reflect.TypeOf((*MockBankKeeper)(nil).InputOutputCoins), ctx, inputs, outputs) -} - -// IsSendEnabledCoin mocks base method. -func (m *MockBankKeeper) IsSendEnabledCoin(ctx types.Context, coin types.Coin) bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IsSendEnabledCoin", ctx, coin) - ret0, _ := ret[0].(bool) - return ret0 -} - -// IsSendEnabledCoin indicates an expected call of IsSendEnabledCoin. -func (mr *MockBankKeeperMockRecorder) IsSendEnabledCoin(ctx, coin interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSendEnabledCoin", reflect.TypeOf((*MockBankKeeper)(nil).IsSendEnabledCoin), ctx, coin) -} - -// IsSendEnabledCoins mocks base method. -func (m *MockBankKeeper) IsSendEnabledCoins(ctx types.Context, coins ...types.Coin) error { - m.ctrl.T.Helper() - varargs := []interface{}{ctx} - for _, a := range coins { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "IsSendEnabledCoins", varargs...) - ret0, _ := ret[0].(error) - return ret0 -} - -// IsSendEnabledCoins indicates an expected call of IsSendEnabledCoins. -func (mr *MockBankKeeperMockRecorder) IsSendEnabledCoins(ctx interface{}, coins ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{ctx}, coins...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSendEnabledCoins", reflect.TypeOf((*MockBankKeeper)(nil).IsSendEnabledCoins), varargs...) -} - -// IsSendEnabledDenom mocks base method. -func (m *MockBankKeeper) IsSendEnabledDenom(ctx types.Context, denom string) bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IsSendEnabledDenom", ctx, denom) - ret0, _ := ret[0].(bool) - return ret0 -} - -// IsSendEnabledDenom indicates an expected call of IsSendEnabledDenom. -func (mr *MockBankKeeperMockRecorder) IsSendEnabledDenom(ctx, denom interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSendEnabledDenom", reflect.TypeOf((*MockBankKeeper)(nil).IsSendEnabledDenom), ctx, denom) -} - -// IterateAccountBalances mocks base method. -func (m *MockBankKeeper) IterateAccountBalances(ctx types.Context, addr types.AccAddress, cb func(types.Coin) bool) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateAccountBalances", ctx, addr, cb) -} - -// IterateAccountBalances indicates an expected call of IterateAccountBalances. -func (mr *MockBankKeeperMockRecorder) IterateAccountBalances(ctx, addr, cb interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateAccountBalances", reflect.TypeOf((*MockBankKeeper)(nil).IterateAccountBalances), ctx, addr, cb) -} - -// IterateAllBalances mocks base method. -func (m *MockBankKeeper) IterateAllBalances(ctx types.Context, cb func(types.AccAddress, types.Coin) bool) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateAllBalances", ctx, cb) -} - -// IterateAllBalances indicates an expected call of IterateAllBalances. -func (mr *MockBankKeeperMockRecorder) IterateAllBalances(ctx, cb interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).IterateAllBalances), ctx, cb) -} - -// IterateAllDenomMetaData mocks base method. -func (m *MockBankKeeper) IterateAllDenomMetaData(ctx types.Context, cb func(types1.Metadata) bool) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateAllDenomMetaData", ctx, cb) -} - -// IterateAllDenomMetaData indicates an expected call of IterateAllDenomMetaData. -func (mr *MockBankKeeperMockRecorder) IterateAllDenomMetaData(ctx, cb interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateAllDenomMetaData", reflect.TypeOf((*MockBankKeeper)(nil).IterateAllDenomMetaData), ctx, cb) -} - -// IterateSendEnabledEntries mocks base method. -func (m *MockBankKeeper) IterateSendEnabledEntries(ctx types.Context, cb func(string, bool) bool) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateSendEnabledEntries", ctx, cb) -} - -// IterateSendEnabledEntries indicates an expected call of IterateSendEnabledEntries. -func (mr *MockBankKeeperMockRecorder) IterateSendEnabledEntries(ctx, cb interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateSendEnabledEntries", reflect.TypeOf((*MockBankKeeper)(nil).IterateSendEnabledEntries), ctx, cb) -} - -// IterateTotalSupply mocks base method. -func (m *MockBankKeeper) IterateTotalSupply(ctx types.Context, cb func(types.Coin) bool) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateTotalSupply", ctx, cb) -} - -// IterateTotalSupply indicates an expected call of IterateTotalSupply. -func (mr *MockBankKeeperMockRecorder) IterateTotalSupply(ctx, cb interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateTotalSupply", reflect.TypeOf((*MockBankKeeper)(nil).IterateTotalSupply), ctx, cb) -} - -// LockedCoins mocks base method. -func (m *MockBankKeeper) LockedCoins(ctx types.Context, addr types.AccAddress) types.Coins { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LockedCoins", ctx, addr) - ret0, _ := ret[0].(types.Coins) - return ret0 -} - -// LockedCoins indicates an expected call of LockedCoins. -func (mr *MockBankKeeperMockRecorder) LockedCoins(ctx, addr interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LockedCoins", reflect.TypeOf((*MockBankKeeper)(nil).LockedCoins), ctx, addr) -} - -// MintCoins mocks base method. -func (m *MockBankKeeper) MintCoins(ctx types.Context, moduleName string, amt types.Coins) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "MintCoins", ctx, moduleName, amt) - ret0, _ := ret[0].(error) - return ret0 -} - -// MintCoins indicates an expected call of MintCoins. -func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, moduleName, amt interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MintCoins", reflect.TypeOf((*MockBankKeeper)(nil).MintCoins), ctx, moduleName, amt) -} - -// Params mocks base method. -func (m *MockBankKeeper) Params(arg0 context.Context, arg1 *types1.QueryParamsRequest) (*types1.QueryParamsResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Params", arg0, arg1) - ret0, _ := ret[0].(*types1.QueryParamsResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Params indicates an expected call of Params. -func (mr *MockBankKeeperMockRecorder) Params(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Params", reflect.TypeOf((*MockBankKeeper)(nil).Params), arg0, arg1) -} - -// SendCoins mocks base method. -func (m *MockBankKeeper) SendCoins(ctx types.Context, fromAddr, toAddr types.AccAddress, amt types.Coins) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendCoins", ctx, fromAddr, toAddr, amt) - ret0, _ := ret[0].(error) - return ret0 -} - -// SendCoins indicates an expected call of SendCoins. -func (mr *MockBankKeeperMockRecorder) SendCoins(ctx, fromAddr, toAddr, amt interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoins", reflect.TypeOf((*MockBankKeeper)(nil).SendCoins), ctx, fromAddr, toAddr, amt) -} - -// SendCoinsFromAccountToModule mocks base method. -func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx types.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) - ret0, _ := ret[0].(error) - return ret0 -} - -// SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule. -func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) -} - -// SendCoinsFromModuleToAccount mocks base method. -func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx types.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) - ret0, _ := ret[0].(error) - return ret0 -} - -// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount. -func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) -} - -// SendCoinsFromModuleToModule mocks base method. -func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx types.Context, senderModule, recipientModule string, amt types.Coins) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendCoinsFromModuleToModule", ctx, senderModule, recipientModule, amt) - ret0, _ := ret[0].(error) - return ret0 -} - -// SendCoinsFromModuleToModule indicates an expected call of SendCoinsFromModuleToModule. -func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToModule), ctx, senderModule, recipientModule, amt) -} - -// SendEnabled mocks base method. -func (m *MockBankKeeper) SendEnabled(arg0 context.Context, arg1 *types1.QuerySendEnabledRequest) (*types1.QuerySendEnabledResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendEnabled", arg0, arg1) - ret0, _ := ret[0].(*types1.QuerySendEnabledResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// SendEnabled indicates an expected call of SendEnabled. -func (mr *MockBankKeeperMockRecorder) SendEnabled(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendEnabled", reflect.TypeOf((*MockBankKeeper)(nil).SendEnabled), arg0, arg1) -} - -// SetAllSendEnabled mocks base method. -func (m *MockBankKeeper) SetAllSendEnabled(ctx types.Context, sendEnableds []*types1.SendEnabled) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "SetAllSendEnabled", ctx, sendEnableds) -} - -// SetAllSendEnabled indicates an expected call of SetAllSendEnabled. -func (mr *MockBankKeeperMockRecorder) SetAllSendEnabled(ctx, sendEnableds interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAllSendEnabled", reflect.TypeOf((*MockBankKeeper)(nil).SetAllSendEnabled), ctx, sendEnableds) -} - -// SetDenomMetaData mocks base method. -func (m *MockBankKeeper) SetDenomMetaData(ctx types.Context, denomMetaData types1.Metadata) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "SetDenomMetaData", ctx, denomMetaData) -} - -// SetDenomMetaData indicates an expected call of SetDenomMetaData. -func (mr *MockBankKeeperMockRecorder) SetDenomMetaData(ctx, denomMetaData interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDenomMetaData", reflect.TypeOf((*MockBankKeeper)(nil).SetDenomMetaData), ctx, denomMetaData) -} - -// SetParams mocks base method. -func (m *MockBankKeeper) SetParams(ctx types.Context, params types1.Params) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SetParams", ctx, params) - ret0, _ := ret[0].(error) - return ret0 -} - -// SetParams indicates an expected call of SetParams. -func (mr *MockBankKeeperMockRecorder) SetParams(ctx, params interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetParams", reflect.TypeOf((*MockBankKeeper)(nil).SetParams), ctx, params) -} - -// SetSendEnabled mocks base method. -func (m *MockBankKeeper) SetSendEnabled(ctx types.Context, denom string, value bool) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "SetSendEnabled", ctx, denom, value) -} - -// SetSendEnabled indicates an expected call of SetSendEnabled. -func (mr *MockBankKeeperMockRecorder) SetSendEnabled(ctx, denom, value interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSendEnabled", reflect.TypeOf((*MockBankKeeper)(nil).SetSendEnabled), ctx, denom, value) -} - -// SpendableBalanceByDenom mocks base method. -func (m *MockBankKeeper) SpendableBalanceByDenom(arg0 context.Context, arg1 *types1.QuerySpendableBalanceByDenomRequest) (*types1.QuerySpendableBalanceByDenomResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SpendableBalanceByDenom", arg0, arg1) - ret0, _ := ret[0].(*types1.QuerySpendableBalanceByDenomResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// SpendableBalanceByDenom indicates an expected call of SpendableBalanceByDenom. -func (mr *MockBankKeeperMockRecorder) SpendableBalanceByDenom(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableBalanceByDenom", reflect.TypeOf((*MockBankKeeper)(nil).SpendableBalanceByDenom), arg0, arg1) -} - -// SpendableBalances mocks base method. -func (m *MockBankKeeper) SpendableBalances(arg0 context.Context, arg1 *types1.QuerySpendableBalancesRequest) (*types1.QuerySpendableBalancesResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SpendableBalances", arg0, arg1) - ret0, _ := ret[0].(*types1.QuerySpendableBalancesResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// SpendableBalances indicates an expected call of SpendableBalances. -func (mr *MockBankKeeperMockRecorder) SpendableBalances(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableBalances", reflect.TypeOf((*MockBankKeeper)(nil).SpendableBalances), arg0, arg1) -} - -// SpendableCoin mocks base method. -func (m *MockBankKeeper) SpendableCoin(ctx types.Context, addr types.AccAddress, denom string) types.Coin { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SpendableCoin", ctx, addr, denom) - ret0, _ := ret[0].(types.Coin) - return ret0 -} - -// SpendableCoin indicates an expected call of SpendableCoin. -func (mr *MockBankKeeperMockRecorder) SpendableCoin(ctx, addr, denom interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoin", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoin), ctx, addr, denom) -} - -// SpendableCoins mocks base method. -func (m *MockBankKeeper) SpendableCoins(ctx types.Context, addr types.AccAddress) types.Coins { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SpendableCoins", ctx, addr) - ret0, _ := ret[0].(types.Coins) - return ret0 -} - -// SpendableCoins indicates an expected call of SpendableCoins. -func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr) -} - -// SupplyOf mocks base method. -func (m *MockBankKeeper) SupplyOf(arg0 context.Context, arg1 *types1.QuerySupplyOfRequest) (*types1.QuerySupplyOfResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SupplyOf", arg0, arg1) - ret0, _ := ret[0].(*types1.QuerySupplyOfResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// SupplyOf indicates an expected call of SupplyOf. -func (mr *MockBankKeeperMockRecorder) SupplyOf(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupplyOf", reflect.TypeOf((*MockBankKeeper)(nil).SupplyOf), arg0, arg1) -} - -// TotalSupply mocks base method. -func (m *MockBankKeeper) TotalSupply(arg0 context.Context, arg1 *types1.QueryTotalSupplyRequest) (*types1.QueryTotalSupplyResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TotalSupply", arg0, arg1) - ret0, _ := ret[0].(*types1.QueryTotalSupplyResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// TotalSupply indicates an expected call of TotalSupply. -func (mr *MockBankKeeperMockRecorder) TotalSupply(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalSupply", reflect.TypeOf((*MockBankKeeper)(nil).TotalSupply), arg0, arg1) -} - -// UndelegateCoins mocks base method. -func (m *MockBankKeeper) UndelegateCoins(ctx types.Context, moduleAccAddr, delegatorAddr types.AccAddress, amt types.Coins) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UndelegateCoins", ctx, moduleAccAddr, delegatorAddr, amt) - ret0, _ := ret[0].(error) - return ret0 -} - -// UndelegateCoins indicates an expected call of UndelegateCoins. -func (mr *MockBankKeeperMockRecorder) UndelegateCoins(ctx, moduleAccAddr, delegatorAddr, amt interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UndelegateCoins", reflect.TypeOf((*MockBankKeeper)(nil).UndelegateCoins), ctx, moduleAccAddr, delegatorAddr, amt) -} - -// UndelegateCoinsFromModuleToAccount mocks base method. -func (m *MockBankKeeper) UndelegateCoinsFromModuleToAccount(ctx types.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UndelegateCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) - ret0, _ := ret[0].(error) - return ret0 -} - -// UndelegateCoinsFromModuleToAccount indicates an expected call of UndelegateCoinsFromModuleToAccount. -func (mr *MockBankKeeperMockRecorder) UndelegateCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UndelegateCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).UndelegateCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) -} - -// ValidateBalance mocks base method. -func (m *MockBankKeeper) ValidateBalance(ctx types.Context, addr types.AccAddress) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ValidateBalance", ctx, addr) - ret0, _ := ret[0].(error) - return ret0 -} - -// ValidateBalance indicates an expected call of ValidateBalance. -func (mr *MockBankKeeperMockRecorder) ValidateBalance(ctx, addr interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateBalance", reflect.TypeOf((*MockBankKeeper)(nil).ValidateBalance), ctx, addr) -} - -// WithMintCoinsRestriction mocks base method. -func (m *MockBankKeeper) WithMintCoinsRestriction(arg0 keeper.MintingRestrictionFn) keeper.BaseKeeper { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WithMintCoinsRestriction", arg0) - ret0, _ := ret[0].(keeper.BaseKeeper) - return ret0 -} - -// WithMintCoinsRestriction indicates an expected call of WithMintCoinsRestriction. -func (mr *MockBankKeeperMockRecorder) WithMintCoinsRestriction(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithMintCoinsRestriction", reflect.TypeOf((*MockBankKeeper)(nil).WithMintCoinsRestriction), arg0) -} - -// MockStakingKeeper is a mock of StakingKeeper interface. -type MockStakingKeeper struct { - ctrl *gomock.Controller - recorder *MockStakingKeeperMockRecorder -} - -// MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper. -type MockStakingKeeperMockRecorder struct { - mock *MockStakingKeeper -} - -// NewMockStakingKeeper creates a new mock instance. -func NewMockStakingKeeper(ctrl *gomock.Controller) *MockStakingKeeper { - mock := &MockStakingKeeper{ctrl: ctrl} - mock.recorder = &MockStakingKeeperMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { - return m.recorder -} - -// BondDenom mocks base method. -func (m *MockStakingKeeper) BondDenom(ctx types.Context) string { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BondDenom", ctx) - ret0, _ := ret[0].(string) - return ret0 -} - -// BondDenom indicates an expected call of BondDenom. -func (mr *MockStakingKeeperMockRecorder) BondDenom(ctx interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BondDenom", reflect.TypeOf((*MockStakingKeeper)(nil).BondDenom), ctx) -} - -// IterateBondedValidatorsByPower mocks base method. -func (m *MockStakingKeeper) IterateBondedValidatorsByPower(arg0 types.Context, arg1 func(int64, types2.ValidatorI) bool) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateBondedValidatorsByPower", arg0, arg1) -} - -// IterateBondedValidatorsByPower indicates an expected call of IterateBondedValidatorsByPower. -func (mr *MockStakingKeeperMockRecorder) IterateBondedValidatorsByPower(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateBondedValidatorsByPower", reflect.TypeOf((*MockStakingKeeper)(nil).IterateBondedValidatorsByPower), arg0, arg1) -} - -// IterateDelegations mocks base method. -func (m *MockStakingKeeper) IterateDelegations(ctx types.Context, delegator types.AccAddress, fn func(int64, types2.DelegationI) bool) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateDelegations", ctx, delegator, fn) -} - -// IterateDelegations indicates an expected call of IterateDelegations. -func (mr *MockStakingKeeperMockRecorder) IterateDelegations(ctx, delegator, fn interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateDelegations", reflect.TypeOf((*MockStakingKeeper)(nil).IterateDelegations), ctx, delegator, fn) -} - -// TokensFromConsensusPower mocks base method. -func (m *MockStakingKeeper) TokensFromConsensusPower(ctx types.Context, power int64) math.Int { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TokensFromConsensusPower", ctx, power) - ret0, _ := ret[0].(math.Int) - return ret0 -} - -// TokensFromConsensusPower indicates an expected call of TokensFromConsensusPower. -func (mr *MockStakingKeeperMockRecorder) TokensFromConsensusPower(ctx, power interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TokensFromConsensusPower", reflect.TypeOf((*MockStakingKeeper)(nil).TokensFromConsensusPower), ctx, power) -} - -// TotalBondedTokens mocks base method. -func (m *MockStakingKeeper) TotalBondedTokens(arg0 types.Context) math.Int { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TotalBondedTokens", arg0) - ret0, _ := ret[0].(math.Int) - return ret0 -} - -// TotalBondedTokens indicates an expected call of TotalBondedTokens. -func (mr *MockStakingKeeperMockRecorder) TotalBondedTokens(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalBondedTokens", reflect.TypeOf((*MockStakingKeeper)(nil).TotalBondedTokens), arg0) -} - -// MockCrossChainKeeper is a mock of CrossChainKeeper interface. -type MockCrossChainKeeper struct { - ctrl *gomock.Controller - recorder *MockCrossChainKeeperMockRecorder -} - -// MockCrossChainKeeperMockRecorder is the mock recorder for MockCrossChainKeeper. -type MockCrossChainKeeperMockRecorder struct { - mock *MockCrossChainKeeper -} - -// NewMockCrossChainKeeper creates a new mock instance. -func NewMockCrossChainKeeper(ctrl *gomock.Controller) *MockCrossChainKeeper { - mock := &MockCrossChainKeeper{ctrl: ctrl} - mock.recorder = &MockCrossChainKeeperMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockCrossChainKeeper) EXPECT() *MockCrossChainKeeperMockRecorder { - return m.recorder -} - -// CreateRawIBCPackageWithFee mocks base method. -func (m *MockCrossChainKeeper) CreateRawIBCPackageWithFee(ctx types.Context, channelID types.ChannelID, packageType types.CrossChainPackageType, packageLoad []byte, relayerFee, ackRelayerFee *big.Int) (uint64, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateRawIBCPackageWithFee", ctx, channelID, packageType, packageLoad, relayerFee, ackRelayerFee) - ret0, _ := ret[0].(uint64) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CreateRawIBCPackageWithFee indicates an expected call of CreateRawIBCPackageWithFee. -func (mr *MockCrossChainKeeperMockRecorder) CreateRawIBCPackageWithFee(ctx, channelID, packageType, packageLoad, relayerFee, ackRelayerFee interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRawIBCPackageWithFee", reflect.TypeOf((*MockCrossChainKeeper)(nil).CreateRawIBCPackageWithFee), ctx, channelID, packageType, packageLoad, relayerFee, ackRelayerFee) -} - -// RegisterChannel mocks base method. -func (m *MockCrossChainKeeper) RegisterChannel(name string, id types.ChannelID, app types.CrossChainApplication) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RegisterChannel", name, id, app) - ret0, _ := ret[0].(error) - return ret0 -} - -// RegisterChannel indicates an expected call of RegisterChannel. -func (mr *MockCrossChainKeeperMockRecorder) RegisterChannel(name, id, app interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterChannel", reflect.TypeOf((*MockCrossChainKeeper)(nil).RegisterChannel), name, id, app) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterProposalVotingPeriodEnded", reflect.TypeOf((*MockGovHooks)(nil).AfterProposalVotingPeriodEnded), ctx, proposalID) } diff --git a/x/gov/types/expected_keepers.go b/x/gov/types/expected_keepers.go index eae9e6a76b..70de43317c 100644 --- a/x/gov/types/expected_keepers.go +++ b/x/gov/types/expected_keepers.go @@ -53,7 +53,8 @@ type BankKeeper interface { } type CrossChainKeeper interface { - CreateRawIBCPackageWithFee(ctx sdk.Context, channelID sdk.ChannelID, packageType sdk.CrossChainPackageType, + GetDestBscChainID() sdk.ChainID + CreateRawIBCPackageWithFee(ctx sdk.Context, destChainId sdk.ChainID, channelID sdk.ChannelID, packageType sdk.CrossChainPackageType, packageLoad []byte, relayerFee, ackRelayerFee *big.Int, ) (uint64, error) diff --git a/x/oracle/keeper/msg_server.go b/x/oracle/keeper/msg_server.go index 9db0a2bbd7..dfe75714b7 100644 --- a/x/oracle/keeper/msg_server.go +++ b/x/oracle/keeper/msg_server.go @@ -59,7 +59,7 @@ func (k msgServer) Claim(goCtx context.Context, req *types.MsgClaim) (*types.Msg return nil, sdkerrors.Wrapf(types.ErrInvalidSrcChainId, "src chain id(%d) is not supported", req.SrcChainId) } - sequence := k.CrossChainKeeper.GetReceiveSequence(ctx, types.RelayPackagesChannelId) + sequence := k.CrossChainKeeper.GetReceiveSequence(ctx, sdk.ChainID(req.SrcChainId), types.RelayPackagesChannelId) if sequence != req.Sequence { return nil, sdkerrors.Wrapf(types.ErrInvalidReceiveSequence, "current sequence of channel %d is %d", types.RelayPackagesChannelId, sequence) } @@ -92,7 +92,7 @@ func (k msgServer) Claim(goCtx context.Context, req *types.MsgClaim) (*types.Msg totalRelayerFee = totalRelayerFee.Add(relayerFee) // increase channel sequence - k.CrossChainKeeper.IncrReceiveSequence(ctx, pack.ChannelId) + k.CrossChainKeeper.IncrReceiveSequence(ctx, sdk.ChainID(req.SrcChainId), pack.ChannelId) } err = k.distributeReward(ctx, relayer, signedRelayers, totalRelayerFee) @@ -100,7 +100,7 @@ func (k msgServer) Claim(goCtx context.Context, req *types.MsgClaim) (*types.Msg return nil, err } - k.CrossChainKeeper.IncrReceiveSequence(ctx, types.RelayPackagesChannelId) + k.CrossChainKeeper.IncrReceiveSequence(ctx, sdk.ChainID(req.SrcChainId), types.RelayPackagesChannelId) err = ctx.EventManager().EmitTypedEvents(events...) if err != nil { @@ -179,7 +179,7 @@ func (k Keeper) handlePackage( return sdkmath.ZeroInt(), nil, sdkerrors.Wrapf(types.ErrChannelNotRegistered, "channel %d not registered", pack.ChannelId) } - sequence := k.CrossChainKeeper.GetReceiveSequence(ctx, pack.ChannelId) + sequence := k.CrossChainKeeper.GetReceiveSequence(ctx, sdk.ChainID(srcChainId), pack.ChannelId) if sequence != pack.Sequence { return sdkmath.ZeroInt(), nil, sdkerrors.Wrapf(types.ErrInvalidReceiveSequence, "current sequence of channel %d is %d", pack.ChannelId, sequence) @@ -201,7 +201,7 @@ func (k Keeper) handlePackage( } cacheCtx, write := ctx.CacheContext() - crash, result := executeClaim(cacheCtx, crossChainApp, sequence, pack.Payload, &packageHeader) + crash, result := executeClaim(cacheCtx, crossChainApp, srcChainId, sequence, pack.Payload, &packageHeader) if result.IsOk() { write() } @@ -216,7 +216,7 @@ func (k Keeper) handlePackage( return sdkmath.ZeroInt(), nil, sdkerrors.Wrapf(types.ErrInvalidPackage, "payload without header") } - sendSeq, ibcErr := k.CrossChainKeeper.CreateRawIBCPackageWithFee(ctx, pack.ChannelId, + sendSeq, ibcErr := k.CrossChainKeeper.CreateRawIBCPackageWithFee(ctx, sdk.ChainID(srcChainId), pack.ChannelId, sdk.FailAckCrossChainPackageType, pack.Payload[sdk.SynPackageHeaderLength:], packageHeader.AckRelayerFee, sdk.NilAckRelayerFee) if ibcErr != nil { logger.Error("failed to write FailAckCrossChainPackage", "err", err) @@ -224,7 +224,7 @@ func (k Keeper) handlePackage( } sendSequence = int64(sendSeq) } else if len(result.Payload) != 0 { - sendSeq, err := k.CrossChainKeeper.CreateRawIBCPackageWithFee(ctx, pack.ChannelId, + sendSeq, err := k.CrossChainKeeper.CreateRawIBCPackageWithFee(ctx, sdk.ChainID(srcChainId), pack.ChannelId, sdk.AckCrossChainPackageType, result.Payload, packageHeader.AckRelayerFee, sdk.NilAckRelayerFee) if err != nil { logger.Error("failed to write AckCrossChainPackage", "err", err) @@ -253,6 +253,7 @@ func (k Keeper) handlePackage( func executeClaim( ctx sdk.Context, app sdk.CrossChainApplication, + srcChainId uint32, sequence uint64, payload []byte, header *sdk.PackageHeader, @@ -272,18 +273,21 @@ func executeClaim( switch header.PackageType { case sdk.SynCrossChainPackageType: result = app.ExecuteSynPackage(ctx, &sdk.CrossChainAppContext{ - Sequence: sequence, - Header: header, + SrcChainId: sdk.ChainID(srcChainId), + Sequence: sequence, + Header: header, }, payload[sdk.SynPackageHeaderLength:]) case sdk.AckCrossChainPackageType: result = app.ExecuteAckPackage(ctx, &sdk.CrossChainAppContext{ - Sequence: sequence, - Header: header, + SrcChainId: sdk.ChainID(srcChainId), + Sequence: sequence, + Header: header, }, payload[sdk.AckPackageHeaderLength:]) case sdk.FailAckCrossChainPackageType: result = app.ExecuteFailAckPackage(ctx, &sdk.CrossChainAppContext{ - Sequence: sequence, - Header: header, + SrcChainId: sdk.ChainID(srcChainId), + Sequence: sequence, + Header: header, }, payload[sdk.AckPackageHeaderLength:]) default: panic(fmt.Sprintf("receive unexpected package type %d", header.PackageType)) diff --git a/x/oracle/types/expected_keeper_mocks.go b/x/oracle/types/expected_keeper_mocks.go index 6756d97639..d63d1ffe3d 100644 --- a/x/oracle/types/expected_keeper_mocks.go +++ b/x/oracle/types/expected_keeper_mocks.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/cosmos/cosmos-sdk/x/oracle/types (interfaces: StakingKeeper,CrossChainKeeper,BankKeeper) +// Source: expected_keepers.go // Package types is a generated GoMock package. package types @@ -8,145 +8,144 @@ import ( big "math/big" reflect "reflect" - gomock "github.com/golang/mock/gomock" - types "github.com/cosmos/cosmos-sdk/types" types0 "github.com/cosmos/cosmos-sdk/x/staking/types" + gomock "github.com/golang/mock/gomock" ) -// MockStakingKeeper is a mock of StakingKeeper interface +// MockStakingKeeper is a mock of StakingKeeper interface. type MockStakingKeeper struct { ctrl *gomock.Controller recorder *MockStakingKeeperMockRecorder } -// MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper +// MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper. type MockStakingKeeperMockRecorder struct { mock *MockStakingKeeper } -// NewMockStakingKeeper creates a new mock instance +// NewMockStakingKeeper creates a new mock instance. func NewMockStakingKeeper(ctrl *gomock.Controller) *MockStakingKeeper { mock := &MockStakingKeeper{ctrl: ctrl} mock.recorder = &MockStakingKeeperMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use +// EXPECT returns an object that allows the caller to indicate expected use. func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { return m.recorder } -// BondDenom mocks base method -func (m *MockStakingKeeper) BondDenom(arg0 types.Context) string { +// BondDenom mocks base method. +func (m *MockStakingKeeper) BondDenom(ctx types.Context) string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BondDenom", arg0) + ret := m.ctrl.Call(m, "BondDenom", ctx) ret0, _ := ret[0].(string) return ret0 } -// BondDenom indicates an expected call of BondDenom -func (mr *MockStakingKeeperMockRecorder) BondDenom(arg0 interface{}) *gomock.Call { +// BondDenom indicates an expected call of BondDenom. +func (mr *MockStakingKeeperMockRecorder) BondDenom(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BondDenom", reflect.TypeOf((*MockStakingKeeper)(nil).BondDenom), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BondDenom", reflect.TypeOf((*MockStakingKeeper)(nil).BondDenom), ctx) } -// GetHistoricalInfo mocks base method -func (m *MockStakingKeeper) GetHistoricalInfo(arg0 types.Context, arg1 int64) (types0.HistoricalInfo, bool) { +// GetHistoricalInfo mocks base method. +func (m *MockStakingKeeper) GetHistoricalInfo(ctx types.Context, height int64) (types0.HistoricalInfo, bool) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetHistoricalInfo", arg0, arg1) + ret := m.ctrl.Call(m, "GetHistoricalInfo", ctx, height) ret0, _ := ret[0].(types0.HistoricalInfo) ret1, _ := ret[1].(bool) return ret0, ret1 } -// GetHistoricalInfo indicates an expected call of GetHistoricalInfo -func (mr *MockStakingKeeperMockRecorder) GetHistoricalInfo(arg0, arg1 interface{}) *gomock.Call { +// GetHistoricalInfo indicates an expected call of GetHistoricalInfo. +func (mr *MockStakingKeeperMockRecorder) GetHistoricalInfo(ctx, height interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHistoricalInfo", reflect.TypeOf((*MockStakingKeeper)(nil).GetHistoricalInfo), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHistoricalInfo", reflect.TypeOf((*MockStakingKeeper)(nil).GetHistoricalInfo), ctx, height) } -// GetLastValidators mocks base method -func (m *MockStakingKeeper) GetLastValidators(arg0 types.Context) []types0.Validator { +// GetLastValidators mocks base method. +func (m *MockStakingKeeper) GetLastValidators(ctx types.Context) []types0.Validator { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetLastValidators", arg0) + ret := m.ctrl.Call(m, "GetLastValidators", ctx) ret0, _ := ret[0].([]types0.Validator) return ret0 } -// GetLastValidators indicates an expected call of GetLastValidators -func (mr *MockStakingKeeperMockRecorder) GetLastValidators(arg0 interface{}) *gomock.Call { +// GetLastValidators indicates an expected call of GetLastValidators. +func (mr *MockStakingKeeperMockRecorder) GetLastValidators(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLastValidators", reflect.TypeOf((*MockStakingKeeper)(nil).GetLastValidators), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLastValidators", reflect.TypeOf((*MockStakingKeeper)(nil).GetLastValidators), ctx) } -// MockCrossChainKeeper is a mock of CrossChainKeeper interface +// MockCrossChainKeeper is a mock of CrossChainKeeper interface. type MockCrossChainKeeper struct { ctrl *gomock.Controller recorder *MockCrossChainKeeperMockRecorder } -// MockCrossChainKeeperMockRecorder is the mock recorder for MockCrossChainKeeper +// MockCrossChainKeeperMockRecorder is the mock recorder for MockCrossChainKeeper. type MockCrossChainKeeperMockRecorder struct { mock *MockCrossChainKeeper } -// NewMockCrossChainKeeper creates a new mock instance +// NewMockCrossChainKeeper creates a new mock instance. func NewMockCrossChainKeeper(ctrl *gomock.Controller) *MockCrossChainKeeper { mock := &MockCrossChainKeeper{ctrl: ctrl} mock.recorder = &MockCrossChainKeeperMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use +// EXPECT returns an object that allows the caller to indicate expected use. func (m *MockCrossChainKeeper) EXPECT() *MockCrossChainKeeperMockRecorder { return m.recorder } -// CreateRawIBCPackageWithFee mocks base method -func (m *MockCrossChainKeeper) CreateRawIBCPackageWithFee(arg0 types.Context, arg1 types.ChannelID, arg2 types.CrossChainPackageType, arg3 []byte, arg4, arg5 *big.Int) (uint64, error) { +// CreateRawIBCPackageWithFee mocks base method. +func (m *MockCrossChainKeeper) CreateRawIBCPackageWithFee(ctx types.Context, destChainId types.ChainID, channelID types.ChannelID, packageType types.CrossChainPackageType, packageLoad []byte, relayerFee, ackRelayerFee *big.Int) (uint64, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateRawIBCPackageWithFee", arg0, arg1, arg2, arg3, arg4, arg5) + ret := m.ctrl.Call(m, "CreateRawIBCPackageWithFee", ctx, destChainId, channelID, packageType, packageLoad, relayerFee, ackRelayerFee) ret0, _ := ret[0].(uint64) ret1, _ := ret[1].(error) return ret0, ret1 } -// CreateRawIBCPackageWithFee indicates an expected call of CreateRawIBCPackageWithFee -func (mr *MockCrossChainKeeperMockRecorder) CreateRawIBCPackageWithFee(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { +// CreateRawIBCPackageWithFee indicates an expected call of CreateRawIBCPackageWithFee. +func (mr *MockCrossChainKeeperMockRecorder) CreateRawIBCPackageWithFee(ctx, destChainId, channelID, packageType, packageLoad, relayerFee, ackRelayerFee interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRawIBCPackageWithFee", reflect.TypeOf((*MockCrossChainKeeper)(nil).CreateRawIBCPackageWithFee), arg0, arg1, arg2, arg3, arg4, arg5) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRawIBCPackageWithFee", reflect.TypeOf((*MockCrossChainKeeper)(nil).CreateRawIBCPackageWithFee), ctx, destChainId, channelID, packageType, packageLoad, relayerFee, ackRelayerFee) } -// GetCrossChainApp mocks base method -func (m *MockCrossChainKeeper) GetCrossChainApp(arg0 types.ChannelID) types.CrossChainApplication { +// GetCrossChainApp mocks base method. +func (m *MockCrossChainKeeper) GetCrossChainApp(channelID types.ChannelID) types.CrossChainApplication { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetCrossChainApp", arg0) + ret := m.ctrl.Call(m, "GetCrossChainApp", channelID) ret0, _ := ret[0].(types.CrossChainApplication) return ret0 } -// GetCrossChainApp indicates an expected call of GetCrossChainApp -func (mr *MockCrossChainKeeperMockRecorder) GetCrossChainApp(arg0 interface{}) *gomock.Call { +// GetCrossChainApp indicates an expected call of GetCrossChainApp. +func (mr *MockCrossChainKeeperMockRecorder) GetCrossChainApp(channelID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCrossChainApp", reflect.TypeOf((*MockCrossChainKeeper)(nil).GetCrossChainApp), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCrossChainApp", reflect.TypeOf((*MockCrossChainKeeper)(nil).GetCrossChainApp), channelID) } -// GetReceiveSequence mocks base method -func (m *MockCrossChainKeeper) GetReceiveSequence(arg0 types.Context, arg1 types.ChannelID) uint64 { +// GetReceiveSequence mocks base method. +func (m *MockCrossChainKeeper) GetReceiveSequence(ctx types.Context, chainId types.ChainID, channelID types.ChannelID) uint64 { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetReceiveSequence", arg0, arg1) + ret := m.ctrl.Call(m, "GetReceiveSequence", ctx, chainId, channelID) ret0, _ := ret[0].(uint64) return ret0 } -// GetReceiveSequence indicates an expected call of GetReceiveSequence -func (mr *MockCrossChainKeeperMockRecorder) GetReceiveSequence(arg0, arg1 interface{}) *gomock.Call { +// GetReceiveSequence indicates an expected call of GetReceiveSequence. +func (mr *MockCrossChainKeeperMockRecorder) GetReceiveSequence(ctx, chainId, channelID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReceiveSequence", reflect.TypeOf((*MockCrossChainKeeper)(nil).GetReceiveSequence), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReceiveSequence", reflect.TypeOf((*MockCrossChainKeeper)(nil).GetReceiveSequence), ctx, chainId, channelID) } -// GetSrcChainID mocks base method +// GetSrcChainID mocks base method. func (m *MockCrossChainKeeper) GetSrcChainID() types.ChainID { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetSrcChainID") @@ -154,71 +153,71 @@ func (m *MockCrossChainKeeper) GetSrcChainID() types.ChainID { return ret0 } -// GetSrcChainID indicates an expected call of GetSrcChainID +// GetSrcChainID indicates an expected call of GetSrcChainID. func (mr *MockCrossChainKeeperMockRecorder) GetSrcChainID() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSrcChainID", reflect.TypeOf((*MockCrossChainKeeper)(nil).GetSrcChainID)) } -// IncrReceiveSequence mocks base method -func (m *MockCrossChainKeeper) IncrReceiveSequence(arg0 types.Context, arg1 types.ChannelID) { +// IncrReceiveSequence mocks base method. +func (m *MockCrossChainKeeper) IncrReceiveSequence(ctx types.Context, chainId types.ChainID, channelID types.ChannelID) { m.ctrl.T.Helper() - m.ctrl.Call(m, "IncrReceiveSequence", arg0, arg1) + m.ctrl.Call(m, "IncrReceiveSequence", ctx, chainId, channelID) } -// IncrReceiveSequence indicates an expected call of IncrReceiveSequence -func (mr *MockCrossChainKeeperMockRecorder) IncrReceiveSequence(arg0, arg1 interface{}) *gomock.Call { +// IncrReceiveSequence indicates an expected call of IncrReceiveSequence. +func (mr *MockCrossChainKeeperMockRecorder) IncrReceiveSequence(ctx, chainId, channelID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IncrReceiveSequence", reflect.TypeOf((*MockCrossChainKeeper)(nil).IncrReceiveSequence), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IncrReceiveSequence", reflect.TypeOf((*MockCrossChainKeeper)(nil).IncrReceiveSequence), ctx, chainId, channelID) } -// IsDestChainSupported mocks base method -func (m *MockCrossChainKeeper) IsDestChainSupported(arg0 types.ChainID) bool { +// IsDestChainSupported mocks base method. +func (m *MockCrossChainKeeper) IsDestChainSupported(chainID types.ChainID) bool { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IsDestChainSupported", arg0) + ret := m.ctrl.Call(m, "IsDestChainSupported", chainID) ret0, _ := ret[0].(bool) return ret0 } -// IsDestChainSupported indicates an expected call of IsDestChainSupported -func (mr *MockCrossChainKeeperMockRecorder) IsDestChainSupported(arg0 interface{}) *gomock.Call { +// IsDestChainSupported indicates an expected call of IsDestChainSupported. +func (mr *MockCrossChainKeeperMockRecorder) IsDestChainSupported(chainID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsDestChainSupported", reflect.TypeOf((*MockCrossChainKeeper)(nil).IsDestChainSupported), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsDestChainSupported", reflect.TypeOf((*MockCrossChainKeeper)(nil).IsDestChainSupported), chainID) } -// MockBankKeeper is a mock of BankKeeper interface +// MockBankKeeper is a mock of BankKeeper interface. type MockBankKeeper struct { ctrl *gomock.Controller recorder *MockBankKeeperMockRecorder } -// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper +// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper. type MockBankKeeperMockRecorder struct { mock *MockBankKeeper } -// NewMockBankKeeper creates a new mock instance +// NewMockBankKeeper creates a new mock instance. func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper { mock := &MockBankKeeper{ctrl: ctrl} mock.recorder = &MockBankKeeperMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use +// EXPECT returns an object that allows the caller to indicate expected use. func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { return m.recorder } -// SendCoinsFromModuleToAccount mocks base method -func (m *MockBankKeeper) SendCoinsFromModuleToAccount(arg0 types.Context, arg1 string, arg2 types.AccAddress, arg3 types.Coins) error { +// SendCoinsFromModuleToAccount mocks base method. +func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx types.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendCoinsFromModuleToAccount", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "SendCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) ret0, _ := ret[0].(error) return ret0 } -// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount -func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) } diff --git a/x/oracle/types/expected_keepers.go b/x/oracle/types/expected_keepers.go index 47b24572d8..6d751db32e 100644 --- a/x/oracle/types/expected_keepers.go +++ b/x/oracle/types/expected_keepers.go @@ -14,14 +14,14 @@ type StakingKeeper interface { } type CrossChainKeeper interface { - CreateRawIBCPackageWithFee(ctx sdk.Context, channelID sdk.ChannelID, + CreateRawIBCPackageWithFee(ctx sdk.Context, destChainId sdk.ChainID, channelID sdk.ChannelID, packageType sdk.CrossChainPackageType, packageLoad []byte, relayerFee, ackRelayerFee *big.Int, ) (uint64, error) GetCrossChainApp(channelID sdk.ChannelID) sdk.CrossChainApplication GetSrcChainID() sdk.ChainID IsDestChainSupported(chainID sdk.ChainID) bool - GetReceiveSequence(ctx sdk.Context, channelID sdk.ChannelID) uint64 - IncrReceiveSequence(ctx sdk.Context, channelID sdk.ChannelID) + GetReceiveSequence(ctx sdk.Context, chainId sdk.ChainID, channelID sdk.ChannelID) uint64 + IncrReceiveSequence(ctx sdk.Context, chainId sdk.ChainID, channelID sdk.ChannelID) } type BankKeeper interface { From 83799325520bf86da3f469893beb4e5607658226 Mon Sep 17 00:00:00 2001 From: yutianwu Date: Wed, 12 Jul 2023 15:02:31 +0800 Subject: [PATCH 2/4] fix the ci cases --- x/gov/testutil/expected_keepers.go | 47 + x/gov/testutil/expected_keepers_mocks.go | 1110 +++++++++++++++++----- 2 files changed, 918 insertions(+), 239 deletions(-) create mode 100644 x/gov/testutil/expected_keepers.go diff --git a/x/gov/testutil/expected_keepers.go b/x/gov/testutil/expected_keepers.go new file mode 100644 index 0000000000..a018300264 --- /dev/null +++ b/x/gov/testutil/expected_keepers.go @@ -0,0 +1,47 @@ +// This file only used to generate mocks + +package testutil + +import ( + "math/big" + + math "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + "github.com/cosmos/cosmos-sdk/x/gov/types" +) + +// AccountKeeper extends gov's actual expected AccountKeeper with additional +// methods used in tests. +type AccountKeeper interface { + types.AccountKeeper + + IterateAccounts(ctx sdk.Context, cb func(account authtypes.AccountI) (stop bool)) +} + +// BankKeeper extends gov's actual expected BankKeeper with additional +// methods used in tests. +type BankKeeper interface { + bankkeeper.Keeper +} + +// StakingKeeper extends gov's actual expected StakingKeeper with additional +// methods used in tests. +type StakingKeeper interface { + types.StakingKeeper + + BondDenom(ctx sdk.Context) string + TokensFromConsensusPower(ctx sdk.Context, power int64) math.Int +} + +// CrossChainKeeper defines the expected crossChain keeper +type CrossChainKeeper interface { + GetDestBscChainID() sdk.ChainID + CreateRawIBCPackageWithFee(ctx sdk.Context, destChainId sdk.ChainID, channelID sdk.ChannelID, packageType sdk.CrossChainPackageType, + packageLoad []byte, relayerFee, ackRelayerFee *big.Int, + ) (uint64, error) + + RegisterChannel(name string, id sdk.ChannelID, app sdk.CrossChainApplication) error +} diff --git a/x/gov/testutil/expected_keepers_mocks.go b/x/gov/testutil/expected_keepers_mocks.go index 5d50b32bb6..be6731dd57 100644 --- a/x/gov/testutil/expected_keepers_mocks.go +++ b/x/gov/testutil/expected_keepers_mocks.go @@ -1,128 +1,23 @@ // Code generated by MockGen. DO NOT EDIT. // Source: x/gov/testutil/expected_keepers.go - // Package testutil is a generated GoMock package. package testutil import ( + context "context" big "math/big" reflect "reflect" math "cosmossdk.io/math" types "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" types0 "github.com/cosmos/cosmos-sdk/x/auth/types" - types1 "github.com/cosmos/cosmos-sdk/x/staking/types" + keeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + types1 "github.com/cosmos/cosmos-sdk/x/bank/types" + types2 "github.com/cosmos/cosmos-sdk/x/staking/types" gomock "github.com/golang/mock/gomock" ) -// MockParamSubspace is a mock of ParamSubspace interface. -type MockParamSubspace struct { - ctrl *gomock.Controller - recorder *MockParamSubspaceMockRecorder -} - -// MockParamSubspaceMockRecorder is the mock recorder for MockParamSubspace. -type MockParamSubspaceMockRecorder struct { - mock *MockParamSubspace -} - -// NewMockParamSubspace creates a new mock instance. -func NewMockParamSubspace(ctrl *gomock.Controller) *MockParamSubspace { - mock := &MockParamSubspace{ctrl: ctrl} - mock.recorder = &MockParamSubspaceMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockParamSubspace) EXPECT() *MockParamSubspaceMockRecorder { - return m.recorder -} - -// Get mocks base method. -func (m *MockParamSubspace) Get(ctx types.Context, key []byte, ptr interface{}) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "Get", ctx, key, ptr) -} - -// Get indicates an expected call of Get. -func (mr *MockParamSubspaceMockRecorder) Get(ctx, key, ptr interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockParamSubspace)(nil).Get), ctx, key, ptr) -} - -// Set mocks base method. -func (m *MockParamSubspace) Set(ctx types.Context, key []byte, param interface{}) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "Set", ctx, key, param) -} - -// Set indicates an expected call of Set. -func (mr *MockParamSubspaceMockRecorder) Set(ctx, key, param interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockParamSubspace)(nil).Set), ctx, key, param) -} - -// MockStakingKeeper is a mock of StakingKeeper interface. -type MockStakingKeeper struct { - ctrl *gomock.Controller - recorder *MockStakingKeeperMockRecorder -} - -// MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper. -type MockStakingKeeperMockRecorder struct { - mock *MockStakingKeeper -} - -// NewMockStakingKeeper creates a new mock instance. -func NewMockStakingKeeper(ctrl *gomock.Controller) *MockStakingKeeper { - mock := &MockStakingKeeper{ctrl: ctrl} - mock.recorder = &MockStakingKeeperMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { - return m.recorder -} - -// IterateBondedValidatorsByPower mocks base method. -func (m *MockStakingKeeper) IterateBondedValidatorsByPower(arg0 types.Context, arg1 func(int64, types1.ValidatorI) bool) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateBondedValidatorsByPower", arg0, arg1) -} - -// IterateBondedValidatorsByPower indicates an expected call of IterateBondedValidatorsByPower. -func (mr *MockStakingKeeperMockRecorder) IterateBondedValidatorsByPower(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateBondedValidatorsByPower", reflect.TypeOf((*MockStakingKeeper)(nil).IterateBondedValidatorsByPower), arg0, arg1) -} - -// IterateDelegations mocks base method. -func (m *MockStakingKeeper) IterateDelegations(ctx types.Context, delegator types.AccAddress, fn func(int64, types1.DelegationI) bool) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateDelegations", ctx, delegator, fn) -} - -// IterateDelegations indicates an expected call of IterateDelegations. -func (mr *MockStakingKeeperMockRecorder) IterateDelegations(ctx, delegator, fn interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateDelegations", reflect.TypeOf((*MockStakingKeeper)(nil).IterateDelegations), ctx, delegator, fn) -} - -// TotalBondedTokens mocks base method. -func (m *MockStakingKeeper) TotalBondedTokens(arg0 types.Context) math.Int { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TotalBondedTokens", arg0) - ret0, _ := ret[0].(math.Int) - return ret0 -} - -// TotalBondedTokens indicates an expected call of TotalBondedTokens. -func (mr *MockStakingKeeperMockRecorder) TotalBondedTokens(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalBondedTokens", reflect.TypeOf((*MockStakingKeeper)(nil).TotalBondedTokens), arg0) -} - // MockAccountKeeper is a mock of AccountKeeper interface. type MockAccountKeeper struct { ctrl *gomock.Controller @@ -188,6 +83,18 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name interface{}) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), name) } +// IterateAccounts mocks base method. +func (m *MockAccountKeeper) IterateAccounts(ctx types.Context, cb func(types0.AccountI) bool) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IterateAccounts", ctx, cb) +} + +// IterateAccounts indicates an expected call of IterateAccounts. +func (mr *MockAccountKeeperMockRecorder) IterateAccounts(ctx, cb interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateAccounts", reflect.TypeOf((*MockAccountKeeper)(nil).IterateAccounts), ctx, cb) +} + // SetModuleAccount mocks base method. func (m *MockAccountKeeper) SetModuleAccount(arg0 types.Context, arg1 types0.ModuleAccountI) { m.ctrl.T.Helper() @@ -223,249 +130,974 @@ func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { return m.recorder } +// AllBalances mocks base method. +func (m *MockBankKeeper) AllBalances(arg0 context.Context, arg1 *types1.QueryAllBalancesRequest) (*types1.QueryAllBalancesResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllBalances", arg0, arg1) + ret0, _ := ret[0].(*types1.QueryAllBalancesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllBalances indicates an expected call of AllBalances. +func (mr *MockBankKeeperMockRecorder) AllBalances(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllBalances", reflect.TypeOf((*MockBankKeeper)(nil).AllBalances), arg0, arg1) +} + +// Balance mocks base method. +func (m *MockBankKeeper) Balance(arg0 context.Context, arg1 *types1.QueryBalanceRequest) (*types1.QueryBalanceResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Balance", arg0, arg1) + ret0, _ := ret[0].(*types1.QueryBalanceResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Balance indicates an expected call of Balance. +func (mr *MockBankKeeperMockRecorder) Balance(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Balance", reflect.TypeOf((*MockBankKeeper)(nil).Balance), arg0, arg1) +} + +// BlockedAddr mocks base method. +func (m *MockBankKeeper) BlockedAddr(addr types.AccAddress) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BlockedAddr", addr) + ret0, _ := ret[0].(bool) + return ret0 +} + +// BlockedAddr indicates an expected call of BlockedAddr. +func (mr *MockBankKeeperMockRecorder) BlockedAddr(addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockedAddr", reflect.TypeOf((*MockBankKeeper)(nil).BlockedAddr), addr) +} + // BurnCoins mocks base method. -func (m *MockBankKeeper) BurnCoins(ctx types.Context, name string, amt types.Coins) error { +func (m *MockBankKeeper) BurnCoins(ctx types.Context, moduleName string, amt types.Coins) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BurnCoins", ctx, name, amt) + ret := m.ctrl.Call(m, "BurnCoins", ctx, moduleName, amt) ret0, _ := ret[0].(error) return ret0 } // BurnCoins indicates an expected call of BurnCoins. -func (mr *MockBankKeeperMockRecorder) BurnCoins(ctx, name, amt interface{}) *gomock.Call { +func (mr *MockBankKeeperMockRecorder) BurnCoins(ctx, moduleName, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BurnCoins", reflect.TypeOf((*MockBankKeeper)(nil).BurnCoins), ctx, name, amt) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BurnCoins", reflect.TypeOf((*MockBankKeeper)(nil).BurnCoins), ctx, moduleName, amt) } -// GetAllBalances mocks base method. -func (m *MockBankKeeper) GetAllBalances(ctx types.Context, addr types.AccAddress) types.Coins { +// DelegateCoins mocks base method. +func (m *MockBankKeeper) DelegateCoins(ctx types.Context, delegatorAddr, moduleAccAddr types.AccAddress, amt types.Coins) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAllBalances", ctx, addr) - ret0, _ := ret[0].(types.Coins) + ret := m.ctrl.Call(m, "DelegateCoins", ctx, delegatorAddr, moduleAccAddr, amt) + ret0, _ := ret[0].(error) return ret0 } -// GetAllBalances indicates an expected call of GetAllBalances. -func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call { +// DelegateCoins indicates an expected call of DelegateCoins. +func (mr *MockBankKeeperMockRecorder) DelegateCoins(ctx, delegatorAddr, moduleAccAddr, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAllBalances), ctx, addr) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelegateCoins", reflect.TypeOf((*MockBankKeeper)(nil).DelegateCoins), ctx, delegatorAddr, moduleAccAddr, amt) } -// GetBalance mocks base method. -func (m *MockBankKeeper) GetBalance(ctx types.Context, addr types.AccAddress, denom string) types.Coin { +// DelegateCoinsFromAccountToModule mocks base method. +func (m *MockBankKeeper) DelegateCoinsFromAccountToModule(ctx types.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetBalance", ctx, addr, denom) - ret0, _ := ret[0].(types.Coin) + ret := m.ctrl.Call(m, "DelegateCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) + ret0, _ := ret[0].(error) return ret0 } -// GetBalance indicates an expected call of GetBalance. -func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call { +// DelegateCoinsFromAccountToModule indicates an expected call of DelegateCoinsFromAccountToModule. +func (mr *MockBankKeeperMockRecorder) DelegateCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockBankKeeper)(nil).GetBalance), ctx, addr, denom) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelegateCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).DelegateCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) } -// LockedCoins mocks base method. -func (m *MockBankKeeper) LockedCoins(ctx types.Context, addr types.AccAddress) types.Coins { +// DeleteSendEnabled mocks base method. +func (m *MockBankKeeper) DeleteSendEnabled(ctx types.Context, denoms ...string) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LockedCoins", ctx, addr) - ret0, _ := ret[0].(types.Coins) - return ret0 + varargs := []interface{}{ctx} + for _, a := range denoms { + varargs = append(varargs, a) + } + m.ctrl.Call(m, "DeleteSendEnabled", varargs...) } -// LockedCoins indicates an expected call of LockedCoins. -func (mr *MockBankKeeperMockRecorder) LockedCoins(ctx, addr interface{}) *gomock.Call { +// DeleteSendEnabled indicates an expected call of DeleteSendEnabled. +func (mr *MockBankKeeperMockRecorder) DeleteSendEnabled(ctx interface{}, denoms ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LockedCoins", reflect.TypeOf((*MockBankKeeper)(nil).LockedCoins), ctx, addr) + varargs := append([]interface{}{ctx}, denoms...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSendEnabled", reflect.TypeOf((*MockBankKeeper)(nil).DeleteSendEnabled), varargs...) } -// SendCoinsFromAccountToModule mocks base method. -func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx types.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { +// DenomMetadata mocks base method. +func (m *MockBankKeeper) DenomMetadata(arg0 context.Context, arg1 *types1.QueryDenomMetadataRequest) (*types1.QueryDenomMetadataResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) - ret0, _ := ret[0].(error) + ret := m.ctrl.Call(m, "DenomMetadata", arg0, arg1) + ret0, _ := ret[0].(*types1.QueryDenomMetadataResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DenomMetadata indicates an expected call of DenomMetadata. +func (mr *MockBankKeeperMockRecorder) DenomMetadata(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DenomMetadata", reflect.TypeOf((*MockBankKeeper)(nil).DenomMetadata), arg0, arg1) +} + +// DenomOwners mocks base method. +func (m *MockBankKeeper) DenomOwners(arg0 context.Context, arg1 *types1.QueryDenomOwnersRequest) (*types1.QueryDenomOwnersResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DenomOwners", arg0, arg1) + ret0, _ := ret[0].(*types1.QueryDenomOwnersResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DenomOwners indicates an expected call of DenomOwners. +func (mr *MockBankKeeperMockRecorder) DenomOwners(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DenomOwners", reflect.TypeOf((*MockBankKeeper)(nil).DenomOwners), arg0, arg1) +} + +// DenomsMetadata mocks base method. +func (m *MockBankKeeper) DenomsMetadata(arg0 context.Context, arg1 *types1.QueryDenomsMetadataRequest) (*types1.QueryDenomsMetadataResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DenomsMetadata", arg0, arg1) + ret0, _ := ret[0].(*types1.QueryDenomsMetadataResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DenomsMetadata indicates an expected call of DenomsMetadata. +func (mr *MockBankKeeperMockRecorder) DenomsMetadata(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DenomsMetadata", reflect.TypeOf((*MockBankKeeper)(nil).DenomsMetadata), arg0, arg1) +} + +// ExportGenesis mocks base method. +func (m *MockBankKeeper) ExportGenesis(arg0 types.Context) *types1.GenesisState { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ExportGenesis", arg0) + ret0, _ := ret[0].(*types1.GenesisState) return ret0 } -// SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule. -func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call { +// ExportGenesis indicates an expected call of ExportGenesis. +func (mr *MockBankKeeperMockRecorder) ExportGenesis(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockBankKeeper)(nil).ExportGenesis), arg0) } -// SendCoinsFromModuleToAccount mocks base method. -func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx types.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error { +// GetAccountsBalances mocks base method. +func (m *MockBankKeeper) GetAccountsBalances(ctx types.Context) []types1.Balance { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) - ret0, _ := ret[0].(error) + ret := m.ctrl.Call(m, "GetAccountsBalances", ctx) + ret0, _ := ret[0].([]types1.Balance) return ret0 } -// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount. -func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call { +// GetAccountsBalances indicates an expected call of GetAccountsBalances. +func (mr *MockBankKeeperMockRecorder) GetAccountsBalances(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountsBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAccountsBalances), ctx) } -// SpendableCoins mocks base method. -func (m *MockBankKeeper) SpendableCoins(ctx types.Context, addr types.AccAddress) types.Coins { +// GetAllBalances mocks base method. +func (m *MockBankKeeper) GetAllBalances(ctx types.Context, addr types.AccAddress) types.Coins { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SpendableCoins", ctx, addr) + ret := m.ctrl.Call(m, "GetAllBalances", ctx, addr) ret0, _ := ret[0].(types.Coins) return ret0 } -// SpendableCoins indicates an expected call of SpendableCoins. -func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call { +// GetAllBalances indicates an expected call of GetAllBalances. +func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAllBalances), ctx, addr) } -// MockCrossChainKeeper is a mock of CrossChainKeeper interface. -type MockCrossChainKeeper struct { - ctrl *gomock.Controller - recorder *MockCrossChainKeeperMockRecorder +// GetAllDenomMetaData mocks base method. +func (m *MockBankKeeper) GetAllDenomMetaData(ctx types.Context) []types1.Metadata { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllDenomMetaData", ctx) + ret0, _ := ret[0].([]types1.Metadata) + return ret0 } -// MockCrossChainKeeperMockRecorder is the mock recorder for MockCrossChainKeeper. -type MockCrossChainKeeperMockRecorder struct { - mock *MockCrossChainKeeper +// GetAllDenomMetaData indicates an expected call of GetAllDenomMetaData. +func (mr *MockBankKeeperMockRecorder) GetAllDenomMetaData(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllDenomMetaData", reflect.TypeOf((*MockBankKeeper)(nil).GetAllDenomMetaData), ctx) } -// NewMockCrossChainKeeper creates a new mock instance. -func NewMockCrossChainKeeper(ctrl *gomock.Controller) *MockCrossChainKeeper { - mock := &MockCrossChainKeeper{ctrl: ctrl} - mock.recorder = &MockCrossChainKeeperMockRecorder{mock} - return mock +// GetAllSendEnabledEntries mocks base method. +func (m *MockBankKeeper) GetAllSendEnabledEntries(ctx types.Context) []types1.SendEnabled { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllSendEnabledEntries", ctx) + ret0, _ := ret[0].([]types1.SendEnabled) + return ret0 } -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockCrossChainKeeper) EXPECT() *MockCrossChainKeeperMockRecorder { - return m.recorder +// GetAllSendEnabledEntries indicates an expected call of GetAllSendEnabledEntries. +func (mr *MockBankKeeperMockRecorder) GetAllSendEnabledEntries(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSendEnabledEntries", reflect.TypeOf((*MockBankKeeper)(nil).GetAllSendEnabledEntries), ctx) } -// CreateRawIBCPackageWithFee mocks base method. -func (m *MockCrossChainKeeper) CreateRawIBCPackageWithFee(ctx types.Context, destChainId types.ChainID, channelID types.ChannelID, packageType types.CrossChainPackageType, packageLoad []byte, relayerFee, ackRelayerFee *big.Int) (uint64, error) { +// GetAuthority mocks base method. +func (m *MockBankKeeper) GetAuthority() string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateRawIBCPackageWithFee", ctx, destChainId, channelID, packageType, packageLoad, relayerFee, ackRelayerFee) - ret0, _ := ret[0].(uint64) - ret1, _ := ret[1].(error) - return ret0, ret1 + ret := m.ctrl.Call(m, "GetAuthority") + ret0, _ := ret[0].(string) + return ret0 } -// CreateRawIBCPackageWithFee indicates an expected call of CreateRawIBCPackageWithFee. -func (mr *MockCrossChainKeeperMockRecorder) CreateRawIBCPackageWithFee(ctx, destChainId, channelID, packageType, packageLoad, relayerFee, ackRelayerFee interface{}) *gomock.Call { +// GetAuthority indicates an expected call of GetAuthority. +func (mr *MockBankKeeperMockRecorder) GetAuthority() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRawIBCPackageWithFee", reflect.TypeOf((*MockCrossChainKeeper)(nil).CreateRawIBCPackageWithFee), ctx, destChainId, channelID, packageType, packageLoad, relayerFee, ackRelayerFee) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthority", reflect.TypeOf((*MockBankKeeper)(nil).GetAuthority)) } -// GetDestBscChainID mocks base method. -func (m *MockCrossChainKeeper) GetDestBscChainID() types.ChainID { +// GetBalance mocks base method. +func (m *MockBankKeeper) GetBalance(ctx types.Context, addr types.AccAddress, denom string) types.Coin { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetDestBscChainID") - ret0, _ := ret[0].(types.ChainID) + ret := m.ctrl.Call(m, "GetBalance", ctx, addr, denom) + ret0, _ := ret[0].(types.Coin) return ret0 } -// GetDestBscChainID indicates an expected call of GetDestBscChainID. -func (mr *MockCrossChainKeeperMockRecorder) GetDestBscChainID() *gomock.Call { +// GetBalance indicates an expected call of GetBalance. +func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDestBscChainID", reflect.TypeOf((*MockCrossChainKeeper)(nil).GetDestBscChainID)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockBankKeeper)(nil).GetBalance), ctx, addr, denom) } -// RegisterChannel mocks base method. -func (m *MockCrossChainKeeper) RegisterChannel(name string, id types.ChannelID, app types.CrossChainApplication) error { +// GetBlockedAddresses mocks base method. +func (m *MockBankKeeper) GetBlockedAddresses() map[string]bool { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RegisterChannel", name, id, app) - ret0, _ := ret[0].(error) + ret := m.ctrl.Call(m, "GetBlockedAddresses") + ret0, _ := ret[0].(map[string]bool) return ret0 } -// RegisterChannel indicates an expected call of RegisterChannel. -func (mr *MockCrossChainKeeperMockRecorder) RegisterChannel(name, id, app interface{}) *gomock.Call { +// GetBlockedAddresses indicates an expected call of GetBlockedAddresses. +func (mr *MockBankKeeperMockRecorder) GetBlockedAddresses() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterChannel", reflect.TypeOf((*MockCrossChainKeeper)(nil).RegisterChannel), name, id, app) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockedAddresses", reflect.TypeOf((*MockBankKeeper)(nil).GetBlockedAddresses)) } -// MockGovHooks is a mock of GovHooks interface. -type MockGovHooks struct { - ctrl *gomock.Controller - recorder *MockGovHooksMockRecorder +// GetDenomMetaData mocks base method. +func (m *MockBankKeeper) GetDenomMetaData(ctx types.Context, denom string) (types1.Metadata, bool) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetDenomMetaData", ctx, denom) + ret0, _ := ret[0].(types1.Metadata) + ret1, _ := ret[1].(bool) + return ret0, ret1 } -// MockGovHooksMockRecorder is the mock recorder for MockGovHooks. -type MockGovHooksMockRecorder struct { - mock *MockGovHooks +// GetDenomMetaData indicates an expected call of GetDenomMetaData. +func (mr *MockBankKeeperMockRecorder) GetDenomMetaData(ctx, denom interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDenomMetaData", reflect.TypeOf((*MockBankKeeper)(nil).GetDenomMetaData), ctx, denom) } -// NewMockGovHooks creates a new mock instance. -func NewMockGovHooks(ctrl *gomock.Controller) *MockGovHooks { - mock := &MockGovHooks{ctrl: ctrl} - mock.recorder = &MockGovHooksMockRecorder{mock} - return mock +// GetPaginatedTotalSupply mocks base method. +func (m *MockBankKeeper) GetPaginatedTotalSupply(ctx types.Context, pagination *query.PageRequest) (types.Coins, *query.PageResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPaginatedTotalSupply", ctx, pagination) + ret0, _ := ret[0].(types.Coins) + ret1, _ := ret[1].(*query.PageResponse) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 } -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockGovHooks) EXPECT() *MockGovHooksMockRecorder { - return m.recorder +// GetPaginatedTotalSupply indicates an expected call of GetPaginatedTotalSupply. +func (mr *MockBankKeeperMockRecorder) GetPaginatedTotalSupply(ctx, pagination interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPaginatedTotalSupply", reflect.TypeOf((*MockBankKeeper)(nil).GetPaginatedTotalSupply), ctx, pagination) } -// AfterProposalDeposit mocks base method. -func (m *MockGovHooks) AfterProposalDeposit(ctx types.Context, proposalID uint64, depositorAddr types.AccAddress) { +// GetParams mocks base method. +func (m *MockBankKeeper) GetParams(ctx types.Context) types1.Params { m.ctrl.T.Helper() - m.ctrl.Call(m, "AfterProposalDeposit", ctx, proposalID, depositorAddr) + ret := m.ctrl.Call(m, "GetParams", ctx) + ret0, _ := ret[0].(types1.Params) + return ret0 } -// AfterProposalDeposit indicates an expected call of AfterProposalDeposit. -func (mr *MockGovHooksMockRecorder) AfterProposalDeposit(ctx, proposalID, depositorAddr interface{}) *gomock.Call { +// GetParams indicates an expected call of GetParams. +func (mr *MockBankKeeperMockRecorder) GetParams(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterProposalDeposit", reflect.TypeOf((*MockGovHooks)(nil).AfterProposalDeposit), ctx, proposalID, depositorAddr) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetParams", reflect.TypeOf((*MockBankKeeper)(nil).GetParams), ctx) } -// AfterProposalFailedMinDeposit mocks base method. -func (m *MockGovHooks) AfterProposalFailedMinDeposit(ctx types.Context, proposalID uint64) { +// GetSendEnabledEntry mocks base method. +func (m *MockBankKeeper) GetSendEnabledEntry(ctx types.Context, denom string) (types1.SendEnabled, bool) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AfterProposalFailedMinDeposit", ctx, proposalID) + ret := m.ctrl.Call(m, "GetSendEnabledEntry", ctx, denom) + ret0, _ := ret[0].(types1.SendEnabled) + ret1, _ := ret[1].(bool) + return ret0, ret1 } -// AfterProposalFailedMinDeposit indicates an expected call of AfterProposalFailedMinDeposit. -func (mr *MockGovHooksMockRecorder) AfterProposalFailedMinDeposit(ctx, proposalID interface{}) *gomock.Call { +// GetSendEnabledEntry indicates an expected call of GetSendEnabledEntry. +func (mr *MockBankKeeperMockRecorder) GetSendEnabledEntry(ctx, denom interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterProposalFailedMinDeposit", reflect.TypeOf((*MockGovHooks)(nil).AfterProposalFailedMinDeposit), ctx, proposalID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSendEnabledEntry", reflect.TypeOf((*MockBankKeeper)(nil).GetSendEnabledEntry), ctx, denom) } -// AfterProposalSubmission mocks base method. -func (m *MockGovHooks) AfterProposalSubmission(ctx types.Context, proposalID uint64) { +// GetSupply mocks base method. +func (m *MockBankKeeper) GetSupply(ctx types.Context, denom string) types.Coin { m.ctrl.T.Helper() - m.ctrl.Call(m, "AfterProposalSubmission", ctx, proposalID) + ret := m.ctrl.Call(m, "GetSupply", ctx, denom) + ret0, _ := ret[0].(types.Coin) + return ret0 } -// AfterProposalSubmission indicates an expected call of AfterProposalSubmission. -func (mr *MockGovHooksMockRecorder) AfterProposalSubmission(ctx, proposalID interface{}) *gomock.Call { +// GetSupply indicates an expected call of GetSupply. +func (mr *MockBankKeeperMockRecorder) GetSupply(ctx, denom interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterProposalSubmission", reflect.TypeOf((*MockGovHooks)(nil).AfterProposalSubmission), ctx, proposalID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSupply", reflect.TypeOf((*MockBankKeeper)(nil).GetSupply), ctx, denom) } -// AfterProposalVote mocks base method. -func (m *MockGovHooks) AfterProposalVote(ctx types.Context, proposalID uint64, voterAddr types.AccAddress) { +// HasBalance mocks base method. +func (m *MockBankKeeper) HasBalance(ctx types.Context, addr types.AccAddress, amt types.Coin) bool { m.ctrl.T.Helper() - m.ctrl.Call(m, "AfterProposalVote", ctx, proposalID, voterAddr) + ret := m.ctrl.Call(m, "HasBalance", ctx, addr, amt) + ret0, _ := ret[0].(bool) + return ret0 } -// AfterProposalVote indicates an expected call of AfterProposalVote. -func (mr *MockGovHooksMockRecorder) AfterProposalVote(ctx, proposalID, voterAddr interface{}) *gomock.Call { +// HasBalance indicates an expected call of HasBalance. +func (mr *MockBankKeeperMockRecorder) HasBalance(ctx, addr, amt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterProposalVote", reflect.TypeOf((*MockGovHooks)(nil).AfterProposalVote), ctx, proposalID, voterAddr) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasBalance", reflect.TypeOf((*MockBankKeeper)(nil).HasBalance), ctx, addr, amt) } -// AfterProposalVotingPeriodEnded mocks base method. -func (m *MockGovHooks) AfterProposalVotingPeriodEnded(ctx types.Context, proposalID uint64) { +// HasDenomMetaData mocks base method. +func (m *MockBankKeeper) HasDenomMetaData(ctx types.Context, denom string) bool { m.ctrl.T.Helper() - m.ctrl.Call(m, "AfterProposalVotingPeriodEnded", ctx, proposalID) + ret := m.ctrl.Call(m, "HasDenomMetaData", ctx, denom) + ret0, _ := ret[0].(bool) + return ret0 } -// AfterProposalVotingPeriodEnded indicates an expected call of AfterProposalVotingPeriodEnded. -func (mr *MockGovHooksMockRecorder) AfterProposalVotingPeriodEnded(ctx, proposalID interface{}) *gomock.Call { +// HasDenomMetaData indicates an expected call of HasDenomMetaData. +func (mr *MockBankKeeperMockRecorder) HasDenomMetaData(ctx, denom interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterProposalVotingPeriodEnded", reflect.TypeOf((*MockGovHooks)(nil).AfterProposalVotingPeriodEnded), ctx, proposalID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasDenomMetaData", reflect.TypeOf((*MockBankKeeper)(nil).HasDenomMetaData), ctx, denom) +} + +// HasSupply mocks base method. +func (m *MockBankKeeper) HasSupply(ctx types.Context, denom string) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "HasSupply", ctx, denom) + ret0, _ := ret[0].(bool) + return ret0 +} + +// HasSupply indicates an expected call of HasSupply. +func (mr *MockBankKeeperMockRecorder) HasSupply(ctx, denom interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasSupply", reflect.TypeOf((*MockBankKeeper)(nil).HasSupply), ctx, denom) +} + +// InitGenesis mocks base method. +func (m *MockBankKeeper) InitGenesis(arg0 types.Context, arg1 *types1.GenesisState) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "InitGenesis", arg0, arg1) +} + +// InitGenesis indicates an expected call of InitGenesis. +func (mr *MockBankKeeperMockRecorder) InitGenesis(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockBankKeeper)(nil).InitGenesis), arg0, arg1) +} + +// InputOutputCoins mocks base method. +func (m *MockBankKeeper) InputOutputCoins(ctx types.Context, inputs []types1.Input, outputs []types1.Output) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "InputOutputCoins", ctx, inputs, outputs) + ret0, _ := ret[0].(error) + return ret0 +} + +// InputOutputCoins indicates an expected call of InputOutputCoins. +func (mr *MockBankKeeperMockRecorder) InputOutputCoins(ctx, inputs, outputs interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InputOutputCoins", reflect.TypeOf((*MockBankKeeper)(nil).InputOutputCoins), ctx, inputs, outputs) +} + +// IsSendEnabledCoin mocks base method. +func (m *MockBankKeeper) IsSendEnabledCoin(ctx types.Context, coin types.Coin) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsSendEnabledCoin", ctx, coin) + ret0, _ := ret[0].(bool) + return ret0 +} + +// IsSendEnabledCoin indicates an expected call of IsSendEnabledCoin. +func (mr *MockBankKeeperMockRecorder) IsSendEnabledCoin(ctx, coin interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSendEnabledCoin", reflect.TypeOf((*MockBankKeeper)(nil).IsSendEnabledCoin), ctx, coin) +} + +// IsSendEnabledCoins mocks base method. +func (m *MockBankKeeper) IsSendEnabledCoins(ctx types.Context, coins ...types.Coin) error { + m.ctrl.T.Helper() + varargs := []interface{}{ctx} + for _, a := range coins { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "IsSendEnabledCoins", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// IsSendEnabledCoins indicates an expected call of IsSendEnabledCoins. +func (mr *MockBankKeeperMockRecorder) IsSendEnabledCoins(ctx interface{}, coins ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx}, coins...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSendEnabledCoins", reflect.TypeOf((*MockBankKeeper)(nil).IsSendEnabledCoins), varargs...) +} + +// IsSendEnabledDenom mocks base method. +func (m *MockBankKeeper) IsSendEnabledDenom(ctx types.Context, denom string) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsSendEnabledDenom", ctx, denom) + ret0, _ := ret[0].(bool) + return ret0 +} + +// IsSendEnabledDenom indicates an expected call of IsSendEnabledDenom. +func (mr *MockBankKeeperMockRecorder) IsSendEnabledDenom(ctx, denom interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSendEnabledDenom", reflect.TypeOf((*MockBankKeeper)(nil).IsSendEnabledDenom), ctx, denom) +} + +// IterateAccountBalances mocks base method. +func (m *MockBankKeeper) IterateAccountBalances(ctx types.Context, addr types.AccAddress, cb func(types.Coin) bool) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IterateAccountBalances", ctx, addr, cb) +} + +// IterateAccountBalances indicates an expected call of IterateAccountBalances. +func (mr *MockBankKeeperMockRecorder) IterateAccountBalances(ctx, addr, cb interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateAccountBalances", reflect.TypeOf((*MockBankKeeper)(nil).IterateAccountBalances), ctx, addr, cb) +} + +// IterateAllBalances mocks base method. +func (m *MockBankKeeper) IterateAllBalances(ctx types.Context, cb func(types.AccAddress, types.Coin) bool) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IterateAllBalances", ctx, cb) +} + +// IterateAllBalances indicates an expected call of IterateAllBalances. +func (mr *MockBankKeeperMockRecorder) IterateAllBalances(ctx, cb interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).IterateAllBalances), ctx, cb) +} + +// IterateAllDenomMetaData mocks base method. +func (m *MockBankKeeper) IterateAllDenomMetaData(ctx types.Context, cb func(types1.Metadata) bool) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IterateAllDenomMetaData", ctx, cb) +} + +// IterateAllDenomMetaData indicates an expected call of IterateAllDenomMetaData. +func (mr *MockBankKeeperMockRecorder) IterateAllDenomMetaData(ctx, cb interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateAllDenomMetaData", reflect.TypeOf((*MockBankKeeper)(nil).IterateAllDenomMetaData), ctx, cb) +} + +// IterateSendEnabledEntries mocks base method. +func (m *MockBankKeeper) IterateSendEnabledEntries(ctx types.Context, cb func(string, bool) bool) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IterateSendEnabledEntries", ctx, cb) +} + +// IterateSendEnabledEntries indicates an expected call of IterateSendEnabledEntries. +func (mr *MockBankKeeperMockRecorder) IterateSendEnabledEntries(ctx, cb interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateSendEnabledEntries", reflect.TypeOf((*MockBankKeeper)(nil).IterateSendEnabledEntries), ctx, cb) +} + +// IterateTotalSupply mocks base method. +func (m *MockBankKeeper) IterateTotalSupply(ctx types.Context, cb func(types.Coin) bool) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IterateTotalSupply", ctx, cb) +} + +// IterateTotalSupply indicates an expected call of IterateTotalSupply. +func (mr *MockBankKeeperMockRecorder) IterateTotalSupply(ctx, cb interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateTotalSupply", reflect.TypeOf((*MockBankKeeper)(nil).IterateTotalSupply), ctx, cb) +} + +// LockedCoins mocks base method. +func (m *MockBankKeeper) LockedCoins(ctx types.Context, addr types.AccAddress) types.Coins { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "LockedCoins", ctx, addr) + ret0, _ := ret[0].(types.Coins) + return ret0 +} + +// LockedCoins indicates an expected call of LockedCoins. +func (mr *MockBankKeeperMockRecorder) LockedCoins(ctx, addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LockedCoins", reflect.TypeOf((*MockBankKeeper)(nil).LockedCoins), ctx, addr) +} + +// MintCoins mocks base method. +func (m *MockBankKeeper) MintCoins(ctx types.Context, moduleName string, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "MintCoins", ctx, moduleName, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// MintCoins indicates an expected call of MintCoins. +func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, moduleName, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MintCoins", reflect.TypeOf((*MockBankKeeper)(nil).MintCoins), ctx, moduleName, amt) +} + +// Params mocks base method. +func (m *MockBankKeeper) Params(arg0 context.Context, arg1 *types1.QueryParamsRequest) (*types1.QueryParamsResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Params", arg0, arg1) + ret0, _ := ret[0].(*types1.QueryParamsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Params indicates an expected call of Params. +func (mr *MockBankKeeperMockRecorder) Params(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Params", reflect.TypeOf((*MockBankKeeper)(nil).Params), arg0, arg1) +} + +// SendCoins mocks base method. +func (m *MockBankKeeper) SendCoins(ctx types.Context, fromAddr, toAddr types.AccAddress, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoins", ctx, fromAddr, toAddr, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoins indicates an expected call of SendCoins. +func (mr *MockBankKeeperMockRecorder) SendCoins(ctx, fromAddr, toAddr, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoins", reflect.TypeOf((*MockBankKeeper)(nil).SendCoins), ctx, fromAddr, toAddr, amt) +} + +// SendCoinsFromAccountToModule mocks base method. +func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx types.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) +} + +// SendCoinsFromModuleToAccount mocks base method. +func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx types.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) +} + +// SendCoinsFromModuleToModule mocks base method. +func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx types.Context, senderModule, recipientModule string, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromModuleToModule", ctx, senderModule, recipientModule, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromModuleToModule indicates an expected call of SendCoinsFromModuleToModule. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToModule), ctx, senderModule, recipientModule, amt) +} + +// SendEnabled mocks base method. +func (m *MockBankKeeper) SendEnabled(arg0 context.Context, arg1 *types1.QuerySendEnabledRequest) (*types1.QuerySendEnabledResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendEnabled", arg0, arg1) + ret0, _ := ret[0].(*types1.QuerySendEnabledResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SendEnabled indicates an expected call of SendEnabled. +func (mr *MockBankKeeperMockRecorder) SendEnabled(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendEnabled", reflect.TypeOf((*MockBankKeeper)(nil).SendEnabled), arg0, arg1) +} + +// SetAllSendEnabled mocks base method. +func (m *MockBankKeeper) SetAllSendEnabled(ctx types.Context, sendEnableds []*types1.SendEnabled) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetAllSendEnabled", ctx, sendEnableds) +} + +// SetAllSendEnabled indicates an expected call of SetAllSendEnabled. +func (mr *MockBankKeeperMockRecorder) SetAllSendEnabled(ctx, sendEnableds interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAllSendEnabled", reflect.TypeOf((*MockBankKeeper)(nil).SetAllSendEnabled), ctx, sendEnableds) +} + +// SetDenomMetaData mocks base method. +func (m *MockBankKeeper) SetDenomMetaData(ctx types.Context, denomMetaData types1.Metadata) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetDenomMetaData", ctx, denomMetaData) +} + +// SetDenomMetaData indicates an expected call of SetDenomMetaData. +func (mr *MockBankKeeperMockRecorder) SetDenomMetaData(ctx, denomMetaData interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDenomMetaData", reflect.TypeOf((*MockBankKeeper)(nil).SetDenomMetaData), ctx, denomMetaData) +} + +// SetParams mocks base method. +func (m *MockBankKeeper) SetParams(ctx types.Context, params types1.Params) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SetParams", ctx, params) + ret0, _ := ret[0].(error) + return ret0 +} + +// SetParams indicates an expected call of SetParams. +func (mr *MockBankKeeperMockRecorder) SetParams(ctx, params interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetParams", reflect.TypeOf((*MockBankKeeper)(nil).SetParams), ctx, params) +} + +// SetSendEnabled mocks base method. +func (m *MockBankKeeper) SetSendEnabled(ctx types.Context, denom string, value bool) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetSendEnabled", ctx, denom, value) +} + +// SetSendEnabled indicates an expected call of SetSendEnabled. +func (mr *MockBankKeeperMockRecorder) SetSendEnabled(ctx, denom, value interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSendEnabled", reflect.TypeOf((*MockBankKeeper)(nil).SetSendEnabled), ctx, denom, value) +} + +// SpendableBalanceByDenom mocks base method. +func (m *MockBankKeeper) SpendableBalanceByDenom(arg0 context.Context, arg1 *types1.QuerySpendableBalanceByDenomRequest) (*types1.QuerySpendableBalanceByDenomResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SpendableBalanceByDenom", arg0, arg1) + ret0, _ := ret[0].(*types1.QuerySpendableBalanceByDenomResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SpendableBalanceByDenom indicates an expected call of SpendableBalanceByDenom. +func (mr *MockBankKeeperMockRecorder) SpendableBalanceByDenom(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableBalanceByDenom", reflect.TypeOf((*MockBankKeeper)(nil).SpendableBalanceByDenom), arg0, arg1) +} + +// SpendableBalances mocks base method. +func (m *MockBankKeeper) SpendableBalances(arg0 context.Context, arg1 *types1.QuerySpendableBalancesRequest) (*types1.QuerySpendableBalancesResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SpendableBalances", arg0, arg1) + ret0, _ := ret[0].(*types1.QuerySpendableBalancesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SpendableBalances indicates an expected call of SpendableBalances. +func (mr *MockBankKeeperMockRecorder) SpendableBalances(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableBalances", reflect.TypeOf((*MockBankKeeper)(nil).SpendableBalances), arg0, arg1) +} + +// SpendableCoin mocks base method. +func (m *MockBankKeeper) SpendableCoin(ctx types.Context, addr types.AccAddress, denom string) types.Coin { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SpendableCoin", ctx, addr, denom) + ret0, _ := ret[0].(types.Coin) + return ret0 +} + +// SpendableCoin indicates an expected call of SpendableCoin. +func (mr *MockBankKeeperMockRecorder) SpendableCoin(ctx, addr, denom interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoin", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoin), ctx, addr, denom) +} + +// SpendableCoins mocks base method. +func (m *MockBankKeeper) SpendableCoins(ctx types.Context, addr types.AccAddress) types.Coins { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SpendableCoins", ctx, addr) + ret0, _ := ret[0].(types.Coins) + return ret0 +} + +// SpendableCoins indicates an expected call of SpendableCoins. +func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr) +} + +// SupplyOf mocks base method. +func (m *MockBankKeeper) SupplyOf(arg0 context.Context, arg1 *types1.QuerySupplyOfRequest) (*types1.QuerySupplyOfResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SupplyOf", arg0, arg1) + ret0, _ := ret[0].(*types1.QuerySupplyOfResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SupplyOf indicates an expected call of SupplyOf. +func (mr *MockBankKeeperMockRecorder) SupplyOf(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupplyOf", reflect.TypeOf((*MockBankKeeper)(nil).SupplyOf), arg0, arg1) +} + +// TotalSupply mocks base method. +func (m *MockBankKeeper) TotalSupply(arg0 context.Context, arg1 *types1.QueryTotalSupplyRequest) (*types1.QueryTotalSupplyResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "TotalSupply", arg0, arg1) + ret0, _ := ret[0].(*types1.QueryTotalSupplyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// TotalSupply indicates an expected call of TotalSupply. +func (mr *MockBankKeeperMockRecorder) TotalSupply(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalSupply", reflect.TypeOf((*MockBankKeeper)(nil).TotalSupply), arg0, arg1) +} + +// UndelegateCoins mocks base method. +func (m *MockBankKeeper) UndelegateCoins(ctx types.Context, moduleAccAddr, delegatorAddr types.AccAddress, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UndelegateCoins", ctx, moduleAccAddr, delegatorAddr, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// UndelegateCoins indicates an expected call of UndelegateCoins. +func (mr *MockBankKeeperMockRecorder) UndelegateCoins(ctx, moduleAccAddr, delegatorAddr, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UndelegateCoins", reflect.TypeOf((*MockBankKeeper)(nil).UndelegateCoins), ctx, moduleAccAddr, delegatorAddr, amt) +} + +// UndelegateCoinsFromModuleToAccount mocks base method. +func (m *MockBankKeeper) UndelegateCoinsFromModuleToAccount(ctx types.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UndelegateCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// UndelegateCoinsFromModuleToAccount indicates an expected call of UndelegateCoinsFromModuleToAccount. +func (mr *MockBankKeeperMockRecorder) UndelegateCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UndelegateCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).UndelegateCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) +} + +// ValidateBalance mocks base method. +func (m *MockBankKeeper) ValidateBalance(ctx types.Context, addr types.AccAddress) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ValidateBalance", ctx, addr) + ret0, _ := ret[0].(error) + return ret0 +} + +// ValidateBalance indicates an expected call of ValidateBalance. +func (mr *MockBankKeeperMockRecorder) ValidateBalance(ctx, addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateBalance", reflect.TypeOf((*MockBankKeeper)(nil).ValidateBalance), ctx, addr) +} + +// WithMintCoinsRestriction mocks base method. +func (m *MockBankKeeper) WithMintCoinsRestriction(arg0 keeper.MintingRestrictionFn) keeper.BaseKeeper { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "WithMintCoinsRestriction", arg0) + ret0, _ := ret[0].(keeper.BaseKeeper) + return ret0 +} + +// WithMintCoinsRestriction indicates an expected call of WithMintCoinsRestriction. +func (mr *MockBankKeeperMockRecorder) WithMintCoinsRestriction(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithMintCoinsRestriction", reflect.TypeOf((*MockBankKeeper)(nil).WithMintCoinsRestriction), arg0) +} + +// MockStakingKeeper is a mock of StakingKeeper interface. +type MockStakingKeeper struct { + ctrl *gomock.Controller + recorder *MockStakingKeeperMockRecorder +} + +// MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper. +type MockStakingKeeperMockRecorder struct { + mock *MockStakingKeeper +} + +// NewMockStakingKeeper creates a new mock instance. +func NewMockStakingKeeper(ctrl *gomock.Controller) *MockStakingKeeper { + mock := &MockStakingKeeper{ctrl: ctrl} + mock.recorder = &MockStakingKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { + return m.recorder +} + +// BondDenom mocks base method. +func (m *MockStakingKeeper) BondDenom(ctx types.Context) string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BondDenom", ctx) + ret0, _ := ret[0].(string) + return ret0 +} + +// BondDenom indicates an expected call of BondDenom. +func (mr *MockStakingKeeperMockRecorder) BondDenom(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BondDenom", reflect.TypeOf((*MockStakingKeeper)(nil).BondDenom), ctx) +} + +// IterateBondedValidatorsByPower mocks base method. +func (m *MockStakingKeeper) IterateBondedValidatorsByPower(arg0 types.Context, arg1 func(int64, types2.ValidatorI) bool) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IterateBondedValidatorsByPower", arg0, arg1) +} + +// IterateBondedValidatorsByPower indicates an expected call of IterateBondedValidatorsByPower. +func (mr *MockStakingKeeperMockRecorder) IterateBondedValidatorsByPower(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateBondedValidatorsByPower", reflect.TypeOf((*MockStakingKeeper)(nil).IterateBondedValidatorsByPower), arg0, arg1) +} + +// IterateDelegations mocks base method. +func (m *MockStakingKeeper) IterateDelegations(ctx types.Context, delegator types.AccAddress, fn func(int64, types2.DelegationI) bool) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IterateDelegations", ctx, delegator, fn) +} + +// IterateDelegations indicates an expected call of IterateDelegations. +func (mr *MockStakingKeeperMockRecorder) IterateDelegations(ctx, delegator, fn interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateDelegations", reflect.TypeOf((*MockStakingKeeper)(nil).IterateDelegations), ctx, delegator, fn) +} + +// TokensFromConsensusPower mocks base method. +func (m *MockStakingKeeper) TokensFromConsensusPower(ctx types.Context, power int64) math.Int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "TokensFromConsensusPower", ctx, power) + ret0, _ := ret[0].(math.Int) + return ret0 +} + +// TokensFromConsensusPower indicates an expected call of TokensFromConsensusPower. +func (mr *MockStakingKeeperMockRecorder) TokensFromConsensusPower(ctx, power interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TokensFromConsensusPower", reflect.TypeOf((*MockStakingKeeper)(nil).TokensFromConsensusPower), ctx, power) +} + +// TotalBondedTokens mocks base method. +func (m *MockStakingKeeper) TotalBondedTokens(arg0 types.Context) math.Int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "TotalBondedTokens", arg0) + ret0, _ := ret[0].(math.Int) + return ret0 +} + +// TotalBondedTokens indicates an expected call of TotalBondedTokens. +func (mr *MockStakingKeeperMockRecorder) TotalBondedTokens(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalBondedTokens", reflect.TypeOf((*MockStakingKeeper)(nil).TotalBondedTokens), arg0) +} + +// MockCrossChainKeeper is a mock of CrossChainKeeper interface. +type MockCrossChainKeeper struct { + ctrl *gomock.Controller + recorder *MockCrossChainKeeperMockRecorder +} + +// MockCrossChainKeeperMockRecorder is the mock recorder for MockCrossChainKeeper. +type MockCrossChainKeeperMockRecorder struct { + mock *MockCrossChainKeeper +} + +// NewMockCrossChainKeeper creates a new mock instance. +func NewMockCrossChainKeeper(ctrl *gomock.Controller) *MockCrossChainKeeper { + mock := &MockCrossChainKeeper{ctrl: ctrl} + mock.recorder = &MockCrossChainKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockCrossChainKeeper) EXPECT() *MockCrossChainKeeperMockRecorder { + return m.recorder +} + +// CreateRawIBCPackageWithFee mocks base method. +func (m *MockCrossChainKeeper) CreateRawIBCPackageWithFee(ctx types.Context, destChainId types.ChainID, channelID types.ChannelID, packageType types.CrossChainPackageType, packageLoad []byte, relayerFee, ackRelayerFee *big.Int) (uint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateRawIBCPackageWithFee", ctx, destChainId, channelID, packageType, packageLoad, relayerFee, ackRelayerFee) + ret0, _ := ret[0].(uint64) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateRawIBCPackageWithFee indicates an expected call of CreateRawIBCPackageWithFee. +func (mr *MockCrossChainKeeperMockRecorder) CreateRawIBCPackageWithFee(ctx, destChainId, channelID, packageType, packageLoad, relayerFee, ackRelayerFee interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRawIBCPackageWithFee", reflect.TypeOf((*MockCrossChainKeeper)(nil).CreateRawIBCPackageWithFee), ctx, destChainId, channelID, packageType, packageLoad, relayerFee, ackRelayerFee) +} + +// GetDestBscChainID mocks base method. +func (m *MockCrossChainKeeper) GetDestBscChainID() types.ChainID { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetDestBscChainID") + ret0, _ := ret[0].(types.ChainID) + return ret0 +} + +// GetDestBscChainID indicates an expected call of GetDestBscChainID. +func (mr *MockCrossChainKeeperMockRecorder) GetDestBscChainID() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDestBscChainID", reflect.TypeOf((*MockCrossChainKeeper)(nil).GetDestBscChainID)) +} + +// RegisterChannel mocks base method. +func (m *MockCrossChainKeeper) RegisterChannel(name string, id types.ChannelID, app types.CrossChainApplication) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RegisterChannel", name, id, app) + ret0, _ := ret[0].(error) + return ret0 +} + +// RegisterChannel indicates an expected call of RegisterChannel. +func (mr *MockCrossChainKeeperMockRecorder) RegisterChannel(name, id, app interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterChannel", reflect.TypeOf((*MockCrossChainKeeper)(nil).RegisterChannel), name, id, app) } From f565ad82e2019aa62d212f408bad6194898fc18a Mon Sep 17 00:00:00 2001 From: yutianwu Date: Wed, 12 Jul 2023 15:32:51 +0800 Subject: [PATCH 3/4] fix the ci cases --- x/crosschain/keeper/keeper_test.go | 12 ++++++------ x/gov/keeper/common_test.go | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/x/crosschain/keeper/keeper_test.go b/x/crosschain/keeper/keeper_test.go index 5702ab28ef..7345a9d286 100644 --- a/x/crosschain/keeper/keeper_test.go +++ b/x/crosschain/keeper/keeper_test.go @@ -53,21 +53,21 @@ func TestTestSuite(t *testing.T) { } func (s *TestSuite) TestIncrSendSequence() { - beforeSequence := s.crossChainKeeper.GetSendSequence(s.ctx, sdk.ChannelID(1)) + beforeSequence := s.crossChainKeeper.GetSendSequence(s.ctx, sdk.ChainID(1), sdk.ChannelID(1)) - s.crossChainKeeper.IncrSendSequence(s.ctx, sdk.ChannelID(1)) + s.crossChainKeeper.IncrSendSequence(s.ctx, sdk.ChainID(1), sdk.ChannelID(1)) - afterSequence := s.crossChainKeeper.GetSendSequence(s.ctx, sdk.ChannelID(1)) + afterSequence := s.crossChainKeeper.GetSendSequence(s.ctx, sdk.ChainID(1), sdk.ChannelID(1)) s.Require().EqualValues(afterSequence, beforeSequence+1) } func (s *TestSuite) TestIncrReceiveSequence() { - beforeSequence := s.crossChainKeeper.GetReceiveSequence(s.ctx, sdk.ChannelID(1)) + beforeSequence := s.crossChainKeeper.GetReceiveSequence(s.ctx, sdk.ChainID(1), sdk.ChannelID(1)) - s.crossChainKeeper.IncrReceiveSequence(s.ctx, sdk.ChannelID(1)) + s.crossChainKeeper.IncrReceiveSequence(s.ctx, sdk.ChainID(1), sdk.ChannelID(1)) - afterSequence := s.crossChainKeeper.GetReceiveSequence(s.ctx, sdk.ChannelID(1)) + afterSequence := s.crossChainKeeper.GetReceiveSequence(s.ctx, sdk.ChainID(1), sdk.ChannelID(1)) s.Require().EqualValues(afterSequence, beforeSequence+1) } diff --git a/x/gov/keeper/common_test.go b/x/gov/keeper/common_test.go index 7283530e0c..5831dac745 100644 --- a/x/gov/keeper/common_test.go +++ b/x/gov/keeper/common_test.go @@ -91,7 +91,8 @@ func setupGovKeeper(t *testing.T) ( govKeeper.SetLegacyRouter(govRouter) govKeeper.SetParams(ctx, v1.DefaultParams()) - crossChainKeeper.EXPECT().CreateRawIBCPackageWithFee(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(uint64(0), nil).AnyTimes() + crossChainKeeper.EXPECT().GetDestBscChainID().Return(sdk.ChainID(714)).AnyTimes() + crossChainKeeper.EXPECT().CreateRawIBCPackageWithFee(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(uint64(0), nil).AnyTimes() // Register all handlers for the MegServiceRouter. msr.SetInterfaceRegistry(encCfg.InterfaceRegistry) From d93742bd9135b894546cb9caacca55215b0889a0 Mon Sep 17 00:00:00 2001 From: yutianwu Date: Wed, 12 Jul 2023 15:42:05 +0800 Subject: [PATCH 4/4] fix the ci cases --- x/oracle/keeper/msg_server_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/x/oracle/keeper/msg_server_test.go b/x/oracle/keeper/msg_server_test.go index 9410e41263..6d8bdea033 100644 --- a/x/oracle/keeper/msg_server_test.go +++ b/x/oracle/keeper/msg_server_test.go @@ -38,11 +38,11 @@ func (s *TestSuite) TestClaim() { s.crossChainKeeper.EXPECT().GetSrcChainID().Return(sdk.ChainID(1)).AnyTimes() s.crossChainKeeper.EXPECT().IsDestChainSupported(sdk.ChainID(56)).Return(true).AnyTimes() - s.crossChainKeeper.EXPECT().GetReceiveSequence(gomock.Any(), types.RelayPackagesChannelId).Return(uint64(0)).AnyTimes() - s.crossChainKeeper.EXPECT().GetReceiveSequence(gomock.Any(), sdk.ChannelID(1)).Return(uint64(0)).AnyTimes() - s.crossChainKeeper.EXPECT().CreateRawIBCPackageWithFee(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(uint64(0), nil).AnyTimes() + s.crossChainKeeper.EXPECT().GetReceiveSequence(gomock.Any(), gomock.Any(), types.RelayPackagesChannelId).Return(uint64(0)).AnyTimes() + s.crossChainKeeper.EXPECT().GetReceiveSequence(gomock.Any(), gomock.Any(), sdk.ChannelID(1)).Return(uint64(0)).AnyTimes() + s.crossChainKeeper.EXPECT().CreateRawIBCPackageWithFee(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(uint64(0), nil).AnyTimes() s.crossChainKeeper.EXPECT().GetCrossChainApp(sdk.ChannelID(1)).Return(&DummyCrossChainApp{}).AnyTimes() - s.crossChainKeeper.EXPECT().IncrReceiveSequence(gomock.Any(), gomock.Any()).Return().AnyTimes() + s.crossChainKeeper.EXPECT().IncrReceiveSequence(gomock.Any(), gomock.Any(), gomock.Any()).Return().AnyTimes() s.stakingKeeper.EXPECT().BondDenom(gomock.Any()).Return("BNB").AnyTimes() s.bankKeeper.EXPECT().SendCoinsFromModuleToAccount(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).AnyTimes() @@ -104,11 +104,11 @@ func (s *TestSuite) TestInvalidClaim() { s.crossChainKeeper.EXPECT().GetSrcChainID().Return(sdk.ChainID(1)).AnyTimes() s.crossChainKeeper.EXPECT().IsDestChainSupported(sdk.ChainID(65)).Return(false) - s.crossChainKeeper.EXPECT().GetReceiveSequence(gomock.Any(), types.RelayPackagesChannelId).Return(uint64(0)).AnyTimes() - s.crossChainKeeper.EXPECT().GetReceiveSequence(gomock.Any(), sdk.ChannelID(1)).Return(uint64(0)).AnyTimes() - s.crossChainKeeper.EXPECT().CreateRawIBCPackageWithFee(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(uint64(0), nil).AnyTimes() + s.crossChainKeeper.EXPECT().GetReceiveSequence(gomock.Any(), gomock.Any(), types.RelayPackagesChannelId).Return(uint64(0)).AnyTimes() + s.crossChainKeeper.EXPECT().GetReceiveSequence(gomock.Any(), gomock.Any(), sdk.ChannelID(1)).Return(uint64(0)).AnyTimes() + s.crossChainKeeper.EXPECT().CreateRawIBCPackageWithFee(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(uint64(0), nil).AnyTimes() s.crossChainKeeper.EXPECT().GetCrossChainApp(sdk.ChannelID(1)).Return(&DummyCrossChainApp{}).AnyTimes() - s.crossChainKeeper.EXPECT().IncrReceiveSequence(gomock.Any(), gomock.Any()).Return().AnyTimes() + s.crossChainKeeper.EXPECT().IncrReceiveSequence(gomock.Any(), gomock.Any(), gomock.Any()).Return().AnyTimes() s.stakingKeeper.EXPECT().BondDenom(gomock.Any()).Return("BNB").AnyTimes() s.bankKeeper.EXPECT().SendCoinsFromModuleToAccount(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).AnyTimes()