Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thlorenz/tictactoe
Solana TicTacToe built with the MetaStack
https://github.com/thlorenz/tictactoe
Last synced: 15 days ago
JSON representation
Solana TicTacToe built with the MetaStack
- Host: GitHub
- URL: https://github.com/thlorenz/tictactoe
- Owner: thlorenz
- Created: 2022-10-18T17:40:15.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T10:20:11.000Z (almost 2 years ago)
- Last Synced: 2024-10-18T04:39:36.997Z (19 days ago)
- Language: TypeScript
- Homepage:
- Size: 41 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TicTacToe
A [TicTacToe](https://en.wikipedia.org/wiki/Tic-tac-toe) game that runs on the
[Solana](https://solana.com/) blockchain.It is built using the _IronStack_ consisting of the following tools:
- [shank](https://github.com/metaplex-foundation/shank) which extracts IDL data from the Rust
program
- [solita](https://github.com/metaplex-foundation/solita) which generates a TypeScript SDK from
the extracted IDL
- [amman](https://github.com/metaplex-foundation/amman) which allows debugging and testing the
program on a local validator## Workshop
This workshop is implemented via pull requests. Each pull request adds a tool or feature and
explains how this was done and how you as a developer can experiment with the contract at the
current stage.In most cases this involves building the Rust program, updating the SDK and running some
functions against that program after it is deployed on a local validator via _amman_.### Prerequisites
- [install solana](https://docs.solana.com/cli/install-solana-cli-tools) in order to make a
local validator available on your machine as well as gain access to commands like
`cargo build-bpf`### Building the Rust Program
```sh
cd program && cargo build-bpf
```### Installing SDK Dependencies
```sh
cd ts && yarn install
```### Generating SDK
```sh
cd ts && yarn api:gen
```### Running SDK Tests
```sh
cd ts && yarn test
```## Steps
1. [adding solana rust program with processor method stubs](https://github.com/thlorenz/tictactoe/pull/1)
2. [setup SDK package](https://github.com/thlorenz/tictactoe/pull/2)
3. [preparing SDK generation](https://github.com/thlorenz/tictactoe/pull/3)
4. [generating IDL and TypeScript SDK](https://github.com/thlorenz/tictactoe/pull/4)
5. [setup amman and added initialize game test](https://github.com/thlorenz/tictactoe/pull/5)
6. [fix build](https://github.com/thlorenz/tictactoe/pull/6) (_you may skip that one_)
7. [add init game functionality](https://github.com/thlorenz/tictactoe/pull/7)
8. [amman account providers and renderers](https://github.com/thlorenz/tictactoe/pull/8)
9. [implement join player instruction](https://github.com/thlorenz/tictactoe/pull/9)
10. [resolving errors with cusper](https://github.com/thlorenz/tictactoe/pull/10)
11. [implement and test move instruction](https://github.com/thlorenz/tictactoe/pull/11)**NOTE**:
Each step/pull-request is tagged and thus you can check them out via:
`git switch -c pr/`.
For example to checkout step **2** you'd do: `git switch 2 -c pr/2`.
## Resources
- [Figma Board](https://www.figma.com/file/mjzOnSoQ6cOlmRhCLFYgxn/Shank%2FSolita%2FAmman-Solana-Development-Toolbelt)
used to explain the _MetaStack_.## LICENSE
MIT