Commit 8460865f authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

contracts-bedrock: optimize build info generation (#2861)

Only create the hardhat style `BuildInfo` objects when
compiling through the hardhat interface. Do not build
them when going through `forge build`. This saves
disk i/o when just building using `forge` vs building
using `hardhat` for releases or hardhat tasks.
Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent c6f6d68b
---
'@eth-optimism/contracts-bedrock': patch
---
Optimize buildinfo support, only build through hardhat interface
...@@ -14,5 +14,3 @@ remappings = [ ...@@ -14,5 +14,3 @@ remappings = [
] ]
extra_output = ['devdoc', 'userdoc', 'metadata', 'storageLayout'] extra_output = ['devdoc', 'userdoc', 'metadata', 'storageLayout']
bytecode_hash = 'none' bytecode_hash = 'none'
build_info = true
...@@ -46,6 +46,9 @@ const config: HardhatUserConfig = { ...@@ -46,6 +46,9 @@ const config: HardhatUserConfig = {
accounts: [process.env.PRIVATE_KEY_DEPLOYER || ethers.constants.HashZero], accounts: [process.env.PRIVATE_KEY_DEPLOYER || ethers.constants.HashZero],
}, },
}, },
foundry: {
buildInfo: true,
},
paths: { paths: {
deploy: './deploy', deploy: './deploy',
deployments: './deployments', deployments: './deployments',
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
"devDependencies": { "devDependencies": {
"@eth-optimism/hardhat-deploy-config": "^0.2.0", "@eth-optimism/hardhat-deploy-config": "^0.2.0",
"@defi-wonderland/smock": "^2.0.2", "@defi-wonderland/smock": "^2.0.2",
"@foundry-rs/hardhat-forge": "^0.1.8", "@foundry-rs/hardhat-forge": "^0.1.9",
"@nomiclabs/hardhat-ethers": "^2.0.0", "@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-waffle": "^2.0.0", "@nomiclabs/hardhat-waffle": "^2.0.0",
"@typechain/ethers-v5": "^7.0.1", "@typechain/ethers-v5": "^7.0.1",
......
...@@ -1614,10 +1614,10 @@ ...@@ -1614,10 +1614,10 @@
command-exists "^1.2.9" command-exists "^1.2.9"
ts-interface-checker "^0.1.9" ts-interface-checker "^0.1.9"
"@foundry-rs/hardhat-forge@^0.1.8": "@foundry-rs/hardhat-forge@^0.1.9":
version "0.1.8" version "0.1.9"
resolved "https://registry.yarnpkg.com/@foundry-rs/hardhat-forge/-/hardhat-forge-0.1.8.tgz#2e15b275e7f6672dea96ebddcae312009bb458a1" resolved "https://registry.yarnpkg.com/@foundry-rs/hardhat-forge/-/hardhat-forge-0.1.9.tgz#43144d349b0d9ea00bcad28827c7f03187458c5a"
integrity sha512-jGIK3wBWHdYXeyjJ9ULBVBaSpmXnaL9yTpGYy+2hn8JM5iOvdSXZgxJQuFZQT/BFrjFt/RVWiMynzyhAtJ+nlg== integrity sha512-y1k9bMV9LNgNnxvC7O/P2HPk8eNN2Jpan3fDl9/gii7NCT8J5028hABsCIEwFq4/4mMybJWu2KsHYDjZi8NGZQ==
dependencies: dependencies:
"@foundry-rs/easy-foundryup" "^0.1.3" "@foundry-rs/easy-foundryup" "^0.1.3"
"@nomiclabs/hardhat-ethers" "^2.0.0" "@nomiclabs/hardhat-ethers" "^2.0.0"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment