"Contract code size exceeds 24576 bytes" during coverage
See original GitHub issueIn #288 we’ve seen a warning during the coverage phase in CI. This is not urgent but deserves a look at.
/home/travis/build/HQ20/contracts/.coverage_contracts/examples/dao/VentureEth.sol:26:1: Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
contract VentureEth is
^ (Relevant source part starts here and spans across multiple lines).
,/home/travis/build/HQ20/contracts/.coverage_contracts/examples/dao/DAO.sol:22:1: Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
contract DAO is VentureEth, Democratic {
^ (Relevant source part starts here and spans across multiple lines).
,/home/travis/build/HQ20/contracts/.coverage_contracts/exchange/UniswapFactory.sol:49:1: Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
contract UniswapFactory is IUniswapFactory {
^ (Relevant source part starts here and spans across multiple lines).
,/home/travis/build/HQ20/contracts/.coverage_contracts/test/exchange/TestUniswapExchange.sol:5:1: Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
contract TestUniswapExchange is UniswapExchange {
^ (Relevant source part starts here and spans across multiple lines).
,/home/travis/build/HQ20/contracts/.coverage_contracts/test/exchange/TestUniswapFactory.sol:6:1: Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
contract TestUniswapFactory is UniswapFactory {
^ (Relevant source part starts here and spans across multiple lines).
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Warning: Contract code size exceeds 24576 bytes
12:1 ; 24576 bytes (a limit introduced in ; not be deployable on ; Consider enabling the optimizer (with a low "runs" value!),...
Read more >Downsizing contracts to fight the contract size limit
Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet.
Read more >"Contract code size exceeds 24576 bytes" ERC721Upgradeable
I ran into the following limit with an ERC721Upgradeable: Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious ...
Read more >Contract code size exceeds 24576 bytes) Pops on Hardhat ...
you need to mention the optimization settings inside the version since hardhat execute. multiple solidity version code.
Read more >[Solidity] Contract code size over limit | by Sigit H. Yudanto
On November 22, 2016 the Spurious Dragon hard-fork introduced EIP-170 which added a smart contract size limit of 24.576 kb. For you as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Reading this thread makes me sad. Mostly because the amount of people impacted by this and how little concern is there for them.
Not to mention that the workarounds being proposed sound complex as hell.
hi LuckyStar0831 ,i modified the hardhat.config or the truffle instead. and i added this.hopw its works for u!