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:
To install all the dependencies :
yarn installTo start a solana test validator
sh scripts/start_test_validator.shOr To start a local solana validator
sh scripts/configure_local.shTo configure mango
yarn ts-node index.tsTo run mango keeper (deprecated)
yarn ts-node keeper.tsTo create 50 users and store in the file accounts.json
ts-node create-users.ts 50 accounts.jsonTo 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.