https://github.com/e00dan/blockchain-workshop
Ethereum workshop
https://github.com/e00dan/blockchain-workshop
blockchain ethereum
Last synced: about 1 year ago
JSON representation
Ethereum workshop
- Host: GitHub
- URL: https://github.com/e00dan/blockchain-workshop
- Owner: e00dan
- Created: 2020-02-06T21:23:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-04T17:10:51.000Z (about 2 years ago)
- Last Synced: 2025-04-13T09:08:43.543Z (about 1 year ago)
- Topics: blockchain, ethereum
- Language: TypeScript
- Homepage:
- Size: 3.14 MB
- Stars: 7
- Watchers: 2
- Forks: 22
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ethereum workshop
Learn Ethereum development by creating application where you can bet what choice has the other party committed to the blockchain and win cryptocurrency in the process.
## Stages
| Stage | Status | Description |
| --- | --- | --- |
| [master](https://github.com/Kuzirashi/blockchain-workshop/tree/master) |  | Starting point |
| [stage-1](https://github.com/Kuzirashi/blockchain-workshop/tree/stage-1) |  | Create a function that saves user one address and accepts deposit |
| [stage-2](https://github.com/Kuzirashi/blockchain-workshop/tree/stage-2) |  | Allow two users to deposit 1 ETH and save their address |
| [stage-3](https://github.com/Kuzirashi/blockchain-workshop/tree/stage-3) |  | Add ability to save boolean along with the address |
| [stage-3.1](https://github.com/Kuzirashi/blockchain-workshop/tree/stage-3.1) |  | Move user one deposit function to constructor |
| [stage-4](https://github.com/Kuzirashi/blockchain-workshop/tree/stage-4) |  | Add prize distribution function, sends ETH after a correct guess |
| [stage-5](https://github.com/Kuzirashi/blockchain-workshop/tree/stage-5) |  | Encrypt user one choice with secret |
## Requirements
1. Node.js version `>= 16`
## Install and run
Install:
```
yarn
```
Build:
```
yarn build
// Contracts only
yarn compile
// TypeScript only
yarn build:ts
```
Start local Ethereum blockchain:
```
yarn start:ethereum
```
Run demo (`src/HeadTail.ts`):
```
yarn start
```
Test:
```
yarn test
```