-
Notifications
You must be signed in to change notification settings - Fork 2.3k
The contract code couldn't be stored, please check your gas amount during successful deployment #558
Comments
Experienced this issue trying to run truffle test on rinkeby testnet from gentoo linux. I've discovered that Assert.sol generates an EVM binary that is just too big to be deployed without it choking. I ended up manually editing Assert.sol and taking out a couple of funcs that I wasn't using. Now the EVM binary is slightly smaller and deploys on rinkeby, and my tests complete successfully. |
Thanks for the info guys. This is good sleuthing. |
Related: trufflesuite/truffle-migrate#15 |
The same issue. That's why I have deployed a lot of pointless Migrations.sol
|
Hello, |
Try the latest beta release of truffle, or try finding the Assert.sol file in truffle and manually editing it to take out a couple of functions that you don't need. |
@delormemarie240 Check web3/web3.js#1243 |
@7flash Hi, I used yarn to download dependencies and I tried your suggestion by changing the line you mentioned in |
@charltonh Thanks for the info! Could you please specify which functions are not used and safe to delete? |
@liyihe96 Depends on which functions you are using in your program. I took out just a couple small functions that I knew I'd never use, which amounted to just a few lines. Then the Assert.sol compiled code was able to 'fit' and it deployed successfully. |
@liyihe96 |
Getting the same issue, I have a contract that deploys on Ganache (truffle test),
|
In case this applies to any of you, make sure you try deploying any libraries you use separately, then link them to the main contract(s) to limit the gas used in each migration txn. |
@nickjm this is my migration script :
and my contract:
The "The contract code couldn't be stored, please check your gas amount." seems to apply to the deployment of EIP20Interface This is a test settup, where can I increase the gas amount for the store transaction to succeed ? I am using Ganache and the account doing the deploy starts with 100 ETH, is that not enough, or is the error message about another gas treshold being busted ? |
not work for me see my sol file please pragma solidity ^0.4.21;
contract Wrestling {
} |
Any news on this? |
I was facing the same issue solved it by adding "0x" to the bytecode `const HDWalletProvider = require("truffle-hdwallet-provider"); deploy = async () => { |
thanks, your working around works |
Closing this as duplicate of #522. |
Issue
After running
truffle migrate
for mainnet network i've got:On etherscan i see:
Transaction completes successfully: https://etherscan.io/tx/0xe728474cc7b4bf31749fb6b5f4d377f58afb4a2bf1abe9283b4c03ceb7d8619f
Contract is created: https://etherscan.io/address/0x1d3d6458065f3cd778541f0676db6837be9252ec
Its regular issue we have with truffle framework...
The text was updated successfully, but these errors were encountered: