From 98e70579e59fd4f9495dc2b4ed58f7a369174ba1 Mon Sep 17 00:00:00 2001 From: neeraj Date: Wed, 20 Mar 2024 11:12:31 +0530 Subject: [PATCH] Add steps to run registry cli test --- .env.example | 1 + README.md | 33 +++++++++++++++++++++++++++++++-- config.example.yml | 4 +++- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..683b140 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +TEST_ACCOUNT= diff --git a/README.md b/README.md index aa847f9..7eca4c0 100644 --- a/README.md +++ b/README.md @@ -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 build`. + * Create a `config.yml` file from [config.example.yml](./config.example.yml) file. ## Account Setup @@ -15,17 +17,44 @@ Run the chain: - In laconicd repo run: ```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: ```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`. +## 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 https://docs.evmos.org/users/basics/gas.html diff --git a/config.example.yml b/config.example.yml index a424c65..45b0c25 100644 --- a/config.example.yml +++ b/config.example.yml @@ -1,7 +1,9 @@ services: registry: - restEndpoint: 'http://localhost:1317' + restEndpoint: 'http://localhost:26657' gqlEndpoint: 'http://localhost:9473/api' userKey: bondId: chainId: laconic_9000-1 + gas: 200000 + fees: 200000photon