laconic-registry-cli/test/README.md
Prathamesh Musale 03422548a4
All checks were successful
Lint / lint (18.x) (push) Successful in 1m14s
Publish npm package to gitea / npm_publish (18.x) (release) Successful in 1m17s
Tests / cli_tests (18.x) (push) Successful in 7m42s
Add command to create an auction and add auction CLI tests (#83)
Part of [Service provider auctions](https://www.notion.so/Service-provider-auctions-a7b63697d818479493ec145ea6ea3c1c)

Examples:

```bash
# vickrey auction
laconic registry auction create --kind vickrey --commits-duration 60 --reveals-duration 60 --commit-fee 1000 --reveal-fee 1000 --minimum-bid 1000000
```

```bash
# provider auction
laconic registry auction create --kind provider --commits-duration 60 --reveals-duration 60 --commit-fee 1000 --reveal-fee 1000 --max-price 3000000 --num-providers 5

# Release provider auction funds
laconic registry auction release-funds --auction-id <auction-id>
```

Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
Reviewed-on: #83
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-09-25 13:57:55 +00:00

35 lines
732 B
Markdown

# Run CLI tests
* Follow the project `Setup` and `Account Setup` from root [README](./../README.md)
* Add laconic cmd to path
```bash
export PATH="$PWD/bin:$PATH"
```
* Create a .env file using [.env.example](./.env.example):
```bash
cp .env.example .env
```
* Get account address of test account:
```bash
laconicd 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 CLI tests:
```bash
yarn test
```