我正在通过 web3 向 QuickSwap(多边形)发送一个事务,但它被卡住并且无法通过。这是我正在使用的代码:
const Web3 = require('web3')
const HDWalletProvider = require('@truffle/hdwallet-provider');
var provider = new HDWalletProvider(privateKey, rpcEndpoint);
const init = async () => {
const QuickSwap = new web3.eth.Contract(contracts.QuickSwap.ABI, contracts.QuickSwap.address)
const path = ["0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270", "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619"]
await QuickSwap.methods.swapExactETHForTokens(0, path, addr, "999999999999999999999999999999999999999999999").send({
value: "10000000000000",
from: addr,
gasPrice: "25"
}).on('transactionHash', function(hash){
console.log(hash)
}).on('confirmation', () => {
console.log("Transaction confirmed")
})
}
这是卡住的交易:https ://polygonscan.com/tx/0x973d4e85c499a36e0f255afb801eeea3b5945e0e761a892e50f53f8d75f51c17
无论如何我可以解决这个问题?谢谢。