Cardano Plutus Tutorial #3: Game Project | Smart Contracts DApp and Haskell Explanation

In this video we will take everything we have learned and understand how to make our own guessing game DApp on the Plutus Playground.

In this project we will create a game where one user will lock up their lovelace with a password on the blockchain and another user has to guess it to redeem the it.

Some of the key concepts we will be looking at are:
1) Creating Datum and Reedemer classes to store data on the Cardano Blockchain
2) Receiving inputs from the user by setting up our Contract
3) Implementing and sending transactions with the user’s input

Along the way, we will be doing additional light explaination on some of the Haskell syntax that shows up in more detail.

For other similar video’s, check out our Cardano Plutls Playground Tutorial playlist:
https://www.youtube.com/playlist?list=PL53JxaGwWUqAE59_XRxhwDuN1QrBgbIav

00:00 – Intro
00:45 – Running the Game project in the simulator
02:22 – Setting up our Template Haskell code with Plutux TX
03:34 – Creating the Game object and defining the Datum and Redeemer type
06:19 – Creating the Validator script to release the funds
07:49 – Setting up code for the simulator
09:08 – Defining the Contract’s Schema to receive user input
11:33 – Defining the endpoints to receive user input
12:37 – Implementing the Lock endpoint
16:01 – Implementing the Guess endpoint
17:57 – Conclusion

Donate Ada: addr1qxws6z9qxkycclpxxpnkq202wxrlc7ke29zmpydj40a2z8aq4jx95m2pnvdrwrsrl5m30j0vce0w7k5zt0aeqzcsurwqulm5hc

(Visited 30 times, 1 visits today)

You might be interested in

LEAVE YOUR COMMENT

Your email address will not be published. Required fields are marked *

eos
EOS (EOS) 1,98 2,33%
aave
Aave (AAVE) 128,81 0,81%
the-graph
The Graph (GRT) 0,367473 5,71%
kusama
Kusama (KSM) 149,19 5,15%
waves
Waves (WAVES) 8,61 0,26%
dash
Dash (DASH) 83,42 4,53%
bitcoin
Bitcoin (BTC) 32.817,93 2,20%
ethereum
Ethereum (ETH) 2.159,82 1,23%
cardano
Cardano (ADA) 0,920956 0,21%
tether
Tether (USDT) 0,885535 0,08%
xrp
XRP (XRP) 0,536946 0,04%
solana
Solana (SOL) 81,08 2,79%
polkadot
Polkadot (DOT) 16,14 3,64%
usd-coin
USD Coin (USDC) 0,885535 0,09%
dogecoin
Dogecoin (DOGE) 0,125069 0,08%
uniswap
Uniswap (UNI) 9,18 1,90%
terra-luna
Terra (LUNA) 47,40 7,73%
litecoin
Litecoin (LTC) 95,23 1,18%
chainlink
Chainlink (LINK) 13,53 2,79%
bitcoin-cash
Bitcoin Cash (BCH) 259,53 2,55%
algorand
Algorand (ALGO) 0,852522 6,92%
matic-network
Polygon (MATIC) 1,46 6,63%
stellar
Stellar (XLM) 0,172788 0,19%
cosmos
Cosmos (ATOM) 26,19 4,21%
filecoin
Filecoin (FIL) 17,06 4,17%
tron
TRON (TRX) 0,050332 2,24%
ethereum-classic
Ethereum Classic (ETC) 22,01 4,57%
dai
Dai (DAI) 0,885535 0,24%
tezos
Tezos (XTZ) 2,60 2,62%
monero
Monero (XMR) 128,38 1,72%