evm

package
v0.15.0-dev Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0, MIT Imports: 12 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Methods = map[abi.MethodNum]builtin.MethodMeta{
	1: builtin.NewMethodMeta("Constructor", *new(func(*ConstructorParams) *abi.EmptyValue)),
	2: builtin.NewMethodMeta("Resurrect", *new(func(*ResurrectParams) *abi.EmptyValue)),
	3: builtin.NewMethodMeta("GetBytecode", *new(func(*abi.EmptyValue) *GetBytecodeReturn)),
	4: builtin.NewMethodMeta("GetBytecodeHash", *new(func(*abi.EmptyValue) *abi.CborBytes)),
	5: builtin.NewMethodMeta("GetStorageAt", *new(func(*GetStorageAtParams) *abi.CborBytes)),
	6: builtin.NewMethodMeta("InvokeContractDelegate", *new(func(params *DelegateCallParams) *abi.CborBytes)),
	builtin.MustGenerateFRCMethodNum("InvokeEVM"): builtin.NewMethodMeta("InvokeContract", *new(func(bytes *abi.CborBytes) *abi.CborBytes)),
}

Functions

func CheckStateInvariants

func CheckStateInvariants(st *State, store adt.Store) *builtin.MessageAccumulator

Checks internal invariants of evm state.

Types

type ConstructorParams

type ConstructorParams struct {
	Creator  [20]byte
	Initcode []byte
}

func (*ConstructorParams) MarshalCBOR

func (t *ConstructorParams) MarshalCBOR(w io.Writer) error

func (*ConstructorParams) UnmarshalCBOR

func (t *ConstructorParams) UnmarshalCBOR(r io.Reader) (err error)

type DelegateCallParams

type DelegateCallParams struct {
	Code   cid.Cid
	Input  []byte
	Caller [20]byte
	Value  abi.TokenAmount
}

func (*DelegateCallParams) MarshalCBOR

func (t *DelegateCallParams) MarshalCBOR(w io.Writer) error

func (*DelegateCallParams) UnmarshalCBOR

func (t *DelegateCallParams) UnmarshalCBOR(r io.Reader) (err error)

type GetBytecodeReturn

type GetBytecodeReturn struct {
	Cid *cid.Cid
}

func (*GetBytecodeReturn) MarshalCBOR

func (bc *GetBytecodeReturn) MarshalCBOR(w io.Writer) error

func (*GetBytecodeReturn) UnmarshalCBOR

func (bc *GetBytecodeReturn) UnmarshalCBOR(r io.Reader) error

type GetStorageAtParams

type GetStorageAtParams struct {
	StorageKey [32]byte
}

func (*GetStorageAtParams) MarshalCBOR

func (t *GetStorageAtParams) MarshalCBOR(w io.Writer) error

func (*GetStorageAtParams) UnmarshalCBOR

func (t *GetStorageAtParams) UnmarshalCBOR(r io.Reader) (err error)

type ResurrectParams

type ResurrectParams = ConstructorParams

type State

type State struct {
	Bytecode      cid.Cid
	BytecodeHash  [32]byte
	ContractState cid.Cid
	Nonce         uint64
	Tombstone     *Tombstone
}

func ConstructState

func ConstructState(store adt.Store, bytecode cid.Cid) (*State, error)

func (*State) MarshalCBOR

func (t *State) MarshalCBOR(w io.Writer) error

func (*State) UnmarshalCBOR

func (t *State) UnmarshalCBOR(r io.Reader) (err error)

type Tombstone

type Tombstone struct {
	Origin abi.ActorID
	Nonce  uint64
}

func (*Tombstone) MarshalCBOR

func (t *Tombstone) MarshalCBOR(w io.Writer) error

func (*Tombstone) UnmarshalCBOR

func (t *Tombstone) UnmarshalCBOR(r io.Reader) (err error)

Jump to

Keyboard shortcuts

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