From 00cfd280c095273a0d3d5e045adcd1ae899ea1fc Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Thu, 24 Jul 2025 10:03:42 +0530 Subject: [PATCH] Update readme to publish required records --- deploy/pricing.yml | 6 +-- deploy/publish-pricing.md | 86 +++++++++++++++++++++++++++++---------- 2 files changed, 68 insertions(+), 24 deletions(-) diff --git a/deploy/pricing.yml b/deploy/pricing.yml index 3bf6bda..8fe991e 100644 --- a/deploy/pricing.yml +++ b/deploy/pricing.yml @@ -1,6 +1,6 @@ record: type: PricingRecord - for: "webapp-deployment" - amount: "5" - currency: "USD" + for: "" + amount: "" + currency: "" version: 1.0.0 diff --git a/deploy/publish-pricing.md b/deploy/publish-pricing.md index a46470e..44eb3c1 100644 --- a/deploy/publish-pricing.md +++ b/deploy/publish-pricing.md @@ -16,38 +16,66 @@ nano config.yml ``` -- Update `cost` and `currency` in [pricing.yml](./pricing.yml) file as required: - - ```bash - nano pricing.yml - ``` - ## Create Bond - Create bond: ```bash - npm run laconic bond create --type alnt --quantity 100000000 + npm run laconic -- bond create --type alnt --quantity 100000000 ``` - Get bond info: ```bash - npm run laconic bond get --id + npm run laconic -- bond get --id ``` -## Publish Record +## Publish Record for Cost of alnt -- Publish a record +- Update `for`, `cost` and `currency` fields in [pricing.yml](./pricing.yml) file: ```bash - npm run laconic record publish --filename pricing.yml --bond-id --gas 250000 --fees 250000alnt + ... + for: "alnt" + amount: "0.000385802" + currency: "USD" + ... + ``` + +- Publish the record: + + ```bash + npm run laconic -- record publish --filename deploy/pricing.yml --bond-id --gas 250000 --fees 250000alnt ``` - Get record info: ```bash - npm run laconic record get --id + npm run laconic -- record get --id + ``` + +## Publish Record for Cost of Deployment + +- Update `for`, `cost` and `currency` fields in [pricing.yml](./pricing.yml) file: + + ```bash + ... + for: "webapp-deployment" + amount: "12960" + currency: "alnt" + ... + ``` + +- Publish the record: + + ```bash + npm run laconic -- record publish --filename deploy/pricing.yml --bond-id --gas 250000 --fees 250000alnt + ``` + +- Get record info: + + ```bash + npm run laconic -- record get --id ``` ## Reserve a New Authority (optional) @@ -55,13 +83,13 @@ - Reserve authority: ```bash - npm run laconic authority reserve laconic + npm run laconic -- authority reserve laconic ``` - Check authority info: ```bash - npm run laconic authority whois laconic + npm run laconic -- authority whois laconic ``` - Note down auction ID from authority info as it is required in next steps @@ -69,13 +97,13 @@ - Get auction info: ```bash - npm run laconic auction get + npm run laconic -- auction get ``` - Commit an auction bid: ```bash - npm run laconic auction bid commit 25000000 alnt + npm run laconic -- auction bid commit 25000000 alnt Reveal file: ./out/bafyreiay2rccax64yn4ljhvzvm3jkbebvzheyucuma5jlbpzpzd5i5gjuy.json ``` @@ -83,21 +111,37 @@ - Reveal bid: ```bash - npm run laconic auction bid reveal ./out/bafyreiay2rccax64yn4ljhvzvm3jkbebvzheyucuma5jlbpzpzd5i5gjuy.json + npm run laconic -- auction bid reveal ./out/bafyreiay2rccax64yn4ljhvzvm3jkbebvzheyucuma5jlbpzpzd5i5gjuy.json ``` -## Set Authority Bond +### Set Authority Bond - Set authority bond after winning auction: ```bash - npm run laconic authority bond set laconic + npm run laconic -- authority bond set laconic ``` ## Set Record Name -- Set name: +NOTE: To set record name an authority with an authority bond is required + +- Set record name for cost of alnt record ```bash - npm run laconic name set lrn:///pricing/webapp-deployment + npm run laconic -- name set lrn:///pricing/alnt + ``` + +- Set record name for cost of deployment record + + ```bash + npm run laconic -- name set lrn:///pricing/webapp-deployment + ``` + +## Delete Record Name + +- Delete record name: + + ```bash + npm run laconic -- name delete ```