diff --git a/x/evm/wrappers/bank_test.go b/x/evm/wrappers/bank_test.go index c75c9c9..5c200d8 100644 --- a/x/evm/wrappers/bank_test.go +++ b/x/evm/wrappers/bank_test.go @@ -28,7 +28,7 @@ func TestMintAmountToAccount(t *testing.T) { amount *big.Int recipient sdk.AccAddress expectErr string - mockSetup func(*testutil.MockBankKeeper) + mockSetup func(*testutil.MockBankWrapper) }{ { name: "success - convert 18 decimals amount to 6 decimals", @@ -37,7 +37,7 @@ func TestMintAmountToAccount(t *testing.T) { amount: big.NewInt(1e18), // 1 token in 18 decimals recipient: sdk.AccAddress([]byte("test_address")), expectErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoin := sdk.NewCoin(tokenDenom, sdkmath.NewInt(1e6)) // 1 token in 6 decimals expectedCoins := sdk.NewCoins(expectedCoin) @@ -61,7 +61,7 @@ func TestMintAmountToAccount(t *testing.T) { amount: big.NewInt(1e18), // 1 token in 18 decimals recipient: sdk.AccAddress([]byte("test_address")), expectErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoin := sdk.NewCoin(tokenDenom, sdkmath.NewInt(1e18)) expectedCoins := sdk.NewCoins(expectedCoin) @@ -85,7 +85,7 @@ func TestMintAmountToAccount(t *testing.T) { amount: big.NewInt(1e18), recipient: sdk.AccAddress([]byte("test_address")), expectErr: "failed to mint coins to account in bank wrapper", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoin := sdk.NewCoin(tokenDenom, sdkmath.NewInt(1e6)) expectedCoins := sdk.NewCoins(expectedCoin) @@ -101,7 +101,7 @@ func TestMintAmountToAccount(t *testing.T) { amount: big.NewInt(1e18), recipient: sdk.AccAddress([]byte("test_address")), expectErr: "send error", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoin := sdk.NewCoin("evm", sdkmath.NewInt(1e6)) expectedCoins := sdk.NewCoins(expectedCoin) @@ -131,7 +131,7 @@ func TestMintAmountToAccount(t *testing.T) { // Setup mock controller ctrl := gomock.NewController(t) - mockBankKeeper := testutil.NewMockBankKeeper(ctrl) + mockBankKeeper := testutil.NewMockBankWrapper(ctrl) tc.mockSetup(mockBankKeeper) bankWrapper := wrappers.NewBankWrapper(mockBankKeeper) @@ -156,7 +156,7 @@ func TestBurnAmountFromAccount(t *testing.T) { evmDecimals uint8 amount *big.Int expectErr string - mockSetup func(*testutil.MockBankKeeper) + mockSetup func(*testutil.MockBankWrapper) }{ { name: "success - convert 18 decimals amount to 6 decimals", @@ -164,7 +164,7 @@ func TestBurnAmountFromAccount(t *testing.T) { evmDecimals: 6, amount: big.NewInt(1e18), expectErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoin := sdk.NewCoin(tokenDenom, sdkmath.NewInt(1e6)) expectedCoins := sdk.NewCoins(expectedCoin) @@ -187,7 +187,7 @@ func TestBurnAmountFromAccount(t *testing.T) { evmDecimals: 18, amount: big.NewInt(1e18), expectErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoin := sdk.NewCoin(tokenDenom, sdkmath.NewInt(1e18)) expectedCoins := sdk.NewCoins(expectedCoin) @@ -210,7 +210,7 @@ func TestBurnAmountFromAccount(t *testing.T) { evmDecimals: 6, amount: big.NewInt(1e18), expectErr: "failed to burn coins from account in bank wrapper", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoin := sdk.NewCoin(tokenDenom, sdkmath.NewInt(1e6)) expectedCoins := sdk.NewCoins(expectedCoin) @@ -229,7 +229,7 @@ func TestBurnAmountFromAccount(t *testing.T) { evmDecimals: 6, amount: big.NewInt(1e18), expectErr: "burn error", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoin := sdk.NewCoin(tokenDenom, sdkmath.NewInt(1e6)) expectedCoins := sdk.NewCoins(expectedCoin) @@ -255,7 +255,7 @@ func TestBurnAmountFromAccount(t *testing.T) { // Setup mock controller ctrl := gomock.NewController(t) - mockBankKeeper := testutil.NewMockBankKeeper(ctrl) + mockBankKeeper := testutil.NewMockBankWrapper(ctrl) tc.mockSetup(mockBankKeeper) bankWrapper := wrappers.NewBankWrapper(mockBankKeeper) @@ -280,7 +280,7 @@ func TestSendCoinsFromModuleToAccount(t *testing.T) { evmDecimals uint8 coins func() sdk.Coins expectErr string - mockSetup func(*testutil.MockBankKeeper) + mockSetup func(*testutil.MockBankWrapper) }{ { name: "success - does not convert 18 decimals amount with single token", @@ -293,7 +293,7 @@ func TestSendCoinsFromModuleToAccount(t *testing.T) { return coins }, expectErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoins := sdk.NewCoins([]sdk.Coin{ sdk.NewCoin(tokenDenom, sdkmath.NewInt(1e18)), }...) @@ -318,7 +318,7 @@ func TestSendCoinsFromModuleToAccount(t *testing.T) { return coins }, expectErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoins := sdk.NewCoins([]sdk.Coin{ sdk.NewCoin(tokenDenom, sdkmath.NewInt(1e6)), }...) @@ -344,7 +344,7 @@ func TestSendCoinsFromModuleToAccount(t *testing.T) { return coins }, expectErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoins := sdk.NewCoins([]sdk.Coin{ sdk.NewCoin(tokenDenom, sdkmath.NewInt(1e18)), sdk.NewCoin("something", sdkmath.NewInt(3e18)), @@ -371,7 +371,7 @@ func TestSendCoinsFromModuleToAccount(t *testing.T) { return coins }, expectErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoins := sdk.NewCoins([]sdk.Coin{ sdk.NewCoin(tokenDenom, sdkmath.NewInt(1e6)), sdk.NewCoin("something", sdkmath.NewInt(3e18)), @@ -397,7 +397,7 @@ func TestSendCoinsFromModuleToAccount(t *testing.T) { return coins }, expectErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { mbk.EXPECT(). SendCoinsFromModuleToAccount( gomock.Any(), @@ -420,7 +420,7 @@ func TestSendCoinsFromModuleToAccount(t *testing.T) { // Setup mock controller ctrl := gomock.NewController(t) - mockBankKeeper := testutil.NewMockBankKeeper(ctrl) + mockBankKeeper := testutil.NewMockBankWrapper(ctrl) tc.mockSetup(mockBankKeeper) bankWrapper := wrappers.NewBankWrapper(mockBankKeeper) @@ -445,7 +445,7 @@ func TestSendCoinsFromAccountToModule(t *testing.T) { evmDecimals uint8 coins func() sdk.Coins expectErr string - mockSetup func(*testutil.MockBankKeeper) + mockSetup func(*testutil.MockBankWrapper) }{ { name: "success - does not convert 18 decimals amount with single token", @@ -458,7 +458,7 @@ func TestSendCoinsFromAccountToModule(t *testing.T) { return coins }, expectErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoins := sdk.NewCoins([]sdk.Coin{ sdk.NewCoin(tokenDenom, sdkmath.NewInt(1e18)), }...) @@ -483,7 +483,7 @@ func TestSendCoinsFromAccountToModule(t *testing.T) { return coins }, expectErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoins := sdk.NewCoins([]sdk.Coin{ sdk.NewCoin(tokenDenom, sdkmath.NewInt(1e6)), }...) @@ -509,7 +509,7 @@ func TestSendCoinsFromAccountToModule(t *testing.T) { return coins }, expectErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoins := sdk.NewCoins([]sdk.Coin{ sdk.NewCoin(tokenDenom, sdkmath.NewInt(1e18)), sdk.NewCoin("something", sdkmath.NewInt(3e18)), @@ -536,7 +536,7 @@ func TestSendCoinsFromAccountToModule(t *testing.T) { return coins }, expectErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { expectedCoins := sdk.NewCoins([]sdk.Coin{ sdk.NewCoin(tokenDenom, sdkmath.NewInt(1e6)), sdk.NewCoin("something", sdkmath.NewInt(3e18)), @@ -562,7 +562,7 @@ func TestSendCoinsFromAccountToModule(t *testing.T) { return coins }, expectErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { mbk.EXPECT(). SendCoinsFromAccountToModule( gomock.Any(), @@ -585,7 +585,7 @@ func TestSendCoinsFromAccountToModule(t *testing.T) { // Setup mock controller ctrl := gomock.NewController(t) - mockBankKeeper := testutil.NewMockBankKeeper(ctrl) + mockBankKeeper := testutil.NewMockBankWrapper(ctrl) tc.mockSetup(mockBankKeeper) bankWrapper := wrappers.NewBankWrapper(mockBankKeeper) @@ -614,7 +614,7 @@ func TestGetBalance(t *testing.T) { expCoin sdk.Coin expErr string expPanic string - mockSetup func(*testutil.MockBankKeeper) + mockSetup func(*testutil.MockBankWrapper) }{ { name: "success - convert 6 decimals amount to 18 decimals", @@ -622,7 +622,7 @@ func TestGetBalance(t *testing.T) { evmDecimals: 6, expCoin: sdk.NewCoin(evmDenom, sdkmath.NewInt(1e18)), expErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { returnedCoin := sdk.NewCoin(evmDenom, sdkmath.NewInt(1e6)) mbk.EXPECT(). @@ -639,7 +639,7 @@ func TestGetBalance(t *testing.T) { evmDecimals: 6, expCoin: sdk.NewCoin(evmDenom, sdkmath.NewInt(1e12).MulRaw(maxInt64)), expErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { returnedCoin := sdk.NewCoin(evmDenom, sdkmath.NewInt(maxInt64)) mbk.EXPECT(). @@ -656,7 +656,7 @@ func TestGetBalance(t *testing.T) { evmDecimals: 18, expCoin: sdk.NewCoin(evmDenom, sdkmath.NewInt(1e18)), expErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { returnedCoin := sdk.NewCoin(evmDenom, sdkmath.NewInt(1e18)) mbk.EXPECT(). @@ -673,7 +673,7 @@ func TestGetBalance(t *testing.T) { evmDecimals: 6, expCoin: sdk.NewCoin(evmDenom, sdkmath.NewInt(0)), expErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { returnedCoin := sdk.NewCoin(evmDenom, sdkmath.NewInt(0)) mbk.EXPECT(). @@ -690,7 +690,7 @@ func TestGetBalance(t *testing.T) { evmDecimals: 6, expCoin: sdk.NewCoin(evmDenom, sdkmath.NewInt(1e14)), // 0.0001 token in 18 decimals expErr: "", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { returnedCoin := sdk.NewCoin(evmDenom, sdkmath.NewInt(100)) // 0.0001 token in 6 decimals mbk.EXPECT(). @@ -706,7 +706,7 @@ func TestGetBalance(t *testing.T) { denom: "wrong_denom", evmDecimals: 18, expPanic: "expected evm denom token", - mockSetup: func(mbk *testutil.MockBankKeeper) { + mockSetup: func(mbk *testutil.MockBankWrapper) { returnedCoin := sdk.NewCoin("wrong_denom", sdkmath.NewInt(1e18)) mbk.EXPECT(). @@ -730,7 +730,7 @@ func TestGetBalance(t *testing.T) { // Setup mock controller ctrl := gomock.NewController(t) - mockBankKeeper := testutil.NewMockBankKeeper(ctrl) + mockBankKeeper := testutil.NewMockBankWrapper(ctrl) tc.mockSetup(mockBankKeeper) bankWrapper := wrappers.NewBankWrapper(mockBankKeeper) diff --git a/x/evm/wrappers/testutil/mock.go b/x/evm/wrappers/testutil/mock.go index 719b2f3..fa0d6cd 100644 --- a/x/evm/wrappers/testutil/mock.go +++ b/x/evm/wrappers/testutil/mock.go @@ -14,360 +14,12 @@ import ( big "math/big" reflect "reflect" - address "cosmossdk.io/core/address" math "cosmossdk.io/math" types "github.com/cosmos/cosmos-sdk/types" - types0 "github.com/cosmos/cosmos-sdk/x/auth/types" - types1 "github.com/cosmos/cosmos-sdk/x/staking/types" - common "github.com/ethereum/go-ethereum/common" - vm "github.com/evmos/os/x/evm/core/vm" - types2 "github.com/evmos/os/x/evm/types" types3 "github.com/evmos/os/x/feemarket/types" gomock "go.uber.org/mock/gomock" ) -// MockAccountKeeper is a mock of AccountKeeper interface. -type MockAccountKeeper struct { - ctrl *gomock.Controller - recorder *MockAccountKeeperMockRecorder - isgomock struct{} -} - -// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper. -type MockAccountKeeperMockRecorder struct { - mock *MockAccountKeeper -} - -// NewMockAccountKeeper creates a new mock instance. -func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper { - mock := &MockAccountKeeper{ctrl: ctrl} - mock.recorder = &MockAccountKeeperMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { - return m.recorder -} - -// AddressCodec mocks base method. -func (m *MockAccountKeeper) AddressCodec() address.Codec { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddressCodec") - ret0, _ := ret[0].(address.Codec) - return ret0 -} - -// AddressCodec indicates an expected call of AddressCodec. -func (mr *MockAccountKeeperMockRecorder) AddressCodec() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddressCodec", reflect.TypeOf((*MockAccountKeeper)(nil).AddressCodec)) -} - -// GetAccount mocks base method. -func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddress) types.AccountI { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAccount", ctx, addr) - ret0, _ := ret[0].(types.AccountI) - return ret0 -} - -// GetAccount indicates an expected call of GetAccount. -func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr) -} - -// GetModuleAddress mocks base method. -func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types.AccAddress { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetModuleAddress", moduleName) - ret0, _ := ret[0].(types.AccAddress) - return ret0 -} - -// GetModuleAddress indicates an expected call of GetModuleAddress. -func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(moduleName any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), moduleName) -} - -// GetParams mocks base method. -func (m *MockAccountKeeper) GetParams(ctx context.Context) types0.Params { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetParams", ctx) - ret0, _ := ret[0].(types0.Params) - return ret0 -} - -// GetParams indicates an expected call of GetParams. -func (mr *MockAccountKeeperMockRecorder) GetParams(ctx any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetParams", reflect.TypeOf((*MockAccountKeeper)(nil).GetParams), ctx) -} - -// GetSequence mocks base method. -func (m *MockAccountKeeper) GetSequence(ctx context.Context, account types.AccAddress) (uint64, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetSequence", ctx, account) - ret0, _ := ret[0].(uint64) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetSequence indicates an expected call of GetSequence. -func (mr *MockAccountKeeperMockRecorder) GetSequence(ctx, account any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSequence", reflect.TypeOf((*MockAccountKeeper)(nil).GetSequence), ctx, account) -} - -// NewAccountWithAddress mocks base method. -func (m *MockAccountKeeper) NewAccountWithAddress(ctx context.Context, addr types.AccAddress) types.AccountI { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NewAccountWithAddress", ctx, addr) - ret0, _ := ret[0].(types.AccountI) - return ret0 -} - -// NewAccountWithAddress indicates an expected call of NewAccountWithAddress. -func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccountWithAddress", reflect.TypeOf((*MockAccountKeeper)(nil).NewAccountWithAddress), ctx, addr) -} - -// RemoveAccount mocks base method. -func (m *MockAccountKeeper) RemoveAccount(ctx context.Context, account types.AccountI) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "RemoveAccount", ctx, account) -} - -// RemoveAccount indicates an expected call of RemoveAccount. -func (mr *MockAccountKeeperMockRecorder) RemoveAccount(ctx, account any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAccount", reflect.TypeOf((*MockAccountKeeper)(nil).RemoveAccount), ctx, account) -} - -// SetAccount mocks base method. -func (m *MockAccountKeeper) SetAccount(ctx context.Context, account types.AccountI) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "SetAccount", ctx, account) -} - -// SetAccount indicates an expected call of SetAccount. -func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, account any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetAccount), ctx, account) -} - -// MockBankKeeper is a mock of BankKeeper interface. -type MockBankKeeper struct { - ctrl *gomock.Controller - recorder *MockBankKeeperMockRecorder - isgomock struct{} -} - -// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper. -type MockBankKeeperMockRecorder struct { - mock *MockBankKeeper -} - -// 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. -func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { - return m.recorder -} - -// BurnCoins mocks base method. -func (m *MockBankKeeper) BurnCoins(ctx context.Context, moduleName string, amt types.Coins) error { - m.ctrl.T.Helper() - 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, moduleName, amt any) *gomock.Call { - mr.mock.ctrl.T.Helper() - 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 context.Context, addr types.AccAddress) types.Coins { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAllBalances", ctx, addr) - ret0, _ := ret[0].(types.Coins) - return ret0 -} - -// GetAllBalances indicates an expected call of GetAllBalances. -func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAllBalances), ctx, addr) -} - -// GetBalance mocks base method. -func (m *MockBankKeeper) GetBalance(ctx context.Context, addr types.AccAddress, denom string) types.Coin { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetBalance", ctx, addr, denom) - ret0, _ := ret[0].(types.Coin) - return ret0 -} - -// GetBalance indicates an expected call of GetBalance. -func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockBankKeeper)(nil).GetBalance), ctx, addr, denom) -} - -// IsSendEnabledCoins mocks base method. -func (m *MockBankKeeper) IsSendEnabledCoins(ctx context.Context, coins ...types.Coin) error { - m.ctrl.T.Helper() - varargs := []any{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 any, coins ...any) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]any{ctx}, coins...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSendEnabledCoins", reflect.TypeOf((*MockBankKeeper)(nil).IsSendEnabledCoins), varargs...) -} - -// MintCoins mocks base method. -func (m *MockBankKeeper) MintCoins(ctx context.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 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MintCoins", reflect.TypeOf((*MockBankKeeper)(nil).MintCoins), ctx, moduleName, amt) -} - -// SendCoins mocks base method. -func (m *MockBankKeeper) SendCoins(ctx context.Context, from, to types.AccAddress, amt types.Coins) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendCoins", ctx, from, to, amt) - ret0, _ := ret[0].(error) - return ret0 -} - -// SendCoins indicates an expected call of SendCoins. -func (mr *MockBankKeeperMockRecorder) SendCoins(ctx, from, to, amt any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoins", reflect.TypeOf((*MockBankKeeper)(nil).SendCoins), ctx, from, to, amt) -} - -// SendCoinsFromAccountToModule mocks base method. -func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.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 any) *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 context.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 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) -} - -// MockStakingKeeper is a mock of StakingKeeper interface. -type MockStakingKeeper struct { - ctrl *gomock.Controller - recorder *MockStakingKeeperMockRecorder - isgomock struct{} -} - -// 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 -} - -// GetHistoricalInfo mocks base method. -func (m *MockStakingKeeper) GetHistoricalInfo(ctx context.Context, height int64) (types1.HistoricalInfo, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetHistoricalInfo", ctx, height) - ret0, _ := ret[0].(types1.HistoricalInfo) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetHistoricalInfo indicates an expected call of GetHistoricalInfo. -func (mr *MockStakingKeeperMockRecorder) GetHistoricalInfo(ctx, height any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHistoricalInfo", reflect.TypeOf((*MockStakingKeeper)(nil).GetHistoricalInfo), ctx, height) -} - -// GetValidatorByConsAddr mocks base method. -func (m *MockStakingKeeper) GetValidatorByConsAddr(ctx context.Context, consAddr types.ConsAddress) (types1.Validator, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetValidatorByConsAddr", ctx, consAddr) - ret0, _ := ret[0].(types1.Validator) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetValidatorByConsAddr indicates an expected call of GetValidatorByConsAddr. -func (mr *MockStakingKeeperMockRecorder) GetValidatorByConsAddr(ctx, consAddr any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidatorByConsAddr", reflect.TypeOf((*MockStakingKeeper)(nil).GetValidatorByConsAddr), ctx, consAddr) -} - -// ValidatorAddressCodec mocks base method. -func (m *MockStakingKeeper) ValidatorAddressCodec() address.Codec { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ValidatorAddressCodec") - ret0, _ := ret[0].(address.Codec) - return ret0 -} - -// ValidatorAddressCodec indicates an expected call of ValidatorAddressCodec. -func (mr *MockStakingKeeperMockRecorder) ValidatorAddressCodec() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorAddressCodec", reflect.TypeOf((*MockStakingKeeper)(nil).ValidatorAddressCodec)) -} - // MockFeeMarketKeeper is a mock of FeeMarketKeeper interface. type MockFeeMarketKeeper struct { ctrl *gomock.Controller @@ -434,82 +86,6 @@ func (mr *MockFeeMarketKeeperMockRecorder) GetParams(ctx any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetParams", reflect.TypeOf((*MockFeeMarketKeeper)(nil).GetParams), ctx) } -// MockErc20Keeper is a mock of Erc20Keeper interface. -type MockErc20Keeper struct { - ctrl *gomock.Controller - recorder *MockErc20KeeperMockRecorder - isgomock struct{} -} - -// MockErc20KeeperMockRecorder is the mock recorder for MockErc20Keeper. -type MockErc20KeeperMockRecorder struct { - mock *MockErc20Keeper -} - -// NewMockErc20Keeper creates a new mock instance. -func NewMockErc20Keeper(ctrl *gomock.Controller) *MockErc20Keeper { - mock := &MockErc20Keeper{ctrl: ctrl} - mock.recorder = &MockErc20KeeperMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockErc20Keeper) EXPECT() *MockErc20KeeperMockRecorder { - return m.recorder -} - -// GetERC20PrecompileInstance mocks base method. -func (m *MockErc20Keeper) GetERC20PrecompileInstance(ctx types.Context, address common.Address) (vm.PrecompiledContract, bool, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetERC20PrecompileInstance", ctx, address) - ret0, _ := ret[0].(vm.PrecompiledContract) - ret1, _ := ret[1].(bool) - ret2, _ := ret[2].(error) - return ret0, ret1, ret2 -} - -// GetERC20PrecompileInstance indicates an expected call of GetERC20PrecompileInstance. -func (mr *MockErc20KeeperMockRecorder) GetERC20PrecompileInstance(ctx, address any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetERC20PrecompileInstance", reflect.TypeOf((*MockErc20Keeper)(nil).GetERC20PrecompileInstance), ctx, address) -} - -// MockSubspace is a mock of Subspace interface. -type MockSubspace struct { - ctrl *gomock.Controller - recorder *MockSubspaceMockRecorder - isgomock struct{} -} - -// MockSubspaceMockRecorder is the mock recorder for MockSubspace. -type MockSubspaceMockRecorder struct { - mock *MockSubspace -} - -// NewMockSubspace creates a new mock instance. -func NewMockSubspace(ctrl *gomock.Controller) *MockSubspace { - mock := &MockSubspace{ctrl: ctrl} - mock.recorder = &MockSubspaceMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockSubspace) EXPECT() *MockSubspaceMockRecorder { - return m.recorder -} - -// GetParamSetIfExists mocks base method. -func (m *MockSubspace) GetParamSetIfExists(ctx types.Context, ps types2.LegacyParams) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "GetParamSetIfExists", ctx, ps) -} - -// GetParamSetIfExists indicates an expected call of GetParamSetIfExists. -func (mr *MockSubspaceMockRecorder) GetParamSetIfExists(ctx, ps any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetParamSetIfExists", reflect.TypeOf((*MockSubspace)(nil).GetParamSetIfExists), ctx, ps) -} - // MockBankWrapper is a mock of BankWrapper interface. type MockBankWrapper struct { ctrl *gomock.Controller