Documentation ¶
Index ¶
- func TestKeeperTestSuite(t *testing.T)
- type KeeperTestSuite
- func (suite *KeeperTestSuite) BalanceOf(contract, account common.Address) interface{}
- func (suite *KeeperTestSuite) BurnERC20Token(contractAddr, from common.Address, amount *big.Int) *evm.MsgEthereumTx
- func (suite *KeeperTestSuite) Commit()
- func (suite *KeeperTestSuite) CommitAfter(t time.Duration)
- func (suite *KeeperTestSuite) DeployContract(name, symbol string, decimals uint8) (common.Address, error)
- func (suite *KeeperTestSuite) DeployContractDirectBalanceManipulation(name string, symbol string) common.Address
- func (suite *KeeperTestSuite) DeployContractMaliciousDelayed(name string, symbol string) common.Address
- func (suite *KeeperTestSuite) DoSetupTest(t require.TestingT)
- func (suite *KeeperTestSuite) GrantERC20Token(contractAddr, from, to common.Address, role_string string) *evm.MsgEthereumTx
- func (suite *KeeperTestSuite) MintERC20Token(contractAddr, from, to common.Address, amount *big.Int) *evm.MsgEthereumTx
- func (suite *KeeperTestSuite) MintFeeCollector(coins sdk.Coins)
- func (suite *KeeperTestSuite) NameOf(contract common.Address) string
- func (suite *KeeperTestSuite) SetupTest()
- func (suite *KeeperTestSuite) StateDB() *statedb.StateDB
- func (suite *KeeperTestSuite) TransferERC20Token(contractAddr, from, to common.Address, amount *big.Int) *evm.MsgEthereumTx
- type MockBankKeeper
- func (b *MockBankKeeper) BlockedAddr(addr sdk.AccAddress) bool
- func (b *MockBankKeeper) BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
- func (b *MockBankKeeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
- func (b *MockBankKeeper) GetDenomMetaData(ctx sdk.Context, denom string) (banktypes.Metadata, bool)
- func (b *MockBankKeeper) HasSupply(ctx sdk.Context, denom string) bool
- func (b *MockBankKeeper) IsSendEnabledCoin(ctx sdk.Context, coin sdk.Coin) bool
- func (b *MockBankKeeper) MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
- func (b *MockBankKeeper) SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, ...) error
- func (b *MockBankKeeper) SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, ...) error
- func (b *MockBankKeeper) SetDenomMetaData(ctx sdk.Context, denomMetaData banktypes.Metadata)
- type MockEVMKeeper
- func (m *MockEVMKeeper) ApplyMessage(ctx sdk.Context, msg core.Message, tracer vm.EVMLogger, commit bool) (*evm.MsgEthereumTxResponse, error)
- func (m *MockEVMKeeper) EstimateGas(c context.Context, req *evm.EthCallRequest) (*evm.EstimateGasResponse, error)
- func (m *MockEVMKeeper) GetAccountWithoutBalance(ctx sdk.Context, addr common.Address) *statedb.Account
- func (m *MockEVMKeeper) GetParams(ctx sdk.Context) evm.Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestKeeperTestSuite ¶
Types ¶
type KeeperTestSuite ¶
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 ¶
func (*MockBankKeeper) BlockedAddr ¶
func (b *MockBankKeeper) BlockedAddr(addr sdk.AccAddress) bool
func (*MockBankKeeper) GetBalance ¶
func (b *MockBankKeeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
func (*MockBankKeeper) GetDenomMetaData ¶
func (*MockBankKeeper) HasSupply ¶
func (b *MockBankKeeper) HasSupply(ctx sdk.Context, denom string) bool
func (*MockBankKeeper) IsSendEnabledCoin ¶
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 ¶
func (*MockEVMKeeper) ApplyMessage ¶
func (*MockEVMKeeper) EstimateGas ¶
func (m *MockEVMKeeper) EstimateGas(c context.Context, req *evm.EthCallRequest) (*evm.EstimateGasResponse, error)
func (*MockEVMKeeper) GetAccountWithoutBalance ¶
Click to show internal directories.
Click to hide internal directories.