A heads or tails (cross and pile) on Solana. It's meant to serve as an example of how to use solrand, a randomness Oracle: https://github.com/evanmarshall/solrand
- Clone this repository
- Ensure that Anchor and all of its dependencies are installed: https://project-serum.github.io/anchor/getting-started/introduction.html
yarn install
- Rename the
Anchor.example.toml
toAnchor.toml
and update thewallet =
to your solana key. - Start the
solana-test-validator
in a different tab - In a separate folder (In order to run a mock Oracle):
- Install: https://github.com/evanmarshall/solrand
- Run
anchor build && anchor deploy
- Run
anchor build && anchor deploy
- Use the Program Id found from the deploy. Replace
6urrPCjcrQ1xaxbAJGMTtvZfA9wbMqQbEArKnVUHhYTs
with your new Program Id. - Run the tests:
anchor test --skip-local-validator
- The most common problem with anchor is using the right version of node. I recommend install Node through NVM and using
Node v16.11.1
.
We use the GNU Affero General Public License v3.0 or later
license to ensure the community will always have access to all original and derivations of this program.
Full text here: https://spdx.org/licenses/AGPL-3.0-or-later.html