cross-pile-mod
v0.0.3
Published
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
Downloads
1
Readme
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
- 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
and6t7fjmgyNdoMJMftaZin9w2n6YGSB8tHbFvu22bqh1EY
with your new Program Id. - 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