question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deploying large contracts fails

See original GitHub issue

When testing with ganache we use allowUnlimitedContractSize switch to allow contracts bigger than 234576 bytes to be deployed. However an out of gas error is thrown even though the contract was created, e.g:

Transaction: 0x702c95bfc4324122876c795d6175a62e1a8a75c04d37f3dc30c5a479dda54544
  Contract created: 0xe83ef66e898b65e1e202f3f554897943a0383f29
  Gas usage: 110000000
  Block Number: 430
  Block Time: Tue Apr 28 2020 16:44:45 GMT+0300 (Eastern European Summer Time)
  Runtime Error: out of gas

EDIT: The contract that claims to have been created above actually is empty:

web3.eth.getCode("0xe83ef66e898b65e1e202f3f554897943a0383f29")
'0x'

Your Environment

  • Version used: Ganache CLI v6.9.1 (ganache-core: 2.10.2)
  • Version of Truffle/Remix/Other tools used: etherlime
  • NodeJS Version: 10.12
  • Operating System and version (include distro if Linux): OSX
  • Link to your project or repro gist: https://github.com/argentlabs/argent-contracts

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
MicaiahReidcommented, Sep 15, 2021

Hi @elenadimitrova. Apologies for such a late response on this. This doesn’t look like it’s a bug with ganache, but we definitely could do some better error messaging here. A created address for the contract is computed and the nonce is incremented, but since the sender ran out of gas, no data was actually stored in the contract.

1reaction
elenadimitrovacommented, Apr 28, 2020

We’re using the TestUpgradedMakerV2Manager here. And the contract deployment that surfaced the issue is here. Worth mentioning is the contract is compiled with solc optimizer runs = 999, rather than the default 200.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I can't deploy large contracts with Optimizer enabled
I'm getting the error from the deployment that the size of the contracts is too large, so how can they have deployed the...
Read more >
Deploying large contracts : r/ethdev - Reddit
Hi, I've been trying to deploy a compound fork on test net to play around with it, but I get "Error: Transaction reverted:...
Read more >
Downsizing contracts to fight the contract size limit
The idea is basically to make contract calls more expensive for large contracts. It wouldn't be too difficult to implement, has a simple ......
Read more >
Deploying and interacting with smart contracts
If you want to learn how to deploy and use contracts on a public blockchain, ... If you got a connection error, make...
Read more >
Deploying your contracts | Ethereum development ... - Hardhat
#Deploying your contracts · Start a local node. npx hardhat node · Open a new terminal and deploy the smart contract in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found