首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >平衡太低,不能燃烧

平衡太低,不能燃烧
EN

Ethereum用户
提问于 2023-01-13 16:08:56
回答 1查看 31关注 0票数 0

我在仲裁上运行一个Ethereum烧录脚本。我主要是犯了这个错误。同时,脚本需要烧掉整个余额。

代码语言:javascript
运行
复制
Balance too low to burn (balance=0.00024506291612428 gasPrice=0.49) gwei

我的职能:

代码语言:javascript
运行
复制
 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,
        });
EN

回答 1

Ethereum用户

发布于 2023-01-13 18:27:41

这意味着你的钱包没有足够的钱来支付煤气费来执行交易。

因此,错误即将来临。

票数 0
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/142886

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档