{"modulePath":"github.com/Evolution404/simcore","version":"v1.0.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package runtime\n\nPackage runtime provides a basic execution model for executing EVM code.\n\n## Functions\n\n```go\nfunc Call(address common.Address, input []byte, cfg *Config) ([]byte, uint64, error)\n```\nCall executes the code given by the contract's address. It will return the EVM's return value or an error if it failed.\n\nCall, unlike Execute, requires a config and also requires the State field to be set.\n\n```go\nfunc Create(input []byte, cfg *Config) ([]byte, common.Address, uint64, error)\n```\nCreate executes the code using the EVM create method\n\n```go\nfunc Execute(code, input []byte, cfg *Config) ([]byte, *state.StateDB, error)\n```\nExecute executes the code using the input as call data during the execution. It returns the EVM's return value, the new state and an error if it failed.\n\nExecute sets up an in-memory, temporary, environment for the execution of the given code. It makes sure that it's restored to its original state afterwards.\n\n```go\nfunc NewEnv(cfg *Config) *vm.EVM\n```\n\n## Types\n\n```go\ntype Config struct {\n\tChainConfig *params.ChainConfig\n\tDifficulty  *big.Int\n\tOrigin      common.Address\n\tCoinbase    common.Address\n\tBlockNumber *big.Int\n\tTime        *big.Int\n\tGasLimit    uint64\n\tGasPrice    *big.Int\n\tValue       *big.Int\n\tDebug       bool\n\tEVMConfig   vm.Config\n\tBaseFee     *big.Int\n\n\tState     *state.StateDB\n\tGetHashFn func(n uint64) common.Hash\n}\n```\nConfig is a basic type specifying certain configuration flags for running the EVM.\n\n","path":"github.com/Evolution404/simcore/core/vm/runtime","name":"runtime","synopsis":"Package runtime provides a basic execution model for executing EVM code.","isRedistributable":true}
