This repository contains the homework for the Bridge to Turbin3 course from risein.com.
The repository consists of multiple files, that should be run in the right order to ensure that the files and accounts were created and there is nothing missing.
Generates a keypair using the @solana/web3.js
library and prints the public and private keys to the console. The secret key is displayed as a Uint8Array
.
After running the command below, you should create a file dev-wallet.json and copy/paste the private key in there.
Please don't forget to add this file to you .gitignore
, so that you don't push it into the repository by accident.
Execution:
yarn keygen
Airdrops SOL into your wallet.
Execution:
yarn airdrop
Transfers a small amount of SOL to another wallet. I created a second file called dev-wallet2.json
with structure below, but you can also remove it and just add a public key. The choice is yours.
Execution:
yarn transfer
This is the final step. It:
- Takes the GitHub account name hardcoded in line 15.
- Writes it to the WBA program specified by the IDL in programs/wba_prereq.ts on devnet using the Anchor JS client.
- After completing the transaction, a link to the transaction is printed to the console.
Execution:
yarn enroll