Skip to content

Commit 4d8947b

Browse files
committed
up
1 parent 46b16c1 commit 4d8947b

File tree

21 files changed

+6177
-0
lines changed

21 files changed

+6177
-0
lines changed

demo/README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
Demo of ethereum software
2+
3+
These video's give demos of how to use the ethereum tools. ([Up](..) [Home](..\..))
4+
5+
- [MetaMask](#metamask)
6+
- [Ethereum play](#ethereum-play)
7+
- [Remix](#remix)
8+
- [RPC API](#rpc-api)
9+
- [Others](#others)
10+
11+
# MetaMask
12+
13+
| Object | Instance
14+
| --------------- | ---------
15+
| Athereum and metamask | [Athereum and metamask](Athereum_and_metamask.html)
16+
17+
# Ethereum play
18+
19+
| Object | Instance
20+
| --------------- | ---------
21+
| Play - hello example | [Play - hello example](Play_hello_example.html)
22+
| Play - Transfer eth | [Play - Transfer eth with contract](Play_Transfer_eth_with_contract.html)
23+
| Play - oracle | [Play - Provable Temperature Oracle](Play_Provable_Temperature_Oracle.html)
24+
| Play - ERC20 token | [Play - ERC20](Play_ERC20.html)
25+
| Play - Deploy contract ERC721 | [Play - Deploy contract ERC721](Play_Deploy_contract_ERC721.html)
26+
| Play - Check ERC721 interface | [Play - Check ERC721 interface](Play_Check_ERC721_interface.html)
27+
| Play - Mint one ERC721 token | [Play - Mint one ERC721 token](Play_Mint_one_ERC721_token.html)
28+
| Play - See ERC721 token in Metamask | [Play - See ERC721 token in Metamask](Play_See_ERC721_token_in_Metamask.html)
29+
| Play - Unibright | [Play - Unibright](Play_Unibright.html)
30+
| Play - Natspec | [Play - Natspec](Play_Natspec.html)
31+
32+
# Remix
33+
34+
| Object | Instance
35+
| --------------- | ---------
36+
| Remix - compile and use Casino | [Remix - compile and use Casino](Remix_compile_and_use_Casino.html)
37+
| Remix - deploy ropsten | [Remix - deploy ropsten](Remix_deploy_ropsten.html)
38+
| Remix - natspec | [Remix - natspec](Remix_natspec.html)
39+
| Remix - debug | [Remix - debug](Remix_debug.html)
40+
| Remix - ropsten - debug gas | [Remix - ropsten - debug gas](Remix_ropsten_debug_gas.html)
41+
42+
# RPC API
43+
44+
| Object | Instance
45+
| --------------- | ---------
46+
| Curl - Check contract balance | [Check contract balance via RPC-curl](Check_contract_balance_via_RPC_curl.html)
47+
| Check contract balance online | [Check contract balance via RPC-online](Check_contract_balance_via_RPC_online.html)
48+
| Websockets | [Use ganache-cli Windows WS](Use_ganache_cli_Windows_WS.html)
49+
| Subscriptions | [Use ganache-cli Windows WS Subscriptions](Use_ganache_cli_Windows_WS_Subscriptions.html)
50+
51+
# Others
52+
53+
| Object | Instance
54+
| --------------- | ---------
55+
| Test Eth | [Get Ropsten ETH via Faucet](Get_Ropsten_ETH_via_Faucet.html)
56+
| web3.js 0.2 | [Use web3 0.2 from chrome console with MetaMask](Use_web3_0.2_from_chrome_console_with_MetaMask.html)
57+
| web3.js 1.0 | [Use web3 1.0 from chrome console with MetaMask](Use_web3_1.0_from_chrome_console_with_MetaMask.html)
58+
| Load chain | [Load geth goerli windows](Load_geth_goerli_windows.html)
59+
| Publish source | [Publish on etherscan and interact](Publish_on_etherscan_and_interact.html)
60+
| Find ERC721 token in Opensea | [Find ERC721 token in Opensea](Find_ERC721_token_in_Opensea.html)
61+
| Piet - Unibright | [Piet - Unibright](Piet_Unibright.html)
62+
| Aragon - create company | [Aragon - create company](Aragon_create_company.html)
63+
| Create ERC20 via web | [Create ERC20 via web](Create_ERC20_via_web.html)
64+
| Geth Prometheus Grafana | [Geth Prometheus Grafana](Geth_Prometheus_Grafana.html)
65+

demo/a.txt

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
function Test1(x) {
2+
console.log(x);
3+
}
4+
5+
Test2 = y => console.log(y);
6+
7+
Test1(1);
8+
9+
Test2(2);
10+
11+
(z => console.log(z))(3)
12+
13+
// npm install node-fetch
14+
const fetch = require('node-fetch');
15+
16+
async function asyncFunction() {
17+
const Response = await fetch('https://chainid.network/chains.json');
18+
const content = await Response.json();
19+
console.log(content[0].name);
20+
}
21+
asyncFunction();
22+
// npm install node-fetch
23+
const fetch = require('node-fetch');
24+
25+
fetch('https://chainid.network/chains.json2')
26+
.then( Response => Response.json())
27+
.catch(err => console.error('Catch 1: fetch failed', err.message))
28+
.then( content => console.log(content[0].name))
29+
.catch(err => console.error('Catch 2: fetch failed', err.message))
30+
31+
32+
33+
// const declarations are block scoped
34+
// const cannot be updated or re-declared
35+
36+
const greeter = "hey hi";
37+
console.log(greeter)
38+
{
39+
const greeter = "new block now";
40+
console.log(greeter)
41+
}
42+
console.log(greeter)
43+
// let is block scoped
44+
45+
let greeter = "hey hi";
46+
greeter = "say Hello instead";
47+
console.log(greeter)
48+
{
49+
const greeter = "new block now";
50+
console.log(greeter)
51+
}
52+
console.log(greeter){
53+
"requires": true,
54+
"lockfileVersion": 1,
55+
"dependencies": {
56+
"node-fetch": {
57+
"version": "2.6.0",
58+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
59+
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
60+
}
61+
}
62+
}
63+
64+
65+
var x=1;
66+
var y=4;
67+
68+
console.log(`x=${x} y=${y} x+y=${x+y}`);
69+
70+
71+
// npm install node-fetch
72+
const fetch = require('node-fetch');
73+
74+
function StepThree(content) {
75+
console.log(content[0].name);
76+
}
77+
78+
function StepTwo(Response) {
79+
Response.json().then(StepThree);
80+
}
81+
82+
fetch('https://chainid.network/chains.json').then(StepTwo);
83+
84+
// npm install node-fetch
85+
const fetch = require('node-fetch');
86+
87+
fetch('https://chainid.network/chains.json')
88+
.then( Response => Response.json())
89+
.then( content => console.log(content[0].name))
90+
91+
92+
93+
94+
// var declarations are globally scoped or function scoped
95+
// var variables can be re-declared (in the same scope)
96+
// var variables are initialized with undefined
97+
98+
var greeter = "hey hi";
99+
console.log(greeter)
100+
{
101+
var greeter = "new block now";
102+
console.log(greeter)
103+
}
104+
console.log(greeter)

demo/arrow.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function Test1(x) {
2+
console.log(x);
3+
}
4+
5+
Test2 = y => console.log(y);
6+
7+
Test1(1);
8+
9+
Test2(2);
10+
11+
(z => console.log(z))(3)
12+

demo/async.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// npm install node-fetch
2+
const fetch = require('node-fetch');
3+
4+
async function asyncFunction() {
5+
const Response = await fetch('https://chainid.network/chains.json');
6+
const content = await Response.json();
7+
console.log(content[0].name);
8+
}
9+
asyncFunction();

demo/b.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
arrow.js
2+
async.js
3+
catch.js
4+
const.js
5+
let.js
6+
template_literal.js
7+
then.js
8+
then_arrow.js
9+
var.js

demo/catch.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// npm install node-fetch
2+
const fetch = require('node-fetch');
3+
4+
fetch('https://chainid.network/chains.json2')
5+
.then( Response => Response.json())
6+
.catch(err => console.error('Catch 1: fetch failed', err.message))
7+
.then( content => console.log(content[0].name))
8+
.catch(err => console.error('Catch 2: fetch failed', err.message))
9+
10+
11+

demo/const.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// const declarations are block scoped
2+
// const cannot be updated or re-declared
3+
4+
const greeter = "hey hi";
5+
console.log(greeter)
6+
{
7+
const greeter = "new block now";
8+
console.log(greeter)
9+
}
10+
console.log(greeter)

demo/let.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// let is block scoped
2+
3+
let greeter = "hey hi";
4+
greeter = "say Hello instead";
5+
console.log(greeter)
6+
{
7+
const greeter = "new block now";
8+
console.log(greeter)
9+
}
10+
console.log(greeter)

0 commit comments

Comments
 (0)