Documentation
¶
Index ¶
- type Conn
- func (c *Conn) Address(address string, privateKey string) (common.Address, error)
- func (c *Conn) CalculateFees() (*big.Int, *big.Int, error)
- func (c *Conn) ChainID() *big.Int
- func (c *Conn) Client() *ethclient.Client
- func (c *Conn) CreateAccessList(ctx context.Context, txData *TransactionData) (*types.AccessList, uint64, error)
- func (c *Conn) CreateSignedTransaction(ctx context.Context, txData *TransactionData) (*types.Transaction, error)
- func (c *Conn) CreateTransaction(ctx context.Context, txData *TransactionData) (*types.Transaction, error)
- func (c *Conn) CurrentBaseFee(ctx context.Context) (*big.Int, error)
- func (c *Conn) CurrentNonce(ctx context.Context, address common.Address) (uint64, error)
- func (c *Conn) EstimateGas(ctx context.Context, txData *TransactionData) (uint64, error)
- func (c *Conn) HandleSubmittedTransaction(tx *types.Transaction, logFields log.Fields) bool
- func (c *Conn) NextNonce(ctx context.Context, address common.Address) (uint64, error)
- func (c *Conn) PrepareTx(ctx context.Context, txData *TransactionData) error
- func (c *Conn) Resolve(name string) (common.Address, error)
- func (c *Conn) ReverseResolve(address common.Address) (string, error)
- func (c *Conn) SendTransaction(ctx context.Context, tx *types.Transaction) error
- func (c *Conn) SignTransaction(_ context.Context, signer common.Address, tx *types.Transaction, debug bool) (*types.Transaction, error)
- type TransactionData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is a connection to an Ethereum execution client.
func (*Conn) CalculateFees ¶
CalculateFees calculates the base and priority fees.
func (*Conn) CreateAccessList ¶ added in v2.10.0
func (c *Conn) CreateAccessList(ctx context.Context, txData *TransactionData, ) ( *types.AccessList, uint64, error, )
CreateAccessList creates an access list for the given transaction. Consider using CreateTransaction instead of this call, for a more comprehensive process.
func (*Conn) CreateSignedTransaction ¶
func (c *Conn) CreateSignedTransaction(ctx context.Context, txData *TransactionData, ) ( *types.Transaction, error, )
CreateSignedTransaction creates a signed transaction.
func (*Conn) CreateTransaction ¶
func (c *Conn) CreateTransaction(ctx context.Context, txData *TransactionData, ) ( *types.Transaction, error, )
CreateTransaction creates a transaction.
func (*Conn) CurrentBaseFee ¶
CurrentBaseFee returns the current base fee of the chain.
func (*Conn) CurrentNonce ¶
CurrentNonce provides the current nonce for the given address.
func (*Conn) EstimateGas ¶
EstimateGas estimates the gas required for the given transaction. Consider using CreateTransaction instead of this call, for a more comprehensive process.
func (*Conn) HandleSubmittedTransaction ¶ added in v2.10.12
HandleSubmittedTransaction handles logging and waiting for a submitted transaction to be mined. It will not log the transaction if logFields is nil. This function will return false if asked to wait and the transaction is not mined, otherwise true.
func (*Conn) PrepareTx ¶ added in v2.10.0
func (c *Conn) PrepareTx(ctx context.Context, txData *TransactionData, ) error
PrepareTx prepares a transaction, setting the gas limit and access list if applicable. Consider using CreateTransaction instead of this call, for a more comprehensive process.
func (*Conn) ReverseResolve ¶
ReverseResolve resolves an address to a name.
func (*Conn) SendTransaction ¶
SendTransaction send the supplied transaction to the network.
func (*Conn) SignTransaction ¶
func (c *Conn) SignTransaction(_ context.Context, signer common.Address, tx *types.Transaction, debug bool, ) ( *types.Transaction, error, )
SignTransaction signs the given transaction, returning a signed transaction.