Add instructions to run CLI tests #58

Merged
nabarun merged 3 commits from deep-stack/laconic-registry-cli:nv-update-readme into laconic2 2024-03-21 11:19:15 +00:00
3 changed files with 35 additions and 3 deletions
Showing only changes of commit 98e70579e5 - Show all commits

1
.env.example Normal file
View File

@ -0,0 +1 @@
TEST_ACCOUNT=

View File

@ -6,6 +6,8 @@ CLI utility written in TS, used to interact with laconicd. Depends on [registry-
* Run `yarn` to install all dependencies. * Run `yarn` to install all dependencies.
* Run `yarn build`.
* Create a `config.yml` file from [config.example.yml](./config.example.yml) file. * Create a `config.yml` file from [config.example.yml](./config.example.yml) file.
## Account Setup ## Account Setup
@ -15,17 +17,44 @@ Run the chain:
- In laconicd repo run: - In laconicd repo run:
```bash ```bash
TEST_AUCTION_ENABLED=true ./init.sh TEST_AUCTION_ENABLED=true ./scripts/init.sh
``` ```
Registering records in registry requires an account. To get account private key run: Registering records in registry requires an account. To get account private key run:
```bash ```bash
$ laconicd keys export mykey --unarmored-hex --unsafe laconic2d keys export alice --keyring-backend test --unarmored-hex --unsafe
``` ```
In `config.yml` file assign the account private key to `userKey`. In `config.yml` file assign the account private key to `userKey`.
## Run test
* Create .env file using .env.example
```bash
cp .env.example .env
```
* Get account address of test account
```bash
laconic2d keys list --keyring-backend test
# - address: laconic10er85pyd7ukw732e88fzv7k0jq205764hye2dx
# name: alice
# pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AsDoWlNIr3W013pOiwmopaB/SaWQj6r3g56xb2d9GxYK"}'
# type: local
```
Use the `address` field from the result and assign it in `TEST_ACCOUNT` field of `.env` file
* Run laconic registry cli test
```bash
yarn test
```
## Gas and Fees ## Gas and Fees
https://docs.evmos.org/users/basics/gas.html https://docs.evmos.org/users/basics/gas.html

View File

@ -1,7 +1,9 @@
services: services:
registry: registry:
restEndpoint: 'http://localhost:1317' restEndpoint: 'http://localhost:26657'
gqlEndpoint: 'http://localhost:9473/api' gqlEndpoint: 'http://localhost:9473/api'
userKey: userKey:
bondId: bondId:
chainId: laconic_9000-1 chainId: laconic_9000-1
gas: 200000
fees: 200000photon