You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[iExec PoCo registries](./docs/uml/class-uml-dir-registries.svg)
32
34
-[iExec PoCo libraries](./docs/uml/class-uml-dir-libs.svg)
33
-
-[iExec PoCo modules](./docs/uml/class-uml-dir-modules.svg)
35
+
-[iExec PoCo modules (facets)](./docs/uml/class-uml-dir-facets.svg)
34
36
35
37
## Documentation
36
38
37
39
-[Solidity API documentation](./docs/solidity/index.md)
40
+
<!-- TODO update with new documentation URL -->
38
41
-[Full PoCo documentation](https://protocol.docs.iex.ec/key-concepts/proof-of-contribution)
39
42
40
43
## Audits
@@ -45,7 +48,7 @@ All contract audit files can be found in [audit/](./audit/) folder.
45
48
46
49
## Configure a deployment
47
50
48
-
Starting from version 5, the PoCo uses a modular design based on [ERC1538](https://github.com/ethereum/EIPs/issues/1538). The migration scripts and tests will use different modules and deployment process depending on the required configuration. In particular, the configuration can use a [create2 factory](https://github.com/iExecBlockchainComputing/iexec-solidity/blob/master/contracts/Factory/GenericFactory.sol) for the deployment, and enable native token or ERC20 token based escrow depending on the targeted blockchain. This means that the codebase is the same on public blockchains (ERC20 based RLC) and dedicated sidechains (Native token based RLC).
51
+
Starting from version 5, the PoCo uses a modular design based on [ERC-2535](https://eips.ethereum.org/EIPS/eip-2535). The migration scripts and tests will use different modules (facets) and deployment process depending on the required configuration. In particular, the configuration can use a [create2 factory](https://github.com/iExecBlockchainComputing/iexec-solidity/blob/master/contracts/Factory/GenericFactory.sol) for the deployment, and enable native token or ERC20 token based escrow depending on the targeted blockchain. This means that the codebase is the same on public blockchains (ERC20 based RLC) and dedicated sidechains (Native token based RLC).
49
52
50
53
The configuration file is located in `./config/config.json`.
51
54
@@ -69,15 +72,15 @@ If you want to deploy the iExec PoCo V5 smart contracts on a new blockchain, the
Environment variable can be used to alter the configuration of a deployment:
72
-
-**SALT**: if set, the `SALT`envvar will overwrite the salt parameter from the config. This can be useful to distinguish different deployments without modifying the config.
75
+
-**SALT**: if set, the `SALT`env var will overwrite the salt parameter from the config. This can be useful to distinguish different deployments without modifying the config.
73
76
74
77
Additionally, the migration process will look for some smart contracts before deploying new instances. This is true of the application, dataset and workerpool registries. Thus, if different marketplaces are deployed to the same network, they will share these registries.
75
78
76
79
# Development
77
80
78
81
## Build
79
82
80
-
The PoCo smart contracts are in the `./contracts` folder. Json artifacts, containing the contracts bytecode and ABI can be found in the `./build` folder. In case you need to regenerate them, you can use the following command:
83
+
The PoCo smart contracts are in the `contracts/` folder. Json artifacts, containing the contracts bytecode and ABI can be found in the `artifacts/` folder. In case you need to regenerate them, you can use the following command:
81
84
```
82
85
npm install
83
86
npm run build
@@ -114,7 +117,7 @@ The automatic testing command uses the Hardhat network by default to run the tes
114
117
If your blockchain listen to a port that is not 8545, or if the blockchain is on a different node, update the `hardhat.config.ts` configuration (network ports, accounts with mnemonic, ..) accordingly to the [Hardhat Configuration](https://hardhat.org/hardhat-runner/docs/config) documentation.
115
118
3. Run tests
116
119
```
117
-
npm run test
120
+
npm run test -- --network <networkUrl>
118
121
```
119
122
120
123
## Deploy
@@ -123,7 +126,7 @@ The iExec PoCo contracts support automated deployment through both command-line
123
126
124
127
### Command Line Deployment
125
128
126
-
You can deploy the smart contracts according to the [deploy/0_deploy.ts](./deploy/0_deploy.ts) content. This will automatically save some addresses of the deployed artifacts to the `./deployments` folder.
129
+
You can deploy the smart contracts according to the [deploy/0_deploy.ts](./deploy/0_deploy.ts) content. This will automatically save addresses of the deployed artifacts to `deployments/` folder.
127
130
128
131
To deploy using the CLI:
129
132
@@ -132,7 +135,7 @@ To deploy using the CLI:
132
135
3. Run the deployment using:
133
136
134
137
```
135
-
npx hardhat deploy --network <yournetworkname>
138
+
npm run deploy -- --network <yournetworkname>
136
139
```
137
140
138
141
Example with custom salt:
@@ -142,12 +145,12 @@ SALT=0x0000000000000000000000000000000000000000000000000000000000000001 npx hard
142
145
```
143
146
144
147
145
-
### Manual Verification
148
+
### Verification
146
149
147
-
To manually verify contracts:
150
+
To verify contracts:
148
151
149
152
```
150
-
npx hardhat run ./scripts/verify.ts --network <yournetworkname>
153
+
npm run verify:all -- --network <yournetworkname> # e.g. arbitrum
151
154
```
152
155
153
156
This script automatically reads all deployed contract addresses and their constructor arguments from the deployment artifacts and verifies them on the relevant block explorer.
0 commit comments