From a38b1d4a87225b77f86989dc69cbbcebd7f1a7f0 Mon Sep 17 00:00:00 2001 From: D <51912515+adaki2004@users.noreply.github.com> Date: Tue, 26 Sep 2023 04:00:13 +0200 Subject: [PATCH] fix(protocol): Fix genesis tests (#14813) --- packages/protocol/foundry.toml | 4 ++++ packages/protocol/genesis/generate_genesis.test.sh | 2 +- packages/protocol/package.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/protocol/foundry.toml b/packages/protocol/foundry.toml index e711d3bf31e..7086d8e260e 100644 --- a/packages/protocol/foundry.toml +++ b/packages/protocol/foundry.toml @@ -23,6 +23,7 @@ fs_permissions = [ { access = "read", path = "./out" }, { access = "read-write", path = "./deployments" }, { access = "read", path = "./test" }, + { access = "read", path = "./genesis" }, ] fuzz = { runs = 256 } @@ -33,3 +34,6 @@ line_length = 80 multiline_func_header = 'all' number_underscore = 'thousands' wrap_comments = true + +[profile.genesis] +test = 'genesis' \ No newline at end of file diff --git a/packages/protocol/genesis/generate_genesis.test.sh b/packages/protocol/genesis/generate_genesis.test.sh index 60f022f15c0..67af651e90c 100755 --- a/packages/protocol/genesis/generate_genesis.test.sh +++ b/packages/protocol/genesis/generate_genesis.test.sh @@ -101,5 +101,5 @@ forge test \ --fork-url http://localhost:18545 \ --fork-retry-backoff 120 \ --no-storage-caching \ - --match-path $DIR/*.g.sol \ + --match-path genesis/*.g.sol \ --block-gas-limit 1000000000 diff --git a/packages/protocol/package.json b/packages/protocol/package.json index b0abe9a24ac..848ff964b43 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -18,7 +18,7 @@ "snapshot": "forge snapshot --match-path 'test/**/*.t.sol'", "test": "forge test -vvv --gas-report --fuzz-seed $(date +%s) --nmp test/L1/TaikoL1.sim.sol", "test:coverage": "forge coverage --report lcov", - "test:genesis": "./genesis/generate_genesis.test.sh", + "test:genesis": "FOUNDRY_PROFILE=genesis ./genesis/generate_genesis.test.sh", "upgrade": "./script/upgrade_to.sh" }, "keywords": [