This is the Repo for the Solana Program (aka Smart Contract) For the Front End project go to: https://github.com/cooperativamental/MateApp
- Follow this guide to install all the needed software
- Clone this repo:
git clone https://github.com/cooperativamental/mate.git
- Run a local validator
solana-test-validator
- Open another terminal, cd into the project's folder and install dependencies
cd mate && yarn
- Build the program
anchor build
- Set correct program id
anchor keys list
replace all ocurrences of Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS with the resulting key and save the files - Set localhost as target
solana config set --url http://localhost:8899
- Create a dev CLI wallet
solana-keygen new -o dev_account.json
- Airdrop some fake SOL to that wallet
solana airdrop 10 dev_account.json
- Deploy and run tests
anchor test --skip-local-validator
If all test pass you are all set up
PDA | Relevant Keys | Seeds |
---|---|---|
group | name: String | "group", name |
project | group: String, name: String, milestones: u8 | "project", name, group |
milestone(*) | - | "milestone", (project)name, (group)name, order: u8 |
(*) in This first version the milestone PDA isn´t implented, there is only one milestone per project, in the next iteration the milestone feature will be implemented.
Running cargo doc
in a terminal will outputs a folder named target/doc
wich contains very detailed documentation of the project and his depencies,
We recommend /target/doc/mate/index.html
as an entrypoint.