testnet-laconicd-stack/scripts
Prathamesh Musale 9d92a20ab9 Add instructions to setup and run testnet L2 and Nitro deployments (#26)
Part of [Create a public laconicd testnet](https://www.notion.so/Create-a-public-laconicd-testnet-896a11bdd8094eff8f1b49c0be0ca3b8)

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
Co-authored-by: Neeraj <neeraj.rtly@gmail.com>
Reviewed-on: cerc-io/testnet-laconicd-stack#26
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-09-12 13:31:17 +00:00
..
src Add a script to generate stage1 participants and allocations with given validators (#25) 2024-08-19 10:12:29 +00:00
.env.example Add a script to get subscribed and onboarded laconicd accounts (#22) 2024-08-16 04:11:54 +00:00
.gitignore Add a script to get subscribed and onboarded laconicd accounts (#22) 2024-08-16 04:11:54 +00:00
.npmrc Add a script to get subscribed and onboarded laconicd accounts (#22) 2024-08-16 04:11:54 +00:00
package.json Add instructions to setup and run testnet L2 and Nitro deployments (#26) 2024-09-12 13:31:17 +00:00
README.md Add a script to generate stage1 participants and allocations with given validators (#25) 2024-08-19 10:12:29 +00:00
tsconfig.json Add a script to get subscribed and onboarded laconicd accounts (#22) 2024-08-16 04:11:54 +00:00
yarn.lock Add a script to get subscribed and onboarded laconicd accounts (#22) 2024-08-16 04:11:54 +00:00

scripts

Prerequisites

  • NodeJS >= v18.17.x

Instructions

  • Change to scripts dir:

    cd scripts
    
  • Install dependencies and build:

    yarn && yarn build
    
  • Create required env configuration:

    # Update the values as required
    # By default, live laconicd testnet (laconicd.laconic.com) endpoint is configured
    cp .env.example .env
    
  • Generate a list of onboarded participants and allocations with given list of validators:

    yarn participants-with-filtered-validators --validators-csv <validators-csv-file> --participant-alloc <participant-alloc-amount> --validator-alloc <validator-alloc-amount> --output <output-json-file> --output-allocs <output-allocs-json-file>
    
    # Example:
    # yarn participants-with-filtered-validators --validators-csv ./validators.csv --participant-alloc 200000000000 --validator-alloc 1000200000000000 --output stage1-participants-$(date +"%Y-%m-%dT%H%M%S").json --output-allocs stage1-allocs-$(date +"%Y-%m-%dT%H%M%S").json
    
  • Map subscribers to onboarded participants:

    yarn map-subscribers-to-participants --subscribers-csv <subscribers-csv-file> --output <output-csv-file>
    
    # Example:
    # yarn map-subscribers-to-participants --subscribers-csv subscribers.csv --output result-$(date +"%Y-%m-%dT%H%M%S").csv