Documentation ¶
Index ¶
- func Encode(vals ...interface{}) []byte
- func NewAddressEncodeDecoder() address.EncodeDecoder
- type Address
- func (addr Address) Bytes() pack.Bytes
- func (addr Address) Marshal(buf []byte, rem int) ([]byte, int, error)
- func (addr Address) MarshalJSON() ([]byte, error)
- func (Address) SizeHint() int
- func (addr Address) String() string
- func (addr *Address) Unmarshal(buf []byte, rem int) ([]byte, int, error)
- func (addr *Address) UnmarshalJSON(data []byte) error
- type AddressDecoder
- type AddressEncodeDecoder
- type AddressEncoder
- type Payload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encode ¶
func Encode(vals ...interface{}) []byte
Encode values into an Ethereum ABI compatible byte slice.
func NewAddressEncodeDecoder ¶ added in v0.2.1
func NewAddressEncodeDecoder() address.EncodeDecoder
NewAddressEncodeDecoder constructs a new AddressEncodeDecoder.
Types ¶
type Address ¶
An Address represents a public address on the Ethereum blockchain. It can be the address of an external account, or the address of a smart contract.
func NewAddressFromHex ¶
NewAddressFromHex returns an Address decoded from a hex string.
func (Address) MarshalJSON ¶
MarshalJSON implements JSON marshaling by encoding the address as a hex string.
func (Address) SizeHint ¶
SizeHint returns the number of bytes needed to represent this address in binary.
func (*Address) UnmarshalJSON ¶
UnmarshalJSON implements JSON unmarshaling by expected the data be a hex encoded string representation of an address.
type AddressDecoder ¶
type AddressDecoder interface {
DecodeAddress(address.Address) (address.RawAddress, error)
}
AddressDecoder implements the address.Decoder interface.
func NewAddressDecoder ¶
func NewAddressDecoder() AddressDecoder
NewAddressDecoder constructs a new AddressDecoder.
type AddressEncodeDecoder ¶ added in v0.2.1
type AddressEncodeDecoder struct { AddressEncoder AddressDecoder }
AddressEncodeDecoder implements the address.EncodeDecoder interface
type AddressEncoder ¶
type AddressEncoder interface {
EncodeAddress(address.RawAddress) (address.Address, error)
}
AddressEncoder implements the address.Encoder interface.
func NewAddressEncoder ¶
func NewAddressEncoder() AddressEncoder
NewAddressEncoder constructs a new AddressEncoder.