简体   繁体   English

以太坊。 Gas *价格+价值的资金不足

[英]Ethereum. Insufficient funds for gas * price + value

I am trying to deploy smart contract to mint NFTs on mainnet, after successful tests on rinkeby.在 rinkeby 上成功测试后,我正在尝试部署智能合约以在主网上创建 NFT。 While trying to deploy to mainnet the folowing error occured:尝试部署到主网时出现以下错误:

ValueError: insufficient funds for gas * price + value ValueError:gas * 价格 + 价值的资金不足

I'm using brownie with Infura ,and trying to mint ERC-721 tokens.我正在使用带有Infura 的巧克力蛋糕,并尝试铸造 ERC-721 令牌。

I would be grateful for any help!如有任何帮助,我将不胜感激!

Here's my console output:这是我的控制台输出:

Brownie v1.16.2 - Python development framework for Ethereum

NftProject is the active project.

Running 'scripts/simple_collectible/deploy_simple.py::main'...
mainnet
File "/usr/local/lib/python3.8/dist-packages/brownie/_cli/run.py", line 49, in main
    return_value, frame = run(
  File "/usr/local/lib/python3.8/dist-packages/brownie/project/scripts.py", line 103, in run
    return_value = f_locals[method_name](*args, **kwargs)
  File "./scripts/simple_collectible/deploy_simple.py", line 10, in main
    SimpleCollectible.deploy({"from": dev}, publish_source=publish_source)
  File "/usr/local/lib/python3.8/dist-packages/brownie/network/contract.py", line 599, in __call__
    return tx["from"].deploy(
  File "/usr/local/lib/python3.8/dist-packages/brownie/network/account.py", line 508, in deploy
    receipt, exc = self._make_transaction(
  File "/usr/local/lib/python3.8/dist-packages/brownie/network/account.py", line 743, in _make_transaction
    exc = VirtualMachineError(e)
  File "/usr/local/lib/python3.8/dist-packages/brownie/exceptions.py", line 85, in __init__
    raise ValueError(exc["message"]) from None
ValueError: insufficient funds for gas * price + value```

Does your wallet have enough ETH on it to pay for gas?你的钱包里有足够的 ETH 来支付汽油吗? If you don't have enough ETH in your wallet, that means you cannot pay the gas fee when the scripts run.如果您的钱包中没有足够的 ETH,则意味着您无法在脚本运行时支付 gas 费。 Place some ETH into your mainnet wallet and that will fix this issue.将一些 ETH 放入您的主网钱包,这将解决此问题。

When deploying a smart contract, we need to pay the gas because deployment is a transaction.在部署智能合约时,我们需要pay the gas因为部署是一个交易。 So, we need to send some Ether to this account first.所以,我们需要先向这个账户发送一些以太币。 Unless you already have some Ether on your Ropsten testnet account, the easiest way is to request some testing Ether on the Faucet.除非您的 Ropsten 测试网帐户上已经有一些以太币,否则最简单的方法是在水龙头上请求一些测试以太币。

Go to Thinklair Ropsten Ether Faucet websites and type in the account address (make sure to replace the address value with your own) and press the “Send me test Ether” button.转到Thinklair Ropsten Ether Faucet网站并输入帐户地址(确保将地址值替换为您自己的地址),然后按“给我发送测试以太”按钮。

Alternatively, you can also use the Ropsten faucet to send some testing ether to your account.或者,您也可以使用Ropsten faucet向您的帐户发送一些测试以太 However, this faucet seems to have some latency at the time of writing this answer (03 January 2022).但是,在撰写此答案时(2022 年 1 月 3 日),这个水龙头似乎有一些延迟。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Web3:gas资金不足*价格+价值 - Web3: insufficient funds for gas * price + value Web3j Transfer.sendFunds()返回错误“天然气资金不足*价格+价值” - Web3j Transfer.sendFunds() returns Error “insufficient funds for gas * price + value” 以太坊在 web3 钱包中预定义的汽油价格 - 这可能吗? - Ethereum pre defined gas price in web3 wallet - is this possible? 以太坊。 有没有办法知道我的智能合约需要的存储空间? - Ethereum. Is there a way to know the storage space needed by my smart contract? 如果我在以太坊区块链上部署了一个 todolist 智能合约,我是否需要为添加任务或标记任务完成支付以太币/汽油价格? - If i deploy a todolist smartcontract on the ethereum blockchain , will i have to pay ether / gas price for adding a task or marking a task completed? 以太坊 - 两个相同的交易,但不同的实际天然气使用 - 怎么样? - Ethereum - two identical transactions but different actual Gas use - how come? 每笔交易在 NEAR 中都有自己的 gas 价格吗? - Does each transaction have its own gas price in NEAR? 为什么在私有以太坊区块链上部署智能合约需要消耗gas费,而调用不需要? - Why does the deployment of smart contracts on the private Ethereum blockchain need to consume gas fee, while the invocation does not? 从 mai.net(以太坊)上的其他智能合约调用 function 部署合约是否可行(就 gas 成本而言)? - Is it feasible (In terms of gas cost) to call a function of deployed contract from other smart contract on mainnet (ethereum)? 向以太坊智能合约发送价值时出错 - Error sending value to Ethereum smart contract
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM