From faf134f5f88445b70c8a4fb7c8eb8786ac8b3150 Mon Sep 17 00:00:00 2001 From: Jay Paik Date: Thu, 4 Jan 2024 20:47:15 -0500 Subject: [PATCH] chore: add optimized-build profile --- .gitignore | 3 ++- foundry.toml | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b88963480..6bbaff284 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Foundry build and cache directories out/ +out-optimized/ cache/ node_modules/ @@ -8,4 +9,4 @@ report/ lcov.info # secret -.env \ No newline at end of file +.env diff --git a/foundry.toml b/foundry.toml index 2d276cd1a..ffb522b14 100644 --- a/foundry.toml +++ b/foundry.toml @@ -17,6 +17,12 @@ runs=500 fail_on_revert = true depth = 10 +[profile.optimized-build] +via_ir = true +script = 'src' +test = 'src' +out = 'out-optimized' + [profile.lite] solc = '0.8.21' via_ir = false @@ -44,4 +50,4 @@ goerli = "${GOERLI_RPC_URL}" mainnet = { key = "${ETHERSCAN_API_KEY}" } goerli = { key = "${ETHERSCAN_API_KEY}" } -# See more config options https://github.com/foundry-rs/foundry/tree/master/config \ No newline at end of file +# See more config options https://github.com/foundry-rs/foundry/tree/master/config