Skip to content

Commit

Permalink
chore(protocol): set evm_version to cancun as default (#15756)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Wang <[email protected]>
Co-authored-by: D <[email protected]>
  • Loading branch information
3 people authored Feb 13, 2024
1 parent 791b139 commit 16e89d0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
while ! nc -z localhost 8545; do
sleep 1
done
pnpm deploy:foundry
pnpm test:deploy
# - name: protocol - Upload coverage to Codecov
# uses: codecov/codecov-action@v3
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pnpm hardhat node
4. **Deploy Contracts Using Foundry:** Once your network is running, open a new terminal window and execute the deployment scripts using Foundry:

```sh
pnpm deploy:foundry
pnpm test:deploy
```

This command will deploy the L1 contracts using the settings and addresses you’ve provided in the `test_deploy_on_l1.sh` script.
1 change: 1 addition & 0 deletions packages/protocol/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ optimizer_runs = 200
ffi = true
gas_limit = '18446744073709551615'
memory_limit = 2073741824
evm_version = 'cancun'

# Do not change the block_gas_limit value, TaikoL2.t.sol depends on it.
block_gas_limit = 80000000 #80M
Expand Down
1 change: 0 additions & 1 deletion packages/protocol/genesis/generate_genesis.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,5 @@ forge test \
--fork-url http://localhost:18545 \
--fork-retry-backoff 120 \
--no-storage-caching \
--evm-version cancun \
--match-path genesis/*.g.sol \
--block-gas-limit 1000000000
10 changes: 5 additions & 5 deletions packages/protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
"scripts": {
"buildMerkle": "ts-node ./utils/airdrop/buildMerkleTree.ts ./utils/airdrop/airdrop_db/example_claimList.json",
"clean": "rm -rf abis cache* && forge clean",
"compile": "forge build --evm-version cancun --build-info --extra-output storage-layout",
"deploy:foundry": "./script/download_solc.sh && ./script/test_deploy_on_l1.sh",
"compile": "forge build --build-info --extra-output storage-layout",
"test:deploy": "./script/download_solc.sh && ./script/test_deploy_on_l1.sh",
"eslint": "pnpm exec eslint --ignore-path .eslintignore --ext .js,.ts .",
"eslint:fix": "pnpm exec eslint --ignore-path .eslintignore --ext .js,.ts . --fix",
"fmt:sol": "forge fmt",
"generate:genesis": "ts-node ./utils/generate_genesis/main.ts",
"lint:sol": "forge fmt && pnpm solhint 'contracts/**/*.sol' --fix",
"snapshot": "forge snapshot --evm-version cancun --match-path 'test/**/*.t.sol'",
"test": "forge test -vvv --evm-version cancun --match-path test/*.t.sol",
"snapshot": "forge snapshot --match-path 'test/**/*.t.sol'",
"test": "forge test -vvv --match-path test/*.t.sol",
"test:coverage": "mkdir -p coverage && forge coverage --report lcov && lcov --remove ./lcov.info -o ./coverage/lcov.info 'test/' 'script/' 'contracts/thirdparty/' && genhtml coverage/lcov.info --branch-coverage --output-dir coverage --ignore-errors category && open coverage/index.html",
"test:genesis": "pnpm compile && FOUNDRY_PROFILE=genesis ./genesis/generate_genesis.test.sh",
"export:simconf": "forge test --evm-version cancun --match-test 'test_simulation' -vv > simulation/out/simconf_$(date +%s).txt"
"export:simconf": "forge test --match-test 'test_simulation' -vv > simulation/out/simconf_$(date +%s).txt"
},
"keywords": [
"ZKP",
Expand Down
3 changes: 1 addition & 2 deletions packages/protocol/script/test_deploy_on_l1.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

# This script is only used by `pnpm deploy:foundry`.
# This script is only used by `pnpm test:deploy`.
set -e

PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
Expand All @@ -21,7 +21,6 @@ forge script script/DeployOnL1.s.sol:DeployOnL1 \
--fork-url http://localhost:8545 \
--broadcast \
--ffi \
--evm-version cancun \
-vvvv \
--private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
--block-gas-limit 100000000

0 comments on commit 16e89d0

Please sign in to comment.