== Blockchain and Angular (by Michael John Pena)
Blockchain has been a big buzz in the technology world lately. But why should it matter to web developers? In this session, MJ will walk you through on what is a Blockchain, Ethereum and Smart Contracts. This will then be followed on how you can interface your Angular web app to Ethereum with the use of Web3.js.
Presented on NG-Sydney
6. Smart Contracts
• A contract that is handled by a machine once conditions met.
• 2 Parties don’t need to trust each other. They just need to agree
on the contract.
7. Ethereum
February18
• Open Source Blockchain Distribution (Ledger)
• Public, Private and Consortium
• Big Emphasis on Smart Contracts
• “Turing Complete”
• Active Roadmap
• Buzzword: Ether is the currency, Ethereum is the
platform.
8. How does it work?
Substituting your centralized database with a distributed decentralized VM
February18
Source:https://medium.com/@mvmurthy/ethereum-for-
web-developers-890be23d1d0c
9. Solidity
Contract oriented programming language
February18
• JavScript like
• Extension “.sol”
• Compiles to Operation Codes “OpCodes”
• ADD, SUB, MUL, etc
• Supports Testing
10. Ethereum Gas
• Each OpCode has fixed computation effort
See Appendix G of Ethereum Yellow Paper
• Paid by sender that triggered the transaction
• Single ether transaction would cost 21, 000 gas
• Interacting with a smart contract would cost 21, 000 gas + all executed
opcodes gas
• You can set the maximum gas limit, but failure to meet the required gas would
mean loss.
• You can set the gas price as a form of multiplier. Determines how fast your
transaction will be.
February18
Source:
https://ethereum.github.io/yellowpaper/paper.pdf
11. Truffle
”One tool to rule them all”, sounds familiar?
• Built-in smart contract
compilation, linking,
deployment and binary
management
• Truffle Suite
Ganache
Ganache-CLI (Ethereum
TestRPC)
Boxes
A lot more…
February18