Open penachett opened 1 year ago
I am creating crypto wallet application for iOS and using this web3swift package . I need to find gas limit for native and custom token both using Abi file while transfer token but unable to find that can anyone help me out for this issue . I can't provide the static gas limit I need to find for every transaction gas limit
I am creating crypto wallet application for iOS and using this web3swift package . I need to find gas limit for native and custom token both using Abi file while transfer token but unable to find that can anyone help me out for this issue . I can't provide the static gas limit I need to find for every transaction gas limit
I need the result of this issue as soon as possible . if anybody knows please give a reply
What happened?
When using PolicyResolver (manually or in case of calling
writeToChain
operation function) for sending eip1559 transaction themaxFeePerGas
field is set to value ofbaseFeePerGas
returned by theresolveGasBaseFee
resolver method. According to eip1559maxFeePerGas
should't be lower thanbaseFeePerGas + maxPriorityFeePerGas
, so when I am trying to send a transaction and gettingmaxPriorityFeePerGas
higher thanmaxFeePerGas
node returns an error:nodeError(desc: "Server error. Error code: -32000. max priority fee per gas higher than max fee per gas")
I assume this is because in this code of Web3+Resolverwe are setting
tx.maxFeePerGas
as baseFee and we should set it as a sum ofresolveGasBaseFee()
andresolveGasPriorityFee()
What are the steps to reproduce?
We need to set up simple eip1559 tx and try to send it. I tested it on eth goerli network (chainId=5) with quicknode RPC provider.
Final transaction I get before send:
What is the expected behavior?
EIP1559 gas fees set correct and transaction is sent
What is the error thrown?
nodeError(desc: "Server error. Error code: -32000. max priority fee per gas higher than max fee per gas")
What's the stack trace said?
-
OS version
macOS Ventura 13.3.1
Library version
3.1.0