Your reward based trivia platform built on Cardano.
Features • Project Structure • Quick Start • Testing The Validator • Documentation • Video Demo • Author • Acknowledgements
- Create Game: Create your own quiz game with customised settings, set the Ada amount you wish to pay to the game winner(s)
- Host Game: Host your game for players to join in and participate in your quiz.
- Join Game: Join a quiz game as a player using your Cardano wallet address, claim the top spot in the game leaderboard and win Ada reward.
Knowda/
│── frontend/ (Next.js Codebase)
│── smart-contract/ (Aiken Validator)
│── README.md (Project README)
1. Clone the repository:
git clone https://github.com/0xGIDHUB/Knowda2. Navigate to the frontend directory:
cd frontend3. Install dependencies:
npm install4. Setup the environment variables:
NEXT_PUBLIC_BLOCKFROST_PROVIDER=yourblockfrostproviderapi
NEXT_PUBLIC_SUPABASE_URL=knowdasupabaseurl
NEXT_PUBLIC_SUPABASE_ANON_KEY=knowdasupabasekey
NEXT_PUBLIC_MESH_WALLET_PRIVATE_KEY=knowdameshwalletprivatekey
4. Startup the project:
npm run devTo test the aiken validator, navigate to the smart contract directory:
cd smart-contractEnsure you have Aiken installed on your machine, then run the command:
aiken checkYou should see an output like this:
Compiling gideon/knowda 0.0.0 (.)
Compiling aiken-lang/stdlib v2.2.0 (./build/packages/aiken-lang-stdlib)
Compiling sidan-lab/vodka 0.1.10 (./build/packages/sidan-lab-vodka)
Collecting all tests scenarios across all modules
Testing ...
┍━ knowda ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
│ PASS [mem: 91780, cpu: 31639254] pay_first_winner_passes
│ PASS [mem: 63819, cpu: 20742467] pay_first_winner_fails_with_invalid_redeemer
│ PASS [mem: 40969, cpu: 13459414] pay_first_fails_with_no_tx_input
│ PASS [mem: 99339, cpu: 31851715] pay_first_winner_fails_with_multiple_input
│ PASS [mem: 92481, cpu: 31827303] pay_first_winner_fails_with_invalid_ada_amount
│ PASS [mem: 83302, cpu: 27513902] pay_first_winner_fails_with_invalid_tx_signer
┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6 tests | 6 passed | 0 failed
Summary 6 checks, 0 errors, 0 warningsNote
To learn more about about the smart contract, check out the validator script which contains a lot of helpful comments here.
Also, check out the mesh.js integration of the validator here.
Learn more about Knowda by checking out the documentation:
Check out the video demo of the knowda app here
Check out the live demo here
- Gideon - @0xGIDHUB
- Gimbalabs - Sign up