-
Notifications
You must be signed in to change notification settings - Fork 113
Closed
Description
Problem
Currently, make contracts-compile command compile unnecessary solidity contracts in tests/ dir.
If we run make contracts-compile after modofying contracts in x/ or precompiles/, all unnecessary contracts are also compiled.
We should exclude tests/ dir from compilation target.
Problem Detail
When we make contracts-compile without git submodule update --recursive, it returns error.
Error HH411: The library forge-std, imported from solidity/tests/evm-tools-compatibility/foundry/script/ReadState.s.sol, is not installed. Try installing it using npm.
For more info go to https://hardhat.org/HH411 or run Hardhat with --show-stack-traces
Traceback (most recent call last):
File "/Users/kyuhyeonchoi/workspace/cloudgray/evm/./scripts/compile_smart_contracts/compile_smart_contracts.py", line 336, in <module>
compile_files(REPO_PATH, added_contract=None)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kyuhyeonchoi/workspace/cloudgray/evm/./scripts/compile_smart_contracts/compile_smart_contracts.py", line 316, in compile_files
compile_contracts_in_dir(CONTRACTS_TARGET)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/Users/kyuhyeonchoi/workspace/cloudgray/evm/./scripts/compile_smart_contracts/compile_smart_contracts.py", line 232, in compile_contracts_in_dir
raise ValueError("Failed to compile Solidity contracts.")
ValueError: Failed to compile Solidity contracts.
make: *** [contracts-compile] Error 1
If we make contracts-compile after git submodule update --recursive, it compiles many unnecessary contracts from git submodules.
Some contracts in /tests dir are used in ci ,but they are compiled just in time.
So, they don't have to be compiled with make contracts-compile.
Metadata
Metadata
Assignees
Labels
No labels