Documentation ¶
Index ¶
- type Factory
- func (f *Factory) BuildTransactionFromRequests(ctx context.Context, requests ...*ethereum.CallMsg) (*coretypes.Transaction, error)
- func (f *Factory) RebuildTransactionFromRequest(ctx context.Context, request *ethereum.CallMsg, forcedNonce uint64) (*coretypes.Transaction, error)
- func (f *Factory) SetClient(ethClient eth.Client)
- type Multicall3Batcher
- type Noncer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory is a transaction factory that builds 1559 transactions with the configured signer.
func New ¶
func New( noncer Noncer, mc3Batcher *Multicall3Batcher, signer kmstypes.TxSigner, signTxTimeout time.Duration, ) *Factory
New creates a new factory instance.
func (*Factory) BuildTransactionFromRequests ¶
func (f *Factory) BuildTransactionFromRequests( ctx context.Context, requests ...*ethereum.CallMsg, ) (*coretypes.Transaction, error)
BuildTransactionFromRequests builds a transaction from a list of requests.
func (*Factory) RebuildTransactionFromRequest ¶
func (f *Factory) RebuildTransactionFromRequest( ctx context.Context, request *ethereum.CallMsg, forcedNonce uint64, ) (*coretypes.Transaction, error)
RebuildTransactionFromRequest rebuilds a transaction from a request with the forced nonce.
type Multicall3Batcher ¶
type Multicall3Batcher struct {
// contains filtered or unexported fields
}
forge create Multicall3 --rpc-url=http://devnet.beraswillmakeit.com:8545 --private-key=0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306.
func NewMulticall3Batcher ¶
func NewMulticall3Batcher(address common.Address) *Multicall3Batcher
NewMulticall3Batcher creates a new Multicall3Batcher instance.
func (*Multicall3Batcher) BatchCallRequests ¶
func (mc *Multicall3Batcher) BatchCallRequests( ctx context.Context, from common.Address, callReqs ...*ethereum.CallMsg, ) ([]bindings.Multicall3Result, error)
BatchCallRequests uses the Multicall3 contract to create a batched call request for the given call messages and return the batched call result data for each call.
func (*Multicall3Batcher) BatchRequests ¶
func (mc *Multicall3Batcher) BatchRequests(callReqs ...*ethereum.CallMsg) *types.Request
BatchRequests creates a batched transaction request for the given call requests.