Versions in this module Expand all Collapse all v1 v1.15.0 Nov 22, 2021 Changes in this version + func Call(address common.Address, input []byte, cfg *Config) ([]byte, uint64, error) + func CanTransfer(db evm.StateDB, addr common.Address, amount *big.Int) bool + func Create(input []byte, cfg *Config) ([]byte, common.Address, uint64, error) + func Create2(input []byte, cfg *Config, salt *uint256.Int) ([]byte, common.Address, uint64, error) + func Ensure(err error) + func Execute(code, input []byte, cfg *Config) ([]byte, *storage.StateDB, error) + func NewEnv(cfg *Config) *evm.EVM + func Transfer(db evm.StateDB, sender, recipient common.Address, amount *big.Int) + type Config struct + BlockNumber *big.Int + ChainConfig *params.ChainConfig + Coinbase common.Address + Debug bool + Difficulty *big.Int + EVMConfig evm.Config + GasLimit uint64 + GasPrice *big.Int + GetHashFn func(n uint64) common.Hash + Origin common.Address + State *storage.StateDB + Time *big.Int + Value *big.Int + type Contract struct + Abi abi.ABI + Address common.Address + AutoCommit bool + Cfg *Config + func Create2Contract(cfg *Config, jsonABI, hexCode string, salt uint64, params ...interface{}) *Contract + func CreateContract(cfg *Config, jsonABI string, hexCode string, params ...interface{}) *Contract + func NewContract(cfg *Config, jsonABI string, addr common.Address) *Contract + func (self *Contract) Balance() *big.Int + func (self *Contract) BalanceOf(addr common.Address) *big.Int + func (self *Contract) Call(method string, params ...interface{}) ([]byte, uint64, error)