loophe / blockchain-workshop

Ethereum and Nervos Layer 2 EVM workshops

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blockchain workshop

Branches

Name Description
godwoken-simple Nervos Layer 2 React + Truffle + TypeScript starter
godwoken-simple-js Nervos Layer 2 React (Create React App) + JavaScript starter
stage-1 - stage-5 Ethereum Solidity smart contracts workshop

Requirements

  1. Docker - required for compilation of smart contracts
  2. Node.js version >= 14

Install and run

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

Caution: Outdated diagram

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

About

Ethereum and Nervos Layer 2 EVM workshops


Languages

Language:TypeScript 48.6%Language:JavaScript 46.5%Language:Solidity 3.4%Language:EJS 1.3%Language:SCSS 0.2%