-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add deploy workflow for contract deployment #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 39 commits
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 8b91778
Merge branch 'main' into feature/deploy-ci
Le-Caignec ff606eb
feat: Enable automatic deployment trigger on push for contract deploy…
Le-Caignec a1cb82d
fix: Remove push trigger from deploy workflow to enforce manual deplo…
Le-Caignec c540155
feat: Add workflow_call trigger to main workflow for improved reusabi…
Le-Caignec 824d927
fix: Update deployment script to run fork commands in parallel
Le-Caignec 297257d
feat: Update deployment process to support CI mode with private key u…
Le-Caignec 3102541
fix: Update private key secret reference in deployment workflow
Le-Caignec 1ca7bd3
fix: Ensure CI environment variable is set in workflow
Le-Caignec f047102
fix: Update environment variables for CI workflow and remove unused p…
Le-Caignec ad7ef0f
fix: Update FOUNDRY_PROFILE environment variable to use 'ci' for cons…
Le-Caignec c9187f6
fix: Update CI variable in .env.template for clarity and remove redun…
Le-Caignec cd1dbc8
fix: Set CI variable to true for consistent CI mode execution
Le-Caignec ea8193a
fix: Remove redundant .env file copy and ensure environment variables…
Le-Caignec bc09372
test
Le-Caignec 9031254
fix: Add environment declaration for build-and-test job
Le-Caignec cc91ceb
fix: Add required secrets for RPC URLs in CI workflow and remove CI e…
Le-Caignec bd4e41e
fix: Set environment for build-and-test job in main workflow and ensu…
Le-Caignec ea06d32
fix: Update CI job to correctly pass secrets for RPC URLs in deployme…
Le-Caignec d7b404e
fix: Refactor CI jobs to inherit secrets and streamline environment v…
Le-Caignec ccaf928
fix: Remove inherited secrets declaration from CI job
Le-Caignec 080654f
fix: Update CI job to use secrets instead of with for RPC URLs
Le-Caignec 49b409b
test
Le-Caignec 9b53432
fix: Add wait time for Anvil instances to be ready before deployment
Le-Caignec afae923
fix: Add cleanup and wait logic for Anvil processes in deployment wor…
Le-Caignec e9d744c
fix: Improve anvil cleanup process and streamline deployment steps
Le-Caignec c6657c4
test
Le-Caignec 0b92545
fix: Increase sleep duration for Anvil deployment to ensure readiness
Le-Caignec cd8857a
fix: Correct syntax in deploy command for Anvil deployment
Le-Caignec 00a24ba
fix: test with new salt
Le-Caignec 75c42fd
fix: Restore ci job and ensure proper dependency for deploy step
Le-Caignec 80ad04e
chore: save deployment artifacts for sepolia (testnets, 16347341819)
github-actions[bot] 7005fd5
chore: save deployment artifacts for arbitrumSepolia (testnets, 16347…
github-actions[bot] c2ed408
fix: Remove unnecessary cleanup step for Anvil processes in Makefile
Le-Caignec 2ef85a0
feat: add broadcast
Le-Caignec bdcbbe4
refactor: standardize naming for arbitrumSepolia across deployment sc…
Le-Caignec cd822bd
fix: update workflow inputs to use correct types and remove unnecessa…
Le-Caignec 3d66d80
fix: remove unnecessary ci job from deployment workflow
Le-Caignec 9bfde9c
fix: rename CI job to build-and-test and update dependencies for Anvi…
Le-Caignec 7711369
refactor: streamline deployment targets in Makefile and update workfl…
Le-Caignec dcc8d7c
fix: update chain and RPC_URL variables in deployment targets for con…
Le-Caignec 5cec6af
fix: add concurrency settings to deployment workflow for improved eff…
Le-Caignec 339fa96
fix: move concurrency settings to deploy job for better organization
Le-Caignec 5b76764
Merge branch 'main' into feature/deploy-ci
Le-Caignec c8a34e5
feat: Increment salt
zguesmi 3d00c31
fix: update deployment and configuration targets for clarity and comp…
Le-Caignec 62a38a1
Merge branch 'feature/deploy-ci' of https://github.com/iExecBlockchai…
Le-Caignec 4b22c7a
fix: update ChainX deployment condition to exclude Anvil network
Le-Caignec 3a28389
fix: try to simplify concurrency deployment
Le-Caignec 8b1ca4d
fix: rollback
Le-Caignec 821f51a
chore: save deployment artifacts for sepolia (16411040168)
github-actions[bot] 91e5fb3
fix: standardize naming for Arbitrum Sepolia to arbitrum_sepolia acro…
Le-Caignec 141d398
Merge branch 'feature/deploy-ci' of https://github.com/iExecBlockchai…
Le-Caignec dabecd4
chore: save deployment artifacts for sepolia (16411464577)
github-actions[bot] 3fa80f8
chore: save deployment artifacts for arbitrum_sepolia (16411478352)
github-actions[bot] 0341d73
fix: standardize variable naming for Arbitrum Sepolia in IexecLayerZe…
Le-Caignec 1159675
Merge branch 'feature/deploy-ci' of https://github.com/iExecBlockchai…
Le-Caignec 51674fc
fix: rename variable for Arbitrum Sepolia fork to improve clarity
Le-Caignec 87edcc3
fix: rename PRIVATE_KEY to DEPLOYER_PRIVATE_KEY for clarity in deploy…
Le-Caignec af47bbf
fix: remove force options from git auto-commit action for safer deplo…
Le-Caignec 577ebdf
fix: update createx salts for consistency in Sepolia configuration
Le-Caignec 6185f34
chore: save deployment artifacts for arbitrum_sepolia (16417111567)
github-actions[bot] 22c3759
fix: remove concurrency group variation for consistent deployment han…
Le-Caignec cf1c822
Merge branch 'feature/deploy-ci' of https://github.com/iExecBlockchai…
Le-Caignec 3226728
fix: remove unnecessary whitespace in deploy workflow
Le-Caignec 7754ed6
fix: update createx salts for consistency in Sepolia and Arbitrum con…
Le-Caignec 3e84df9
Update foundry.toml
Le-Caignec 25688b5
chore: save deployment artifacts for arbitrum_sepolia (16418248109)
github-actions[bot] b059352
chore: save deployment artifacts for sepolia (16418506422)
github-actions[bot] 4756fe1
Update .github/workflows/main.yml
Le-Caignec f76c4cd
Update .github/workflows/deploy.yml
Le-Caignec d8e9ed5
Update .github/workflows/deploy.yml
Le-Caignec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| name: Deploy contracts | ||
|
|
||
| on: | ||
| workflow_dispatch: # Manual trigger | ||
| inputs: | ||
| network: | ||
| description: 'Network' | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - anvil | ||
| - sepolia | ||
| - ethereum | ||
| - arbitrumSepolia | ||
| - arbitrum | ||
| default: 'anvil' | ||
|
|
||
| jobs: | ||
|
|
||
| # Build and test before deploying. | ||
| build-and-test: | ||
| uses: ./.github/workflows/main.yml | ||
| with: | ||
| SEPOLIA_RPC_URL: ${{ vars.SEPOLIA_RPC_URL }} | ||
| ARBITRUM_SEPOLIA_RPC_URL: ${{ vars.ARBITRUM_SEPOLIA_RPC_URL }} | ||
|
|
||
| # Deploy and verify contract. | ||
| deploy: | ||
| needs: build-and-test | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write # Required to commit deployment files. | ||
| environment: ${{ inputs.network }} | ||
| 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: | ||
| CI: true | ||
| PRIVATE_KEY: ${{ vars.ANVIL_PRIVATE_KEY }} | ||
| SEPOLIA_RPC_URL: ${{ vars.SEPOLIA_RPC_URL }} | ||
| ARBITRUM_SEPOLIA_RPC_URL: ${{ vars.ARBITRUM_SEPOLIA_RPC_URL }} | ||
| ANVIL_SEPOLIA_RPC_URL: ${{ vars.ANVIL_SEPOLIA_RPC_URL }} | ||
| ANVIL_ARBITRUM_SEPOLIA_RPC_URL: ${{ vars.ANVIL_ARBITRUM_SEPOLIA_RPC_URL }} | ||
Le-Caignec marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| run: | | ||
| make fork-sepolia & make fork-arbitrum-sepolia & sleep 10 && make deploy-on-anvil | ||
zguesmi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - name: Deploy contracts on Sepolia/EthereumMainnet | ||
| if: inputs.network == 'sepolia' || inputs.network == 'ethereum' | ||
| env: | ||
| CI: true | ||
| PRIVATE_KEY: ${{ secrets.DEPLOYER_PRIVATE_KEY }} | ||
| CHAIN: ${{ inputs.network }} | ||
| RPC_URL: ${{ secrets.RPC_URL }} | ||
| run: | | ||
| CONTRACT=RLCLiquidityUnifier make deploy-contract | ||
| CONTRACT=bridges/layerZero/IexecLayerZeroBridge make deploy-contract | ||
Le-Caignec marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - name: Deploy contracts on ChainX | ||
| if: inputs.network != 'sepolia' && inputs.network != 'ethereum' | ||
Le-Caignec marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| env: | ||
| CI: true | ||
| PRIVATE_KEY: ${{ secrets.DEPLOYER_PRIVATE_KEY }} | ||
| CHAIN: ${{ inputs.network }} | ||
| RPC_URL: ${{ secrets.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 }} (${{ github.run_id }})' | ||
Le-Caignec marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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 }}." | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.