Skip to content

Commit a1572a4

Browse files
committed
add steps on how to create v3 daos
1 parent c82a522 commit a1572a4

File tree

1 file changed

+41
-2
lines changed

1 file changed

+41
-2
lines changed

release_process.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ Only the version stored in the previous step should be displayed.
184184

185185
**6. Try to create a new DAO using the new factory - using Astro DAO:**
186186

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.
188190

189191
#### 1.3 Mainnet - using official factory account
190192

@@ -199,10 +201,47 @@ This should be done in the following order:
199201
- 1. testnet, using the official testnet factory account
200202
- 2. mainnet, using the official mainnet factory account
201203

204+
Assumptions:
205+
- the DAO v3 code will be a snapshot of the code from commit id 596f27a649c5df3310e945a37a41a957492c0322.
206+
202207
#### 2.1 Testnet - using official factory account
203208

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:**
204241

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.
205244

206245
#### 2.2 Mainnet - using official factory account
207246

208-
The process is very similar with 2.1.
247+
The process is very similar with 2.1.

0 commit comments

Comments
 (0)