Transactions
Estimate a transaction's gas cost.
Changed onEstimates the gas cost of a transaction without sending it.
With a fee sponsorship that charges the user in an ERC-20 token, feeInToken is the estimated amount of that token.
post/v2/transactions/estimate
Request
- Base URL: https://api.openfort.io
- URL: https://api.openfort.io/v2/transactions/estimate
- Auth: one of:
- HTTP bearer
- HTTP bearer
- HTTP bearer
- HTTP bearer
Request body
Example request
{
"chainId": 80002,
"accountId": "acc_e1b24353-1741-4a3d-9e91-2b0fd2942f60",
"feeSponsorshipId": "pol_7e07ae30-2a4d-48fa-803f-361da94905dd",
"feeSponsorshipToken": "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb",
"calls": [
{
"to": "0x3994801f2BF191D22aA60c2ce3728c4D0e856a7B",
"value": "1000000000000000000",
"contractId": "con_0cddb398-1dc6-4e6f-8726-9ec7cea85f35",
"functionName": "mint"
}
],
"authorization": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1c"
}Response
Successful response.
Example response
{
"gas": "210000",
"gasPrice": "1000000000",
"fee": "210000000000000",
"feeUsd": "0.42"
}Changes
- breaking
the
/request property type changed from no type toobject - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
//
- breaking
- breaking
added the new required request property
- warning
removed the request property
- warning
removed the request property
- info
added the new optional request property
- breaking