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
Environment variable can be used to alter the configuration of a deployment:
74
-
-**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.
75
76
76
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.
77
78
78
79
# Development
79
80
80
81
## Build
81
82
82
-
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:
83
84
```
84
85
npm install
85
86
npm run build
@@ -116,7 +117,7 @@ The automatic testing command uses the Hardhat network by default to run the tes
116
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.
117
118
3. Run tests
118
119
```
119
-
npm run test
120
+
npm run test -- --network <networkUrl>
120
121
```
121
122
122
123
## Deploy
@@ -125,7 +126,7 @@ The iExec PoCo contracts support automated deployment through both command-line
125
126
126
127
### Command Line Deployment
127
128
128
-
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.
129
130
130
131
To deploy using the CLI:
131
132
@@ -134,7 +135,7 @@ To deploy using the CLI:
134
135
3. Run the deployment using:
135
136
136
137
```
137
-
npx hardhat deploy --network <yournetworkname>
138
+
npm run deploy -- --network <yournetworkname>
138
139
```
139
140
140
141
Example with custom salt:
@@ -144,12 +145,12 @@ SALT=0x0000000000000000000000000000000000000000000000000000000000000001 npx hard
144
145
```
145
146
146
147
147
-
### Manual Verification
148
+
### Verification
148
149
149
-
To manually verify contracts:
150
+
To verify contracts:
150
151
151
152
```
152
-
npx hardhat run ./scripts/verify.ts --network <yournetworkname>
153
+
npm run verify:all -- --network <yournetworkname> # e.g. arbitrum
153
154
```
154
155
155
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