Gas fees are the costs associated with initiating a transaction on a given blockchain, allowing network validators to perform the requested function.
Gas fees can fluctuate due to network congestion, the type of transaction you request, and the priority placed on your request. You can accelerate a transaction by paying additional gas fees.
Each blockchain has its own native asset required to pay these fees. When interacting with the blockchain, you’ll need to account for the amount of this native asset required for the requested transaction.
You can estimate transaction fees and contract execution with Circle’s Programmable Wallets APIs.
When initiating a request via Circle’s Programmable Wallets APIs that require gas fees, you have two options for configuring your fee tolerance: fee levels and gas limits.
Fee levels provide a simple way to configure your gas tolerance. Depending on your choice, the speed in which your transaction completes compared to the expected blockchain confirmation timing may vary.
You can choose between three tolerance levels:
low- a low-priority transaction, expected to take longer than the average amount of time to complete, with lower fees
medium- a medium-priority transaction, expected to take the average amount of time to complete, with average fees
high- a high-priority transaction, expected to take less than the average amount of time to complete, with higher fees
Gas limits allow for a more advanced configuration of your gas tolerance. Setting gas limit requires the following parameters, which are all designated in wei:
gasLimit- the base amount of gas required to process the requested transaction
priorityFee- an additional “tip” that can be added to the validator to accelerate the requested transaction
maxFee- maximum fee that can be used for the requested transaction, if the fee is greater, the transaction will be failed.
Updated about 2 months ago