Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
df21e2e
feat: add deploy workflow for contract deployment with validation and…
Le-Caignec Jul 16, 2025
8b91778
Merge branch 'main' into feature/deploy-ci
Le-Caignec Jul 16, 2025
ff606eb
feat: Enable automatic deployment trigger on push for contract deploy…
Le-Caignec Jul 16, 2025
a1cb82d
fix: Remove push trigger from deploy workflow to enforce manual deplo…
Le-Caignec Jul 16, 2025
c540155
feat: Add workflow_call trigger to main workflow for improved reusabi…
Le-Caignec Jul 16, 2025
824d927
fix: Update deployment script to run fork commands in parallel
Le-Caignec Jul 16, 2025
297257d
feat: Update deployment process to support CI mode with private key u…
Le-Caignec Jul 16, 2025
3102541
fix: Update private key secret reference in deployment workflow
Le-Caignec Jul 16, 2025
1ca7bd3
fix: Ensure CI environment variable is set in workflow
Le-Caignec Jul 16, 2025
f047102
fix: Update environment variables for CI workflow and remove unused p…
Le-Caignec Jul 16, 2025
ad7ef0f
fix: Update FOUNDRY_PROFILE environment variable to use 'ci' for cons…
Le-Caignec Jul 16, 2025
c9187f6
fix: Update CI variable in .env.template for clarity and remove redun…
Le-Caignec Jul 16, 2025
cd1dbc8
fix: Set CI variable to true for consistent CI mode execution
Le-Caignec Jul 16, 2025
ea8193a
fix: Remove redundant .env file copy and ensure environment variables…
Le-Caignec Jul 16, 2025
bc09372
test
Le-Caignec Jul 16, 2025
9031254
fix: Add environment declaration for build-and-test job
Le-Caignec Jul 16, 2025
cc91ceb
fix: Add required secrets for RPC URLs in CI workflow and remove CI e…
Le-Caignec Jul 16, 2025
bd4e41e
fix: Set environment for build-and-test job in main workflow and ensu…
Le-Caignec Jul 16, 2025
ea06d32
fix: Update CI job to correctly pass secrets for RPC URLs in deployme…
Le-Caignec Jul 16, 2025
d7b404e
fix: Refactor CI jobs to inherit secrets and streamline environment v…
Le-Caignec Jul 16, 2025
ccaf928
fix: Remove inherited secrets declaration from CI job
Le-Caignec Jul 16, 2025
080654f
fix: Update CI job to use secrets instead of with for RPC URLs
Le-Caignec Jul 16, 2025
49b409b
test
Le-Caignec Jul 17, 2025
9b53432
fix: Add wait time for Anvil instances to be ready before deployment
Le-Caignec Jul 17, 2025
afae923
fix: Add cleanup and wait logic for Anvil processes in deployment wor…
Le-Caignec Jul 17, 2025
e9d744c
fix: Improve anvil cleanup process and streamline deployment steps
Le-Caignec Jul 17, 2025
c6657c4
test
Le-Caignec Jul 17, 2025
0b92545
fix: Increase sleep duration for Anvil deployment to ensure readiness
Le-Caignec Jul 17, 2025
cd8857a
fix: Correct syntax in deploy command for Anvil deployment
Le-Caignec Jul 17, 2025
00a24ba
fix: test with new salt
Le-Caignec Jul 17, 2025
75c42fd
fix: Restore ci job and ensure proper dependency for deploy step
Le-Caignec Jul 17, 2025
80ad04e
chore: save deployment artifacts for sepolia (testnets, 16347341819)
github-actions[bot] Jul 17, 2025
7005fd5
chore: save deployment artifacts for arbitrumSepolia (testnets, 16347…
github-actions[bot] Jul 17, 2025
c2ed408
fix: Remove unnecessary cleanup step for Anvil processes in Makefile
Le-Caignec Jul 17, 2025
2ef85a0
feat: add broadcast
Le-Caignec Jul 17, 2025
bdcbbe4
refactor: standardize naming for arbitrumSepolia across deployment sc…
Le-Caignec Jul 17, 2025
cd822bd
fix: update workflow inputs to use correct types and remove unnecessa…
Le-Caignec Jul 17, 2025
3d66d80
fix: remove unnecessary ci job from deployment workflow
Le-Caignec Jul 17, 2025
9bfde9c
fix: rename CI job to build-and-test and update dependencies for Anvi…
Le-Caignec Jul 17, 2025
7711369
refactor: streamline deployment targets in Makefile and update workfl…
Le-Caignec Jul 18, 2025
dcc8d7c
fix: update chain and RPC_URL variables in deployment targets for con…
Le-Caignec Jul 18, 2025
5cec6af
fix: add concurrency settings to deployment workflow for improved eff…
Le-Caignec Jul 18, 2025
339fa96
fix: move concurrency settings to deploy job for better organization
Le-Caignec Jul 18, 2025
5b76764
Merge branch 'main' into feature/deploy-ci
Le-Caignec Jul 18, 2025
c8a34e5
feat: Increment salt
zguesmi Jul 18, 2025
3d00c31
fix: update deployment and configuration targets for clarity and comp…
Le-Caignec Jul 21, 2025
62a38a1
Merge branch 'feature/deploy-ci' of https://github.com/iExecBlockchai…
Le-Caignec Jul 21, 2025
4b22c7a
fix: update ChainX deployment condition to exclude Anvil network
Le-Caignec Jul 21, 2025
3a28389
fix: try to simplify concurrency deployment
Le-Caignec Jul 21, 2025
8b1ca4d
fix: rollback
Le-Caignec Jul 21, 2025
821f51a
chore: save deployment artifacts for sepolia (16411040168)
github-actions[bot] Jul 21, 2025
91e5fb3
fix: standardize naming for Arbitrum Sepolia to arbitrum_sepolia acro…
Le-Caignec Jul 21, 2025
141d398
Merge branch 'feature/deploy-ci' of https://github.com/iExecBlockchai…
Le-Caignec Jul 21, 2025
dabecd4
chore: save deployment artifacts for sepolia (16411464577)
github-actions[bot] Jul 21, 2025
3fa80f8
chore: save deployment artifacts for arbitrum_sepolia (16411478352)
github-actions[bot] Jul 21, 2025
0341d73
fix: standardize variable naming for Arbitrum Sepolia in IexecLayerZe…
Le-Caignec Jul 21, 2025
1159675
Merge branch 'feature/deploy-ci' of https://github.com/iExecBlockchai…
Le-Caignec Jul 21, 2025
51674fc
fix: rename variable for Arbitrum Sepolia fork to improve clarity
Le-Caignec Jul 21, 2025
87edcc3
fix: rename PRIVATE_KEY to DEPLOYER_PRIVATE_KEY for clarity in deploy…
Le-Caignec Jul 21, 2025
af47bbf
fix: remove force options from git auto-commit action for safer deplo…
Le-Caignec Jul 21, 2025
577ebdf
fix: update createx salts for consistency in Sepolia configuration
Le-Caignec Jul 21, 2025
6185f34
chore: save deployment artifacts for arbitrum_sepolia (16417111567)
github-actions[bot] Jul 21, 2025
22c3759
fix: remove concurrency group variation for consistent deployment han…
Le-Caignec Jul 21, 2025
cf1c822
Merge branch 'feature/deploy-ci' of https://github.com/iExecBlockchai…
Le-Caignec Jul 21, 2025
3226728
fix: remove unnecessary whitespace in deploy workflow
Le-Caignec Jul 21, 2025
7754ed6
fix: update createx salts for consistency in Sepolia and Arbitrum con…
Le-Caignec Jul 21, 2025
3e84df9
Update foundry.toml
Le-Caignec Jul 21, 2025
25688b5
chore: save deployment artifacts for arbitrum_sepolia (16418248109)
github-actions[bot] Jul 21, 2025
b059352
chore: save deployment artifacts for sepolia (16418506422)
github-actions[bot] Jul 21, 2025
4756fe1
Update .github/workflows/main.yml
Le-Caignec Jul 21, 2025
f76c4cd
Update .github/workflows/deploy.yml
Le-Caignec Jul 21, 2025
d8e9ed5
Update .github/workflows/deploy.yml
Le-Caignec Jul 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Deploy contracts

on:
workflow_dispatch: # Manual trigger
inputs:
network:
description: 'Network'
required: true
type: choice
options:
- anvil
- sepolia
- ethereum
- arbitrumSepolia
- arbitrum
default: 'anvil'
environment:
description: 'Environment'
required: true
type: choice
options:
- testnets
- mainnets
default: 'testnets'

jobs:

# Validate deployment network and environment.
validate:
runs-on: ubuntu-latest
steps:
# On Github, the environment `mainnets` is restricted to
# the main branch. Here we check that it's only used with
# mainnet networks.
- name: Validate mainnet deployment
run: |
if [[ "${{ inputs.environment }}" == "mainnets" && "${{ inputs.network }}" != "arbitrum" && "${{ inputs.network }}" != "ethereum" ]]; then
echo "::error::mainnets environment can only be used with mainnet networks (ethereum, arbitrum)."
exit 1
fi
echo "Deploying to network '${{ inputs.network }}' with environment '${{ inputs.environment }}'."

# Build and test before deploying.
ci:
needs: validate
uses: ./.github/workflows/main.yml

# Deploy and verify contract.
deploy:
needs: ci
runs-on: ubuntu-latest
permissions:
contents: write # Required to commit deployment files.
environment: ${{ inputs.environment }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable
cache: true

- name: Deploy contracts on Anvil (All networks)
if: inputs.network == 'anvil'
env:
ACCOUNT: ${{ secrets.ACCOUNT }}
SEPOLIA_RPC_URL: ${{ secrets.SEPOLIA_RPC_URL }}
ARBITRUM_SEPOLIA_RPC_URL: ${{ secrets.ARBITRUM_SEPOLIA_RPC_URL }}
ANVIL_SEPOLIA_RPC_URL: http://localhost:8545
ANVIL_ARBITRUM_SEPOLIA_RPC_URL: http://localhost:8546
run: |
make fork-sepolia & make fork-arbitrum-sepolia

# Wait for anvil instances to be ready
sleep 5

# Deploy all contracts using the Makefile target
make deploy-on-anvil

- name: Deploy contracts on Ethereum Mainnet or Sepolia
if: inputs.network == 'sepolia' || inputs.network == 'ethereum'
env:
ACCOUNT: ${{ secrets.ACCOUNT }}
CHAIN: ${{ inputs.network }}
RPC_URL: ${{ inputs.network == 'sepolia' && secrets.SEPOLIA_RPC_URL || secrets.ETHEREUM_RPC_URL }}
run: |
CONTRACT=RLCLiquidityUnifier make deploy-contract
CONTRACT=bridges/layerZero/IexecLayerZeroBridge make deploy-contract

- name: Deploy contracts on Arbitrum/Arbitrum Sepolia (L2)
if: inputs.network == 'arbitrumSepolia' || inputs.network == 'arbitrum'
env:
ACCOUNT: ${{ secrets.ACCOUNT }}
CHAIN: ${{ inputs.network == 'arbitrumSepolia' && 'arbitrum_sepolia' || 'arbitrum' }}
RPC_URL: ${{ inputs.network == 'arbitrumSepolia' && secrets.ARBITRUM_SEPOLIA_RPC_URL || secrets.ARBITRUM_RPC_URL }}
run: |
CONTRACT=RLCCrosschainToken make deploy-contract
CONTRACT=bridges/layerZero/IexecLayerZeroBridge make deploy-contract

- name: Save deployment artifacts
if: inputs.network != 'anvil'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: save deployment artifacts for ${{ inputs.network }} (${{ inputs.environment }}, ${{ github.run_id }})'
file_pattern: 'config/config.json broadcast/'
commit_user_name: 'GitHub Actions Bot'
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
commit_author: 'GitHub Actions Bot <github-actions[bot]@users.noreply.github.com>'

- name: Verify contracts
if: inputs.network != 'anvil'
run: |
echo "TODO: Implement contract verification for ${{ inputs.network }}."
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable
cache: true

- name: Show Forge version
run: forge --version
Expand Down