Skip to content

(FORK) Typescript library with multiple functions to help configure new mango instance for a cluster

License

Notifications You must be signed in to change notification settings

solana-labs/configure_mango

 
 

Repository files navigation

Configure Mango - A faster and easier way to configure Mango Markets on a cluster

This code can be used to configure mango group, tokens, spot market, perp markets and oracles on local solana validator and create 50 mango user accounts. It will create authority.json which is keypair of authority file, accounts.json which contains all user data and ids.json which contains info about mango group.

The project also contains necessary binary files. You can always update the binary files by compiling from source and replacing the binaries locally. You have to apply bin/mango.patch to your mango repository to use it to create a local cluster. From the root directory of this project do:

How to use

To install all the dependencies :

yarn install

To start a solana test validator

sh scripts/start_test_validator.sh

Or To start a local solana validator

sh scripts/configure_local.sh

To configure mango

yarn ts-node index.ts

To run mango keeper (deprecated)

yarn ts-node keeper.ts

To create 50 users and store in the file accounts.json

ts-node create-users.ts 50 accounts.json

To refund users in account file with some sols

ts-node refund_users.ts accounts.json 

Pyth oracle is a mock it is a program which will just rewrite an account with a binary data.

About

(FORK) Typescript library with multiple functions to help configure new mango instance for a cluster

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 92.9%
  • Shell 7.0%
  • JavaScript 0.1%