eth_sendUserOperation

Submits a UserOperation object to the UserOperation pool of the bundler. It returns a userOpHash if the UserOperation was accepted otherwise returns an error.

maxFeePerGas and maxPriorityFeePerGas

  • baseFeePerGas This is the minimum amount of gas required for a transaction to be included in a block. It's algorithmically adjusted by the protocol based on network congestion. When the network is more congested, the base fee goes up; when it's less congested, the base fee goes down. Every transaction must at least pay the base fee.
  • maxPriorityFeePerGas Also known as the "tip," this is an additional fee that a user can set to give their transaction higher priority for inclusion by miners. Essentially, it's the maximum amount a user is willing to pay on top of the base fee to incentivize miners to include their transaction in a block quickly.

How to calculate maxFeePerGas and maxPriorityFeePerGas:

  1. Fetch Current Base Fee: Use the method eth_getBlockByNumber with the 'latest' parameter to get the current baseFeePerGas.
  2. Apply Buffer on Base Fee: To account for potential fee changes, apply a buffer on the current base fee, according to the table below.
  3. Fetch Current Priority Fee: Use the eth_maxPriorityFeePerGas method to query the current priority fee for the network.
  4. Apply Buffer on Priority Fee: Once you have the current priority fee using eth_maxPriorityFeePerGas, increase it according to the table below.
  5. Determine maxFeePerGas: sum of the baseFeePerGas and maxPriorityFeePerGas, and the buffers.

Recomended Extra Fees

EcosystemNetworkExtra Fee Requirement
EthereumMainnetRecommended 25% buffer on priority fee and 50% buffer on base fee for the network.
EthereumSepoliaNo extra priority fee, minimal priority fee . Recommended 20% buffer on base fee for the network.
Polygon PoSMainnetNo extra priority fee, minimal priority fee 30 GWei. Recommended 50% buffer on base fee for the network.
Polygon PoSMumbaiNo extra priority fee, minimal priority fee 1.5 GWei. Recommended 20% buffer on base fee for the network.
OptimismMainnetNo extra priority fee, minimal priority fee 100,000. Recommended 50% buffer on base fee for the network.
OptimismSepoliaNo extra priority fee, minimal priority fee 100,000. Recommended 20% buffer on base fee for the network.
ArbitrumOneNo priority fee. Recommended 5% buffer on base fee for the network.
ArbitrumSepoliaNo priority fee. Recommended 5% buffer on base fee for the network.

Replacement Underpriced Error

When utilizing eth_sendUserOperation, you may encounter a 'Replacement Underpriced Error.' This error typically arises if there's already a pending operation from the same user in the transaction pool. Such operations can linger in the mempool when the gas fees set are insufficient for them to be packaged into a block.

To rectify the issue, it's necessary for the user to increment the maxFeePerGas and maxPriorityFeePerGas values by a minimum of 10%.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Defaults to eth
string
required
Defaults to sepolia
string
required
Defaults to public
Body Params
int32
required
Defaults to 1
string
required
Defaults to 2.0
string
required
Defaults to eth_sendUserOperation
params
array
required
length between 2 and 2
Defaults to [object Object],0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789
  • Object - The UserOperation object
  • String - The entrypoint address the request should be sent through. This MUST be one of the entry points returned by the supportedEntryPoints rpc call.
params*
string
^0x[0-9,a-f,A-F]{40}$
^0x([1-9a-f]+[0-9a-f]*|0)$
string
^0x[0-9a-f]*$
string
^0x[0-9a-f]*$
^0x([1-9a-f]+[0-9a-f]*|0)$
^0x([1-9a-f]+[0-9a-f]*|0)$
^0x([1-9a-f]+[0-9a-f]*|0)$
^0x([1-9a-f]+[0-9a-f]*|0)$

Maximum fee per gas the sender is willing to pay to miners in wei

^0x([1-9a-f]+[0-9a-f]*|0)$

The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei

string
^0x[0-9a-f]*$
string
^0x[0-9a-f]*$
string
^0x[0-9,a-f,A-F]{40}$
^0x([1-9a-f]+[0-9a-f]*|0)$
string
^0x[0-9a-f]*$
string
^0x[0-9a-f]*$
^0x([1-9a-f]+[0-9a-f]*|0)$
^0x([1-9a-f]+[0-9a-f]*|0)$
^0x([1-9a-f]+[0-9a-f]*|0)$
^0x([1-9a-f]+[0-9a-f]*|0)$

Maximum fee per gas the sender is willing to pay to miners in wei

^0x([1-9a-f]+[0-9a-f]*|0)$

The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei

string
^0x[0-9a-f]*$
string
^0x[0-9a-f]*$
Response

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json