Skip to content

Commit ef62833

Browse files
committed
chore: Merge branch 'main' into feat/dvn-config-script
2 parents d643e82 + b670d26 commit ef62833

File tree

30 files changed

+667
-43
lines changed

30 files changed

+667
-43
lines changed

.env.template

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# ===========================================
44
# Set to true in CI environments
55
CI=false
6-
6+
# Foundry configuration for OpenZeppelin Lib
7+
FOUNDRY_OUT=artifacts
78
# ===========================================
89
# DEPLOYMENT CONFIGURATION
910
# ===========================================
@@ -41,4 +42,4 @@ RECIPIENT_ADDRESS=
4142
# ===========================================
4243
# ADMIN CONFIGURATION
4344
# ===========================================
44-
NEW_DEFAULT_ADMIN=
45+
NEW_DEFAULT_ADMIN=
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Bridge Pause Operations
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_type:
16+
description: 'Network type to configure'
17+
required: true
18+
type: choice
19+
options:
20+
- testnets
21+
- mainnets
22+
default: 'testnets'
23+
jobs:
24+
setup-matrix:
25+
runs-on: ubuntu-latest
26+
outputs:
27+
matrix: ${{ steps.set-matrix.outputs.matrix }}
28+
steps:
29+
- name: Set matrix based on network type
30+
id: set-matrix
31+
run: |
32+
if [ "${{ github.event.inputs.network_type }}" == "testnets" ]; then
33+
MATRIX='[
34+
{
35+
"chain": "sepolia"
36+
},
37+
{
38+
"chain": "arbitrum_sepolia"
39+
}
40+
]'
41+
else
42+
MATRIX='[
43+
{
44+
"chain": "ethereum"
45+
},
46+
{
47+
"chain": "arbitrum"
48+
}
49+
]'
50+
fi
51+
52+
bridge-pause-operation:
53+
needs: setup-matrix
54+
runs-on: ubuntu-latest
55+
strategy:
56+
matrix:
57+
include: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
58+
fail-fast: false
59+
concurrency:
60+
group: pause-bridge-${{ matrix.chain }}
61+
cancel-in-progress: false
62+
env:
63+
CI: true
64+
environment: ${{ matrix.chain }}
65+
66+
steps:
67+
- name: Checkout repository
68+
uses: actions/checkout@v4
69+
with:
70+
submodules: recursive
71+
72+
- name: Install Foundry
73+
uses: foundry-rs/foundry-toolchain@v1
74+
with:
75+
version: stable
76+
cache: true
77+
78+
- name: Run pause operation on bridge from ${{ matrix.chain }}
79+
env:
80+
CHAIN: ${{ matrix.chain }}
81+
RPC_URL: ${{ secrets.RPC_URL }}
82+
PAUSER_PRIVATE_KEY: ${{ secrets.PAUSER_PRIVATE_KEY }}
83+
run: make ${{ github.event.inputs.operation }}

.github/workflows/configure-bridges.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ jobs:
4444
}
4545
]'
4646
fi
47-
48-
# Convertir en une ligne pour GitHub Output
49-
echo "matrix=$(echo "$MATRIX" | jq -c .)" >> $GITHUB_OUTPUT
5047
5148
configure-bridges:
5249
needs: setup-matrix

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
runs-on: ubuntu-latest
3131
env:
3232
CI: true
33+
FOUNDRY_OUT: artifacts
3334
permissions:
3435
contents: write # Required to commit deployment files.
3536
environment: ${{ inputs.network }}

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ concurrency:
1717

1818
env:
1919
FOUNDRY_PROFILE: ci
20+
FOUNDRY_OUT: artifacts
2021

2122
jobs:
2223
build-and-test:
@@ -40,7 +41,7 @@ jobs:
4041
run: forge fmt --check
4142

4243
- name: Run Forge build
43-
run: forge build && forge build './src' --sizes
44+
run: forge clean && forge build && forge build './src' --sizes
4445

4546
- name: Run Foundry coverage
4647
env:
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Verify Build Artifacts
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'src/**/*.sol'
7+
- '.github/workflows/verify-artifacts.yml'
8+
9+
env:
10+
FOUNDRY_PROFILE: ci
11+
12+
jobs:
13+
verify-artifacts:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
submodules: recursive
21+
22+
- name: Install Foundry
23+
uses: foundry-rs/foundry-toolchain@v1
24+
with:
25+
version: stable
26+
cache: true
27+
28+
- name: Build contracts
29+
run: forge build
30+
31+
- name: Check artifacts are up to date
32+
run: |
33+
if ! git diff --quiet HEAD -- artifacts/; then
34+
echo "❌ Build artifacts in artifacts/ directory are not up to date!"
35+
echo ""
36+
git diff --name-only HEAD -- artifacts/
37+
echo ""
38+
echo "Please run 'forge build' locally and commit the updated artifacts."
39+
exit 1
40+
fi
41+
echo "✅ Build artifacts are up to date!"

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Compiler files
22
cache/
3-
out/
43

54
# Ignores development broadcast logs
65
!/broadcast
@@ -19,3 +18,13 @@ broadcast/*/*/run-*.json
1918
/coverage
2019
lcov.info
2120
lcov.src.info
21+
22+
# Ignore all artifacts except some files.
23+
!/artifacts/
24+
/artifacts/**
25+
!/artifacts/*IexecLayerZeroBridge.sol
26+
!/artifacts/*IexecLayerZeroBridge.sol/*
27+
!/artifacts/*RLCCrosschainToken.sol
28+
!/artifacts/*RLCCrosschainToken.sol/*
29+
!/artifacts/*RLCLiquidityUnifier.sol
30+
!/artifacts/*RLCLiquidityUnifier.sol/*

.release-please-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-rc"
3-
}
2+
".": "0.1.0"
3+
}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MAKEFLAGS += --no-print-directory
22

3-
include tools/report.mk tools/verification.mk
3+
include tools/report.mk tools/verification.mk tools/pauser.mk
44
-include .env
55

66

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ The scripts automatically calculate these fees and include them in the transacti
343343
344344
## How to release:
345345
346+
<!-- TODO use main branch and create PR for artifacts -->
346347
* First, deploy on Testnets and make sure all tests are ok.
347348
* Create a release branch `release/X.X.X` that starts from the `main` branch.
348349
- Note that GitHub environments `arbitrum` and `ethereum` can only be used with `release/*` branches. The `main` branch cannot be used as the CI will not be able to commit deployment artifacts.

0 commit comments

Comments
 (0)