(Home)
Minor Blockchain on the hague university of applied sciences 20192020 Block D - IT: Programming Dapps
This is the guiding material.
(TOC) Introduction programming dapps
Preparations | Sheets | Assignments results here: web3assignments |
---|---|---|
day0sheets |
(TOC) Technical concept / Solidity / Create first smart contract (play)
Preparations | Video & sheets | Assignments | Background info |
---|---|---|---|
Follow: cryptozombies_1_Making_the_Zombie_Factory | record_day1 | 1) Install metamask | solidity_docs |
Read: mast_eth_01_What_is_Ethereum | 1) general info | 2) Get test ETH (Ropsten) | toshblocks |
Read: mast_eth_02_Ethereum_Basics | 2) arch_ethereum | 3) Experiment with: play_ed | solidity_overview |
Read: mast_eth_04_Keys_and_Addresses | 3) play_solidity | 4) Check out: play_ed_demo | solidity_details |
Read: mast_eth_06_Transactions | 4) metamask_sh | 5) Tryout example contracts: example_solidity1 | |
Read: mast_eth_07_Smart_contracts_and_Solidity | 5) athereum_sh | 6) Tryout example contracts: example_solidity2 | |
Read: mast_eth_14_Consensus | 7) Use athereum | ||
Supply: github account | 8) Create a smart contract and store it here: web3assignments |
(TOC) Remix / Solidity / Debug
Preparations | Video & sheets | Assignments | Background info |
---|---|---|---|
Follow: cryptozombies_2_Zombies_Attack_Their_Victims | record_day2 | 1) Experiment with: remix_ide | remix_docs |
Read: mast_eth_03_Ethereum_Clients | 1) general_day2 | 2) Check out: remix_demos | solidity_docs |
Read: mast_eth_05_Wallets | 2) remix_sh | 3) Tryout newer & remix contracts: example_solidity1 | solidity_overview |
Read: mast_eth_13_gas | 3) solidity_sh | 4) Use the debugger of Remix | solidity_details |
5) Adapt or create a smart contract with: error handling, mapping, events |
toshblocks | ||
6) Store the smart contract here: web3assignments |
(TOC) Install chain software / Ganache / RPC interface / Management
Preparations | Video & sheets | Assignments | Background info |
---|---|---|---|
Follow: cryptozombies_3_Adv_Sol_Con |
record_day3 (only afternoon) | 1) Install curl (see install_sw) | jsonrpc |
1) general_day3 | 2) Instal Build tools (see install_sw) | ||
2) rpc_sh | 3) Install node.js (see install_sw) | ||
3) testnet_sh | 4) Install wscurl & wscat (see install_sw) | ||
4) chainsw_sh | 5) Try out: rpc_examples | ||
6) Try out: grid_rpc_app | |||
7) Create a website (in the form a html file) to show transaction info. It’s like a mini explorer. It should show info which is in the blocks (based on blocknr and wsblocks) Store results here: web3assignments |
|||
8) Test curl, wscurl & rpc commands on other testworks | |||
9) Install Ganache (see install_sw) | |||
10) Configure and test Ganache with curl, wscurl & rpc commands |
|||
11) Tryout eth_accounts, eth_sendTransaction with ganache (see rpc_examples) | |||
12) Use Ethereum Play with Ganache | |||
13) Stop Ganache (to prevent conflicts with Geth) | |||
14) Install grid | |||
15) Configure and start Geth | |||
16) Test curl, wscurl & rpc commands on Geth | |||
17) Test Grid explorer | |||
18) Install Protheus and Grafana, configure and run. | |||
19) Store screenshots of working geth, explorer dashboard here: web3assignments |
(TOC) Node.js; ganache-cli; web3.js
Preparations | Video & sheets | Assignments | Background info |
---|---|---|---|
If you don’t know javascript: study javascript, via: jws or jover | record_day4 | Install node.js 12 (see install_sw) | web3js_docs |
For everyone: study jfeat | general_day4 | Install web3.js (see install_sw) | |
javascript_sh | Install vscode (see install_sw) | ||
node_sh | Try out .js examples: web3js_gh | ||
webjs_sh | Generate vanity address (with >= 5 lead characters) store here: web3assignments |
||
Deploy your smartcontact to ropsten (or simplified version) | |||
Make .js program to call functions of own smartcontract store here: web3assignments |
|||
Add function to get emit/logs of own smartcontract store here: web3assignments |
(TOC) Web3.js in (mobile) browser
Preparations | Video & sheets | Assignments | Background info |
---|---|---|---|
Read: mast_eth_12_Decentralized_Applications | record_day5 | 1) Try out examples: web3jsbr_gh | web3js_docs |
Follow: cryptozombies_6_App_Front_ends_Web3_js | general_day5 | 2) Install opera (see install_sw) | mmdocs |
webapps_sh | 3) Install metamask mobile (see install_sw) | ||
opera_sh | 4) Create website that interacts with your smart contract | ||
mm_mobile_sh | 5) Detect account & network changes, store screenshot: web3assignments |
||
6) Check it works with opera on pc, store screenshot: web3assignments |
|||
7) Check it works with opera on mobile, store screenshot of photo: web3assignments |
|||
8) Check it works with metamask mobile, store screenshot of photo: web3assignments |
|||
9) Store source here: web3assignments |
(TOC) Summarize everything sofar. The second part is an interactive coding session.
Preparations | Sheets | Assignments |
---|---|---|
record_day6a record_day6b |
See assignments of day 5 | |
general_day6 | ||
repeat_sh | ||
end2end_sh |
(TOC) Truffle / Oracle
Preparations | Video & sheets | Assignments | Background info |
---|---|---|---|
Read: mast_eth_11_Oracles | record_day7a record_day7b |
1) Instal truffle (see install_sw) | truffle_docs |
Follow: cryptozombies_4_Zombie_Battle_System | general_day7 | 2) Install git cmdline and hdwallet-provider (see install_sw) | |
truffle_sh | 3) Install bip39 (see install_sw) | ||
truffle_pack | 4) Create mnemonic | ||
oracles_sh | 5) Signup for a Infura key (seeinfura_reg) | ||
6) Adapt truffle-config.js, refer secrets | |||
7) Transfer test eth to account of mnemonic | |||
8) Experiment with truffle | |||
9) Adapt your smart contract to work with truffle | |||
Watch: provable_video | 10) Watch videos: provable_video | provable_docs | |
11) Experiment with provable in remix (see provable_ex) | |||
12) Experiment with provable in truffle (see provable_truffle) | |||
13) Adapt your smart contract to use an oracle & truffle | |||
14) Store resulting directory tree here: web3assignments |
(TOC) Solidity best practices / upgradability
Preparations | Video & sheets | Assignments | Background info |
---|---|---|---|
See background info | record_day8 | 1) Scan the background info documents goal: be aware of the different pattern areas |
consensys_best |
general_day8 | 2) Try out the pattern examples (see pattern_ex) |
maxwoe_pattern | |
patterns_sh | 3) Select an upgrade mechanism and one (1) other pattern store reason why you chose this in web3assignments |
i6mi6_pattern | |
4) Implement upgrade mechanism and one (1) other pattern in your smart contracts, store results in web3assignments |
fravoll_pattern | ||
5) Verify you smart contract on etherscan, store prove: web3assignments |
scottworks_pattern | ||
sol_pattern | |||
pautasso |
(TOC) Tokens (ERC20 / ERC721 / ERC777)
Preparations | Video & sheets | Assignments |
---|---|---|
record_day9 | ||
Follow: cryptozombies_5_ERC721_Crypto_Collectibles | general_day9 | Create a fungible token contract on rinkeby, store proof on web3assignments |
Read: mast_eth_10_Tokens | erc20_sh | Sent a few fungible tokens to 0xEA9a7c7cD8d4Dc3acc6f0AaEc1506C8D6041a1c5 |
erc721_sh | Create a non fungible token contract + image on rinkeby, store proof on web3assignments | |
erc777_sh | Mint a token and check it’s visible on OpenSea, store proof on web3assignments | |
Sent a non fungible token to 0xEA9a7c7cD8d4Dc3acc6f0AaEc1506C8D6041a1c5 |
(TOC) IPFS
Preparations | Video & sheets | Assignments | Background info |
---|---|---|---|
record_day10 | |||
general_day10 | 1) Run ipfs via Grid | ipfs_io | |
ipfs_sh | 2) Install ipfs-companion and experiment | ||
3) Create website to store & retrieve files on IPFS, store site in web3assignments |
|||
4) Run this website via IPFS (store link in web3assignments ) | |||
5) Bonus assignment: connect to domainname via _dnslink, store link in web3assignments |
(TOC) Security & Key management
Preparations | Sheets | Assignments |
---|---|---|
Read: mast_eth_09_Smart_contract_Security | record_day11 | Study swc_reg & test a few testcases with remix |
general_day11 | Study scsvs | |
security_sh | Adapt your smart contract with access control, store results here: web3assignments | |
Install surya & graphviz (see install_sw) and make drawings of your smart contracts, store results here: web3assignments | ||
key_management_sh | Make a treath model drawing of your dapp, store results here: web3assignments | |
Make an advice for users of your dapp for key management (text), store results here: web3assignments |
(TOC) Testing / code quality / natpec / verify / audit
Preparations | Video & sheets | Assignments |
---|---|---|
record_day12 | Add (at least 5) unit tests to your smart contract (either via remix, truffle solidity or truffle javascript). Store updated smart contract here: web3assignments | |
general_day12 | Run unit tests, make screen capture of result and store: web3assignments | |
tests | Add natspec comments to your smart contract and store: web3assignments | |
layout | Run Remix Static analysis on your smart contract, store proof: web3assignments | |
sectests | Run Remix Mythx on your smart contract, store proof: web3assignments | |
Run SmartCheck (see install_sw) on your smart contract, store proof: web3assignments | ||
Install ethlint (see install_sw) and run ethlint on your smart contract, store proof: web3assignments |
(TOC) Ethereum Name Service
Preparations | Video & sheets | Assignments |
---|---|---|
Follow: mast_eth_12_Decentralized_Applications | record_day13 | register ENS name (on testnetwork), connect it to your smart contract, use it in your website to address the contract; store updated sources: web3assignments |
general_day13 | register ENS name (on testnetwork), connect it to your IPFS site, use to access the website. Store name & screen shot: web3assignments | |
ens | experiment with Solidity 6 constructions. | |
solidity6 |
(TOC) Multisigs and Wallets
Preparations | Video & sheets | Assignments |
---|---|---|
record_day14 | Create gnosis multisig for teams (on rinkeby), send some test eth and send it back. Store proof on: web3assignments | |
general_day14 | Install gnosis safe (chrome plugin & mobile app) (the gnosis safe android version for rinkeby can be found here: https://github.com/gnosis/safe-android/releases ) | |
multisig | Implement web3connect in your app | |
wallets | Connect to your app via gnosis safe & web3connect. Check your app functions as expectected (and fix if neccesary), store updated source & proof of tests: web3assignments | |
Verify that mnemonic of your metamask leads to your ethereum address via get_address_from_mnemonic.js (no need to store) |
(TOC) Combine everything
Preparations | Sheets | Assignments |
---|---|---|
- | general_day15 | Combine everything you have learned to create a usable dapp, store results here: web3assignments |
arch_complete |
Here you can find other resources: