tests

package
v3.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 45 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestKeeperTestSuite

func TestKeeperTestSuite(t *testing.T)

Types

type KeeperTestSuite

type KeeperTestSuite struct {
	suite.Suite
	// contains filtered or unexported fields
}

func (*KeeperTestSuite) BalanceOf

func (suite *KeeperTestSuite) BalanceOf(contract, account common.Address) interface{}

func (*KeeperTestSuite) BurnERC20Token

func (suite *KeeperTestSuite) BurnERC20Token(contractAddr, from common.Address, amount *big.Int) *evm.MsgEthereumTx

func (*KeeperTestSuite) Commit

func (suite *KeeperTestSuite) Commit()

func (*KeeperTestSuite) CommitAfter

func (suite *KeeperTestSuite) CommitAfter(t time.Duration)

CommitAfter Commit commits a block at a given time.

func (*KeeperTestSuite) DeployContract

func (suite *KeeperTestSuite) DeployContract(name, symbol string, decimals uint8) (common.Address, error)

DeployContract deploys the ERC20MinterBurnerDecimalsContract.

func (*KeeperTestSuite) DeployContractDirectBalanceManipulation

func (suite *KeeperTestSuite) DeployContractDirectBalanceManipulation(name string, symbol string) common.Address

func (*KeeperTestSuite) DeployContractMaliciousDelayed

func (suite *KeeperTestSuite) DeployContractMaliciousDelayed(name string, symbol string) common.Address

func (*KeeperTestSuite) DoSetupTest

func (suite *KeeperTestSuite) DoSetupTest(t require.TestingT)

DoSetupTest Test helpers

func (*KeeperTestSuite) GrantERC20Token

func (suite *KeeperTestSuite) GrantERC20Token(contractAddr, from, to common.Address, role_string string) *evm.MsgEthereumTx

func (*KeeperTestSuite) MintERC20Token

func (suite *KeeperTestSuite) MintERC20Token(contractAddr, from, to common.Address, amount *big.Int) *evm.MsgEthereumTx

func (*KeeperTestSuite) MintFeeCollector

func (suite *KeeperTestSuite) MintFeeCollector(coins sdk.Coins)

func (*KeeperTestSuite) NameOf

func (suite *KeeperTestSuite) NameOf(contract common.Address) string

func (*KeeperTestSuite) SetupTest

func (suite *KeeperTestSuite) SetupTest()

func (*KeeperTestSuite) StateDB

func (suite *KeeperTestSuite) StateDB() *statedb.StateDB

func (*KeeperTestSuite) TransferERC20Token

func (suite *KeeperTestSuite) TransferERC20Token(contractAddr, from, to common.Address, amount *big.Int) *evm.MsgEthereumTx

type MockBankKeeper

type MockBankKeeper struct {
	mock.Mock
}

func (*MockBankKeeper) BlockedAddr

func (b *MockBankKeeper) BlockedAddr(addr sdk.AccAddress) bool

func (*MockBankKeeper) BurnCoins

func (b *MockBankKeeper) BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error

func (*MockBankKeeper) GetBalance

func (b *MockBankKeeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin

func (*MockBankKeeper) GetDenomMetaData

func (b *MockBankKeeper) GetDenomMetaData(ctx sdk.Context, denom string) (banktypes.Metadata, bool)

func (*MockBankKeeper) HasSupply

func (b *MockBankKeeper) HasSupply(ctx sdk.Context, denom string) bool

func (*MockBankKeeper) IsSendEnabledCoin

func (b *MockBankKeeper) IsSendEnabledCoin(ctx sdk.Context, coin sdk.Coin) bool

func (*MockBankKeeper) MintCoins

func (b *MockBankKeeper) MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error

func (*MockBankKeeper) SendCoinsFromAccountToModule

func (b *MockBankKeeper) SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error

func (*MockBankKeeper) SendCoinsFromModuleToAccount

func (b *MockBankKeeper) SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error

func (*MockBankKeeper) SetDenomMetaData

func (b *MockBankKeeper) SetDenomMetaData(ctx sdk.Context, denomMetaData banktypes.Metadata)

type MockEVMKeeper

type MockEVMKeeper struct {
	mock.Mock
}

func (*MockEVMKeeper) ApplyMessage

func (m *MockEVMKeeper) ApplyMessage(ctx sdk.Context, msg core.Message, tracer vm.EVMLogger, commit bool) (*evm.MsgEthereumTxResponse, error)

func (*MockEVMKeeper) EstimateGas

func (*MockEVMKeeper) GetAccountWithoutBalance

func (m *MockEVMKeeper) GetAccountWithoutBalance(ctx sdk.Context, addr common.Address) *statedb.Account

func (*MockEVMKeeper) GetParams

func (m *MockEVMKeeper) GetParams(ctx sdk.Context) evm.Params

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL