ブロックチェーンハブ主催で開催しているブロックチェーン連続講義シリーズ「スマートコントラクトプログラミング」の第2回「イーサリアム(Ethereum)入門」のスライドです。2016年10月14日(金) に使用しました。
(Ethereum)(2)SFC / CSO[email protected](Ethereum) — (2) – 2016-10-14 – p.1/43
View Slide
1.2.3.4.5.(Ethereum) — (2) – 2016-10-14 – p.2/43
1.2.3.4.5.(Ethereum) — (2) – 2016-10-14 – p.3/43
1.(Ethereum) — (2) – 2016-10-14 – p.4/43
Vitalik Buterin, “Ethereum White Paper: A NEXTGENERATION SMART CONTRACT &DECENTRALIZED APPLICATION PLATFORM”12(Ethereum) — (2) – 2016-10-14 – p.5/43
2.Mac OS X (Yosemite 10.10.5) + HomebrewLinux (Ubuntu 14.04 Desktop)Windows 10geth (CLI) Ethereum-Wallet (GUI)Ethereum | NTT(Ethereum) — (2) – 2016-10-14 – p.6/43
URLhttp://goo.gl/Xjluar(Ethereum) — (2) – 2016-10-14 – p.7/43
gethGOhttps://github.com/ethereum/go-ethereum/wiki/Building-Ethereum#installation-instructionsgeth 1.4.17-stable$ geth -help(Ethereum) — (2) – 2016-10-14 – p.8/43
Ethereum-WalletGUIhttps://github.com/ethereum/mist/releasesDownloads ZIPgeth( )(Ethereum) — (2) – 2016-10-14 – p.9/43
genesis.json{"nonce": "0x00006d6f7264656e","difficulty": "0x200","mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578","coinbase": "0x0000000000000000000000000000000000000000","timestamp": "0x00","parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000","extraData": "0x","gasLimit": "0x2FEFD8","alloc": {}}“genesis.json”Windows geth.exe(Ethereum) — (2) – 2016-10-14 – p.10/43
genesis.json cdWindows geth.exe$ geth init genesis.json“successfully wrote genesis block and/or chain rule set”(Ethereum) — (2) – 2016-10-14 – p.11/43
$ geth --networkid 12345678 --port 50303 --maxpeers 0 --nodiscover console 2>> node.log>> exit$ tail -f node.log (Mac OS X, Linux)> Get-Content node.log -Wait -Tail 10 (Windows PowerShell)(Ethereum) — (2) – 2016-10-14 – p.12/43
Ethereum-Wallet“LAUNCH APPLICATION”(Ethereum) — (2) – 2016-10-14 – p.13/43
ADD ACCOUNT2(Ethereum) — (2) – 2016-10-14 – p.14/43
(ETHERBASE) Ether(Ethereum) — (2) – 2016-10-14 – p.15/43
geth> miner.start(2)true‘2’( CPU )> miner.stop()(Ethereum) — (2) – 2016-10-14 – p.16/43
node.logDAG (Directed Acyclic Graph)Ether(Ethereum) — (2) – 2016-10-14 – p.17/43
3.(Ethereum) — (2) – 2016-10-14 – p.18/43
(Ethereum) — (2) – 2016-10-14 – p.19/43
. . .(Ethereum) — (2) – 2016-10-14 – p.20/43
vs.(Ethereum) — (2) – 2016-10-14 – p.21/43
= run(Ethereum) — (2) – 2016-10-14 – p.22/43
EtherEthereumEOA : Externally-Owned AccountEther EVMEVM(Ethereum) — (2) – 2016-10-14 – p.23/43
EVM : Ethereum Virtual MachineGas(Ethereum) — (2) – 2016-10-14 – p.24/43
EVM::Solidity — JavaScriptLLL — Lisp(Ethereum) — (2) – 2016-10-14 – p.25/43
Soliditycontract metaCoin {mapping (address => uint) balances;function metaCoin() {balances[msg.sender] = 10000;}function sendCoin(address receiver, uint amount) returns(bool sufficient) {if (balances[msg.sender] < amount) return false;balances[msg.sender] -= amount;balances[receiver] += amount;return true;}}by hshimo(Ethereum) — (2) – 2016-10-14 – p.26/43
(Ethereum) — (2) – 2016-10-14 – p.27/43
4.(Ethereum) — (2) – 2016-10-14 – p.28/43
ADEPTADEPT : IBM IoT(Ethereum) — (2) – 2016-10-14 – p.29/43
(Ethereum) — (2) – 2016-10-14 – p.30/43
⇒(Ethereum) — (2) – 2016-10-14 – p.31/43
The DAO ( )The DAOSplit ( )360 ETH (50∼60 ) (6/17)( )( ; )(7/20 )(Ethereum) — (2) – 2016-10-14 – p.32/43
5.(Ethereum) — (2) – 2016-10-14 – p.33/43
ADD ACCOUNT 2(Ethereum) — (2) – 2016-10-14 – p.34/43
(1)CONTRACTSDEPLOY NEW CONTRACT(Ethereum) — (2) – 2016-10-14 – p.35/43
(2)&https://ethereum.github.io/browser-solidity/?#gist=21935dc37c5bfbe92e5a&version=soljson-v0.4.1-2016-09-08-8a057e3.js(Ethereum) — (2) – 2016-10-14 – p.36/43
(3)Pick a contract My Token_supply : 0 _name : BcH Coin_symbol : BcH _decimals : 0(Ethereum) — (2) – 2016-10-14 – p.37/43
DEPLOY TX( )12(Ethereum) — (2) – 2016-10-14 – p.38/43
(1)WALLETEther 1,000,000 BcHWALLET0 Ether(Ethereum) — (2) – 2016-10-14 – p.39/43
(2)Transfer Ether & Tokens1 BcHBcH CoinAMOUNT 1(Ethereum) — (2) – 2016-10-14 – p.40/43
(3)SEND TX(Ethereum) — (2) – 2016-10-14 – p.41/43
WALLETBcH Coin 1 BcH(Ethereum) — (2) – 2016-10-14 – p.42/43
I(Ethereum) — (2) – 2016-10-14 – p.43/43