This repository provides some essential tools and interfaces for developing Programs for the LASR network using Typescript. It provides a number of helpful types, classes, examples, and functions to aid in the building of LASR programs. Along with some helper functions The CLI is used to initialize, build, deploy, and call programs in the network from the terminal.
CLICK HERE TO LEARN MORE ABOUT LASR
CLICK HERE FOR A MORE IN-DEPTH GETTING STARTED GUIDE
CLICK HERE TO LEARN MORE ABOUT LASRCTL CLI
CLICK HERE TO LEARN MORE ABOUT PROGRAMS ON LASR
For a more detailed guide on getting started with your LASR project, including setting up your environment, initializing your project with lasrctl
, building, testing, and deploying your program, please refer to our Getting Started Guide.
- Node (>= v18)
- NPM / Yarn
mkdir your-project-name
cd your-project-name
npm init -y
npm install typescript --save-dev
npx tsc --init
npm install @versatus/versatus-javascript
npx lasrctl init # Choose blank, fungible-token, or faucet
npx lasrctl build example-program.ts
npx lasrctl test inputs
npx lasrctl deploy --author you --name myToken --symbol MYTOKEN --programName "My first token on LASR" --initializedSupply 10000000 --totalSupply 10000000 --inputs '{"imgUrl":"https://pbs.twimg.com/profile_images/1704511091236020224/aOByHnoK_400x400.jpg","conversionRate":"1","paymentProgramAddress":"0xa60c7238d98c7ecef8659a18c2e8c6265327f280"}' --network stable
Note: the program deploy may fail on it's first attempt. If so, try it once more
- Complete steps above.
- Go to https://faucet.versatus.io
- Import Secret Key into the wallet from the initialized
secret_key
in the.lasr
folder.
cat .lasr/wallet/keypair.json | jq -r '.[0].secret_key'
- Reload the faucet and start interacting with the network.