Documentation ¶
Index ¶
- Constants
- Variables
- func BlockGasLimit() uint64
- func BlockNumber() uint64
- func BlockTimestamp() uint64
- func ChainID() uint64
- func Create1()
- func Create2()
- func DecodeBool(data Bytes) (bool, error)
- func DecodeUint64(data Bytes) (uint64, error)
- func Encode(dst, src []byte) int
- func EncodedLen(n int) int
- func Flush()
- func GasLeft() uint64
- func Init(argLen uint32)
- func InkLeft() uint64
- func InkPrice() uint32
- func Log(msg string)
- func LogAddress(addr Address, topics uint32)
- func LogN(msg string, topics uint32)
- func LogRawN(bytes Bytes, topics uint32)
- func LogU256(v U256)
- func LogUInt32(n uint32, topics uint32)
- func LogUInt8(n uint8, topics uint32)
- func ReturnDataSize() uint32
- func Revert(bytes Bytes)
- func RevertWithString(msg string)
- func SStore(key, value U256)
- func SetPure()
- func SetReturnAddress(addr Address)
- func SetReturnBytes(bytes Bytes)
- func SetReturnString(msg string)
- func SetReturnU256(z U256)
- func SetReturnUInt64(val uint64)
- func SetReturnUInt8(val uint8)
- func SetView()
- func ToSelector(in []byte) uint32
- func WithCalldata(calldata Bytes) func(*callOpt)
- func WithGas(gas uint64) func(*callOpt)
- func WithMaxGas() func(*callOpt)
- func WithValue(v U256) func(*callOpt)
- type Address
- func (a Address) Balance() Bytes
- func (a Address) Bytes() Bytes
- func (a Address) Call(opts ...func(*callOpt)) (Bytes, error)
- func (a Address) CodeHash() Bytes
- func (a Address) DelegateCall(opts ...func(*callOpt)) (Bytes, error)
- func (a Address) Equals(b Address) bool
- func (a Address) StaticCall(opts ...func(*callOpt)) (Bytes, error)
- func (a Address) String() string
- type Bytes
- type EvmError
- type String
- type U256
- type Word
Constants ¶
View Source
const AddressLen = 20
Variables ¶
View Source
var NilAddress = Address([AddressLen]uint8{0})
View Source
var Zero = U256([4]uint64{0, 0, 0, 0})
Functions ¶
func BlockGasLimit ¶
func BlockGasLimit() uint64
func BlockNumber ¶
func BlockNumber() uint64
func BlockTimestamp ¶
func BlockTimestamp() uint64
func DecodeBool ¶
func DecodeUint64 ¶
func Encode ¶
Encode encodes src into EncodedLen(len(src)) bytes of dst. As a convenience, it returns the number of bytes written to dst, but this value is always EncodedLen(len(src)). Encode implements hexadecimal encoding.
func EncodedLen ¶
EncodedLen returns the length of an encoding of n source bytes. Specifically, it returns n * 2.
func LogAddress ¶
func ReturnDataSize ¶
func ReturnDataSize() uint32
func RevertWithString ¶
func RevertWithString(msg string)
func SetReturnAddress ¶
func SetReturnAddress(addr Address)
func SetReturnBytes ¶
func SetReturnBytes(bytes Bytes)
func SetReturnString ¶
func SetReturnString(msg string)
func SetReturnU256 ¶
func SetReturnU256(z U256)
func SetReturnUInt64 ¶
func SetReturnUInt64(val uint64)
func SetReturnUInt8 ¶
func SetReturnUInt8(val uint8)
func ToSelector ¶
func WithCalldata ¶
func WithCalldata(calldata Bytes) func(*callOpt)
func WithMaxGas ¶
func WithMaxGas() func(*callOpt)
Types ¶
type Address ¶
type Address [AddressLen]uint8
func AddressFromBytes ¶
func BlockCoinbase ¶
func BlockCoinbase() Address
func ContractAddress ¶
func ContractAddress() Address
func DecodeAddress ¶
func (Address) DelegateCall ¶
func (Address) StaticCall ¶
type Bytes ¶
type Bytes []uint8
func BlockBaseFee ¶
func BlockBaseFee() Bytes
func GetCalldata ¶
func GetCalldata() Bytes
func ReturnData ¶
func ReturnData() Bytes
Click to show internal directories.
Click to hide internal directories.