Skip to content

Commit af14640

Browse files
authored
Release v6.0.0 (#254)
2 parents 57b7774 + f7c634b commit af14640

File tree

270 files changed

+49743
-10234
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

270 files changed

+49743
-10234
lines changed

.env.template

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Also defined in Github environments
2+
DEPLOYER_PRIVATE_KEY=
3+
EXPLORER_API_KEY=
4+
IS_VERIFICATION_API_V2=
5+
ARBISCAN_API_KEY=
6+
7+
# Local development
8+
FUJI_RPC_URL=
9+
ARBITRUM_SEPOLIA_RPC_URL=

.github/workflows/deploy.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Deploy PoCo Contracts
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
network:
7+
description: 'Network'
8+
required: true
9+
type: choice
10+
options:
11+
- hardhat
12+
- arbitrumSepolia
13+
- arbitrum
14+
- avalancheFujiTestnet
15+
- bellecour
16+
default: 'hardhat'
17+
18+
jobs:
19+
# Build and test before deploying.
20+
build-and-test:
21+
uses: ./.github/workflows/main.yml
22+
23+
deploy:
24+
needs: build-and-test
25+
runs-on: ubuntu-latest
26+
permissions:
27+
contents: write # Required for saving deployment
28+
environment: ${{ inputs.network }} # Use the selected environment
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Set up Nodejs
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: 20
37+
cache: 'npm' # Cache dependencies
38+
39+
- name: Install dependencies
40+
run: npm ci
41+
42+
- name: Build
43+
run: npm run build
44+
45+
# TODO activate later.
46+
# - name: Run fork tests
47+
# run: |
48+
# if [ "${{ inputs.network }}" == "arbitrumSepolia" ]; then
49+
# npm run test:arbitrumSepolia
50+
# elif [ "${{ inputs.network }}" == "avalancheFujiTestnet" ]; then
51+
# npm run test:fuji
52+
# fi
53+
54+
- name: Deploy contracts
55+
env:
56+
DEPLOYER_PRIVATE_KEY: ${{ secrets.DEPLOYER_PRIVATE_KEY }}
57+
RPC_URL: ${{ secrets.RPC_URL }}
58+
ARBISCAN_API_KEY: ${{ secrets.ARBISCAN_API_KEY }}
59+
# TODO: Use Etherscan V2 API
60+
# EXPLORER_API_KEY: ${{ secrets.EXPLORER_API_KEY }}
61+
# IS_VERIFICATION_API_V2: ${{ vars.IS_VERIFICATION_API_V2 }}
62+
run: npm run deploy -- --network ${{ inputs.network }}
63+
64+
- name: Update config.json with Diamond address
65+
if: inputs.network != 'hardhat'
66+
env:
67+
DEPLOYER_PRIVATE_KEY: ${{ secrets.DEPLOYER_PRIVATE_KEY }} # Fixes hardhat issue.
68+
run: npx hardhat run scripts/tools/update-config.ts --network ${{ inputs.network }}
69+
70+
- name: Save deployment artifacts and updated config
71+
if: inputs.network != 'hardhat'
72+
uses: stefanzweifel/git-auto-commit-action@v5
73+
with:
74+
commit_message: 'chore: Save deployment artifacts for ${{ inputs.network }} (run_id: ${{ github.run_id }})'
75+
file_pattern: 'deployments/${{ inputs.network }}/* config/config.json'
76+
commit_user_name: 'GitHub Actions Bot'
77+
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
78+
commit_author: 'GitHub Actions Bot <github-actions[bot]@users.noreply.github.com>'

.github/workflows/main.yml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
1+
name: PoCo Contracts CI
2+
13
on:
2-
push:
3-
branches:
4-
- feature/*
5-
- bugfix/*
6-
- develop
7-
- release/*
8-
- hotfix/*
9-
- main
10-
- v5
4+
pull_request:
5+
workflow_call:
6+
7+
concurrency:
8+
group: ${{ github.ref }}-ci
9+
cancel-in-progress: true
1110

1211
jobs:
13-
# Note: changing the name of the job disables Slither checks with the error:
14-
# Warning: Code scanning cannot determine the alerts introduced by this pull
15-
# request, because 1 configuration present on refs/heads/develop was not found:
16-
#
17-
# Actions workflow (main.yml)
18-
# ❓ .github/workflows/main.yml:coverage
19-
coverage:
12+
build-and-test:
2013
runs-on: ubuntu-latest
2114
steps:
2215
- name: Checkout
@@ -48,7 +41,7 @@ jobs:
4841
- name: Run static analysis with Slither
4942
uses: crytic/[email protected]
5043
with:
51-
target: "contracts/tools/testing/slither/"
44+
target: 'contracts/tools/testing/slither/'
5245
solc-version: '0.8.21'
5346
slither-args: --checklist --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/
5447
fail-on: none # TODO set this to high or other

.github/workflows/publish.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
name: Publish NPM Package
22

33
on:
4-
release:
5-
types: [published]
4+
push:
5+
tags:
6+
- 'v*'
67

78
jobs:
9+
build-and-test:
10+
uses: ./.github/workflows/main.yml
11+
812
publish:
9-
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/[email protected]
13+
needs: build-and-test
14+
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/[email protected]
1015
secrets:
1116
npm-token: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ build/*.json
2020
contracts/hardhat-dependency-compiler/
2121
deployments/*hardhat*
2222
deployments/dev-*
23+
24+
# Flattened Solidity file used to generate diagrams.
25+
flatten.sol

.prettierignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
artifacts/
3+
audit/
4+
build/
5+
cache/
6+
coverage/
7+
coverage.json
8+
deployments/
9+
node_modules/
10+
typechain/

.solcover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = {
2121
'tools/testing/ERC1271Mock.sol',
2222
'tools/testing/TestClient.sol',
2323
'tools/testing/TestReceiver.sol',
24-
'modules/delegates/SignatureVerifier.sol',
24+
'facets/SignatureVerifier.sol',
2525
],
2626
istanbulFolder: BASE_FOLDER,
2727
};

CHANGELOG.md

Lines changed: 91 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,102 @@
11
# Changelog
22

3-
## v5.5.1
3+
## vNEXT
44

5-
- Add Github Action CI in order to publish NPM package
5+
## v6.0.0 - Diamond Proxy Pattern (ERC-2535)
6+
7+
### What's new?
8+
9+
#### 🚨 Breaking changes
10+
The proxy architecture has been migrated from [ERC-1538 Transparent Contract Standard](https://eips.ethereum.org/EIPS/eip-1538) to [ERC-2535 Diamond Standard](https://eips.ethereum.org/EIPS/eip-2535).
11+
12+
> **Impact:**
13+
> - **No changes** to on-chain business logic or contract interfaces used by regular clients.
14+
> - Existing integrations that interact with contract functions will **continue to work without modification**.
15+
> - **Breaking change** applies only to how the proxy’s upgrade mechanism works and how contract structure is exposed to **indexers, explorers, or tooling** that previously relied on ERC-1538’s upgrade API.
16+
17+
💡 **Versioning note:**
18+
Technically, since public APIs for business logic did not change, this could be a **minor release** under Semantic Versioning.
19+
However, because the upgrade proxy standard changed and this could impact **indexers and tooling**, releasing as a **major** version ensures better visibility of this architectural shift.
20+
21+
##### ❌ Removed functions and events (ERC-1538):
22+
23+
- `function totalFunctions(...)`
24+
- `function functionByIndex(...)`
25+
- `function functionById(...)`
26+
- `function functionExists(...)`
27+
- `function functionSignatures(...)`
28+
- `function delegateFunctionSignatures(...)`
29+
- `function delegateAddress(...)`
30+
- `function delegateAddresses(...)`
31+
- `function updateContract(...)`
32+
- `event CommitMessage(...)`
33+
- `event FunctionUpdate(...)`
34+
35+
##### ✨ New functions (ERC-2535)
36+
37+
- `function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata)`
38+
- `function facets() external view returns (Facet[] memory)`
39+
- `function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory)`
40+
- `function facetAddresses() external view returns (address[] memory)`
41+
- `function facetAddress(bytes4 _selector) external view returns (address)`
42+
- `event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata)`
43+
44+
### ✍️ Updated contracts
45+
All contracts have been updated (formatting, renaming, …) but **no breaking changes**
46+
have been introduced to the business logic.
47+
48+
### 🚀 Deployment & network support
49+
- The PoCo protocol is now available on **Arbitrum One Mainnet**.
50+
51+
### More details
52+
53+
- Update docs and diagrams (#250)
54+
- Deploy on Arbitrum Mainnet (#249)
55+
- Add support for Arbitrum Mainnet (#248)
56+
- Publish NPM package for version `v5.6.0-rc1` (#247)
57+
- Deploy on Arbitrum Sepolia (#246)
58+
- Set owner at deployment (#245)
59+
- Use lib as storage. (#243)
60+
- Save `IexecLibOrders_v5` in config file (#242)
61+
- Migrate proxy to **Diamond pattern - ERC-2535** (#241):
62+
- Restore compatibility with iExec SDK. (#240)
63+
- Target latest EVM version (#239)
64+
- Adapt contracts file tree (#238)
65+
- Use namespaced storage (#236, #237)
66+
- Fix script folder (#235)
67+
- Format all solidity files (#233)
68+
- Replace ERC1538 wording by diamond Proxy wording (#229, #230, #234)
69+
- Update deployment CI (#228)
70+
- Format contracts (#227)
71+
- Remove ENS module (#225)
72+
- Add Diamond contract unit tests (#224)
73+
- Fix `fallback` and `receive` (#223)
74+
- Init contracts migration (#222)
75+
76+
## v5.5.1 - Fresh development environment
77+
78+
### What's new?
79+
80+
- Add some small optimizations to `IexecPoco2Delegate` contract (#167, #168).
81+
- Add support for CreateX factory.
82+
- Migrate to Ethers v6.
83+
- Migrate all Javascript files to Typescript.
84+
- Purge Truffle.
85+
- Migrate CI from Jenkins to Github Actions.
686

787
### Updated contracts
888

989
- [x] `IexecPoco2Delegate.sol`
1090

11-
### Features
91+
### More details
1292

13-
- Housekeeping (#207)
93+
- Release v5.5.1 #220
94+
- Add gitub action workflow for deployment (#218)
95+
- Rename Avalanche Fuji and Arbitrum Sepolia network configuration (#217)
96+
- Deploy on new testnet chains using CreateX factory (#216)
97+
- Add CreateX factory for new chain deployment (#215)
98+
- Add Github Action CI in order to publish NPM package (#214)
99+
- Housekeeping (#208)
14100
- Add Halborn "Poco v5.5 & Voucher v1.0" audit report (#205)
15101
- Refactor Factory deployer (#206)
16102
- Enable native tests on CI (#204)
@@ -60,7 +146,7 @@
60146
- kitty (#142, #144)
61147
- reopen (#135)
62148

63-
## v5.5.0
149+
## v5.5.0 - Deal sponsoring
64150

65151
### What's new?
66152

0 commit comments

Comments
 (0)