BNB链的代币合约发起approve操作,gasPrice为null

使用NodeJS+ethers.js v5,对代币合约,发起approve操作时,返回如下错误提示: transaction underpriced: gas tip cap 1500000000, minimum needed 3000000000

查看transaction内容如下: transaction: { type: 2, chainId: 56, nonce: 0, maxPriorityFeePerGas: BigNumber { _hex: '0x59682f00', _isBigNumber: true }, maxFeePerGas: BigNumber { _hex: '0x59682f00', _isBigNumber: true }, gasPrice: null, gasLimit: BigNumber { _hex: '0xb8db', _isBigNumber: true }, to: '0x77bC1D08F4d457C93BD65D4d716c0e2cD843e38e', value: BigNumber { _hex: '0x00', _isBigNumber: true }, data: '0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba300000000000000000000000000000000000000000052b7d2dcc80cd2e4000000', accessList: [], hash: '0x2de8e11de9709fb9692a95634d9e38351c0a0953ab1020bfad34595374f3654a', v: 1, r: '0xdc28099d91ec16f7389b14ea544d2df4b954df9c91cabc1595c8a9b26dd2e91b', s: '0x2ac050cad686b8e771ffefa128d667921e3ccfbb96e589ba3e6c6685c0387ba3', from: '0x6680b72F18ff4Ea6aE045fbAf6EF5920856dc73A', confirmations: 0 }

是本地运行的全节点模式。但使用wss://bsc-rpc.publicnode.com 是可以正常发起approve操作的。现在不清楚是本地运行节点在启动时少了什么参数还是其它原因。 本地节点执行allowance 操作是可行的。查询钱包地址的余额也是可行的。

请先 登录 后评论

1 个回答

Wade - Footprint Analytics CTO
  擅长:数据分析,GameFi,NFT
请先 登录 后评论
  • 1 关注
  • 0 收藏,308 浏览
  • Yootou 提出于 2024-11-20 18:20