Documentation ¶
Index ¶
- func ComputeContractAddr(code []byte, args []byte, nonce []byte) common.Address
- func ComputeContractAddrByHash(codeHash []byte, args []byte, nonce []byte) common.Address
- func ComputeContractAddrWithUnpackedArgs(code []byte, args [][]byte, nonce []byte) common.Address
- func CreateContractAddr(tx *types.Transaction) common.Address
- type BlockHeaderProvider
- type ContractContext
- func (c *ContractContext) Caller() common.Address
- func (c *ContractContext) ContractAddr() common.Address
- func (c *ContractContext) CreateSubContext(contract lib.Address, amount *big.Int) *ContractContext
- func (c *ContractContext) Epoch() uint16
- func (c *ContractContext) Nonce() uint32
- func (c *ContractContext) PayAmount() *big.Int
- type ContractData
- type WasmEnv
- func (w *WasmEnv) AddBalance(meter *lib.GasMeter, address lib.Address, amount *big.Int)
- func (w *WasmEnv) Balance(meter *lib.GasMeter) *big.Int
- func (w *WasmEnv) BlockHeader(meter *lib.GasMeter, height uint64) []byte
- func (w *WasmEnv) BlockNumber(meter *lib.GasMeter) uint64
- func (w *WasmEnv) BlockSeed(meter *lib.GasMeter) []byte
- func (w *WasmEnv) BlockTimestamp(meter *lib.GasMeter) int64
- func (w *WasmEnv) Burn(meter *lib.GasMeter, amount *big.Int) error
- func (w *WasmEnv) Caller(meter *lib.GasMeter) lib.Address
- func (w *WasmEnv) CodeHash(meter *lib.GasMeter) []byte
- func (w *WasmEnv) Commit()
- func (w *WasmEnv) ContractAddr(meter *lib.GasMeter, code []byte, args []byte, nonce []byte) lib.Address
- func (w *WasmEnv) ContractAddrByHash(meter *lib.GasMeter, hash []byte, args []byte, nonce []byte) lib.Address
- func (w *WasmEnv) ContractAddress(meter *lib.GasMeter) lib.Address
- func (w *WasmEnv) ContractCodeHash(addr lib.Address) *[]byte
- func (w *WasmEnv) CreateSubEnv(contract lib.Address, method string, payAmount *big.Int, isDeploy bool) (lib.HostEnv, error)
- func (w *WasmEnv) Deploy(code []byte)
- func (w *WasmEnv) Ecrecover(meter *lib.GasMeter, data []byte, signature []byte) []byte
- func (w *WasmEnv) Epoch(meter *lib.GasMeter) uint16
- func (w *WasmEnv) Event(meter *lib.GasMeter, name string, args ...[]byte)
- func (w *WasmEnv) GetCode(addr lib.Address) []byte
- func (w *WasmEnv) GetStorage(meter *lib.GasMeter, key []byte) []byte
- func (w *WasmEnv) GlobalState(meter *lib.GasMeter) []byte
- func (w *WasmEnv) Identity(meter *lib.GasMeter, address lib.Address) []byte
- func (w *WasmEnv) InternalCommit() []*types.TxEvent
- func (w *WasmEnv) IsDebug() bool
- func (w *WasmEnv) Keccak256(meter *lib.GasMeter, data []byte) []byte
- func (w *WasmEnv) MinFeePerGas(meter *lib.GasMeter) *big.Int
- func (w *WasmEnv) NetworkSize(meter *lib.GasMeter) uint64
- func (w *WasmEnv) OriginalCaller(meter *lib.GasMeter) lib.Address
- func (w *WasmEnv) OwnCode(meter *lib.GasMeter) []byte
- func (w *WasmEnv) PayAmount(meter *lib.GasMeter) *big.Int
- func (w *WasmEnv) ReadContractData(meter *lib.GasMeter, address lib.Address, key []byte) []byte
- func (w *WasmEnv) RemoveStorage(meter *lib.GasMeter, key []byte)
- func (w *WasmEnv) SetStorage(meter *lib.GasMeter, key []byte, value []byte)
- func (w *WasmEnv) SubBalance(meter *lib.GasMeter, amount *big.Int) error
- type WasmVM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeContractAddr ¶
func CreateContractAddr ¶
func CreateContractAddr(tx *types.Transaction) common.Address
Types ¶
type BlockHeaderProvider ¶
type ContractContext ¶
type ContractContext struct {
// contains filtered or unexported fields
}
func NewContractContext ¶
func NewContractContext(tx *types.Transaction) *ContractContext
func (*ContractContext) Caller ¶
func (c *ContractContext) Caller() common.Address
func (*ContractContext) ContractAddr ¶
func (c *ContractContext) ContractAddr() common.Address
func (*ContractContext) CreateSubContext ¶
func (c *ContractContext) CreateSubContext(contract lib.Address, amount *big.Int) *ContractContext
func (*ContractContext) Epoch ¶
func (c *ContractContext) Epoch() uint16
func (*ContractContext) Nonce ¶
func (c *ContractContext) Nonce() uint32
func (*ContractContext) PayAmount ¶
func (c *ContractContext) PayAmount() *big.Int
type ContractData ¶
type ContractData struct {
Code []byte
}
type WasmEnv ¶
type WasmEnv struct {
// contains filtered or unexported fields
}
func NewWasmEnv ¶
func (*WasmEnv) AddBalance ¶
func (*WasmEnv) BlockHeader ¶
func (*WasmEnv) ContractAddr ¶
func (*WasmEnv) ContractAddrByHash ¶
func (*WasmEnv) ContractAddress ¶
func (*WasmEnv) CreateSubEnv ¶
func (*WasmEnv) InternalCommit ¶
func (*WasmEnv) ReadContractData ¶
func (*WasmEnv) SetStorage ¶
Click to show internal directories.
Click to hide internal directories.