diff --git a/.github/workflows/verify-bytecode.yml b/.github/workflows/verify-bytecode.yml new file mode 100644 index 0000000..4e42271 --- /dev/null +++ b/.github/workflows/verify-bytecode.yml @@ -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 }} diff --git a/artifacts-arb.json b/artifacts-arb.json new file mode 100644 index 0000000..39289ef --- /dev/null +++ b/artifacts-arb.json @@ -0,0 +1,9 @@ +[ + { + "artifactPath": "artifacts/contracts/bridges/ArbitrumBridgeExecutor.sol/ArbitrumBridgeExecutor.json", + "sourcePath": "contracts/bridges/ArbitrumBridgeExecutor.sol", + "name": "ArbitrumBridgeExecutor", + "address": "0x1dcA41859Cd23b526CBe74dA8F48aC96e14B1A29", + "txHash": "0x182706c6ea244a184363608b646636e159238dbc737619873390b1021dd7857c" + } +] diff --git a/artifacts-opt.json b/artifacts-opt.json new file mode 100644 index 0000000..97ed9d1 --- /dev/null +++ b/artifacts-opt.json @@ -0,0 +1,9 @@ +[ + { + "artifactPath": "artifacts/contracts/bridges/OptimismBridgeExecutor.sol/OptimismBridgeExecutor.json", + "sourcePath": "contracts/bridges/OptimismBridgeExecutor.sol", + "name": "OptimismBridgeExecutor", + "address": "0xEfa0dB536d2c8089685630fafe88CF7805966FC3", + "txHash": "0xb2cac3cea80817ddf1e5ae042a0a3cd6e017e30e663f857ae1be6f171a39e49b" + } +]