Documentation ¶
Index ¶
- Constants
- func NewWASMInstance(config string, blockChainHook vmcommon.BlockchainHook, ...) (*vmContext, error)
- type CallKind
- type Error
- type HostContext
- type Instance
- func (instance *Instance) Destroy()
- func (instance *Instance) Execute(ctx HostContext, rev Revision, kind CallKind, static bool, depth int, ...) (output []byte, gasLeft int64, err error)
- func (instance *Instance) Name() string
- func (instance *Instance) SetOption(name string, value string) (err error)
- func (instance *Instance) Version() string
- type Revision
- type StorageStatus
- type TxContext
Constants ¶
View Source
const ( Failure = Error(C.EVMC_FAILURE) Revert = Error(C.EVMC_REVERT) )
Variables ¶
This section is empty.
Functions ¶
func NewWASMInstance ¶
func NewWASMInstance( config string, blockChainHook vmcommon.BlockchainHook, cryptoHook vmcommon.CryptoHook, vmType []byte, ) (*vmContext, error)
Types ¶
type CallKind ¶
type CallKind int
const ( Call CallKind = C.EVMC_CALL DelegateCall CallKind = C.EVMC_DELEGATECALL CallCode CallKind = C.EVMC_CALLCODE Create CallKind = C.EVMC_CREATE Create2 CallKind = C.EVMC_CREATE2 )
type Error ¶
type Error int32
func (Error) IsInternalError ¶
func (Error) ToReturnCode ¶
func (err Error) ToReturnCode() vmcommon.ReturnCode
type HostContext ¶
type HostContext interface { AccountExists(addr common.Address) bool GetStorage(addr common.Address, key common.Hash) common.Hash SetStorage(addr common.Address, key common.Hash, value common.Hash) StorageStatus GetBalance(addr common.Address) common.Hash GetCodeSize(addr common.Address) int GetCodeHash(addr common.Address) common.Hash GetCode(addr common.Address) []byte Selfdestruct(addr common.Address, beneficiary common.Address) GetTxContext() TxContext GetBlockHash(number int64) common.Hash EmitLog(addr common.Address, topics []common.Hash, data []byte) Call(kind CallKind, destination common.Address, sender common.Address, value *big.Int, input []byte, gas int64, depth int, static bool, salt *big.Int) (output []byte, gasLeft int64, createAddr common.Address, err error) }
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
type StorageStatus ¶
type StorageStatus int
const ( StorageUnchanged StorageStatus = C.EVMC_STORAGE_UNCHANGED StorageModified StorageStatus = C.EVMC_STORAGE_MODIFIED StorageModifiedAgain StorageStatus = C.EVMC_STORAGE_MODIFIED_AGAIN StorageAdded StorageStatus = C.EVMC_STORAGE_ADDED StorageDeleted StorageStatus = C.EVMC_STORAGE_DELETED )
Click to show internal directories.
Click to hide internal directories.