Darwin-Coin / darwin-token-contracts

Darwin Protocol Smart Contracts
https://darwinprotocol.io
0 stars 0 forks source link

Contract Code Size Exceeds Limit #48

Closed SonOfMosiah closed 1 year ago

SonOfMosiah commented 1 year ago

Currently Darwin.sol, DarwinPresale.sol, and DarwinCommunity.sol exceed the contract code size limit set in the SpuriousDragon hardfork (24576 bytes).

We can drop the optimizer runs down to 1 and use the ir compiler to help, but we'll need to externalize or remove code in several files to make these contracts deployable.

kingofclubstroyDev commented 1 year ago

George and I have compiled what we have with no issues, did you add some code to the contracts?

thesios commented 1 year ago

I dont see it either

[root@big darwin]# npx hardhat compile Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: " to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information. --> @uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol

Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: " to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information. --> @uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol

Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: " to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information. --> @uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol

Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: " to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information. --> @uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol

SonOfMosiah commented 1 year ago

I'm only seeing the error when I run npx hardhat coverage

Perhaps the coverage command compiles the contracts differently?

SonOfMosiah commented 1 year ago

Running on the master branch no changes.

kingofclubstroyDev commented 1 year ago

Yeah hardhat coverage does add code to the contracts so that makes sense. Its pretty cool how it works, it emits an event before each line, then monitors each event emitted during the tests to book keep whats been called or not.

On Mon., Dec. 5, 2022, 3:33 p.m. SonOfMosiah, @.***> wrote:

Running on the master branch no changes.

— Reply to this email directly, view it on GitHub https://github.com/Darwin-Coin/darwin-token-contracts/issues/48#issuecomment-1338130480, or unsubscribe https://github.com/notifications/unsubscribe-auth/AX6WTXQZWSX3ZITGXQTRRKTWLZGSJANCNFSM6AAAAAASUVUO3Y . You are receiving this because you commented.Message ID: @.***>

SonOfMosiah commented 1 year ago

Sounds like this is a non issue then.

SonOfMosiah commented 1 year ago

Closing as this is not a bug, but a consequence of the code injected when running the coverage command.