Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
ad787ae
Refactor code structure for improved readability and maintainability
Le-Caignec Oct 1, 2025
fb225eb
chore: Remove branch restrictions from push event in workflow
Le-Caignec Oct 1, 2025
57b8dbc
fix: update Foundry version to stable in workflow
Le-Caignec Oct 1, 2025
01f96e1
chore: remove caching option for Foundry installation in workflow
Le-Caignec Oct 1, 2025
64f3476
chore: remove caching option for Foundry installation in workflow
Le-Caignec Oct 1, 2025
72587ae
chore: enable caching for Foundry installation in workflow
Le-Caignec Oct 1, 2025
503bf44
chore: add FOUNDRY_OUT configuration to CI environment
Le-Caignec Oct 1, 2025
fa54a60
chore: enable caching for Foundry installation and set FOUNDRY_OUT in…
Le-Caignec Oct 1, 2025
308f1c0
chore: add ignore-compile option to slither static analysis step
Le-Caignec Oct 1, 2025
a7e94a3
chore: remove ignore-compile option from slither static analysis step…
Le-Caignec Oct 1, 2025
0f140ec
chore: remove redundant clean command from Forge build step
Le-Caignec Oct 1, 2025
f161665
chore: update Forge build step to include clean command and remove un…
Le-Caignec Oct 2, 2025
813cc8d
chore: update workflow trigger to pull_request and specify paths for …
Le-Caignec Oct 2, 2025
ed0f4c0
Refactor code structure and remove redundant changes
Le-Caignec Oct 5, 2025
8d82204
Implement code changes to enhance functionality and improve performance
Le-Caignec Oct 5, 2025
d8b45de
chore: remove caching from Foundry installation and clean command fro…
Le-Caignec Oct 5, 2025
4047bdb
chore: enable caching for Foundry installation and ensure clean build…
Le-Caignec Oct 6, 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
5 changes: 3 additions & 2 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# ===========================================
# Set to true in CI environments
CI=false

