Skip to content

Commit a8bfb15

Browse files
committed
feat: Add Safe multisig integration and bridge pause/unpause workflow
1 parent a9185a5 commit a8bfb15

File tree

2 files changed

+104
-0
lines changed

2 files changed

+104
-0
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Bridge Pause/Unpause via Safe Multisig
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
operation:
7+
description: 'Pause operation to perform'
8+
required: true
9+
type: choice
10+
options:
11+
- pause-bridge
12+
- unpause-bridge
13+
- pause-outbound
14+
- unpause-outbound
15+
network:
16+
description: 'Network to perform operation on'
17+
required: true
18+
type: choice
19+
options:
20+
- ethereum
21+
- arbitrum
22+
- sepolia
23+
- arbitrum_sepolia
24+
default: sepolia
25+
26+
jobs:
27+
prepare-pause-operation:
28+
runs-on: ubuntu-latest
29+
environment: ${{ inputs.network }}
30+
outputs:
31+
transaction-data: ${{ steps.prepare.outputs.transaction-data }}
32+
safe-address: ${{ steps.prepare.outputs.safe-address }}
33+
bridge-address: ${{ steps.prepare.outputs.bridge-address }}
34+
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v4
38+
with:
39+
submodules: recursive
40+
41+
- name: Install Foundry
42+
uses: foundry-rs/foundry-toolchain@v1
43+
with:
44+
version: stable
45+
cache: true
46+
47+
- name: Prepare pause/unpause transaction calldata
48+
id: prepare
49+
env:
50+
CHAIN: ${{ inputs.network }}
51+
run: |
52+
# Get bridge address from config
53+
BRIDGE_ADDRESS=$(jq -r ".${CHAIN}.iexecLayerZeroBridgeAddress" config/config.json)
54+
echo "bridge-address=$BRIDGE_ADDRESS" >> $GITHUB_OUTPUT
55+
56+
# Determine the function selector based on operation
57+
case "${{ inputs.operation }}" in
58+
"pause-bridge")
59+
# pause() function selector
60+
SELECTOR="0x8456cb59"
61+
;;
62+
"unpause-bridge")
63+
# unpause() function selector
64+
SELECTOR="0x3f4ba83a"
65+
;;
66+
"pause-outbound")
67+
# pauseOutboundTransfers() function selector
68+
SELECTOR="0x47e7ef24"
69+
;;
70+
"unpause-outbound")
71+
# unpauseOutboundTransfers() function selector
72+
SELECTOR="0x63ba0d00"
73+
;;
74+
esac
75+
76+
echo "transaction-data=$SELECTOR" >> $GITHUB_OUTPUT
77+
echo "safe-address=${{ secrets.SAFE_ADDRESS }}" >> $GITHUB_OUTPUT
78+
79+
propose-to-safe:
80+
needs: prepare-pause-operation
81+
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/propose-safe-multisig-tx.yml@main
82+
secrets:
83+
safe-proposer-private-key: ${{ secrets.SAFE_PROPOSER_PRIVATE_KEY }}
84+
safe-api-key: ${{ secrets.SAFE_API_KEY }}
85+
with:
86+
rpc-url: ${{ secrets.RPC_URL }}
87+
safe-address: ${{ needs.prepare-pause-operation.outputs.safe-address }}
88+
transaction-to: ${{ needs.prepare-pause-operation.outputs.bridge-address }}
89+
transaction-value: '0'
90+
transaction-data: ${{ needs.prepare-pause-operation.outputs.transaction-data }}

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,20 @@ The scripts automatically calculate these fees and include them in the transacti
347347
348348
Note that production GitHub environments `arbitrum` and `ethereum` can only be used with the `main` branch.
349349
350+
## Safe Multisig Integration
351+
352+
All critical administrative operations are secured using Safe (Gnosis Safe) multisig wallets. This ensures that important actions like contract upgrades, role management, and pause operations require approval from multiple authorized signers.
353+
354+
### Supported Operations
355+
356+
- **Pause/Unpause**: Control bridge operations with different pause levels
357+
358+
### GitHub Actions Workflows
359+
360+
- `.github/workflows/bridge-pause-safe.yml` - Propose pause/unpause transactions
361+
362+
All workflows use the reusable Safe multisig workflow from [iExecBlockchainComputing/github-actions-workflows](https://github.com/iExecBlockchainComputing/github-actions-workflows).
363+
350364
## TODO
351365
352366
- Use an enterprise RPC URL for `secrets.SEPOLIA_RPC_URL` in Github environment `ci`.

0 commit comments

Comments
 (0)