From bf6722746058e79fb83b15edf0976f5aa752149a Mon Sep 17 00:00:00 2001 From: Dirk Brink Date: Tue, 30 Jan 2024 11:35:39 -0800 Subject: [PATCH] ethereum: PUSH0 test (#3748) * ethereum: PUSH0 test * Echo to stderr --- .github/workflows/build.yml | 2 +- ethereum/Makefile | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf4ff7f39..8edf005b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,7 +71,7 @@ jobs: node-version: "16" - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 - - run: cd ethereum && make test + - run: cd ethereum && make test && make test-push0 ethereum-upgrade: runs-on: ubuntu-latest diff --git a/ethereum/Makefile b/ethereum/Makefile index daa67bb1c..91d17b7ff 100644 --- a/ethereum/Makefile +++ b/ethereum/Makefile @@ -85,5 +85,10 @@ test-identifiers: dependencies test-forge: dependencies forge test --no-match-test .*_KEVM # ignore KEVM tests (see PROOFS.md) +# Verify that the contracts do not include PUSH0 opcodes +test-push0: dependencies + forge build --extra-output evm.bytecode.opcodes + @if grep -qr --include \*.json PUSH0 ./build-forge; then echo "Contract uses PUSH0 instruction" 1>&2; exit 1; fi + clean: rm -rf ganache.log .env node_modules build flattened build-forge ethers-contracts lib/forge-std lib/openzeppelin-contracts