Skip to content

Commit d70505f

Browse files
committed
docs: Show users to use Option A
1 parent d30901a commit d70505f

File tree

1 file changed

+51
-49
lines changed

1 file changed

+51
-49
lines changed

_SETUP.md

Lines changed: 51 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -298,57 +298,9 @@ git submodule update --init --recursive
298298
make start-server
299299
```
300300
301-
* Terminal Tab 2: [Compile](https://docs.scrt.network/secret-network-documentation/development/readme-1/compile-and-deploy#compile-the-code). Note: Outputs contract.wasm or contract.wasm.gz file in the root directory being the ./SecretPath/TNLS-Gateways/secret/ folder. Using `make build-mainnet-reproducible` will remove contract.wasm so only the optimised contract.wasm.gz remains. Warning: If you only run `make build-mainnet` then you will get this error https://github.com/svub/nunya/issues/8 when deploying.
302-
303-
* Secret Gateway Contract. Note: Wait until the Docker container exists first.
304-
```
305-
make clean
306-
make build
307-
```
308-
* Note: If `wasm-opt` binary is required but not installed on macOS install it with `brew install binaryen` or on Linux with `apt install binaryen`
309-
* Note: Use `make build-mainnet-reproducible` to deploy to Testnet
310-
* Note: The default Makefile originally used `--features="debug-print"` but running that gives error `the package secret_gateway depends on secret-cosmwasm-std, with features: debug-print but secret-cosmwasm-std does not have these features.`. The reason why it was removed is mentioned here:
311-
* https://github.com/CosmWasm/cosmwasm/issues/1841
312-
* https://github.com/CosmWasm/wasmvm/pull/453
313-
* https://github.com/CosmWasm/cosmwasm/pull/1667
314-
* https://github.com/CosmWasm/cosmwasm/pull/1953
315-
* Solution:
316-
* https://github.com/CosmWasm/cosmwasm/blob/main/contracts/cyberpunk/tests/integration.rs#L126
317-
* TODO: For Production on mainnet, configure it to use a debug-print or debug_print with a custom feature flag and wrap use of `set_debug_handler` with it so debug logs aren't output in production.
318-
319-
* Note: Use existing secretdev Docker container that is running already.
320-
321-
* Copy compiled Secret Gateway contract to the Docker container
322-
```
323-
make copy-secret-gateway-contract-local
324-
```
325-
326-
* Store compiled Secret Gateway contract on Localhost (Localsecret network)
327-
```
328-
make store-secret-gateway-contract-local
329-
```
330-
* Optional: To enter the Docker container to interact manually with secretcli:
331-
```bash
332-
docker exec -it secretdev /bin/bash
333-
secretcli --help
334-
secretcli keys list
335-
ls /root/.secretd/config
336-
```
337-
338-
* Example output:
339-
```
340-
{"height":"0","txhash":"A5A2E9864A3F455AD503935AE739B4E898F71A5B5BFCDB7B7D6934942297223C","codespace":"","code":0,"data":"","raw_log":"","logs":[],"info":"","gas_wanted":"0","gas_used":"0","tx":null,"timestamp":"","events":[]}
341-
```
342-
* Note that in the Secret Localsecret chain logs it output `num_txs=1`:
343-
```
344-
11:43AM INF finalizing commit of block hash=9B39F1E7367B876F61E45CFD0DE3EC55CE59D140A4604E35622D8C6CDEE1BB66 height=115 module=consensus num_txs=1 root=371919C2BE93B7F0C2B81837770B871592793F8A74847C04593F27F8A62109A1
345-
```
346-
* TODO: Why didn't it output `"height":"115"` instead of `"height":"0"`?
347-
348-
* WIP - Option B
301+
* Terminal Tab 2: Option A (SecretJS) Compile, Upload, Instantiate:
349302
* Change back to the project root directory
350303
* Run the following on the local machine to copy the relevant environment variables to the remote machine
351-
* TODO - change deploy.ts into a different kind of configuration file?
352304
```
353305
REMOTE_IP=172.105.184.209
354306
SOURCE=/Users/luke/code/clones/github/svub/nunya/packages/hardhat/.env
@@ -399,6 +351,56 @@ git submodule update --init --recursive
399351
* View on Secret Localhost block explorer
400352
* Reference https://docs.scrt.network/secret-network-documentation/development/readme-1/compile-and-deploy
401353
354+
* IGNORE - Terminal Tab 2: Option B (SecretCLI) Compile, Upload, Instantiate:
355+
* [Compile](https://docs.scrt.network/secret-network-documentation/development/readme-1/compile-and-deploy#compile-the-code). Note: Outputs contract.wasm or contract.wasm.gz file in the root directory being the ./SecretPath/TNLS-Gateways/secret/ folder. Using `make build-mainnet-reproducible` will remove contract.wasm so only the optimised contract.wasm.gz remains. Warning: If you only run `make build-mainnet` then you will get this error https://github.com/svub/nunya/issues/8 when deploying.
356+
357+
* Secret Gateway Contract. Note: Wait until the Docker container exists first.
358+
```
359+
make clean
360+
make build
361+
```
362+
* Note: If `wasm-opt` binary is required but not installed on macOS install it with `brew install binaryen` or on Linux with `apt install binaryen`
363+
* Note: Use `make build-mainnet-reproducible` to deploy to Testnet
364+
* Note: The default Makefile originally used `--features="debug-print"` but running that gives error `the package secret_gateway depends on secret-cosmwasm-std, with features: debug-print but secret-cosmwasm-std does not have these features.`. The reason why it was removed is mentioned here:
365+
* https://github.com/CosmWasm/cosmwasm/issues/1841
366+
* https://github.com/CosmWasm/wasmvm/pull/453
367+
* https://github.com/CosmWasm/cosmwasm/pull/1667
368+
* https://github.com/CosmWasm/cosmwasm/pull/1953
369+
* Solution:
370+
* https://github.com/CosmWasm/cosmwasm/blob/main/contracts/cyberpunk/tests/integration.rs#L126
371+
* TODO: For Production on mainnet, configure it to use a debug-print or debug_print with a custom feature flag and wrap use of `set_debug_handler` with it so debug logs aren't output in production.
372+
373+
* Note: Use existing secretdev Docker container that is running already.
374+
375+
* Copy compiled Secret Gateway contract to the Docker container
376+
```
377+
make copy-secret-gateway-contract-local
378+
```
379+
380+
* Store compiled Secret Gateway contract on Localhost (Localsecret network)
381+
```
382+
make store-secret-gateway-contract-local
383+
```
384+
* Optional: To enter the Docker container to interact manually with secretcli:
385+
```bash
386+
docker exec -it secretdev /bin/bash
387+
secretcli --help
388+
secretcli keys list
389+
ls /root/.secretd/config
390+
```
391+
392+
* Example output:
393+
```
394+
{"height":"0","txhash":"A5A2E9864A3F455AD503935AE739B4E898F71A5B5BFCDB7B7D6934942297223C","codespace":"","code":0,"data":"","raw_log":"","logs":[],"info":"","gas_wanted":"0","gas_used":"0","tx":null,"timestamp":"","events":[]}
395+
```
396+
* Note that in the Secret Localsecret chain logs it output `num_txs=1`:
397+
```
398+
11:43AM INF finalizing commit of block hash=9B39F1E7367B876F61E45CFD0DE3EC55CE59D140A4604E35622D8C6CDEE1BB66 height=115 module=consensus num_txs=1 root=371919C2BE93B7F0C2B81837770B871592793F8A74847C04593F27F8A62109A1
399+
```
400+
* TODO: Why didn't it output `"height":"115"` instead of `"height":"0"`?
401+
* TODO: Why doesn't it output the CODE_ID and CODE_HASH? Use Option A instead until resolve this issue.
402+
403+
402404
###### Deploy Relayer of SecretPath on Localhost
403405
404406
* Reference: https://docs.scrt.network/secret-network-documentation/confidential-computing-layer/ethereum-evm-developer-toolkit/basics/cross-chain-messaging/secretpath/how-to-deploy-secretpath-on-your-chain

0 commit comments

Comments
 (0)