Documentation ¶
Overview ¶
Package w3types implements common types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Nonce uint64 Balance *big.Int Code []byte Storage map[common.Hash]common.Hash // contains filtered or unexported fields }
func (*Account) MarshalJSON ¶
MarshalJSON implements the json.Marshaler.
type Caller ¶
type Caller interface { RequestCreator ResponseHandler }
Caller is the interface that groups the basic CreateRequest and HandleResponse methods.
type CallerFactory ¶
type CallerFactory[T any] interface { // Returns given argument points to the variable in which to store the // calls result. Returns(*T) Caller }
CallerFactory is the interface that wraps the basic Returns method.
type Func ¶
type Func interface { // EncodeArgs ABI-encodes the given args and prepends the Func's 4-byte // selector. EncodeArgs(args ...any) (input []byte, err error) // DecodeArgs ABI-decodes the given input to the given args. DecodeArgs(input []byte, args ...any) (err error) // DecodeReturns ABI-decodes the given output to the given returns. DecodeReturns(output []byte, returns ...any) (err error) }
Func is the interface that wraps the methods for ABI encoding and decoding.
type Message ¶
type Message struct { From common.Address // Sender To *common.Address // Recipient Nonce uint64 GasPrice *big.Int GasFeeCap *big.Int GasTipCap *big.Int Gas uint64 Value *big.Int Input []byte // Input data AccessList types.AccessList Func Func // Func to encode Args []any // Arguments for Func }
Message represents a transaction without the signature.
If no input data is given, but Func is not null, the input data is automatically encoded from the given Func and Args arguments by many functions that accept a Message struct as an argument.
func (*Message) MarshalJSON ¶
MarshalJSON implements the json.Marshaler.
func (*Message) SetCallMsg ¶
SetCallMsg sets msg to the ethereum.CallMsg callMsg and returns msg.
func (*Message) SetTx ¶
SetTx sets msg to the types.Transaction tx and returns msg.
type RequestCreator ¶
RequestCreator is the interface that wraps the basic CreateRequest method.
type ResponseHandler ¶
ResponseHandler is the interface that wraps the basic HandleResponse method.
type State ¶
func (State) SetGenesisAlloc ¶
func (s State) SetGenesisAlloc(alloc core.GenesisAlloc) State
SetGenesisAlloc copies the given core.GenesisAlloc to the state and returns it.