runtime

package
v0.0.0-...-471f645 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(action *types.Action, cfg *Config) ([]byte, uint64, error)

Call executes the code given by the contract's address. It will return the EVM's return value or an error if it failed.

Call, unlike Execute, requires a config and also requires the State field to be set.

func Create

func Create(action *types.Action, cfg *Config) ([]byte, uint64, error)

Create executes the code using the EVM create method

func NewEnv

func NewEnv(cfg *Config) *vm.EVM

create a new evm env

Types

type Config

type Config struct {
	ChainConfig *params.ChainConfig
	Difficulty  *big.Int
	Origin      common.Name
	FromPubkey  common.PubKey
	Coinbase    common.Name
	BlockNumber *big.Int
	Time        *big.Int
	GasLimit    uint64
	AssetID     uint64
	GasPrice    *big.Int
	Value       *big.Int
	Debug       bool
	EVMConfig   vm.Config
	Account     *accountmanager.AccountManager
	State       *state.StateDB
	GetHashFn   func(n uint64) common.Hash
}

Config is a basic type specifying certain configuration flags for running the EVM.

Jump to

Keyboard shortcuts

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