Update readme for publishing records
This commit is contained in:
parent
083feb4e55
commit
a6f884e3c8
@ -1,7 +1,7 @@
|
||||
# Client-side environment variables must be prefixed with NEXT_PUBLIC_
|
||||
|
||||
# Solana Payment Configuration
|
||||
# TODO: Use different RPC URL or use browser wallet
|
||||
# TODO: Use different RPC URL
|
||||
NEXT_PUBLIC_SOLANA_RPC_URL=https://skilled-prettiest-seed.solana-mainnet.quiknode.pro/eeecfebd04e345f69f1900cc3483cbbfea02a158
|
||||
NEXT_PUBLIC_SOLANA_TOKEN_MINT_ADDRESS=71Jvq4Epe2FCJ7JFSF7jLXdNk1Wy4Bhqd9iL6bEFELvg
|
||||
NEXT_PUBLIC_SOLANA_TOKEN_SYMBOL=GOR
|
||||
|
23
README.md
23
README.md
@ -22,32 +22,33 @@ A simple Next.js frontend that allows users to pay in GOR tokens (configurable S
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Copy the `.env.local.example` file to `.env.local` and fill in the required variables:
|
||||
Copy the `.env.example` file to `.env.local` and fill in the required variables:
|
||||
|
||||
```bash
|
||||
cp .env.local.example .env.local
|
||||
cp .env.example .env.local
|
||||
```
|
||||
|
||||
Required environment variables:
|
||||
|
||||
Client-side (must be prefixed with NEXT_PUBLIC_):
|
||||
- `NEXT_PUBLIC_SOLANA_RPC_URL` - The RPC URL for the Solana blockchain
|
||||
- `NEXT_PUBLIC_SOLANA_RPC_URL` - The RPC URL for the Solana blockchain (SPL token transactions)
|
||||
- `NEXT_PUBLIC_SOLANA_TOKEN_MINT_ADDRESS` - The mint address of the SPL token to accept
|
||||
- `NEXT_PUBLIC_SOLANA_TOKEN_RECIPIENT_ADDRESS` - The Solana address that will receive token payments
|
||||
- `NEXT_PUBLIC_SOLANA_TOKEN_SYMBOL` - The token symbol to display (e.g., "GOR")
|
||||
- `NEXT_PUBLIC_SOLANA_TOKEN_DECIMALS` - The number of decimals for the token (e.g., 6)
|
||||
- `NEXT_PUBLIC_SOLANA_PAYMENT_AMOUNT` - The fixed payment amount required (e.g., 400)
|
||||
- `NEXT_PUBLIC_GORBAGANA_RPC_URL` - The RPC URL for the Gorbagana blockchain (native GOR transactions)
|
||||
- `NEXT_PUBLIC_ENABLE_NATIVE_GOR_TRANSFER` - Enable native GOR token transfers (true/false)
|
||||
- `NEXT_PUBLIC_SOLANA_TOKEN_RECIPIENT_ADDRESS` - The Solana address that will receive token payments
|
||||
- `NEXT_PUBLIC_EXAMPLE_URL` - Example URL to pre-fill in the URL form
|
||||
- `NEXT_PUBLIC_REGISTRY_CHAIN_ID` - The laconicd chain ID for the Laconic Registry
|
||||
- `NEXT_PUBLIC_REGISTRY_RPC_ENDPOINT` - The laconicd RPC endpoint for the Laconic Registry
|
||||
- `NEXT_PUBLIC_REGISTRY_GQL_ENDPOINT` - The laconicd GraphQL endpoint for the Laconic Registry
|
||||
- `NEXT_PUBLIC_ALNT_COST_LRN` - LRN for ALNT token pricing
|
||||
- `NEXT_PUBLIC_DEPLOYMENT_COST_LRN` - LRN for deployment cost pricing
|
||||
- `NEXT_PUBLIC_DOMAIN_SUFFIX` - Optional suffix to append to DNS names in the UI (e.g. ".example.com")
|
||||
- `NEXT_PUBLIC_EXAMPLE_URL` - Example URL to pre-fill in the URL form (e.g. "https://github.com/cerc-io/laconic-registry-cli")
|
||||
|
||||
Server-side:
|
||||
- `REGISTRY_CHAIN_ID` - The chain ID for the Laconic Registry
|
||||
- `REGISTRY_GQL_ENDPOINT` - The GraphQL endpoint for the Laconic Registry
|
||||
- `REGISTRY_RPC_ENDPOINT` - The RPC endpoint for the Laconic Registry
|
||||
- `REGISTRY_BOND_ID` - The bond ID to use for Laconic Registry records
|
||||
- `REGISTRY_AUTHORITY` - The authority for Laconic Registry LRNs
|
||||
- `REGISTRY_USER_KEY` - The private key for Laconic Registry transactions (also used for LNT transfers)
|
||||
- `APP_NAME` - The name of the application (used in record creation, defaults to "gor-deploy")
|
||||
- `DEPLOYER_LRN` - The LRN of the deployer
|
||||
|
||||
## Installation
|
||||
|
@ -1,14 +1,5 @@
|
||||
# Deploy
|
||||
|
||||
## Prerequisites
|
||||
|
||||
This project requires pricing records for cost of deployment and cost of alnt to be published
|
||||
|
||||
- Cost of deployment: `lrn://laconic/pricing/webapp-deployment`
|
||||
- Cost of alnt: `lrn://laconic/pricing/alnt`
|
||||
|
||||
If these records are not available, [follow these steps to publish them](./publish-pricing.md)
|
||||
|
||||
## Setup
|
||||
|
||||
### gor-deploy
|
||||
@ -30,10 +21,29 @@ If these records are not available, [follow these steps to publish them](./publi
|
||||
|
||||
- Configure `userKey` and `bondId` in the [registry CLI config](./config.yml):
|
||||
|
||||
NOTE: The bond id should be set as authority bond of `laconic-deploy` and user key should be of the account that owns the `laconic-deploy` authority (owner account address: `laconic1kwx2jm6vscz38qlyujvq6msujmk8l3zangqahs`)
|
||||
|
||||
```bash
|
||||
nano config.yml
|
||||
```
|
||||
|
||||
- This project requires pricing records for cost of deployment and cost of alnt to be published
|
||||
|
||||
- Cost of deployment: `lrn://laconic/pricing/webapp-deployment`
|
||||
- Cost of alnt: `lrn://laconic/pricing/alnt`
|
||||
|
||||
If these records are not available, [follow these steps to publish them](./publish-pricing.md)
|
||||
|
||||
- Check if these records are available by running following commands:
|
||||
|
||||
```bash
|
||||
# Check if `lrn://laconic/pricing/webapp-deployment` is available
|
||||
./laconic-cli.sh name resolve lrn://laconic/pricing/webapp-deployment
|
||||
|
||||
# Check if `lrn://laconic/pricing/alnt` is available
|
||||
./laconic-cli.sh name resolve lrn://laconic/pricing/alnt
|
||||
```
|
||||
|
||||
- Add configuration for registry operations:
|
||||
|
||||
```bash
|
||||
@ -51,6 +61,7 @@ If these records are not available, [follow these steps to publish them](./publi
|
||||
# Fill in the required values
|
||||
nano .app.env
|
||||
```
|
||||
<!-- TODO: Document relevant env variables -->
|
||||
|
||||
## Run
|
||||
|
||||
|
@ -19,15 +19,19 @@
|
||||
|
||||
- Configure `userKey` in the [registry CLI config](./config.yml):
|
||||
|
||||
NOTE: User key should be of the account that owns the `laconic` authority
|
||||
NOTE: User key should be of the account that owns the `laconic` authority (owner account address: `laconic13maulvmjxnyx3g855vk0lsv5aptf3rpxskynef`). If you don't have an authority check [steps to reserve a new authority](#reserve-a-new-authority-optional)
|
||||
|
||||
```bash
|
||||
nano config.yml
|
||||
```
|
||||
|
||||
## Publish Record
|
||||
## Publish Record and Set Record Name
|
||||
|
||||
NOTE: Publishing record requires a bond with enough funds, if you don't have a bond check [steps to create bond](#create-bond-optional)
|
||||
Publishing record requires a bond with enough funds (min. 10000000alnt ), if you don't have a bond check [steps to create bond](#create-bond-optional)
|
||||
|
||||
To set record name an authority is required, if you don't have an authority check [steps to reserve a new authority](#reserve-a-new-authority-optional)
|
||||
|
||||
Make sure, the record names are under `laconic` authority
|
||||
|
||||
### Publish Record for Cost of alnt
|
||||
|
||||
@ -47,6 +51,14 @@ NOTE: Publishing record requires a bond with enough funds, if you don't have a b
|
||||
./laconic-cli.sh record get --id <record-id>
|
||||
```
|
||||
|
||||
### Set Record Name
|
||||
|
||||
- Set record name for cost of alnt record
|
||||
|
||||
```bash
|
||||
./laconic-cli.sh name set lrn://laconic/pricing/alnt <record-id>
|
||||
```
|
||||
|
||||
### Publish Record for Cost of Deployment
|
||||
|
||||
- Publish the record:
|
||||
@ -61,17 +73,7 @@ NOTE: Publishing record requires a bond with enough funds, if you don't have a b
|
||||
./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](#reserve-a-new-authority-optional)
|
||||
|
||||
These record names should be under `laconic` authority
|
||||
|
||||
- Set record name for cost of alnt record
|
||||
|
||||
```bash
|
||||
./laconic-cli.sh name set lrn://laconic/pricing/alnt <record-id>
|
||||
```
|
||||
### Set Record Name
|
||||
|
||||
- Set record name for cost of deployment record
|
||||
|
||||
@ -79,20 +81,14 @@ These record names should be under `laconic` authority
|
||||
./laconic-cli.sh name set lrn://laconic/pricing/webapp-deployment <record-id>
|
||||
```
|
||||
|
||||
## Delete Record Name
|
||||
|
||||
- Delete record name:
|
||||
|
||||
```bash
|
||||
./laconic-cli.sh name delete <record-name>
|
||||
```
|
||||
- Now you should be able to use these records in the app
|
||||
|
||||
## Create Bond (optional)
|
||||
|
||||
- Create bond:
|
||||
|
||||
```bash
|
||||
./laconic-cli.sh bond create --type alnt --quantity 100000000
|
||||
./laconic-cli.sh bond create --type alnt --quantity 10000000
|
||||
```
|
||||
|
||||
- Get bond info:
|
||||
@ -111,6 +107,8 @@ Below steps are used to reserve `laconic` authority
|
||||
./laconic-cli.sh authority reserve laconic
|
||||
```
|
||||
|
||||
- After reserving authority, commit phase begins which lasts for 1 minute so please commit the bid following below steps within that time period
|
||||
|
||||
- Check authority info:
|
||||
|
||||
```bash
|
||||
@ -128,27 +126,21 @@ Below steps are used to reserve `laconic` authority
|
||||
- Commit an auction bid:
|
||||
|
||||
```bash
|
||||
./laconic-cli.sh auction bid commit <auction-id> 25000000 alnt
|
||||
./laconic-cli.sh auction bid commit <auction-id> 5000000 alnt
|
||||
|
||||
# Path inside container
|
||||
# Example file 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
|
||||
- The reveal phase starts as soon as commit phase ends and lasts for 1 minute so please reveal the bid within this time period
|
||||
|
||||
- Reveal bid:
|
||||
|
||||
```bash
|
||||
./laconic-cli.sh auction bid reveal <auction-id> /app/deploy/out/bafyreiay2rccax64yn4ljhvzvm3jkbebvzheyucuma5jlbpzpzd5i5gjuy.json
|
||||
./laconic-cli.sh auction bid reveal <auction-id> /app/deploy/out/<reaveal-file>.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:
|
||||
- Set authority bond after winning auction as it is required to use the published authority:
|
||||
|
||||
```bash
|
||||
./laconic-cli.sh authority bond set laconic <bond-id>
|
||||
|
Loading…
Reference in New Issue
Block a user