Skip to content

Commit

Permalink
ci: add action-verify-bytecode workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
madlabman committed Dec 7, 2022
1 parent a47c99b commit f7a90a2
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/verify-bytecode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Verify deployed contracts' bytecode

on:
pull_request:
branches:
- "master"

jobs:
assert-bytecode:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
persist-credentials: false

- name: Setup node.js version
uses: actions/setup-node@v3
with:
node-version: 14

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: "**/node_modules"
key: node_modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: node_modules-${{ hashFiles('**/package-lock.json') }}

- name: Install node dependencies
run: npm i
if: |
steps.cache-node-modules.outputs.cache-hit != 'true'
- name: Compile contracts
run: npm run compile

- name: Verify bytecode of contracts on Optimism chain
uses: lidofinance/action-verify-bytecode@master
if: always()
with:
file: artifacts-opt.json
rpcUrl: ${{ secrets.OPTIMISM_RPC }}

- name: Verify bytecode of contracts on Arbitrum chain
uses: lidofinance/action-verify-bytecode@master
if: always()
with:
file: artifacts-arb.json
rpcUrl: ${{ secrets.ARBITRUM_RPC }}
9 changes: 9 additions & 0 deletions artifacts-arb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"artifactPath": "artifacts/contracts/bridges/ArbitrumBridgeExecutor.sol/ArbitrumBridgeExecutor.json",
"sourcePath": "contracts/bridges/ArbitrumBridgeExecutor.sol",
"name": "ArbitrumBridgeExecutor",
"address": "0x1dcA41859Cd23b526CBe74dA8F48aC96e14B1A29",
"txHash": "0x182706c6ea244a184363608b646636e159238dbc737619873390b1021dd7857c"
}
]
9 changes: 9 additions & 0 deletions artifacts-opt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"artifactPath": "artifacts/contracts/bridges/OptimismBridgeExecutor.sol/OptimismBridgeExecutor.json",
"sourcePath": "contracts/bridges/OptimismBridgeExecutor.sol",
"name": "OptimismBridgeExecutor",
"address": "0xEfa0dB536d2c8089685630fafe88CF7805966FC3",
"txHash": "0xb2cac3cea80817ddf1e5ae042a0a3cd6e017e30e663f857ae1be6f171a39e49b"
}
]

0 comments on commit f7a90a2

Please sign in to comment.