Skip to content

A simple heads or tails (cross and pile) on Solana

Notifications You must be signed in to change notification settings

someteamone/cross-pile

 
 

Repository files navigation

cross-pile-mod (Coin flip)

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

Installation & Usage

  1. Clone this repository
  2. Ensure that Anchor and all of its dependencies are installed: https://project-serum.github.io/anchor/getting-started/introduction.html
  3. yarn install
  4. Rename the Anchor.example.toml to Anchor.toml and update the wallet = to your solana key.
  5. Start the solana-test-validator in a different tab
  6. In a separate folder (In order to run a mock Oracle):
    1. Install: https://github.com/evanmarshall/solrand
    2. Run anchor build && anchor deploy
  7. Run anchor build && anchor deploy
  8. Use the Program Id found from the deploy. Replace 6urrPCjcrQ1xaxbAJGMTtvZfA9wbMqQbEArKnVUHhYTs and 6t7fjmgyNdoMJMftaZin9w2n6YGSB8tHbFvu22bqh1EY with your new Program Id.
  9. Run the tests: anchor test --skip-local-validator

Troubleshooting

Problems with Anchor

  • 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.

License

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

About

A simple heads or tails (cross and pile) on Solana

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 51.6%
  • TypeScript 47.6%
  • Shell 0.8%