Scalability – transactions are slower on web3 because they're decentralized. Changes to state, like a payment, need to be processed by a node and propagated throughout the network.
UX – interacting with web3 applications can require extra steps, software, and education. This can be a hurdle to adoption.
Accessibility – the lack of integration in modern web browsers makes web3 less accessible to most users.
Cost – most successful dapps put very small portions of their code on the blockchain as it's expensive
Ethereum Account type:
Externally Owned Account
Creating an account costs nothing
Can initiate transactions
Transactions between externally-owned accounts can only be ETH/token transfers
Made up of a cryptographic pair of keys: public and private keys that control account activities
Contract Owned Account
Creating a contract has a cost because you're using network storage
Can only send transactions in response to receiving a transaction
Transactions from an external account to a contract account can trigger code which can execute many different actions, such as transferring tokens or even creating a new contract
Contract accounts don't have private keys. Instead, they are controlled by the logic of the smart contract code
Mastering Ethereum
Ethereum Spec, Client, node
Trapdoor function:
RSA - Prime Number Factorization
amount of bits required by ECC vs RSA to achieve same security level
Multicurrency and multiaccount wallets, based on BIP-44
The Ethereum Contract ABI
in ethereum, the ABI is used to encode contract calls for the EVM and to read data out of transactions
the purpose of an ABI is to define the functions in the contract that can be invoked and describe how each function will accept arguments and returns its results
an contract’s ABI is specified as a JSON array of function descriptions & events
function description JSON Object
type, name, inputs, outputs, constant, payable
event description JSON Object
type, name, inputs, anonymous
All that is needed for an application to interact with a contract is an ABI and the address where the contract has been deployed.
Ether.js Modules
Ethers.Provider: This module enables you to establish a connection with the Ethereum blockchain. You use it to issue queries and send signed transactions. Through this module, Ethers.js users get to change the state of the blockchain.
Ethers.Contract: You use this module to deploy and interact with smart contracts. While deploying smart contracts is one of the main purposes of Ethers.Contract, it has more to offer. As such, it also packs functions that enable developers to ‘listen’ to smart contract events (
). Furthermore, you also use this module to get information about smart contracts and call particular functions provided by smart contracts.
Ethers.Utils: You will use this module when you want to format data and process user inputs. As such, Ethers.utils makes building dApps a whole lot easier.
Ethers.Wallet: As you can assume based on the ‘.wallet’, Ethers.Wallet provides a way to connect to any existing Ethereum address (an Ethereum wallet). On top of that important feature, this module also enables you to create new wallets and sign transactions
Web3.js Modules
Web3.eth: The Eth module is there for interacting with the Ethereum network. It offers several sub-modules, including Web3.eth.subscribe, Web3.eth.contract, Web3.eth.accounts, Web3.eth.personal, and more.
Web3.*.net: The Net module is there for interacting with network properties. Of course, it may be used as a sub-module to interact with Ethereum (Web3.eth.net).
Web3.bzz: The Bzz module is there for interacting with the swarm network.
Web3.shh: The Shh module is there for interacting with the whisper protocol.
Web3.utils: This module provides utility functions for Ethereum dApps and other web3.js packages.
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (