Blockchain workshop

Install:

yarn

Build:

yarn build

// Contracts only
yarn compile

// TypeScript only
yarn build:ts

Start src/HeadTail.ts:

yarn start

Test:

yarn test

Make sure to start local blockchain first:

yarn start:ganache

Overview

Diagram

Stages

Stage Status Description
master Starting point
stage-1 Create a function that saves user one address and accepts deposit
stage-2 Allow two users to deposit 1 ETH and save their address
stage-3 Add ability to save boolean along with the address
stage-3.1 Move user one deposit function to constructor
stage-4 Add prize distribution function, sends ETH after a correct guess
stage-5 Encrypt user one choice with secret

Slides

Credits

Authored by Daniel Kmak.