5 调用pancake方法出错EXCESSIVE_INPUT_AMOUNT

这是hash https://bscscan.com/tx/0xab375204779802481076bfa51baa9940eafe1b8446ff92adeb2e83c56adb44c0

const tx = await router.swapETHForExactTokens( amountOutMin, [tokenIn, tokenOut], data.recipient, Date.now() + 1000 60 10, //10 minutes { 'gasLimit': data.gasLimit, 'gasPrice': ethers.utils.parseUnits(${data.gasPrice}, 'gwei') });

tx.wait().then((receipt) => { console.log('Transaction receipt'); console.log(receipt); }).catch((error) => { console.log("error", error) })

请先 登录 后评论

最佳答案 2022-09-05 16:03

{
'gasLimit': data.gasLimit,
'gasPrice': ethers.utils.parseUnits(${data.gasPrice}, 'gwei')
'value':  ethvalue
}
请先 登录 后评论

其它 1 个回答

浪荡人
请先 登录 后评论
  • 1 关注
  • 0 收藏,1602 浏览
  • 志辉 提出于 2022-09-05 12:47

相似问题