Skip to content

Commit

Permalink
bootstrap command and remove jq dependency (#9)
Browse files Browse the repository at this point in the history
* bootstrap command and remove jq dependency

TODO: put more in the readme

* go first

* Update README.md
  • Loading branch information
bmperrea committed Sep 6, 2021
1 parent 4d84741 commit 65fd51a
Show file tree
Hide file tree
Showing 7 changed files with 980 additions and 22 deletions.
1 change: 0 additions & 1 deletion .tool-versions
@@ -1,3 +1,2 @@
nodejs 14.17.4
jq 1.6
golang 1.16.2
18 changes: 15 additions & 3 deletions Makefile
@@ -1,9 +1,21 @@
# prerequisites
# install golang https://golang.org/doc/install
# install docker https://docs.docker.com/get-docker/
# install node https://nodejs.org/en/download/

# for a quicker option on mac, you can use the homebrew based helper: `make bootstrap-homebrew`
bootstrap-homebrew:
which brew || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
which go || brew install go
which docker || brew cask install docker
which node || brew install node

contract-bindings: SHELL:=/usr/bin/env bash
contract-bindings: contracts/USDK.sol
npm install
npm run compile
cat build/contracts/UsdToken.json | jq -c .abi > build/USDK.abi
cat build/contracts/UsdToken.json | jq -r .bytecode > build/USDK.bin
cat build/contracts/UsdToken.json | ./node_modules/node-jq/bin/jq -c .abi > build/USDK.abi
cat build/contracts/UsdToken.json | ./node_modules/node-jq/bin/jq -r .bytecode > build/USDK.bin
docker run -v $(shell pwd):/sources ethereum/client-go:alltools-v1.10.6 abigen --type USDK \
--bin="/sources/build/USDK.bin" \
--abi="/sources/build/USDK.abi" \
Expand All @@ -16,4 +28,4 @@ run-backend:
@go run ./cmd/backend

run-frontend:
@cd webapp && npm start
@cd webapp && npm install && npm start
28 changes: 26 additions & 2 deletions README.md
@@ -1,6 +1,30 @@
# fintech-devcon-2021-stablecoin-workshop
Fintech DevCon 2021 Stablecoin Workshop

Start up the backend like
# Slides

`go run ./cmd/backend`
TODO: link

# Setup

- install golang https://golang.org/doc/install
- install docker https://docs.docker.com/get-docker/
- install node https://nodejs.org/en/download/

# Exercises

## One: Finish the smart contract and deploy it

Checkout `exercise-1` and follow the slides!

## Two: Create a mint transaction

Checkout `exercise-2` and follow the slides!

## Three: Explicitly Sign A Mint Transaction

Checkout `exercise-3` and follow the slides!

## Four Use MetaMask To Receive Tokens

Checkout `exercise-4` and follow the slides!
2 changes: 1 addition & 1 deletion build/USDK.bin

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/USDK.go

Large diffs are not rendered by default.

0 comments on commit 65fd51a

Please sign in to comment.