testutil

package
v7.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ERC20Suite

type ERC20Suite struct {
	contract.ERC20ABI
	EVMSuite
}

func NewERC20Suite

func NewERC20Suite(evmSuite EVMSuite) ERC20Suite

func (*ERC20Suite) Allowance

func (s *ERC20Suite) Allowance(owner, spender common.Address) *big.Int

func (*ERC20Suite) Approve

func (s *ERC20Suite) Approve(spender common.Address, amount *big.Int, result bool)

func (*ERC20Suite) BalanceOf

func (s *ERC20Suite) BalanceOf(account common.Address) *big.Int

func (*ERC20Suite) Burn

func (s *ERC20Suite) Burn(from common.Address, amount *big.Int, result bool)

func (*ERC20Suite) Call

func (s *ERC20Suite) Call(method string, res interface{}, args ...interface{})

func (*ERC20Suite) Decimals

func (s *ERC20Suite) Decimals() uint8

func (*ERC20Suite) Deploy

func (s *ERC20Suite) Deploy(symbol string) common.Address

func (*ERC20Suite) Deposit

func (s *ERC20Suite) Deposit(value *big.Int, result bool)

func (*ERC20Suite) Initialize

func (s *ERC20Suite) Initialize(symbol string, result bool)

func (*ERC20Suite) Mint

func (s *ERC20Suite) Mint(to common.Address, amount *big.Int, result bool)

func (*ERC20Suite) Name

func (s *ERC20Suite) Name() string

func (*ERC20Suite) OnTest

func (s *ERC20Suite) OnTest(name, symbol string, decimals uint8, totalSupply *big.Int, owner common.Address)

func (*ERC20Suite) Owner

func (s *ERC20Suite) Owner() common.Address

func (*ERC20Suite) Send

func (s *ERC20Suite) Send(method string, args ...interface{}) *evmtypes.MsgEthereumTxResponse

func (*ERC20Suite) Symbol

func (s *ERC20Suite) Symbol() string

func (*ERC20Suite) TotalSupply

func (s *ERC20Suite) TotalSupply() *big.Int

func (*ERC20Suite) Transfer

func (s *ERC20Suite) Transfer(recipient common.Address, amount *big.Int, result bool)

func (*ERC20Suite) TransferFrom

func (s *ERC20Suite) TransferFrom(sender, recipient common.Address, amount *big.Int, result bool)

func (*ERC20Suite) TransferOwnership

func (s *ERC20Suite) TransferOwnership(newOwner common.Address, result bool)

func (*ERC20Suite) Withdraw

func (s *ERC20Suite) Withdraw(to common.Address, amount *big.Int, result bool)

func (*ERC20Suite) WithdrawSelf

func (s *ERC20Suite) WithdrawSelf(amount *big.Int, result bool)

type EVMSuite

type EVMSuite struct {
	*require.Assertions
	// contains filtered or unexported fields
}

func (*EVMSuite) AccAddr

func (s *EVMSuite) AccAddr() sdk.AccAddress

func (*EVMSuite) Call

func (s *EVMSuite) Call(abi abi.ABI, method string, res interface{}, args ...interface{})

func (*EVMSuite) CallContract

func (s *EVMSuite) CallContract(data []byte) error

func (*EVMSuite) CallEVM

func (s *EVMSuite) CallEVM(data []byte, gasLimit uint64) *evmtypes.MsgEthereumTxResponse

func (*EVMSuite) DeployUpgradableERC20Logic

func (s *EVMSuite) DeployUpgradableERC20Logic(symbol string) common.Address

func (*EVMSuite) EthereumTx

func (s *EVMSuite) EthereumTx(to *common.Address, data []byte, value *big.Int, gasLimit uint64) (*evmtypes.MsgEthereumTxResponse, error)

func (*EVMSuite) GetContractAddr

func (s *EVMSuite) GetContractAddr() *common.Address

func (*EVMSuite) GetFrom

func (s *EVMSuite) GetFrom() common.Address

func (*EVMSuite) HexAddr

func (s *EVMSuite) HexAddr() common.Address

func (*EVMSuite) Init

func (s *EVMSuite) Init(ass *require.Assertions, ctx sdk.Context, evmKeeper *fxevmkeeper.Keeper, signer *helpers.Signer) *EVMSuite

func (*EVMSuite) Send

func (s *EVMSuite) Send(abi abi.ABI, method string, args ...interface{}) *evmtypes.MsgEthereumTxResponse

func (*EVMSuite) WithContractAddr

func (s *EVMSuite) WithContractAddr(addr common.Address)

func (*EVMSuite) WithFrom

func (s *EVMSuite) WithFrom(from common.Address)

func (*EVMSuite) WithGasPrice

func (s *EVMSuite) WithGasPrice(gasPrice *big.Int)

func (*EVMSuite) WithSigner

func (s *EVMSuite) WithSigner(signer *helpers.Signer)

Jump to

Keyboard shortcuts

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