Skip to content

Latest commit

 

History

History
 
 

frontend

Getting started

0. Dependecies

The versions are the ones that work for me locally.

1. Install and build

From the root directory :

npm install
npx lerna run build --scope=@pythnetwork/staking

2. Start the test validator

cd staking
npm run localnet

This command spawns a validator at http://localhost:8899 with the staking program deployed in the genesis block at the address : pytS9TjG1qyAZypk7n8rw8gfW9sUaqqYyMhJQ4E7JCQ

Additionally it will :

  • Initialize and configure the staking program
  • Create the Pyth token at the address in staking/app/keypairs/pyth_mint.json
  • Airdrop SOL to two hypothetical users Alice and Bob (their keys are in staking/app/keypairs/)
  • Airdrop Pyth tokens to Alice and Bob
  • Create some stake accounts for Alice and Bob and deposit some tokens

3. Run the frontend in dev mode

Once that's done, keep the process running. Open a new terminal, change directory to frontend/ and run:

npm run dev