logo

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 }