@@ -184,7 +184,9 @@ Only the version stored in the previous step should be displayed.
184
184
185
185
** 6. Try to create a new DAO using the new factory - using Astro DAO:**
186
186
187
- Go to https://testnet.app.astrodao.com/all/daos and try to create a new DAO from the UI. It should use the new version of the factory code.
187
+ Go to https://testnet.app.astrodao.com/all/daos and try to create a new DAO from the UI. It should use the new version of the factory code.
188
+
189
+ Please note that the DAO itself is still v2. The only difference is that the DAO gets created through the v3 version of the factory.
188
190
189
191
#### 1.3 Mainnet - using official factory account
190
192
@@ -199,10 +201,47 @@ This should be done in the following order:
199
201
- 1 . testnet, using the official testnet factory account
200
202
- 2 . mainnet, using the official mainnet factory account
201
203
204
+ Assumptions:
205
+ - the DAO v3 code will be a snapshot of the code from commit id 596f27a649c5df3310e945a37a41a957492c0322.
206
+
202
207
#### 2.1 Testnet - using official factory account
203
208
209
+ ** 1. Checkout to the right commit id**
210
+ ``` bash
211
+ git checkout 596f27a649c5df3310e945a37a41a957492c0322
212
+ ```
213
+
214
+ ** 2. Build the DAO v3 code:**
215
+ ``` bash
216
+ ./build.sh
217
+ ```
218
+
219
+ ** 3. Use the code built at the previous step and store it inside the factory as the default code used for creating new DAOs:**
220
+ ``` bash
221
+ BYTES=' cat sputnikdao2/res/sputnikdao2.wasm | base64'
222
+ ```
223
+ ``` bash
224
+ near call sputnikv2.testnet store $( eval " $BYTES " ) --base64 --accountId sputnikv2.testnet --gas 100000000000000 --amount 10
225
+ ```
226
+
227
+ ** 4. Use the code hash returned from the previous step to store the metadata associated with the code:**
228
+ ``` bash
229
+ near call sputnikv2.testnet store_contract_metadata ' {"code_hash": "TBD", "metadata": {"version": "v3", "commit_id": "596f27a649c5df3310e945a37a41a957492c0322"}, "set_default": true}' --accountId sputnikv2.testnet
230
+ ```
231
+
232
+ ** 5. See all the contract versions stored inside the factory:**
233
+ ``` bash
234
+ near view sputnikv2.testnet get_contracts_metadata
235
+ ```
236
+ 2 versions should be displayed:
237
+ - v2 with commit id ` c2cf1553b070d04eed8f659571440b27d398c588 ` and hash ` ZGdM2TFdQpcXrxPxvq25514EViyi9xBSboetDiB3Uiq `
238
+ - v3 with commit id ` 596f27a649c5df3310e945a37a41a957492c0322 ` and hash ` TBD `
239
+
240
+ ** 6. Try to create a DAO v3 - using Astro DAO:**
204
241
242
+ Go to https://testnet.app.astrodao.com/all/daos and try to create a new DAO from the UI.
243
+ The DAO that gets created should be a brand new v3 DAO.
205
244
206
245
#### 2.2 Mainnet - using official factory account
207
246
208
- The process is very similar with 2.1.
247
+ The process is very similar with 2.1.
0 commit comments