gor-deploy/deploy/publish-pricing.md
2025-07-25 13:32:00 +05:30

3.4 KiB

publish-pricing

Setup

  • Clone the repo:

    git clone git@git.vdb.to:LaconicNetwork/gor-deploy.git
    cd gor-deploy/deploy
    
  • Build the Docker container:

    docker build -t cerc/laconic-registry-cli .
    
    # Builds image cerc/laconic-registry-cli:latest
    
  • Configure userKey in the registry CLI config:

    NOTE: User key should be of the account that owns the laconic authority

    nano config.yml
    

Publish Record

NOTE: Publishing record requires a bond with enough funds, if you don't have a bond check steps to create bond

Publish Record for Cost of alnt

  • alnt price calculation (reference: https://store.laconic.com):

    • Cost of 1 deployment is 12960 in terms of alnt or 5 in terms of USD
    • Hence, cost of 1 alnt comes out be 0.000386 USD rounded off to 6 decimals
  • Publish the record:

    ./laconic-cli.sh record publish --filename alnt-pricing.yml --bond-id <bond-id>
    
  • Get record info:

    ./laconic-cli.sh record get --id <record-id>
    

Publish Record for Cost of Deployment

  • Publish the record:

    ./laconic-cli.sh record publish --filename webapp-deployment-pricing.yml --bond-id <bond-id>
    
  • Get record info:

    ./laconic-cli.sh record get --id <record-id>
    

Set Record Name

NOTE: To set record name an authority is required, if you don't have an authority check steps to reserve a new authority

These record names should be under laconic authority

  • Set record name for cost of alnt record

    ./laconic-cli.sh name set lrn://laconic/pricing/alnt <record-id>
    
  • Set record name for cost of deployment record

    ./laconic-cli.sh name set lrn://laconic/pricing/webapp-deployment <record-id>
    

Delete Record Name

  • Delete record name:

    ./laconic-cli.sh name delete <record-name>
    

Create Bond (optional)

  • Create bond:

    ./laconic-cli.sh bond create --type alnt --quantity 100000000
    
  • Get bond info:

    ./laconic-cli.sh bond get --id <bond-id>
    

Reserve a New Authority (optional)

Below steps are used to reserve laconic authority

  • Reserve authority:

    ./laconic-cli.sh authority reserve laconic
    
  • Check authority info:

    ./laconic-cli.sh authority whois laconic
    
    • Note down auction ID from authority info as it is required in next steps
  • Get auction info:

    ./laconic-cli.sh auction get <auction-id>
    
  • Commit an auction bid:

    ./laconic-cli.sh auction bid commit <auction-id> 25000000 alnt
    
    # Path inside container
    Reveal file: /app/deploy/out/bafyreiay2rccax64yn4ljhvzvm3jkbebvzheyucuma5jlbpzpzd5i5gjuy.json
    
    • The commit phase lasts for 1 minute after reserving the authority so please commit the auction bid within this time period
  • Reveal bid:

    ./laconic-cli.sh auction bid reveal <auction-id> /app/deploy/out/bafyreiay2rccax64yn4ljhvzvm3jkbebvzheyucuma5jlbpzpzd5i5gjuy.json
    
    • The reveal phase starts as soon as commit phase ends and lasts for 1 minute so please reveal the bid within this time period
  • To use this published authority for setting record names, authority bond is also required

Set Authority Bond

  • Set authority bond after winning auction:

    ./laconic-cli.sh authority bond set laconic <bond-id>