# Foundry configuration for OpenZeppelin Lib
FOUNDRY_OUT=artifacts
# ===========================================
# DEPLOYMENT CONFIGURATION
# ===========================================
Expand Down Expand Up @@ -41,4 +42,4 @@ RECIPIENT_ADDRESS=
# ===========================================
# ADMIN CONFIGURATION
# ===========================================
NEW_DEFAULT_ADMIN=
NEW_DEFAULT_ADMIN=
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
runs-on: ubuntu-latest
env:
CI: true
FOUNDRY_OUT: artifacts
permissions:
contents: write # Required to commit deployment files.
environment: ${{ inputs.network }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ concurrency:

env:
FOUNDRY_PROFILE: ci
FOUNDRY_OUT: artifacts

jobs:
build-and-test:
Expand All @@ -40,7 +41,7 @@ jobs:
run: forge fmt --check

- name: Run Forge build
run: forge build && forge build './src' --sizes
run: forge clean && forge build && forge build './src' --sizes

- name: Run Foundry coverage
env:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/verify-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Verify Build Artifacts

on:
pull_request:
paths:
- 'src/**/*.sol'
- '.github/workflows/verify-artifacts.yml'

env:
FOUNDRY_PROFILE: ci

jobs:
verify-artifacts:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

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

- name: Build contracts
run: forge build

- name: Check artifacts are up to date
run: |
if ! git diff --quiet HEAD -- artifacts/; then
echo "❌ Build artifacts in artifacts/ directory are not up to date!"
echo ""
git diff --name-only HEAD -- artifacts/
echo ""
echo "Please run 'forge build' locally and commit the updated artifacts."
exit 1
fi
echo "✅ Build artifacts are up to date!"
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Compiler files
cache/
out/

# Ignores development broadcast logs
!/broadcast
Expand All @@ -19,3 +18,13 @@ broadcast/*/*/run-*.json
/coverage
lcov.info
lcov.src.info

# Ignore all artifacts except some files.
!/artifacts/
/artifacts/**
!/artifacts/*IexecLayerZeroBridge.sol
!/artifacts/*IexecLayerZeroBridge.sol/*
!/artifacts/*RLCCrosschainToken.sol
!/artifacts/*RLCCrosschainToken.sol/*
!/artifacts/*RLCLiquidityUnifier.sol
!/artifacts/*RLCLiquidityUnifier.sol/*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"abi":[{"type":"function","name":"pause","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"pauseOutboundTransfers","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"unpause","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"unpauseOutboundTransfers","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"error","name":"OperationNotAllowed","inputs":[{"name":"message","type":"string","internalType":"string"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"pause()":"8456cb59","pauseOutboundTransfers()":"86843aa1","unpause()":"3f4ba83a","unpauseOutboundTransfers()":"1657c3b8"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"OperationNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pauseOutboundTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpauseOutboundTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"pause()\":{\"details\":\"Should only be callable by authorized accounts: PAUSER_ROLE.\"},\"pauseOutboundTransfers()\":{\"details\":\"Should only be callable by authorized accounts: PAUSER_ROLE.\"},\"unpause()\":{\"details\":\"Should only be callable by authorized accounts: PAUSER_ROLE.\"},\"unpauseOutboundTransfers()\":{\"details\":\"Should only be callable by authorized accounts: PAUSER_ROLE.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"pause()\":{\"notice\":\"Pauses the contract, disabling `_credit` & `_debit` functions.\"},\"pauseOutboundTransfers()\":{\"notice\":\"Pauses only the `_debit` function, allowing `_credit` to still work.\"},\"unpause()\":{\"notice\":\"Unpauses the contract, re-enabling previously disabled functions (`_credit` & `_debit`).\"},\"unpauseOutboundTransfers()\":{\"notice\":\"Unpauses the `_debit` function, allowing outbound transfers again.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/interfaces/IIexecLayerZeroBridge.sol\":\"IIexecLayerZeroBridge\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@createx/contracts/=lib/createx/src/\",\":@layerzerolabs/lz-evm-messagelib-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/messagelib/\",\":@layerzerolabs/lz-evm-protocol-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/protocol/\",\":@layerzerolabs/lz-evm-v1-0.7/=lib/layerzero-v1/\",\":@layerzerolabs/oapp-evm-upgradeable/=lib/devtools/packages/oapp-evm-upgradeable/\",\":@layerzerolabs/oapp-evm/=lib/devtools/packages/oapp-evm/\",\":@layerzerolabs/oft-evm-upgradeable/=lib/devtools/packages/oft-evm-upgradeable/\",\":@layerzerolabs/oft-evm/=lib/devtools/packages/oft-evm/\",\":@layerzerolabs/test-devtools-evm-foundry/=lib/devtools/packages/test-devtools-evm-foundry/\",\":@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/\",\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":@openzeppelin/foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/\",\":createx/=lib/createx/src/\",\":devtools/=lib/devtools/packages/toolbox-foundry/src/\",\":ds-test/=lib/solidity-bytes-utils/lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/\",\":layerzero-v1/=lib/layerzero-v1/contracts/\",\":layerzero-v2/=lib/layerzero-v2/\",\":openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/\",\":openzeppelin/=lib/createx/lib/openzeppelin-contracts/contracts/\",\":rlc-faucet-contract/=lib/rlc-faucet-contract/contracts/\",\":solady/=lib/createx/lib/solady/\",\":solidity-bytes-utils/=lib/solidity-bytes-utils/\"]},\"sources\":{\"src/interfaces/IIexecLayerZeroBridge.sol\":{\"keccak256\":\"0x970b8202b88c17d02f048bdd4d7a48a99dfce8c935df7bc9997dbb4788613a77\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://8a83809f4a060d53937dc4c066c9d791e8e41ba4f732566382494bd8abafed5e\",\"dweb:/ipfs/QmTGqx1WrJPEbujozYHttaivxSAqFFbbM1PLEFNAVLspTZ\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.23+commit.f704f362"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"message","type":"string"}],"type":"error","name":"OperationNotAllowed"},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"pause"},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"pauseOutboundTransfers"},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"unpause"},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"unpauseOutboundTransfers"}],"devdoc":{"kind":"dev","methods":{"pause()":{"details":"Should only be callable by authorized accounts: PAUSER_ROLE."},"pauseOutboundTransfers()":{"details":"Should only be callable by authorized accounts: PAUSER_ROLE."},"unpause()":{"details":"Should only be callable by authorized accounts: PAUSER_ROLE."},"unpauseOutboundTransfers()":{"details":"Should only be callable by authorized accounts: PAUSER_ROLE."}},"version":1},"userdoc":{"kind":"user","methods":{"pause()":{"notice":"Pauses the contract, disabling `_credit` & `_debit` functions."},"pauseOutboundTransfers()":{"notice":"Pauses only the `_debit` function, allowing `_credit` to still work."},"unpause()":{"notice":"Unpauses the contract, re-enabling previously disabled functions (`_credit` & `_debit`)."},"unpauseOutboundTransfers()":{"notice":"Unpauses the `_debit` function, allowing outbound transfers again."}},"version":1}},"settings":{"remappings":["@createx/contracts/=lib/createx/src/","@layerzerolabs/lz-evm-messagelib-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/messagelib/","@layerzerolabs/lz-evm-protocol-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/protocol/","@layerzerolabs/lz-evm-v1-0.7/=lib/layerzero-v1/","@layerzerolabs/oapp-evm-upgradeable/=lib/devtools/packages/oapp-evm-upgradeable/","@layerzerolabs/oapp-evm/=lib/devtools/packages/oapp-evm/","@layerzerolabs/oft-evm-upgradeable/=lib/devtools/packages/oft-evm-upgradeable/","@layerzerolabs/oft-evm/=lib/devtools/packages/oft-evm/","@layerzerolabs/test-devtools-evm-foundry/=lib/devtools/packages/test-devtools-evm-foundry/","@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","@openzeppelin/foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/","createx/=lib/createx/src/","devtools/=lib/devtools/packages/toolbox-foundry/src/","ds-test/=lib/solidity-bytes-utils/lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/","layerzero-v1/=lib/layerzero-v1/contracts/","layerzero-v2/=lib/layerzero-v2/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/","openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/","openzeppelin/=lib/createx/lib/openzeppelin-contracts/contracts/","rlc-faucet-contract/=lib/rlc-faucet-contract/contracts/","solady/=lib/createx/lib/solady/","solidity-bytes-utils/=lib/solidity-bytes-utils/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/interfaces/IIexecLayerZeroBridge.sol":"IIexecLayerZeroBridge"},"evmVersion":"shanghai","libraries":{}},"sources":{"src/interfaces/IIexecLayerZeroBridge.sol":{"keccak256":"0x970b8202b88c17d02f048bdd4d7a48a99dfce8c935df7bc9997dbb4788613a77","urls":["bzz-raw://8a83809f4a060d53937dc4c066c9d791e8e41ba4f732566382494bd8abafed5e","dweb:/ipfs/QmTGqx1WrJPEbujozYHttaivxSAqFFbbM1PLEFNAVLspTZ"],"license":"Apache-2.0"}},"version":1},"storageLayout":{"storage":[],"types":{}},"ast":{"absolutePath":"src/interfaces/IIexecLayerZeroBridge.sol","id":88307,"exportedSymbols":{"IIexecLayerZeroBridge":[88306]},"nodeType":"SourceUnit","src":"39:979:192","nodes":[{"id":88285,"nodeType":"PragmaDirective","src":"39:24:192","nodes":[],"literals":["solidity","^","0.8",".22"]},{"id":88306,"nodeType":"ContractDefinition","src":"65:952:192","nodes":[{"id":88289,"nodeType":"ErrorDefinition","src":"103:42:192","nodes":[],"errorSelector":"67f2b6d3","name":"OperationNotAllowed","nameLocation":"109:19:192","parameters":{"id":88288,"nodeType":"ParameterList","parameters":[{"constant":false,"id":88287,"mutability":"mutable","name":"message","nameLocation":"136:7:192","nodeType":"VariableDeclaration","scope":88289,"src":"129:14:192","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":88286,"name":"string","nodeType":"ElementaryTypeName","src":"129:6:192","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"visibility":"internal"}],"src":"128:16:192"}},{"id":88293,"nodeType":"FunctionDefinition","src":"318:26:192","nodes":[],"documentation":{"id":88290,"nodeType":"StructuredDocumentation","src":"151:162:192","text":" @notice Pauses the contract, disabling `_credit` & `_debit` functions.\n @dev Should only be callable by authorized accounts: PAUSER_ROLE."},"functionSelector":"8456cb59","implemented":false,"kind":"function","modifiers":[],"name":"pause","nameLocation":"327:5:192","parameters":{"id":88291,"nodeType":"ParameterList","parameters":[],"src":"332:2:192"},"returnParameters":{"id":88292,"nodeType":"ParameterList","parameters":[],"src":"343:0:192"},"scope":88306,"stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"id":88297,"nodeType":"FunctionDefinition","src":"543:28:192","nodes":[],"documentation":{"id":88294,"nodeType":"StructuredDocumentation","src":"350:188:192","text":" @notice Unpauses the contract, re-enabling previously disabled functions (`_credit` & `_debit`).\n @dev Should only be callable by authorized accounts: PAUSER_ROLE."},"functionSelector":"3f4ba83a","implemented":false,"kind":"function","modifiers":[],"name":"unpause","nameLocation":"552:7:192","parameters":{"id":88295,"nodeType":"ParameterList","parameters":[],"src":"559:2:192"},"returnParameters":{"id":88296,"nodeType":"ParameterList","parameters":[],"src":"570:0:192"},"scope":88306,"stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"id":88301,"nodeType":"FunctionDefinition","src":"750:43:192","nodes":[],"documentation":{"id":88298,"nodeType":"StructuredDocumentation","src":"577:168:192","text":" @notice Pauses only the `_debit` function, allowing `_credit` to still work.\n @dev Should only be callable by authorized accounts: PAUSER_ROLE."},"functionSelector":"86843aa1","implemented":false,"kind":"function","modifiers":[],"name":"pauseOutboundTransfers","nameLocation":"759:22:192","parameters":{"id":88299,"nodeType":"ParameterList","parameters":[],"src":"781:2:192"},"returnParameters":{"id":88300,"nodeType":"ParameterList","parameters":[],"src":"792:0:192"},"scope":88306,"stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"id":88305,"nodeType":"FunctionDefinition","src":"970:45:192","nodes":[],"documentation":{"id":88302,"nodeType":"StructuredDocumentation","src":"799:166:192","text":" @notice Unpauses the `_debit` function, allowing outbound transfers again.\n @dev Should only be callable by authorized accounts: PAUSER_ROLE."},"functionSelector":"1657c3b8","implemented":false,"kind":"function","modifiers":[],"name":"unpauseOutboundTransfers","nameLocation":"979:24:192","parameters":{"id":88303,"nodeType":"ParameterList","parameters":[],"src":"1003:2:192"},"returnParameters":{"id":88304,"nodeType":"ParameterList","parameters":[],"src":"1014:0:192"},"scope":88306,"stateMutability":"nonpayable","virtual":false,"visibility":"external"}],"abstract":false,"baseContracts":[],"canonicalName":"IIexecLayerZeroBridge","contractDependencies":[],"contractKind":"interface","fullyImplemented":false,"linearizedBaseContracts":[88306],"name":"IIexecLayerZeroBridge","nameLocation":"75:21:192","scope":88307,"usedErrors":[88289],"usedEvents":[]}],"license":"Apache-2.0"},"id":192}
Loading