GET fees
Calculating required gas to execute given calldata can be confusing in a multi-chain context. This endpoint knows the best way to calculate L1 + L2 fees for all chains.
Last updated
Calculating required gas to execute given calldata can be confusing in a multi-chain context. This endpoint knows the best way to calculate L1 + L2 fees for all chains.
Last updated
curl -X POST https://engine.omo.so/api/v1/fees \
-H "Content-Type: application/json" \
-d '{
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"chainId": 8453,
"calldata": "0xa9059cbb0000000000000000000000002680d6e9b4b54fbf1b8e912909531a1306e0e6a900000000000000000000000000000000000000000000000000000000000f4240",
"fromAddress": "0x2680d6e9b4b54fbf1b8e912909531a1306e0e6a9"
}'{
"amountUsd": "0.166303",
"amountNative": "0.000070872272560256",
"parts": [
{
"name": "gas-l2",
"amountUsd": "0.000123",
"amountNative": "0.000000052601432536",
"amountCurrency": {
"address": "0x0000000000000000000000000000000000000000",
"chain": {
"name": "Base",
"chainId": 8453
},
"decimals": 18,
"name": "ETH"
}
},
{
"name": "gas-l1",
"amountUsd": "0.166180",
"amountNative": "0.000070819671127720",
"amountCurrency": {
"address": "0x0000000000000000000000000000000000000000",
"chain": {
"name": "Base",
"chainId": 8453
},
"decimals": 18,
"name": "ETH"
}
}
]
}