pimlico_getUserOperationGasPrice
Returns the gas prices that must be used for the user operation you are bundling with Pimlico bundlers. This method uses 80 credits from your daily balance.
Parameters
None.
Returns
An object containing gas price recommendations for different priority levels:
slow
: (object) - Lower gas prices for non-urgent transactions:maxFeePerGas
: (string) - Maximum fee per gas for slow priority.maxPriorityFeePerGas
: (string) - Maximum priority fee per gas for slow priority.
standard
: (object) - Standard gas prices for normal transactions:maxFeePerGas
: (string) - Maximum fee per gas for standard priority.maxPriorityFeePerGas
: (string) - Maximum priority fee per gas for standard priority.
fast
: (object) - Higher gas prices for urgent transactions:maxFeePerGas
: (string) - Maximum fee per gas for fast priority.maxPriorityFeePerGas
: (string) - Maximum priority fee per gas for fast priority.
Example
Replace <YOUR-API-KEY>
with an API key from your MetaMask Developer dashboard.
Request
- curl
curl https://mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "pimlico_getUserOperationGasPrice",
"params": [],
"id": 1
}'
Response
- JSON
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"slow": {
"maxFeePerGas": "0x829b42b5",
"maxPriorityFeePerGas": "0x829b42b5"
},
"standard": {
"maxFeePerGas": "0x88d36a75",
"maxPriorityFeePerGas": "0x88d36a75"
},
"fast": {
"maxFeePerGas": "0x8f0b9234",
"maxPriorityFeePerGas": "0x8f0b9234"
}
}
}