您好,我正在使用Geth,我试图迁移松露,但它给出了错误。truffle-config.js如下所示:
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: "4", //rinkeby id
from:"my address",
gas: 1000
}当我使用-truffle migrate命令进行块菌迁移时,我得到这个错误。
Error: Error: Error: *** Deployment Failed ***
"Migrations" ran out of gas (using a value you set in your network
config or deployment parameters.)
* Block limit: 0x50e7c
* Gas sent: 1000
at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-migrate/index.js:92:1)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)你能帮帮我吗?
发布于 2021-09-08 11:18:28
我通过将这段代码添加到truffle配置文件中解决了这个错误。
compilers: {
solc: {
version: "0.5.16",
settings: {
optimizer: {
enabled: true, // Default: false
runs: 1000, // Default: 200
},
},
},
},发布于 2019-08-17 20:01:51
这正是错误所说的。耗尽gas (使用您在网络配置或部署参数中设置的值。)
gas: 1000不足以部署您的合同
https://stackoverflow.com/questions/57534021
复制相似问题