logo
🥜
Peanut Documentation
🏦
How to Withdraw?
📥
How to Deposit?
🔗
How to receive money via Peanut?
💵
How to pay someone with Peanut?
💰
Fees
🆘
Support
🔑
Passkeys
🔓
Security Audit
👾
Bug bounties
🧑‍💻
Dev Quickstart
➡️
API keys
⛓️
Supported Chains and Tokens
🗂️
Embedding an IFrame
💻
Using the SDK
➡️
Create Claim Links
➡️
Create Request Links
➡️
Claim
➡️
Utils
🔗
Get Link Details
🔗
Cross-chain
🔗
Raffle (Legacy)
🔗
Get Default Provider
🔗
Get Supported Peanut Chains
🔗
Toggle Verbosity
🔗
EthersV5 <> Peanut Transaction Types
🔗
Estimate Fee Options
🔗
Get Random String
🔗
Get all deposits for an Address
🔗
Get Token Balance
➡️
White-Labelling
➡️
Troubleshooting
➡️
SDK FAQ
🏪
Request API
Press Kit
👨‍⚖️
T&Cs and Contact
🎲
Other
Peanut Documentation
/
Using the SDK
/
Utils

Estimate Fee Options

Gas is complicated. Use this function to make it less complicated.

The SDK provides a function that returns a set of fee options which can be passed in when sending a transaction.
plain text
txOptions = await peanut.setFeeOptions({ chainId: '137', provider: undefined //optional arg for ethers provider })
And returns an interface like this:
plain text
interface ISetFeeOptionsResponse { gasPrice: string gasLimit: string maxPriorityFeePerGas: string maxFeePerGas: string }
EthersV5 <> Peanut Transaction Types
Get Random String

Powered by Notaku
Helpful?
Share
Content
Estimate Fee Options
Gas is complicated. Use this function to make it less complicated.