Documentation
¶
Index ¶
- func BuildBlobTx(txData *TxMetadata, blobRefs [][]string) (*types.BlobTx, error)
- func DynFeeTx(txData *TxMetadata) (*types.DynamicFeeTx, error)
- func MarshalBlobV1Tx(tx *types.Transaction) ([]byte, error)
- func ParseBlobRefsBytes(blobRefs []string, tx *types.BlobTx) ([]byte, error)
- func SetCodeTx(txData *TxMetadata) (*types.SetCodeTx, error)
- type BlobCommitment
- type BlockInfo
- type Client
- func (client *Client) GetBalanceAt(ctx context.Context, wallet common.Address) (*big.Int, error)
- func (client *Client) GetBlockHeight(ctx context.Context) (uint64, error)
- func (client *Client) GetChainId(ctx context.Context) (*big.Int, error)
- func (client *Client) GetClientGroup() string
- func (client *Client) GetClientVersion(ctx context.Context) (string, error)
- func (client *Client) GetEthClient() *ethclient.Client
- func (client *Client) GetLastBlockHeight() (uint64, time.Time)
- func (client *Client) GetName() string
- func (client *Client) GetNonceAt(ctx context.Context, wallet common.Address, blockNumber *big.Int) (uint64, error)
- func (client *Client) GetPendingNonceAt(ctx context.Context, wallet common.Address) (uint64, error)
- func (client *Client) GetRPCHost() string
- func (client *Client) GetSuggestedFee(ctx context.Context) (*big.Int, *big.Int, error)
- func (client *Client) GetTransactionReceiptCtx(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
- func (client *Client) SendRawTransactionCtx(ctx context.Context, tx []byte) error
- func (client *Client) SendTransaction2(ctx context.Context, tx *types.Transaction) error
- func (client *Client) SendTransactionCtx(ctx context.Context, tx *types.Transaction) error
- func (client *Client) UpdateWallet(ctx context.Context, wallet *Wallet) error
- type SendTransactionOptions
- type TxConfirmFn
- type TxInfo
- type TxLogFn
- type TxMetadata
- type TxPool
- type TxPoolOptions
- type Wallet
- func (wallet *Wallet) AddBalance(amount *big.Int)
- func (wallet *Wallet) BuildBlobTx(txData *types.BlobTx) (*types.Transaction, error)
- func (wallet *Wallet) BuildBoundTx(ctx context.Context, txData *TxMetadata, ...) (*types.Transaction, error)
- func (wallet *Wallet) BuildDynamicFeeTx(txData *types.DynamicFeeTx) (*types.Transaction, error)
- func (wallet *Wallet) BuildSetCodeTx(txData *types.SetCodeTx) (*types.Transaction, error)
- func (wallet *Wallet) GetAddress() common.Address
- func (wallet *Wallet) GetBalance() *big.Int
- func (wallet *Wallet) GetChainId() *big.Int
- func (wallet *Wallet) GetConfirmedNonce() uint64
- func (wallet *Wallet) GetNextNonce() uint64
- func (wallet *Wallet) GetNonce() uint64
- func (wallet *Wallet) GetPrivateKey() *ecdsa.PrivateKey
- func (wallet *Wallet) ReplaceBlobTx(txData *types.BlobTx, nonce uint64) (*types.Transaction, error)
- func (wallet *Wallet) ReplaceDynamicFeeTx(txData *types.DynamicFeeTx, nonce uint64) (*types.Transaction, error)
- func (wallet *Wallet) ResetPendingNonce(ctx context.Context, client *Client)
- func (wallet *Wallet) SetAddress(address common.Address)
- func (wallet *Wallet) SetBalance(balance *big.Int)
- func (wallet *Wallet) SetChainId(chainid *big.Int)
- func (wallet *Wallet) SetNonce(nonce uint64)
- func (wallet *Wallet) SubBalance(amount *big.Int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildBlobTx ¶
func BuildBlobTx(txData *TxMetadata, blobRefs [][]string) (*types.BlobTx, error)
func DynFeeTx ¶
func DynFeeTx(txData *TxMetadata) (*types.DynamicFeeTx, error)
func MarshalBlobV1Tx ¶ added in v1.1.2
func MarshalBlobV1Tx(tx *types.Transaction) ([]byte, error)
func ParseBlobRefsBytes ¶
Types ¶
type BlobCommitment ¶
type BlobCommitment struct {
Blob *kzg4844.Blob
Commitment kzg4844.Commitment
Proof kzg4844.Proof
VersionedHash common.Hash
}
func EncodeBlob ¶
func EncodeBlob(data []byte) (*BlobCommitment, error)
type Client ¶
func (*Client) GetBalanceAt ¶
func (*Client) GetBlockHeight ¶
func (*Client) GetClientGroup ¶ added in v1.1.1
func (*Client) GetClientVersion ¶ added in v1.1.0
func (*Client) GetEthClient ¶
func (*Client) GetLastBlockHeight ¶ added in v1.1.0
func (*Client) GetNonceAt ¶
func (*Client) GetPendingNonceAt ¶
func (*Client) GetRPCHost ¶
func (*Client) GetSuggestedFee ¶
func (*Client) GetTransactionReceiptCtx ¶
func (*Client) SendRawTransactionCtx ¶ added in v1.1.2
func (*Client) SendTransaction2 ¶
func (*Client) SendTransactionCtx ¶
type SendTransactionOptions ¶
type TxConfirmFn ¶
type TxConfirmFn func(tx *types.Transaction, receipt *types.Receipt, err error)
type TxInfo ¶ added in v1.1.1
type TxInfo struct {
TxHash common.Hash
From common.Address
To *common.Address
Tx *types.Transaction
FromWallet *Wallet
ToWallet *Wallet
Options *SendTransactionOptions
}
TxInfo represents information about a confirmed transaction
type TxMetadata ¶
type TxMetadata struct {
GasTipCap *uint256.Int // a.k.a. maxPriorityFeePerGas
GasFeeCap *uint256.Int // a.k.a. maxFeePerGas
BlobFeeCap *uint256.Int // a.k.a. maxFeePerBlobGas
Gas uint64
To *common.Address
Value *uint256.Int
Data []byte
AccessList types.AccessList
AuthList []types.SetCodeAuthorization
}
type TxPool ¶
type TxPool struct {
// contains filtered or unexported fields
}
func NewTxPool ¶
func NewTxPool(options *TxPoolOptions) *TxPool
func (*TxPool) AwaitTransaction ¶
func (*TxPool) SendTransaction ¶
func (pool *TxPool) SendTransaction(ctx context.Context, wallet *Wallet, tx *types.Transaction, options *SendTransactionOptions) error
type TxPoolOptions ¶
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
func (*Wallet) AddBalance ¶
func (*Wallet) BuildBlobTx ¶
func (*Wallet) BuildBoundTx ¶
func (wallet *Wallet) BuildBoundTx(ctx context.Context, txData *TxMetadata, buildFn func(transactOpts *bind.TransactOpts) (*types.Transaction, error)) (*types.Transaction, error)
func (*Wallet) BuildDynamicFeeTx ¶
func (wallet *Wallet) BuildDynamicFeeTx(txData *types.DynamicFeeTx) (*types.Transaction, error)
func (*Wallet) BuildSetCodeTx ¶ added in v1.1.0
func (*Wallet) GetAddress ¶
func (*Wallet) GetBalance ¶
func (*Wallet) GetChainId ¶
func (*Wallet) GetConfirmedNonce ¶ added in v1.1.0
func (*Wallet) GetNextNonce ¶ added in v1.1.0
func (*Wallet) GetPrivateKey ¶ added in v1.1.0
func (wallet *Wallet) GetPrivateKey() *ecdsa.PrivateKey
func (*Wallet) ReplaceBlobTx ¶
func (*Wallet) ReplaceDynamicFeeTx ¶
func (wallet *Wallet) ReplaceDynamicFeeTx(txData *types.DynamicFeeTx, nonce uint64) (*types.Transaction, error)
func (*Wallet) ResetPendingNonce ¶ added in v1.0.1
func (*Wallet) SetAddress ¶ added in v1.1.1
func (*Wallet) SetBalance ¶
func (*Wallet) SetChainId ¶
func (*Wallet) SubBalance ¶
Click to show internal directories.
Click to hide internal directories.