我在仲裁上运行一个Ethereum烧录脚本。我主要是犯了这个错误。同时,脚本需要烧掉整个余额。
Balance too low to burn (balance=0.00024506291612428 gasPrice=0.49) gwei
我的职能:
const gasPrice = balance.div(500000);
if (gasPrice.lt(1e9)) {
console.log(`Balance too low to burn (balance=${formatEther(balance)} gasPrice=${gasPriceToGwei(gasPrice)}) gwei`);
return;
}
const leftovers = balance.sub(gasPrice.mul(500000));
console.log(`Leftovers: ${formatEther(leftovers)} ETH`);
try {
console.log(`Burning ${formatEther(balance)}`);
const nonce = await burnWallet.provider.getTransactionCount(burnWallet.address);
const tx = await burnWallet.sendTransaction({
to: flashbotsBeerFund,
gasLimit: 500000,
gasPrice,
nonce,
value: leftovers,
});
发布于 2023-01-13 18:27:41
这意味着你的钱包没有足够的钱来支付煤气费来执行交易。
因此,错误即将来临。
https://ethereum.stackexchange.com/questions/142886
复制相似问题