 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func Call(ctx sdk.Context, app *exampleapp.EVMD, args CallArgs) (res abci.ExecTxResult, ethRes *evmtypes.MsgEthereumTxResponse, err error)
- func CallContractAndCheckLogs(ctx sdk.Context, app *exampleapp.EVMD, cArgs CallArgs, ...) (abci.ExecTxResult, *evmtypes.MsgEthereumTxResponse, error)
- func LoadCounterContract() (evmtypes.CompiledContract, error)
- func LoadDistributionCallerContract() (evmtypes.CompiledContract, error)
- func LoadFlashLoanContract() (evmtypes.CompiledContract, error)
- func LoadGovCallerContract() (evmtypes.CompiledContract, error)
- func LoadInterchainSenderCallerContract() (evmtypes.CompiledContract, error)
- func LoadInterchainSenderContract() (evmtypes.CompiledContract, error)
- func LoadReverterContract() (evmtypes.CompiledContract, error)
- func LoadStakingReverterContract() (evmtypes.CompiledContract, error)
- type CallArgs
- func (c CallArgs) WithABI(abi abi.ABI) CallArgs
- func (c CallArgs) WithAccessList(accessList *ethtypes.AccessList) CallArgs
- func (c CallArgs) WithAddress(addr common.Address) CallArgs
- func (c CallArgs) WithAmount(amount *big.Int) CallArgs
- func (c CallArgs) WithArgs(args ...interface{}) CallArgs
- func (c CallArgs) WithGasFeeCap(gasFeeCap *big.Int) CallArgs
- func (c CallArgs) WithGasLimit(gasLimit uint64) CallArgs
- func (c CallArgs) WithGasPrice(gasPrice *big.Int) CallArgs
- func (c CallArgs) WithGasTipCap(gasTipCap *big.Int) CallArgs
- func (c CallArgs) WithMethodName(methodName string) CallArgs
- func (c CallArgs) WithNonce(nonce *big.Int) CallArgs
- func (c CallArgs) WithPrivKey(privKey cryptotypes.PrivKey) CallArgs
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Call ¶
func Call(ctx sdk.Context, app *exampleapp.EVMD, args CallArgs) (res abci.ExecTxResult, ethRes *evmtypes.MsgEthereumTxResponse, err error)
Call is a helper function to call any arbitrary smart contract.
func CallContractAndCheckLogs ¶
func CallContractAndCheckLogs(ctx sdk.Context, app *exampleapp.EVMD, cArgs CallArgs, logCheckArgs precompiletestutil.LogCheckArgs) (abci.ExecTxResult, *evmtypes.MsgEthereumTxResponse, error)
CallContractAndCheckLogs is a helper function to call any arbitrary smart contract and check that the logs contain the expected events.
func LoadCounterContract ¶
func LoadCounterContract() (evmtypes.CompiledContract, error)
func LoadDistributionCallerContract ¶
func LoadDistributionCallerContract() (evmtypes.CompiledContract, error)
func LoadFlashLoanContract ¶
func LoadFlashLoanContract() (evmtypes.CompiledContract, error)
func LoadGovCallerContract ¶ added in v0.3.0
func LoadGovCallerContract() (evmtypes.CompiledContract, error)
func LoadInterchainSenderCallerContract ¶
func LoadInterchainSenderCallerContract() (evmtypes.CompiledContract, error)
func LoadInterchainSenderContract ¶
func LoadInterchainSenderContract() (evmtypes.CompiledContract, error)
func LoadReverterContract ¶
func LoadReverterContract() (evmtypes.CompiledContract, error)
func LoadStakingReverterContract ¶
func LoadStakingReverterContract() (evmtypes.CompiledContract, error)
Types ¶
type CallArgs ¶
type CallArgs struct {
	// Amount is the msg.value sent with the transaction.
	Amount *big.Int
	// AccessList is the access list to use for the transaction. If not empty, the transaction will be an EIP-2930 transaction (AccessListTx).
	AccessList *ethtypes.AccessList
	// ContractAddr is the address of the contract to call.
	ContractAddr common.Address
	// ContractABI is the ABI of the contract to call.
	ContractABI abi.ABI
	// MethodName is the name of the method to call.
	MethodName string
	// Nonce is the nonce to use for the transaction.
	Nonce *big.Int
	// GasLimit to use for the transaction
	GasLimit uint64
	// GasPrice is the gas price to use. If left empty, the base fee for the current block will be used.
	GasPrice *big.Int
	// GasFeeCap is the gas fee cap to use. If not empty, the transaction will be an EIP-1559 transaction (DynamicFeeTx).
	GasFeeCap *big.Int
	// GasTipCap is the gas tip cap to use. If not empty, the transaction will be an EIP-1559 transaction (DynamicFeeTx).
	GasTipCap *big.Int
	// PrivKey is the private key to be used for the transaction.
	PrivKey cryptotypes.PrivKey
	// Args are the arguments to pass to the method.
	Args []interface{}
}
    CallArgs is a struct to define all relevant data to call a smart contract.
func (CallArgs) WithAccessList ¶
func (c CallArgs) WithAccessList(accessList *ethtypes.AccessList) CallArgs
WithAccessList returns the CallArgs with the given access list.
func (CallArgs) WithAddress ¶
WithAddress returns the CallArgs with the given address.
func (CallArgs) WithAmount ¶
WithAmount populates the CallArgs struct's Amount field with the given amount. This is the amount of ATOM that will be sent with the contract call.
func (CallArgs) WithArgs ¶
WithArgs populates the CallArgs struct's Args field with the given list of arguments. These are the arguments that will be packed into the contract call input.
func (CallArgs) WithGasFeeCap ¶
WithGasFeeCap returns the CallArgs with the given gas fee cap.
func (CallArgs) WithGasLimit ¶
WithGasLimit returns the CallArgs with the given gas limit.
func (CallArgs) WithGasPrice ¶
WithGasPrice returns the CallArgs with the given gas price.
func (CallArgs) WithGasTipCap ¶
WithGasTipCap returns the CallArgs with the given gas tip cap.
func (CallArgs) WithMethodName ¶
WithMethodName returns the CallArgs with the given method name.
func (CallArgs) WithPrivKey ¶
func (c CallArgs) WithPrivKey(privKey cryptotypes.PrivKey) CallArgs
WithPrivKey returns the CallArgs with the given private key.