Skip to content

Commit

Permalink
op-bindings: ensure integrity of artifacts (ethereum-optimism#3387)
Browse files Browse the repository at this point in the history
Use `hardhat compile` so that it ensures that the artifacts
used by the generator are up to date
  • Loading branch information
tynes authored Sep 10, 2022
1 parent 6e5df3e commit a28bfa5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion op-bindings/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ bindings: l1block-bindings \

compile:
cd ../packages/contracts-bedrock/ && \
forge build -o ./tmp-artifacts
npx hardhat compile

l1-cross-domain-messenger-bindings: compile
./gen_bindings.sh contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger $(pkg)
Expand Down
6 changes: 3 additions & 3 deletions op-bindings/gen_bindings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ TEMP=$(mktemp -d)
CWD=$(pwd)
# Build contracts
cd ${CONTRACTS_PATH}
forge inspect -o ./tmp-artifacts ${NAME} abi > ${TEMP}/${TYPE}.abi
forge inspect -o ./tmp-artifacts ${NAME} bytecode > ${TEMP}/${TYPE}.bin
forge inspect -o ./tmp-artifacts ${NAME} deployedBytecode > ${CWD}/bin/${TYPE_LOWER}_deployed.hex
forge inspect ${NAME} abi > ${TEMP}/${TYPE}.abi
forge inspect ${NAME} bytecode > ${TEMP}/${TYPE}.bin
forge inspect ${NAME} deployedBytecode > ${CWD}/bin/${TYPE_LOWER}_deployed.hex

# Run ABIGEN
cd ${CWD}
Expand Down

0 comments on commit a28bfa5

Please sign in to comment.