Versions in this module Expand all Collapse all v0 v0.6.0 Jan 2, 2024 Changes in this version + const DefaultClientRPCURL + func Encode(vals ...interface{}) []byte + func NewAddressEncodeDecoder() address.EncodeDecoder + type Address common.Address + func NewAddressFromHex(str string) (Address, error) + func (Address) SizeHint() int + func (addr *Address) Unmarshal(buf []byte, rem int) ([]byte, int, error) + func (addr *Address) UnmarshalJSON(data []byte) error + func (addr Address) Bytes() pack.Bytes + func (addr Address) Marshal(buf []byte, rem int) ([]byte, int, error) + func (addr Address) MarshalJSON() ([]byte, error) + func (addr Address) String() string + type AddressDecoder interface + DecodeAddress func(address.Address) (address.RawAddress, error) + func NewAddressDecoder() AddressDecoder + type AddressEncodeDecoder struct + type AddressEncoder interface + EncodeAddress func(address.RawAddress) (address.Address, error) + func NewAddressEncoder() AddressEncoder + type Client struct + ChainID *big.Int + EthClient *ethclient.Client + func NewClient(rpcURL string, chainID *big.Int) (*Client, error) + func (client *Client) AccountBalance(ctx context.Context, addr address.Address) (pack.U256, error) + func (client *Client) AccountNonce(ctx context.Context, addr address.Address) (pack.U256, error) + func (client *Client) CallContract(ctx context.Context, program address.Address, calldata contract.CallData) (pack.Bytes, error) + func (client *Client) LatestBlock(ctx context.Context) (pack.U64, error) + func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error + func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack.U64, error) + type GasEstimator struct + func NewGasEstimator(client *Client) *GasEstimator + func (gasEstimator *GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) + type Payload struct + ABI pack.Bytes + Data pack.Bytes + Fn pack.Bytes + type Tx struct + EthTx *types.Transaction + Signer types.Signer + func (tx *Tx) Sign(signatures []pack.Bytes65, pubkey pack.Bytes) error + func (tx Tx) From() address.Address + func (tx Tx) Hash() pack.Bytes + func (tx Tx) Nonce() pack.U256 + func (tx Tx) Payload() contract.CallData + func (tx Tx) Serialize() (pack.Bytes, error) + func (tx Tx) Sighashes() ([]pack.Bytes32, error) + func (tx Tx) To() address.Address + func (tx Tx) Value() pack.U256 + type TxBuilder struct + ChainID *big.Int + func NewTxBuilder(chainID *big.Int) TxBuilder + func (txBuilder TxBuilder) BuildTx(ctx context.Context, fromPubKey *id.PubKey, to address.Address, ...) (account.Tx, error)