HQ20 / contracts

A set of reusable smart-contracts

Home Page:https://hq20-contracts.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Contract code size exceeds 24576 bytes" during coverage

vibern0 opened this issue · comments

In #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).

Background for this. I can't believe they thought that choosing a hard coded limit was a good idea.

ethereum/EIPs#170

On the bright side, this is a good opportunity to explore some techniques to make contracts lighter.

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.

please help me.

please help me.

hi LuckyStar0831 ,i modified the hardhat.config or the truffle instead. and i added this.hopw its works for u!

module.exports = {
  solidity: {
    version: "0.8.3",
    settings: {
      optimizer: {
        enabled: true,
        runs: 1000,
      },
    },
  },
};

image

image

please help me.

please help me.

hi LuckyStar0831 ,i modified the hardhat.config or the truffle instead. and i added this.hopw its works for u!

module.exports = {
  solidity: {
    version: "0.8.3",
    settings: {
      optimizer: {
        enabled: true,
        runs: 1000,
      },
    },
  },
};

Thank you for your interest.
But it's not working on my side.