Skip to content

0xGIDHUB/Knowda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Knowda

Your reward based trivia platform built on Cardano.

FeaturesProject StructureQuick StartTesting The ValidatorDocumentationVideo DemoAuthorAcknowledgements

Features

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

Project Structure

Knowda/
│── frontend/ (Next.js Codebase)
│── smart-contract/ (Aiken Validator)
│── README.md (Project README)

Quick Start

1. Clone the repository:

git clone https://github.com/0xGIDHUB/Knowda

2. Navigate to the frontend directory:

cd frontend

3. Install dependencies:

npm install

4. 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 dev

Testing The Validator

To test the aiken validator, navigate to the smart contract directory:

cd smart-contract

Ensure you have Aiken installed on your machine, then run the command:

aiken check

You 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 warnings

Note

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.

Documentation

Learn more about Knowda by checking out the documentation:

Video Demo

Check out the video demo of the knowda app here

Check out the live demo here

Author

Acknowledgements

About

A reward based trivia platform built on Cardano

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages