Documentation ¶
Index ¶
- type BlockContext
- type Environment
- func (env *Environment) BlockContext() *BlockContext
- func (env *Environment) Call(proc func(env *Environment) []interface{}) (output []byte, err error)
- func (env *Environment) Caller() thor.Address
- func (env *Environment) Chain() *chain.Chain
- func (env *Environment) Log(abi *abi.Event, address thor.Address, topics []thor.Bytes32, ...)
- func (env *Environment) ParseArgs(val interface{})
- func (env *Environment) State() *state.State
- func (env *Environment) To() thor.Address
- func (env *Environment) TransactionContext() *TransactionContext
- func (env *Environment) UseGas(gas uint64)
- type TransactionContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockContext ¶
type BlockContext struct { Beneficiary thor.Address Signer thor.Address Number uint32 Time uint64 GasLimit uint64 TotalScore uint64 }
BlockContext block context.
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
Environment an env to execute native method.
func New ¶
func New( abi *abi.Method, chain *chain.Chain, state *state.State, blockCtx *BlockContext, txCtx *TransactionContext, evm *vm.EVM, contract *vm.Contract, ) *Environment
New create a new env.
func (*Environment) BlockContext ¶
func (env *Environment) BlockContext() *BlockContext
func (*Environment) Call ¶
func (env *Environment) Call(proc func(env *Environment) []interface{}) (output []byte, err error)
func (*Environment) Caller ¶
func (env *Environment) Caller() thor.Address
func (*Environment) Chain ¶ added in v1.3.0
func (env *Environment) Chain() *chain.Chain
func (*Environment) ParseArgs ¶
func (env *Environment) ParseArgs(val interface{})
func (*Environment) State ¶
func (env *Environment) State() *state.State
func (*Environment) To ¶
func (env *Environment) To() thor.Address
func (*Environment) TransactionContext ¶
func (env *Environment) TransactionContext() *TransactionContext
func (*Environment) UseGas ¶
func (env *Environment) UseGas(gas uint64)
Click to show internal directories.
Click to hide internal directories.