evm

package
v0.0.0-...-caec882 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EVM

type EVM interface {
	// Call another contract
	Call(caller vm.ContractRef, addr common.Address, data []byte, quota uint64, value *big.Int) ([]byte, uint64, error)
	// Take another's contract code and execute within our own context
	CallCode(caller vm.ContractRef, addr common.Address, data []byte, quota uint64, value *big.Int) ([]byte, uint64, error)
	// Same as CallCode except sender and value is propagated from parent to child scope
	DelegateCall(caller vm.ContractRef, addr common.Address, data []byte, quota uint64) ([]byte, uint64, error)
	// Create a new contract
	Create(caller vm.ContractRef, data []byte, quota uint64, value *big.Int) ([]byte, common.Address, uint64, error)
}

EVM provides a basic interface for the EVM calling conventions. The EVM EVM depends on this context being implemented for doing subcalls and initialising new EVM contracts.

func New

func New(ctx vm.Context, stateDB *state.StateDB, chainConfig *params.ChainConfig, vmConfig vm.Config) EVM

Jump to

Keyboard shortcuts

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