Add playbook to setup cosmos multisig app (#6)
Part of https://www.notion.so/Create-stacks-for-mainnet-1f2a6b22d4728034be4be2c51decf94e Co-authored-by: IshaVenikar <ishavenikar7@gmail.com> Reviewed-on: #6 Co-authored-by: ishavenikar <ishavenikar@noreply.git.vdb.to> Co-committed-by: ishavenikar <ishavenikar@noreply.git.vdb.to>
This commit was merged in pull request #6.
This commit is contained in:
co-authored by
IshaVenikar
parent
40ac26bd78
commit
1886a9acf0
+109
@@ -188,6 +188,8 @@
|
||||
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR logs laconicd -f
|
||||
```
|
||||
|
||||
- The chain will start running after some time.
|
||||
|
||||
- Verify that validator and TMKMS pubkeys match
|
||||
|
||||
- Get validator pubkey on chain
|
||||
@@ -379,6 +381,113 @@
|
||||
rm $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR/data/laconicd-data/config/priv_validator_key.json
|
||||
```
|
||||
|
||||
- Copy the example variables file for cosmos-multisig app playbook:
|
||||
|
||||
```bash
|
||||
cp ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-vars.example.yml ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-vars.yml
|
||||
```
|
||||
|
||||
- Update env values in `cosmos-multisig-vars.yml` withyour node RPC URL
|
||||
|
||||
```bash
|
||||
next_public_node_addresses: '["http://localhost:26657"]'
|
||||
node_rest_endpoint: 'http://localhost:1317'
|
||||
next_public_is_http_enabled: true
|
||||
```
|
||||
|
||||
- Set envs:
|
||||
|
||||
```bash
|
||||
# Set multisig app deployment directory
|
||||
export MULTISIG_DEPLOYMENT_DIR=cosmos-multisig-deployment
|
||||
# Set path to custom network JSON file
|
||||
export NETWORK_JSON_PATH=~/cerc/laconicd-stack/config/network.json
|
||||
|
||||
# Set network mode to host so that browser app and backend can use the same node localhost RPC URL
|
||||
export USE_HOST_NETWORK=host
|
||||
|
||||
# Set local host URL for dgraph server
|
||||
export DGRAPH_URL=http://localhost:8080/graphql
|
||||
```
|
||||
|
||||
- Run playbook to setup cosmos multisig app
|
||||
|
||||
```bash
|
||||
ansible-playbook -v -i localhost, -c local ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml
|
||||
```
|
||||
|
||||
- Check logs to ensure that the app is running:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir $DATA_DIRECTORY/$MULTISIG_DEPLOYMENT_DIR logs -f
|
||||
```
|
||||
|
||||
- The app will be running on `http://localhost:3000/laconic`
|
||||
|
||||
### Create a multisig with both the validator accounts
|
||||
|
||||
- On opening the app, a prompt will be shown to add laconic network to you keplr wallet. Click on `Approve`
|
||||
|
||||
- Go to home and click on `I don't have a multisig`
|
||||
|
||||
- Add the addresses of your validators as member 1 and member 2
|
||||
|
||||
- Set the threshold to 2 out of 2 members (Both the validators should sign the TX to broadcast it)
|
||||
|
||||
- Click on `Submit` and `Create multisig`
|
||||
|
||||
- Copy your multisig address and send some funds to the address
|
||||
|
||||
```
|
||||
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR exec laconicd "laconicd tx bank send validator-2 <multisig_address> 1000000alnt --fees 2000alnt --keyring-backend test"
|
||||
```
|
||||
|
||||
### Create and sign transaction
|
||||
|
||||
- Add accounts in keplr wallet for signing the transaction
|
||||
|
||||
- Open keplr wallet and click on the user icon in the top right corner
|
||||
|
||||
- Click on `Add wallet`, then select `Import an existing wallet` and go to `Use recovery phrase or private key`
|
||||
|
||||
- Select the `Private key` tab and then paste the private key of the validator account and click on import
|
||||
|
||||
- Set a name for the wallet (used when connecting wallet to app for signing transaction) and click on next
|
||||
|
||||
- Search for `Laconic network` and select it, then click on `Save`
|
||||
|
||||
- Follow the above steps for the second validator account
|
||||
|
||||
- Go to `home`, paste your multisig address and click on `Use this multisig`
|
||||
|
||||
- You will see the multisig members and holdings for the address
|
||||
|
||||
- Click on `Create new transaction` and then click on `Bank Send` under `Add New Msg`
|
||||
|
||||
- Enter the recipient address ( Eg: `laconic1n4wa366kh0zxndwyq3kkse9ulz9jv9xukx3hy4`), amount to be transfered and memo (optional)
|
||||
|
||||
- Click on create transaction
|
||||
|
||||
- Go back to the multisig info page and scroll down to the `Transactions` section
|
||||
|
||||
- Click on `Verify identity` and connect the app to your validator account in the keplr wallet
|
||||
|
||||
- After approving the connection, you will see the list of transactions created by your multisig
|
||||
|
||||
- Click on your transaction and under `Choose wallet to sign`, click on connect keplr
|
||||
|
||||
- After connecting the wallet, click on `Sign transaction` and approve the transaction
|
||||
|
||||
- Go back to multisig info page, switch to the second validator account in keplr wallet and repeat the same process to sign the transaction with the second validator account
|
||||
|
||||
- Once the transaction is signed by both the validators, click on `Broadcast Transaction`.
|
||||
|
||||
- Confirm funds transfer by checking balance of recipient address
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR exec laconicd "laconicd query bank balances laconic1n4wa366kh0zxndwyq3kkse9ulz9jv9xukx3hy4"
|
||||
```
|
||||
|
||||
## Cleanup
|
||||
|
||||
- Remove deployments and other config files
|
||||
|
||||
Reference in New Issue
Block a user