Documentation ¶
Index ¶
- func EstimateHandleOpsGas(opts *Opts) (gas uint64, revert *reverts.FailedOpRevert, err error)
- func HandleOps(opts *Opts) (txn *types.Transaction, err error)
- func SuggestMeanGasFeeCap(basefee *big.Int, tip *big.Int, batch []*userop.UserOperation) *big.Int
- func SuggestMeanGasPrice(gasPrice *big.Int, batch []*userop.UserOperation) *big.Int
- func SuggestMeanGasTipCap(tip *big.Int, batch []*userop.UserOperation) *big.Int
- func ToRawTxHex(txn *types.Transaction) string
- func Wait(txn *types.Transaction, eth *ethclient.Client, timeout time.Duration) (*types.Transaction, error)
- type Opts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimateHandleOpsGas ¶
func EstimateHandleOpsGas(opts *Opts) (gas uint64, revert *reverts.FailedOpRevert, err error)
EstimateHandleOpsGas returns a gas estimate required to call handleOps() with a given batch. A failed call will return the cause of the revert.
func HandleOps ¶
func HandleOps(opts *Opts) (txn *types.Transaction, err error)
HandleOps submits a transaction to send a batch of UserOperations to the EntryPoint.
func SuggestMeanGasFeeCap ¶ added in v0.6.5
SuggestMeanGasFeeCap suggests a Max Fee for an EIP-1559 transaction to submit a batch of UserOperations to the EntryPoint. It returns the larger value between the recommended max fee or the average maxFeePerGas of the entire batch.
func SuggestMeanGasPrice ¶ added in v0.6.5
SuggestMeanGasPrice suggests a Gas Price for a legacy transaction to submit a batch of UserOperations to the EntryPoint. It returns the larger value between a given gas price or the average maxFeePerGas of the entire batch.
func SuggestMeanGasTipCap ¶ added in v0.6.5
SuggestMeanGasTipCap suggests a Max Priority Fee for an EIP-1559 transaction to submit a batch of UserOperations to the EntryPoint. It returns the larger value between the suggested gas tip or the average maxPriorityFeePerGas of the entire batch.
func ToRawTxHex ¶ added in v0.6.28
func ToRawTxHex(txn *types.Transaction) string
ToRawTxHex Takes a Geth types.Transaction and returns the encoded raw hex string.
Types ¶
type Opts ¶ added in v0.6.5
type Opts struct { // Options for the network EOA *signer.EOA Eth *ethclient.Client ChainID *big.Int // Options for the EntryPoint EntryPoint common.Address Batch []*userop.UserOperation Beneficiary common.Address // Options for the EOA transaction BaseFee *big.Int Tip *big.Int GasPrice *big.Int GasLimit uint64 NoSend bool WaitTimeout time.Duration }
Opts contains all the fields required for submitting a transaction to call HandleOps on the EntryPoint contract.