3rdstage's Wiki
Tag: Source edit
Tag: Source edit
 
(192 intermediate revisions by the same user not shown)
Line 11: Line 11:
 
* [https://www.binance.vision/ Bynance Academy]
 
* [https://www.binance.vision/ Bynance Academy]
 
** Learn blockchain and cryptocurrency on your schedule and completely free.
 
** Learn blockchain and cryptocurrency on your schedule and completely free.
  +
* [https://academy.binance.com/en/glossary The Words of Crypto] (Glossary)
   
 
* [https://en.wikipedia.org/wiki/Blockchain#Permissioned_.28private.29_blockchain Private blockchain]
 
* [https://en.wikipedia.org/wiki/Blockchain#Permissioned_.28private.29_blockchain Private blockchain]
Line 19: Line 20:
   
 
* [http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html Bitcoin mining the hard way: the algorithms, protocols, and bytes]
 
* [http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html Bitcoin mining the hard way: the algorithms, protocols, and bytes]
* [https://medium.com/@ConsenSys/a-101-noob-intro-to-programming-smart-contracts-on-ethereum-695d15c1dab4 A 101 Noob Intro to Programming Smart Contracts on Ethereum]
+
* [https://medium.com/@ConsenSys/a-101-noob-intro-to-programming-smart-contracts-on-ethereum-695d15c1dab4 A 101 Noob Intro to Programming Smart Contracts on Ethereum] (Oct 29, 2015)
 
* [https://www.linkedin.com/pulse/blockchain-database-adi-ben-ari '''Blockchain as a Database'''] (July 31, 2015)
 
* [https://www.linkedin.com/pulse/blockchain-database-adi-ben-ari '''Blockchain as a Database'''] (July 31, 2015)
 
* [https://en.wikipedia.org/wiki/Cryptocurrency_tumbler Cryptocurrency tumbler]
 
* [https://en.wikipedia.org/wiki/Cryptocurrency_tumbler Cryptocurrency tumbler]
Line 49: Line 50:
 
|-
 
|-
 
| [https://en.bitcoinwiki.org/wiki/Proof-of-stake PoS] || ||
 
| [https://en.bitcoinwiki.org/wiki/Proof-of-stake PoS] || ||
  +
|-
  +
| [https://medium.com/@anatolyyakovenko/proof-of-history-a-decentralized-clock-for-blockchain-9d245bd5abb3 PoH] || ||
 
|}
 
|}
   
Line 84: Line 87:
 
** Total message count per client request : <tt>1 + 3f + 3f(3f-f) + (3f-f+1)(3f+1) + 3f-1</tt>
 
** Total message count per client request : <tt>1 + 3f + 3f(3f-f) + (3f-f+1)(3f+1) + 3f-1</tt>
 
* [https://medium.com/thundercore/consensus-series-pbft-3e011e7f3691 Consensus Series: PBFT] (Nov 7, 2019)
 
* [https://medium.com/thundercore/consensus-series-pbft-3e011e7f3691 Consensus Series: PBFT] (Nov 7, 2019)
  +
* [https://medium.com/coinmonks/implementing-pbft-in-blockchain-12368c6c9548 Implementing PBFT in Blockchain] (Aug 5, 2019)
   
 
====ZKP====
 
====ZKP====
Line 120: Line 124:
 
* [https://ethereum.stackexchange.com/questions/2402/what-exactly-is-the-nothing-at-stake-problem What exactly is the Nothing-At-Stake problem?] (Mar 29 '16)
 
* [https://ethereum.stackexchange.com/questions/2402/what-exactly-is-the-nothing-at-stake-problem What exactly is the Nothing-At-Stake problem?] (Mar 29 '16)
   
===Blockchian Networks===
+
===Blockchain Networks===
 
 
 
{| class='wikitable'
 
{| class='wikitable'
Line 131: Line 135:
 
| EOS || '''EOS''' || DPoS || ||
 
| EOS || '''EOS''' || DPoS || ||
 
|}
 
|}
  +
  +
===Blockchain Platforms===
  +
  +
* [https://wiki.polkadot.network/docs/learn-comparisons-cosmos Polkadot and Cosmos]
  +
* [https://forum.cosmos.network/t/polkadot-vs-cosmos/1397 Polkadot vs Cosmos]
   
 
===Smart Contract===
 
===Smart Contract===
   
 
* [https://en.wikipedia.org/wiki/Smart_contract Smart Contract] (on Wikipedia)
 
* [https://en.wikipedia.org/wiki/Smart_contract Smart Contract] (on Wikipedia)
  +
  +
{| class='wikitable'
  +
! Blockchain !! Language !! Remark
  +
|-
  +
| Ethereum || [https://docs.soliditylang.org/en/latest/ Solidity] ||
  +
|-
  +
| [https://eos.io/ EOSIO] || || C++
  +
|}
   
 
===Key and Wallet===
 
===Key and Wallet===
Line 144: Line 161:
 
** a form of secret sharing, where a secret is divided into parts, giving each participant its own unique part.
 
** a form of secret sharing, where a secret is divided into parts, giving each participant its own unique part.
   
  +
* [http://ethanfast.com/top-crypto.html Cryptography behind the top 100 cryptocurrencies]
===Financial Business===
 
 
 
{| class='wikitable'
 
{| class='wikitable'
! Concept !! Description !! Remark
+
! Blockchain !! Signing Algorithm !! Curve !! Remark
 
|-
 
|-
  +
| Bitcoin || <code>ECDSA</code> || <code>secp256k1</code> ||
| [https://en.wikipedia.org/wiki/Leverage_(finance) Leverage]
 
| any technique involving the use of debt (borrowed funds) rather than fresh equity in the purchase of an asset, with the expectation that the after-tax profit to equity holders from the transaction will exceed the borrowing cost, frequently by several multiples⁠. ||
 
 
|-
 
|-
  +
| Ethereum || <code>ECDSA</code> || <code>secp256k1</code> ||
| [https://en.wikipedia.org/wiki/Margin_(finance) Margin]
 
| collateral that the holder of a financial instrument has to deposit with a counterparty (most often their broker or an exchange) to cover some or all of the credit risk the holder poses for the counterparty. ||
 
 
|-
 
|-
  +
| Ripple || <code>EdDSA</code>, <code>ECDSA</code> || <code>curve25519</code>, <code>secp256k1</code> ||
| [https://en.wikipedia.org/wiki/Fungibility Fungibility]
 
  +
|-
| the property of a good or a commodity whose individual units are essentially '''interchangeable''', and each of its parts is '''indistinguishable''' from another part. || company shares, bonds, precious metals, currencies
 
  +
| Polkadot || <code>EdDSA</code>, <code>ECDSA</code>, <code>Schnorr</code>
  +
| <code>curve25519</code>, <code>secp256k1</code>, <code>ristretto25519</code> ||
  +
|-
  +
| Stellar || <code>EdDSA</code> || <code>curve25519</code> ||
  +
|-
  +
| EOS || <code>ECDSA</code> || <code>secp256k1</code> ||
  +
|-
  +
| Cosmos || <code>ECDSA</code> || <code>secp256k1</code> ||
  +
|-
  +
| Solana || <code>EdDSA</code> || <code>curve25519</code> ||
 
|}
 
|}
   
* [https://en.wikipedia.org/wiki/Debits_and_credits Debits and credits]
+
* [https://en.wikipedia.org/wiki/Curve25519 Curve25519]
  +
** an elliptic curve used in elliptic-curve cryptography (ECC) offering 128 bits of security (256-bit key size) and designed for use with the elliptic curve Diffie–Hellman (ECDH) key agreement scheme.
  +
  +
===Cryptocurrency===
  +
  +
* [https://coinmarketcap.com/ CoinMarketCap]
  +
  +
* &gt;&gt; [[Inceptions and Inspirations#On Finance|On Finance]]
  +
  +
===Automata Theory===
   
 
{| class='wikitable'
 
{| class='wikitable'
  +
! Theory !! Description !! Remarks
 
|-
 
|-
  +
| [https://en.wikipedia.org/wiki/Finite-state_machine Finite State Machine]
! Entry !! Meaning !! Position || Korean
 
  +
| an abstract machine that can be in exactly one of a finite number of states at any given time. || State Machine
 
|-
 
|-
| [https://en.wikipedia.org/wiki/Debits_and_credits Debit] || a transfer of value to that account || right side || 차변
+
| [https://en.wikipedia.org/wiki/Turing_machine Turing Machine]
  +
| a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to a table of rules. ||
 
|-
 
|-
  +
| [https://en.wikipedia.org/wiki/Turing_completeness Turing Completeness]
| Credit || a transfer of value from the account || left side || 대변
 
  +
| a system of data-manipulation rules that can be used to simulate any Turing machine. || Virtually all programming languages today are Turing-complete
 
|}
 
|}
   
  +
===Glossary===
* [https://www.binance.vision/economics/what-is-margin-trading What Is Margin Trading?] (13.01.2020)
 
** ''This ability to expand trading results makes margin trading especially popular in low-volatility markets, particularly the international Forex market. Still, margin trading is also used in stock, commodity, and cryptocurrency markets.''
 
* [https://www.investopedia.com/terms/m/margin.asp Margin] (Jun 25, 2019)
 
 
====Financial Instrument====
 
   
  +
* [https://academy.binance.com/en/glossary The Words of Crypto] (Binance Academy)
* [https://en.wikipedia.org/wiki/Financial_instrument Financial instrument]
 
  +
* [https://www.coindesk.com/learn/crypto-token-supply-whats-the-difference-between-maximum-circulating-and-total-supply/ Crypto Token Supply: What’s the Difference Between Maximum, Circulating and Total Supply?]
** ''monetary contracts between parties which can be created, traded, modified and settled.''
 
   
 
{| class='wikitable'
 
{| class='wikitable'
! Instrument !! Description !! Remark
+
! Term !! Description !! Remarks
 
|-
 
|-
| [https://en.wikipedia.org/wiki/Bond_(finance) Bond]
+
| [https://academy.binance.com/en/glossary/total-supply Total Supply]
  +
| the number of coins or tokens that currently exists and are either in circulation or locked somehow. ||
| an instrument of indebtedness of the bond issuer to the holders. || debt security
 
 
|-
 
|-
  +
| [https://academy.binance.com/en/glossary/circulating-supply Circulating Supply]
| [https://en.wikipedia.org/wiki/Loan Loan]
 
  +
| the number of cryptocurrency coins or tokens that are publicly available and circulating in the market. ||
| the lending of money by one or more individuals, organizations, or other entities to other individuals, organizations etc. ||
 
 
|-
 
|-
| [https://en.wikipedia.org/wiki/Deposit_account Deposit]
+
| [https://academy.binance.com/en/glossary/maximum-supply Maximum Supply]
| any other type of bank account that allows money to be deposited and withdrawn by the account holder. ||
+
| the maximum number of coins or tokens that will be ever created. || Supply Cap
  +
|-
  +
| [https://medium.com/swlh/on-supply-caps-e9c149613edc Supply Cap]
  +
| a permanent limit on the number of units of a cryptocurrency (or coins) that can ever be created || alias : Max Supply
 
|}
 
|}
 
====Credit Card====
 
 
* [https://www.investopedia.com/terms/c/credit-card-authentication.asp Credit Card Authentication] (Mar 16, 2018)
 
** Credit Card Transaction = Credit Card Authentication + Credit Card Authorization
 
 
* [https://www.creditkarma.com/credit-cards/i/credit-card-networks What is a credit card network and how do they work?] (April 12, 2020)
 
** ''The four major credit card networks in the U.S. are Visa, Mastercard, Discover and American Express.''
 
   
 
===Misc===
 
===Misc===
Line 207: Line 235:
 
* [https://justaskthales.com/en/what-is-a-secure-element/ What is a Secure Element?] (April 18, 2018)
 
* [https://justaskthales.com/en/what-is-a-secure-element/ What is a Secure Element?] (April 18, 2018)
 
* [https://www.trendmicro.com/vinfo/in/security/news/mobile-safety/mobile-payment-systems-android-pay Mobile Payment Systems: How Android Pay Works] (August 01, 2015)
 
* [https://www.trendmicro.com/vinfo/in/security/news/mobile-safety/mobile-payment-systems-android-pay Mobile Payment Systems: How Android Pay Works] (August 01, 2015)
  +
  +
====Performance====
  +
  +
* [https://towardsdatascience.com/the-blockchain-scalability-problem-the-race-for-visa-like-transaction-speed-5cce48f9d44 The Blockchain Scalability Problem & the Race for Visa-Like Transaction Speed] (Jan 31, 2019)
  +
* [https://arxiv.org/pdf/1901.00910.pdf FastFabric: Scaling Hyperledger Fabric to 20,000 Transactions per Second] (4 Mar 2019)
   
 
==Bitcoin==
 
==Bitcoin==
Line 213: Line 246:
 
* [https://github.com/bitcoinbook/bitcoinbook Mastering Bitcoin] (O'reilly, Andreas M. Antonopoulos)
 
* [https://github.com/bitcoinbook/bitcoinbook Mastering Bitcoin] (O'reilly, Andreas M. Antonopoulos)
 
* [https://en.bitcoin.it/wiki/ Bitcoin Wiki]
 
* [https://en.bitcoin.it/wiki/ Bitcoin Wiki]
  +
  +
* [https://www.investopedia.com/best-bitcoin-mining-software-5095403 Best Bitcoin Mining Software] (November 12, 2021)
  +
** CGMiner, BFGMiner, MultiMiner
  +
  +
* [https://www.bitpanda.com/academy/en/lessons/what-are-transaction-fees-and-why-do-i-need-to-pay-them/ What are transaction fees and why do I need to pay them?]
  +
** ''In the case of Bitcoin transactions, the '''reward for miners consists of two things''': all '''transaction fees''' in the block that the miner validated and the additional '''incentive''' of a specific block reward of newly minted coins in the process.''
  +
** '''<tt>Reward = Incentive + Fee</tt>'''
  +
* [https://www.coinbase.com/learn/crypto-basics/what-is-inflation What is inflation?]
  +
** ''But because the amount of new bitcoin is automatically '''reduced by 50 percent every four years''', Bitcoin’s inflation rate will also decrease.''
  +
* [https://en.bitcoin.it/wiki/Controlled_supply Controlled supply]
   
 
===Concepts===
 
===Concepts===
Line 221: Line 264:
   
 
* [https://www.investopedia.com/terms/o/orphan-block-cryptocurrency.asp Orphan Block] (Dec 19, 2019)
 
* [https://www.investopedia.com/terms/o/orphan-block-cryptocurrency.asp Orphan Block] (Dec 19, 2019)
  +
* [https://river.com/learn/how-bitcoin-fees-work/ How Bitcoin Fees Work]
  +
** Transaction fees are based on the data volume of a transaction and the congestion of the network.
   
 
===BIP===
 
===BIP===
Line 229: Line 274:
 
! BIP !! Title !! Description !! Type !! Status !! Remarks !! Related
 
! BIP !! Title !! Description !! Type !! Status !! Remarks !! Related
 
|-
 
|-
| style='white-space:nowrap' | [https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki '''BIP 32'''] || Hierarchical Deterministic Wallets
+
| style='white-space:nowrap' | [https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki '''BIP-32''']
  +
| Hierarchical Deterministic Wallets
| describes hierarchical deterministic wallets (or "HD Wallets") || Informational || Final || ||
 
  +
| Describes hierarchical deterministic wallets (or "HD Wallets") || Informational || Final || ||
 
|-
 
|-
| [https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki '''BIP 39'''] || Mnemonic code for generating deterministic keys
+
| style='white-space:nowrap' | [https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki '''BIP-39''']
  +
| Mnemonic code for generating deterministic keys
| describes the implementation of a mnemonic code or mnemonic sentence -- a group of easy to remember words -- for the generation of deterministic wallets.
 
  +
| Describes the implementation of a mnemonic code or mnemonic sentence -- a group of easy to remember words -- for the generation of deterministic wallets. || Standards Track || Proposed || ||
| Standards Track || Proposed || ||
 
 
|-
 
|-
| [https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki '''BIP 43'''] || Purpose Field for Deterministic Wallets
+
| style='white-space:nowrap' | [https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki '''BIP-43''']
  +
| Purpose Field for Deterministic Wallets
| introduces a "Purpose Field" for use in deterministic wallets based on algorithm described in BIP-0032
 
  +
| Introduces a "Purpose Field" for use in deterministic wallets based on algorithm described in BIP-0032
 
| Informational || Draft || <tt>m/purpose'/*</tt> || BIP 32
 
| Informational || Draft || <tt>m/purpose'/*</tt> || BIP 32
 
|-
 
|-
| [https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki '''BIP 44'''] || Multi-Account Hierarchy for Deterministic Wallets
+
| style='white-space:nowrap' | [https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki '''BIP-44''']
  +
| Multi-Account Hierarchy for Deterministic Wallets
| defines a logical hierarchy for deterministic wallets based on an algorithm described in BIP-0032
 
  +
| Defines a logical hierarchy for deterministic wallets based on an algorithm described in BIP-0032
| Standards Track || Proposed || <tt>m/44'/*'/*'/*/*</tt> || BIP 32, BIP 43
 
  +
| Standards Track || Proposed || <tt>m/44'/*'/*'/*/*</tt> || BIP 32, BIP 43, [https://github.com/satoshilabs/slips/blob/master/slip-0044.md SLIP-0044]
 
|}
 
|}
  +
  +
===SLIP===
  +
  +
* [https://github.com/satoshilabs/slips SLIP (SatoshiLabs Improvement Proposals)]
  +
** an extension to BIP process containing documents unsuitable for submission to BIP repository.
   
 
===HD Wallet===
 
===HD Wallet===
Line 342: Line 395:
 
|}
 
|}
   
==Ethereum==
+
===Statistics===
   
  +
{| class='wiki'
* [https://eth.wiki/ Ethereum Wiki] ([https://github.com/ethereum/wiki/wiki Ethereum Old Wiki])
 
  +
! Topic !! Chart/Table !! Remarks
 
  +
| Avg. Block Time || https://bitinfocharts.com/comparison/bitcoin-confirmationtime.html ||
* [https://github.com/ethereum/wiki/wiki/White-Paper Ethereum White Paper] : A Next-Generation Smart Contract and Decentralized Application Platform
 
* [https://github.com/ethereum/wiki/wiki/Design-Rationale Ethereum Design Rationale]
 
* [https://ethereum.github.io/yellowpaper/paper.pdf Ethereum Yello Pager]
 
* [https://github.com/chronaeon/beigepaper/blob/master/beigepaper.pdf Ethereum Beige Paper]
 
* [https://medium.com/@hello_38248/differences-between-a-white-paper-yellow-paper-and-beige-paper-ad173f982237 Differences Between a White Paper, Yellow Paper, and Beige Paper] (Aug 2, 2018)
 
* [https://www.ethereum.org/learn/ Learn about Ethereum]
 
* [https://www.ethereum.org/developers/ Developer Resources]
 
* [https://kauri.io/ethereum-101/5bb65f0f4f34080001731dc2/c Ethereum 101]
 
* [https://github.com/ConsenSys/ethereum-developer-tools-list Ethereum Developer Tools List]
 
* [https://github.com/ethereum/wiki/wiki/Ethereum-Development-Tutorial Ethereum Development Tutorial]
 
 
* [https://docs.ethhub.io/ EthHub] : a single source for essential Ethereum information.
 
* [https://ethereumbuilders.gitbooks.io/guide/content/en/index.html Ethereum Builder's Guide]
 
* [https://github.com/pirapira/awesome-ethereum-virtual-machine Awesome Ethereum Virtual Machine]
 
* [http://www.ethdocs.org/en/latest/ Ethereum Homestead Documentation]
 
** the reference documentation accompanying the Homestead release of the Ethereum project.
 
* [https://www.gitbook.com/book/ethereum/frontier-guide/ Ethereum Frontier Guide]
 
* [https://github.com/crytic/awesome-ethereum-security Awesome Ethereum Security]
 
 
* [https://ethereum.org/en/wallets/ Ethereum Wallets]
 
* [https://ethereum.org/en/dapps/ Use Ethereum Applications]
 
* [https://ethereum.org/en/developers/docs/programming-languages/python/ ETHEREUM FOR PYTHON DEVELOPERS]
 
 
* [https://vitalik.ca/general/2019/11/22/progress.html Hard Problems in Cryptocurrency: Five Years Later] (Nov 22, 2019)
 
* [https://www.trustnodes.com/2018/05/02/enterprise-ethereum-architecture-stack-launched Enterprise Ethereum Architecture Stack Launched] (May 2, 2018)
 
 
* [https://www.sciencedirect.com/science/article/pii/S0304397596000771 Small universal Turing machines]
 
* [https://en.wikipedia.org/wiki/Trapdoor_function Trapdoor function]
 
* [https://en.wikipedia.org/wiki/Discrete_logarithm Discrete logarithm]
 
 
===Specs===
 
 
* [https://github.com/ethereum/wiki/wiki/Ethash Ethash] : PoW algorithm for Ethereum 1.0
 
* [https://github.com/ethereum/wiki/wiki/Ethereum-Natural-Specification-Format Ethereum Natural Specification Format]
 
* [https://github.com/ethereum/wiki/wiki/Ethereum-Chain-Spec-Format Ethereum Chain Spec Format]
 
** [https://github.com/ethereum/wiki/wiki/Ethereum-Chain-Spec-Format#subformat-genesis Subformat: genesis]
 
* [https://github.com/ethereum/wiki/wiki/enode-url-format Enode URL format]
 
 
====EIP====
 
 
* [https://eips.ethereum.org/ EIPs] (Ethereum Improvement Proposals)
 
** describe standards for the Ethereum platform, including core protocol specifications, client APIs, and contract standards.
 
* [https://eips.ethereum.org/all EIP List]
 
 
{| class='wikitable sortable'
 
! EIP/ERC !! Title !! Description !! Category !! Status !! Remarks !! Related
 
|-
 
| [https://eips.ethereum.org/EIPS/eip-20 '''EIP 20'''] || Token Standard
 
| A standard interface for tokens. || ERC || Final
 
| <tt>totalSupply</tt>, <tt>balanceOf</tt>, <tt>transfer</tt>, <tt>transferFrom</tt>, <tt>approve</tt>, ... ||
 
|-
 
| [https://eips.ethereum.org/EIPS/eip-55 '''EIP 55'''] || Mixed-case checksum address encoding
 
| || ERC || Final || ||
 
|-
 
| [https://eips.ethereum.org/EIPS/eip-100 '''EIP 100'''] || Change difficulty adjustment to target mean block time including uncles
 
| the formula to compute the difficulty of a block || Core || Final || ||
 
|-
 
| [https://eips.ethereum.org/EIPS/eip-101 '''EIP 101'''] || Serenity Currency and Crypto Abstraction
 
| Accounts now have only two fields in their RLP encoding: <tt>code</tt> and <tt>storage</tt> || Core || Draft || Ethereum 2.0 ||
 
|-
 
| [https://eips.ethereum.org/EIPS/eip-155 '''EIP-155'''] || Simple replay attack protection
 
| provide a way to send transactions that work on Ethereum without working on ETC or the Morden testnet. || Core || Final || ||
 
|-
 
| [https://eips.ethereum.org/EIPS/eip-165 '''EIP 165'''] || Standard Interface Detection
 
| Creates a standard method to publish and detect what interfaces a smart contract implements. || ERC || Final || || ERC-1820
 
|-
 
| [https://eips.ethereum.org/EIPS/eip-721 '''EIP 721'''] || Non-Fungible Token Standard
 
| A standard interface for non-fungible tokens, also known as deeds. || ERC || Final
 
| <tt>supportsInterface(bytes4 _if)</tt> ||
 
|-
 
| [https://eips.ethereum.org/EIPS/eip-725 '''EIP 725'''] || Proxy Account
 
| A standard interface for a simple proxy account. || ERC || Draft || ||
 
|-
 
| [https://eips.ethereum.org/EIPS/eip-777 '''EIP 777'''] || Token Standard
 
| standard interfaces and behaviors for token contracts. || ERC || Final
 
| operators, send/receive hooks || ERC-1820
 
|-
 
| [https://eips.ethereum.org/EIPS/eip-1066 '''EIP 1066'''] || Status Codes
 
| Broadly applicable status codes for smart contracts. || ERC || Draft || ||
 
|-
 
| [https://eips.ethereum.org/EIPS/eip-1102 '''EIP 1102'''] || Opt-in account exposure
 
| describes a communication protocol between dapps and Ethereum-enabled DOM environments that allows the Ethereum-enabled DOM environment to choose what information to supply the dapp with and when. || Interface || Draft || <tt>eth_requestAccounts</tt> ||
 
|-
 
| style='white-space:nowrap' | [https://eips.ethereum.org/EIPS/eip-1155 '''EIP 1155'''] || Multi Token Standard
 
| A standard interface for contracts that manage multiple token types. || ERC || Final || ||
 
|-
 
| [https://eips.ethereum.org/EIPS/eip-1193 '''EIP 1193'''] || Ethereum Provider JavaScript API
 
| A JavaScript Ethereum Provider API for consistency across clients and applications. || Interface || Last Call || <tt>Provider.request()</tt> ||
 
|-
 
| [https://eips.ethereum.org/EIPS/eip-1474 '''EIP 1474'''] || Remote procedure call specification
 
| defines a standard set of remote procedure call methods that an Ethereum node should implement. || Interface || Draft || JSON-RPC, Error Codes, Methods ||
 
|-
 
| style='white-space:nowrap' | [https://eips.ethereum.org/EIPS/eip-1820 '''EIP 1820'''] || style='white-space:nowrap' | Pseudo-introspection Registry Contract
 
| defines a universal registry smart contract where any address (contract or regular account) can register which interface it supports and which smart contract is responsible for its implementation. || ERC || Final
 
| || ERC-820, ERC-165
 
 
|}
 
|}
   
  +
* [https://btc.com/btc BTC.com / '''Bitcoin Explorer''']
====ERC====
 
  +
* [https://bitinfocharts.com/bitcoin/ Bitcoin (BTC) price stats and information]
  +
* [https://www.blockchain.com/explorer Bitcoin Explorer]
  +
* [https://bitnodes.io/ Bitnodes] : estimate the size of the Bitcoin network by finding all the reachable nodes in the network
   
  +
==Ethereum==
* ERC : Application-level standards and conventions
 
 
{| class='wikitable sortable'
 
! ERC !! Title !! Description !! Remarks
 
|-
 
| [https://github.com/ethereum/EIPs/issues/734 '''ERC 734'''] || Key Manager
 
| A contract for key management of a blockchain proxy account. || ERC 725
 
|-
 
| [https://github.com/ethereum/EIPs/issues/735 '''ERC 735'''] || Claim Holder
 
| Describes standard functions for adding, removing and holding of claims. || ERC 725, ERC 734
 
|-
 
| [https://github.com/ethereum/EIPs/issues/780 '''ERC 780'''] || Ethereum Claims Registry
 
| Describes a proposal for an Ethereum Claims Registry (ECR) which allows persons, smart contracts, and machines to issue claims about each other, as well as self issued claims. || ERC 735
 
|-
 
| [https://github.com/ethereum/EIPs/issues/1155 '''ERC 1155'''] || Multi Token Standard
 
| A standard interface for contracts that manage multiple token types. ||
 
|-
 
| [https://github.com/ethereum/EIPs/issues/1238 '''ERC 1238'''] || Non-transferrable tokens (badges)
 
| Defines a set of standard APIs allowing the identification of statements (called badges) attributed to a public key, such that different dapps and smart contract can use to filter users or to provide user with different badges different experiences. ||
 
|-
 
| style='white-space:nowrap' | [https://github.com/SecurityTokenStandard/EIP-Spec '''ERC 1400'''] || Security Token Standard
 
| Represents a library of standards for security tokens on Ethereum. || [https://github.com/ethereum/EIPs/issues/1411 EIPs/issues/1411]
 
|-
 
| [https://erc1404.org/ '''ERC 1404'''] || style='white-space:nowrap' | Simple Restricted Token Standard
 
| An open source standard for security tokens ||
 
|}
 
 
<syntaxhighlight lang='text' enclose='div'>
 
 
+--- Transferrable ---------- EIP 20
 
|
 
+--- Fungible -------+
 
| |
 
| +--- Non Transferrable -----
 
|
 
+---+
 
|
 
| +--- Transferable ---------- EIP 721
 
| |
 
+--- Non Fungible ---+
 
|
 
+--- Non Transferrable ----- ERC 1238, ERC 735
 
 
</syntaxhighlight>
 
 
* [https://blog.enjincoin.io/erc-1155-the-crypto-item-standard-ac9cf1c5a226?gi=87b8cb289542 ERC-1155: The Crypto Item Standard] (Jun 25, 2018)
 
* [https://cryptopotato.com/can-erc-1155-replace-erc-20-and-721-as-the-new-standard/ Can ERC-1155 Replace ERC-20 And 721 As The New Standard] (Jun 25, 2018)
 
 
* [https://erc725alliance.org/ ERC-725 Alliance]
 
** The home of ERC 725, a proposed standard for blockchain-based identity authored by Fabian Vogelsteller, creator of the ERC 20 standard and Web3.js.
 
 
===Concepts===
 
 
* [http://ethdocs.org/en/latest/ether.html Ether]
 
** 1 wei = 10<sup>-18</sup> ether
 
** 1 Gwei (shannon) = 10<sup>9</sup> wei = 10<sup>-9</sup> ether
 
 
* [http://ethdocs.org/en/latest/contracts-and-transactions/account-types-gas-and-transactions.html Account Types, Gas, and Transactions]
 
** Externally Owned Account, Contract Account, Transaction, Message, Gas
 
* [https://coinsutra.com/ethereum-gas-limit-gas-price-fees/ What is Gas?]
 
* [https://solidity-by-example.org/gas/ Gas and Gas Price]
 
** transaction gas limit : max amount of gas your willing to use for your transaction, set by you
 
** block gas limit : max amount of gas allowed in a block, set by the network
 
* [https://ethereum.stackexchange.com/questions/3081/what-is-coinbase What is coinbase?] (Apr 16 '16)
 
* ''The address of that contract is not the zero address but an address derived from the sender and its number of transactions sent (the “nonce”).''
 
* ''The gas price is a value set by the creator of the transaction, who has to pay gas_price * gas up front from the sending account. If some gas is left after the execution, it is refunded to the creator in the same way.''
 
* ''The Ethereum Virtual Machine has three areas where it can store data- storage, memory and the stack''
 
 
* [https://docs.ethhub.io/using-ethereum/mining/ Mining]
 
* [https://cointelegraph.com/ethereum-for-beginners/how-to-mine-ethereum-guide-for-beginners How to Mine Ethereum.]
 
** ''Once you’ve successfully mined a block, you are entitled to receive a three ETH reward. Along with the reward, miners receive fees associated with the transaction.''
 
 
* [https://www.investopedia.com/terms/u/uncle-block-cryptocurrency.asp Uncle Block] (Apr 17, 2018)
 
** ''However, at times, two different miners may generate a block simultaneously.''
 
** ''Unlike the Bitcoin network which does not reward for orphan blocks, Ethereum incentivizes uncle block miners.''
 
* [https://ethereum.stackexchange.com/questions/34/what-is-an-uncle-ommer-block What is an uncle/ommer block?] (Jan 20 '16)
 
* [https://ethereum.stackexchange.com/questions/13378/what-is-the-exact-longest-chain-rule-implemented-in-the-ethereum-homestead-p What is the exact “longest chain” rule implemented in the Ethereum “Homestead” protocol?] (Mar 21 '17)
 
* [https://www.mangoresearch.co/blockchain-forks-explained/ Longest Chain – How Are Blockchain Forks Resolved?] (June 19, 2018)
 
 
* [https://en.wikipedia.org/wiki/Decentralized_autonomous_organization Decentralized Autonomous Organization (DAO)]
 
** ''an organization represented by rules encoded as a computer program that is transparent, controlled by shareholders and not influenced by a central government.''
 
 
====Keys and Address====
 
 
{| class='wikitable'
 
! rowspan='2' | Element !! colspan='3' | Size !! rowspan='2' | Remarks
 
|-
 
! Bits !! Bytes !! Hex Characters
 
|-
 
| Private Key || 256 || 32 || 64 ||
 
|-
 
| Public Key || 512 || 64 || 128 ||
 
|-
 
| Address || 160 || 20 || 40 || the right most 160-bits of the Keccak hash of the corresponding ECDSA public key.
 
|}
 
 
<div style='margin-left:40px;border:thin black solid;padding-left:10px'>
 
'''<tt>A(p<sub>r</sub>)=B<sub>96...256</sub>(KEC(ECDSAPUBKEY(p<sub>r</sub>)))</tt>'''
 
 
<tt>A</tt> : address<br/>
 
<tt>p</tt><sub>r</sub> : private key<br/>
 
<tt>KEC</tt> : Keccak-256 hash function<br/>
 
</div>
 
 
* [https://medium.com/@jeancvllr/solidity-tutorial-all-about-addresses-ffcdf7efc4e7 '''Solidity Tutorial : all about Addresses''']
 
* [https://theethereum.wiki/w/index.php/Accounts,_Addresses,_Public_And_Private_Keys,_And_Tokens Accounts, Addresses, Public And Private Keys, And Tokens]
 
* [https://etherworld.co/2017/11/17/understanding-the-concept-of-private-key-public-key-and-address-in-ethereum-blockchain/ Understanding the concept of Private Key, Public Key and Address in Ethereum Blockchain] (2017/11/17)
 
* [https://ethereum.stackexchange.com/questions/15494/location-of-public-and-private-keys-of-ethereum-account Location of public and private keys of Ethereum account] (Apr 25 '17)
 
** ''The private key is never (or should never be) saved unencrypted on disk. It is generated from the info in the keystore file when the user enters the password.''
 
* [https://ethereum.stackexchange.com/questions/28970/how-to-produce-enode-from-node-key how to produce enode from node key?] (Oct 21 '17)
 
** <code>bootnode -nodekeyhex 59233b25bfa4c214a8713e07a395a5d11478de10f36c6c80ba5369541f73bc44 -writeaddress</code>
 
* [https://kobl.one/blog/create-full-ethereum-keypair-and-address/ Create full Ethereum wallet, keypair and address] (Feb 15, 2017)
 
* [https://ethereum.stackexchange.com/questions/15766/what-does-v-r-s-in-eth-gettransactionbyhash-mean What does v, r, s in eth_getTransactionByHash mean?] (May 3 '17)
 
* [https://ethereum.stackexchange.com/questions/13778/get-public-key-of-any-ethereum-account Get public key of any ethereum account] (Mar 31 '17)
 
* [https://ethereum.stackexchange.com/questions/9630/can-i-deploy-a-contract-to-an-arbitrary-address-that-i-choose Can I deploy a contract to an arbitrary address that I choose?] (Oct 26 '16)
 
* [https://dzone.com/articles/signing-and-verifying-ethereum-signatures Signing and Verifying Ethereum Signatures] (Nov. 21, 18)
 
 
* [https://keccak.team/keccak.html Keccak]
 
* [https://en.wikipedia.org/wiki/SHA-3 SHA-3]
 
 
* [https://en.bitcoin.it/wiki/Secp256k1 secp256k1]
 
** ''the parameters of the elliptic curve used in Bitcoin's public-key cryptography, and is defined in Standards for Efficient Cryptography (SEC) (Certicom Research, http://www.secg.org/sec2-v2.pdf)''
 
* [https://godoc.org/github.com/ethereum/go-ethereum/crypto/secp256k1 <tt>github.com/ethereum/go-ethereum/crypto/secp256k1</tt>]
 
* [https://github.com/ethereum/go-ethereum/blob/master/crypto/secp256k1/libsecp256k1/include/secp256k1.h <tt>go-ethereum/crypto/secp256k1/libsecp256k1/include/secp256k1.h</tt>]
 
* [https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm Elliptic Curve Digital Signature Algorithm (ECDSA)] (Wikipedia)
 
* [https://en.bitcoin.it/wiki/Elliptic_Curve_Digital_Signature_Algorithm Elliptic Curve Digital Signature Algorithm] (BitCoin Wiki)
 
* [https://blog.enuma.io/update/2016/11/01/a-tale-of-two-curves-hardware-signing-for-ethereum.html '''A Tale of Two Curves'''] (Nov 1, 2016)
 
** <tt>secp256k1</tt>, <tt>secp256r1(prime256)</tt>
 
* [https://bitcoin.stackexchange.com/questions/38351/ecdsa-v-r-s-what-is-v ECDSA: (v, r, s), what is v?] (Jul 1 '15)
 
 
=====Signing=====
 
 
* [https://ethereum.stackexchange.com/questions/1777/workflow-on-signing-a-string-with-private-key-followed-by-signature-verificatio workflow on signing a string with private key, followed by signature verification with public key] (Mar 3 '16)
 
* [https://programtheblockchain.com/posts/2018/02/17/signing-and-verifying-messages-in-ethereum/ Signing and Verifying Messages in Ethereum] (FEBRUARY 17, 2018)
 
 
=====Account State=====
 
 
{| class='wikitable'
 
! Field !! Symbol !! Description !! Remarks
 
|-
 
| '''nonce''' || <tt>&sigma;[a]<sub>n</sub></tt>
 
| A scalar value equal to the number of transactions sent from this address or, in the case of accounts with associated code, the number of contract-creations made by this account. ||
 
|-
 
| '''balance''' || <tt>&sigma;[a]<sub>b</sub></tt>
 
| A scalar value equal to the number of Wei owned by this address. ||
 
|-
 
| '''storageRoot''' || <tt>&sigma;[a]<sub>s</sub></tt>
 
| A 256-bit hash of the root node of a Merkle Patricia tree that encodes the storage contents of the account. ||
 
|-
 
| '''codeHash''' || <tt>&sigma;[a]<sub>c</sub></tt>
 
| The hash of the EVM code of this account—this is the code that gets executed should this address receive a message call. || immutable
 
|}
 
 
====Transaction====
 
 
<blockquote>
 
A transaction (formally, ''T'') is a single cryptographically-signed instruction constructed by an actor externally to the scope of Ethereum.
 
</blockquote>
 
 
{| class='wikitable'
 
! Field !! Symbol !! Description !! Remarks
 
|-
 
| '''nonce''' || <tt>''T<sub>n</sub>''</tt> || A scalar value equal to the number of transactions sent by the sender ||
 
|-
 
| '''gasPrice''' || <tt>''T<sub>p</sub>''</tt>
 
| A scalar value equal to the number of Wei to be paid per unit of gas for all computation costs incurred as a result of the execution of this transaction ||
 
|-
 
| '''gasLimit''' || <tt>''T<sub>g</sub>''</tt>
 
| A scalar value equal to the maximum amount of gas that should be used in executing this transaction. This is paid up-front, before any computation is done and may not be increased ||
 
|-
 
| '''to''' || <tt>''T<sub>t</sub>''</tt>
 
| The 160-bit address of the message call’s recipient or, for a contract creation transaction, ∅ ||
 
|-
 
| '''value''' || <tt>''T<sub>v</sub>''</tt>
 
| A scalar value equal to the number of Wei to be transferred to the message call’s recipient or, in the case of contract creation, as an endowment to the newly created account. ||
 
|-
 
| '''v, r, s''' || style='white-space:nowrap' | <tt>''T<sub>w</sub>'', ''T<sub>r</sub>'', ''T<sub>s</sub>''</tt>
 
| Values corresponding to the signature of the transaction and used to determine the sender of the transaction. ||
 
|-
 
| '''init''' || <tt>''T<sub>i</sub>''</tt>
 
| An unlimited size byte array specifying the EVM-code for the account initialisation procedure. || a contract creation transaction only
 
|-
 
| '''data''' || <tt>''T<sub>d</sub>''</tt>
 
| An unlimited size byte array specifying the input data of the message call. || a message call transaction only
 
|}
 
 
* [https://web3j.readthedocs.io/en/latest/transactions.html#transaction-types Transaction types]
 
* [https://medium.com/blockchannel/life-cycle-of-an-ethereum-transaction-e5c66bae0f6e Life Cycle of an Ethereum Transaction] (Dec 27, 2017)
 
 
* Transaction signature
 
<div style='margin-left:40px;border:thin black solid;padding-left:10px'>
 
'''<tt>Signature = F<sub>sig</sub>(F<sub>keccak256</sub>(m), k) = (r, s)</tt>'''
 
 
<tt>m</tt> : encoded transaction<br/>
 
<tt>k</tt> : signer's private key<br/>
 
<tt>F<sub>keccak256</sub></tt> : Keccak-256 hash function<br/>
 
<tt>F<sub>sig</sub></tt> : Signing algorithm
 
</div>
 
 
* [https://eips.ethereum.org/EIPS/eip-758 EIP 758: Subscriptions and filters for completed transactions] (Draft)
 
* [https://github.com/ethereum/EIPs/issues/1288 Get contract return values from transaction recepts] (2 Aug 2018)
 
 
* [https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call '''What is the difference between a transaction and a call?'''] (an 30 '16)
 
 
====Transaction Receipt====
 
 
* [https://web3js.readthedocs.io/en/v1.2.9/web3-eth.html#gettransactionreceipt <tt>web3.eth.getTransactionReceipt</tt>]
 
 
{| class='wikitable'
 
! Field !! Type !! Size !! Description !! Remarks
 
|-
 
| <tt>blockHash</tt> || <tt>String</tt> || 32 Bytes || hash of the block where this transaction was in. ||
 
|-
 
| <tt>blockNumber</tt> || <tt>Number</tt> || || block number where this transaction was in. ||
 
|-
 
| <tt>transactionHash</tt> || <tt>String</tt> || 32 Bytes || hash of the transaction. ||
 
|-
 
| <tt>transactionIndex</tt> || <tt>Number</tt> || || integer of the transactions index position in the block. ||
 
|-
 
| <tt>from</tt> || <tt>String</tt> || 20 Bytes || address of the sender. ||
 
|-
 
| <tt>to</tt> || <tt>String</tt> || 20 Bytes || address of the receiver. || <tt>null</tt> : a contract creation transaction.
 
|-
 
| <tt>cumulativeGasUsed</tt> || <tt>Number</tt> || || total amount of gas used when this transaction was executed in the block. ||
 
|-
 
| <tt>gasUsed</tt> || <tt>Number</tt> || || the amount of gas used by this specific transaction alone. ||
 
|-
 
| <tt>contractAddress</tt> || <tt>String</tt> || || the contract address created, if the transaction was a contract creation, otherwise <tt>null</tt>. ||
 
|-
 
| <tt>logs</tt> || <tt>Array</tt> || || Array of log objects, which this transaction generated. ||
 
|-
 
| <tt>status</tt> || <tt>String</tt> || || <tt>'0x0'</tt> indicates transaction failure , <tt>'0x1'</tt> indicates transaction succeeded. ||
 
|}
 
 
* [https://codeburst.io/deep-dive-into-ethereum-logs-a8d2047c7371 Deep dive into Ethereum logs] (Jan 4, 2018)
 
 
* Log Entry Scheme
 
** [https://solidity.readthedocs.io/en/v0.5.15/abi-spec.html#formal-specification-of-the-encoding Contract ABI Spec / Events]
 
{| class='wikitable'
 
! Component !! Description !! Remark
 
|-
 
| <tt>address</tt> || the address of the contract (intrinsically provided by Ethereum) ||
 
|-
 
| <tt>topics[0]</tt> || <tt>keccak(event-signature)</tt> || not generated for <tt>anonymous</tt> event
 
|-
 
| <tt>topics[n]</tt> || <tt>abi_encode(event-args[indexed][n - 1])</tt> || indexed arguments
 
|-
 
| <tt>data</tt> || <tt>abi_encode(join(event-args[non-indexed]))</tt> || non-indexed arguments
 
|}
 
 
* [https://ethereum.stackexchange.com/questions/30788/some-transactions-are-missing-receipt Some transactions are missing receipt] (Nov 15 '17)
 
 
====Block====
 
 
<div style='margin-left:40px'>[[File:Ethereum-blocks.png|border|800px|link=https://docs.ethhub.io/using-ethereum/mining/|Ethereum Block Structure]]</div>
 
 
=====Block Header=====
 
 
{| class='wikitable'
 
! Field !! Symbol !! Description !! Remarks
 
|-
 
| '''parentHash''' || <tt>''H<sub>p</sub>''</tt>
 
| The Keccak 256-bit hash of the parent block’s header, in its entirety. ||
 
|-
 
| '''ommersHash''' || <tt>''H<sub>o</sub>''</tt>
 
| The Keccak 256-bit hash of the ommers list portion of this block. ||
 
|-
 
| '''beneficiary''' || <tt>''H<sub>c</sub>''</tt>
 
| The 160-bit address to which all fees collected from the successful mining of this block be transferred. ||
 
|-
 
| '''stateRoot''' || <tt>''H<sub>r</sub>''</tt>
 
| The Keccak 256-bit hash of the root node of the state trie, after all transactions are executed and finalisations applied; ||
 
|-
 
| '''transactionsRoot''' || <tt>''H<sub>t</sub>''</tt>
 
| The Keccak 256-bit hash of the root node of the trie structure populated with each transaction in the transactions list portion of the block. ||
 
|-
 
| '''receiptsRoot''' || <tt>''H<sub>e</sub>''</tt>
 
| The Keccak 256-bit hash of the root node of the trie structure populated with the receipts of each transaction in the transactions list portion of the block. ||
 
|-
 
| '''logsBloom''' || <tt>''H<sub>b</sub>''</tt>
 
| The Bloom filter composed from indexable information (logger address and log topics) contained in each log entry from the receipt of each transaction in the transactions list. ||
 
|-
 
| '''difficulty''' || <tt>''H<sub>d</sub>''</tt>
 
| A scalar value corresponding to the difficulty level of this block. This can be calculated from the previous block’s difficulty level and the timestamp. ||
 
|-
 
| '''number''' || <tt>''H<sub>i</sub>''</tt>
 
| A scalar value equal to the number of ancestor blocks. || 0 for genesis block
 
|-
 
| '''gasLimit''' || <tt>''H<sub>l</sub>''</tt>
 
| A scalar value equal to the current limit of gas expenditure per block ||
 
|-
 
| '''gasUsed''' || <tt>''H<sub>g</sub>''</tt>
 
| A scalar value equal to the total gas used in transactions in this block. ||
 
|-
 
| '''timestamp''' || <tt>''H<sub>s</sub>''</tt>
 
| A scalar value equal to the reasonable output of Unix’s time() at this block’s inception. ||
 
|-
 
| '''extraData''' || <tt>''H<sub>x</sub>''</tt>
 
| An arbitrary byte array containing data relevant to this block. This must be 32 bytes or fewer. ||
 
|-
 
| '''mixHash''' || <tt>''H<sub>m</sub>''</tt>
 
| A 256-bit hash which, combined with the nonce, proves that a sufficient amount of computation has been carried out on this block. ||
 
|-
 
| '''nonce''' || <tt>''H<sub>n</sub>''</tt>
 
| A 64-bit value which, combined with the mixhash, proves that a sufficient amount of computation has been carried out on this block. ||
 
|}
 
 
====World State====
 
 
* [https://medium.com/cybermiles/diving-into-ethereums-world-state-c893102030ed '''Diving into Ethereum’s world state'''] (Feb 11, 2018)
 
** ''There is one, and one only, global state trie in Ethereum.''
 
** ''A storage trie is where all of the contract data lives.''
 
** ''Each Ethereum account has its own storage trie.''
 
** ''Transaction trie — one per block''
 
** ''Ethereum’s Rust client Parity uses rocksdb. Whereas Ethereum’s Go, C++ and Python clients all use leveldb.''
 
 
* [https://ethereum.stackexchange.com/questions/359/where-is-the-state-data-stored Where is the state data stored?](Jan 22 '16)
 
 
* [https://blog.ethereum.org/2015/06/26/state-tree-pruning/ State Tree Pruning] (June 26, 2015)
 
 
====Merkle Patricia Tree====
 
 
* [https://en.wikipedia.org/wiki/Trie Trie]
 
** ''an ordered tree data structure used to store a dynamic set or associative array where the keys are usually strings.''
 
** ''Unlike a binary search tree, no node in the tree stores the key associated with that node; instead, its position in the tree defines the key with which it is associated.''
 
* [https://en.wikipedia.org/wiki/Radix_tree Radix Tree]
 
** ''a data structure that represents a space-optimized trie (prefix tree) in which each node that is the only child is merged with its parent.''
 
 
* [https://github.com/ethereum/wiki/wiki/Patricia-Tree Merkle Patricia Tree Specification]
 
* [https://ethereum.stackexchange.com/questions/57486/why-merkle-patricia-trie-has-three-types-of-nodes Why Merkle-Patricia Trie has three types of nodes?] (Aug 26 '18)
 
 
====Consensus====
 
 
* [https://www.investopedia.com/news/what-ethereums-difficulty-bomb/ What Is Ethereum's "Difficulty Bomb"?] (Jun 25, 2019)
 
* [https://ethereum.stackexchange.com/questions/2072/why-are-there-no-leading-zeroes-in-ethereum-block-hash Why are there no leading zeroes in ethereum block hash?] (Mar 15 '16)
 
** <tt>2<sup>256</sup> = difficulty * target</tt>
 
 
* [https://github.com/ethereum/go-ethereum/blob/v1.9.11/consensus/ethash/consensus.go <tt>github.com/ethereum/go-ethereum/consensus/ethash/consensus.go</tt>]
 
** [https://github.com/ethereum/go-ethereum/blob/v1.9.11/consensus/ethash/consensus.go#L41 <tt>var FrontierBlockReward = big.NewInt(5e+18)</tt>]
 
** [https://github.com/ethereum/go-ethereum/blob/v1.9.11/consensus/ethash/consensus.go#L42 <tt>var ByzantiumBlockReward = big.NewInt(3e+18)</tt>]
 
** [https://github.com/ethereum/go-ethereum/blob/v1.9.11/consensus/ethash/consensus.go#L43 <tt>var ConstantinopleBlockReward = big.NewInt(2e+18)</tt>]
 
** [https://github.com/ethereum/go-ethereum/blob/v1.9.11/consensus/ethash/consensus.go#L63 <tt>var calcDifficultyByzantium = makeDifficultyCalculator(big.NewInt(3000000))</tt>]
 
** [https://github.com/ethereum/go-ethereum/blob/v1.9.11/consensus/ethash/consensus.go#L57 <tt>var calcDifficultyConstantinople = makeDifficultyCalculator(big.NewInt(5000000))</tt>]
 
** [https://github.com/ethereum/go-ethereum/blob/v1.9.11/consensus/ethash/consensus.go#L50 <tt>var calcDifficultyEip2384 = makeDifficultyCalculator(big.NewInt(9000000))</tt>]
 
** [https://github.com/ethereum/go-ethereum/blob/v1.9.11/consensus/ethash/consensus.go#L342 <tt>func makeDifficultyCalculator(bombDelay *big.Int) func(time uint64, parent *types.Header) *big.Int</tt>]
 
*** Ethereum difficulty is integer
 
 
* JavaScript code snippet to calculate <tt>target</tt> in hexa with given <tt>difficulty</tt>
 
** <syntaxhighlight lang='javascript' inline class='inline'>> (2n**256n / 24091770185844n).toString(16).padStart(64, '0') // difficulty: 24091770185844</syntaxhighlight>
 
 
====Misc====
 
 
* [https://ethereum.stackexchange.com/questions/36128/hundreds-of-millions-of-dollars-locked-at-0x0-address-and-smart-contracts-addre Hundreds of Millions of Dollars Locked at 0x0 Address and Smart Contracts’ Addresses — How, Why and What to do?] (Jan 13 '18)
 
 
=====Call vs Send=====
 
 
{| class='wikitable'
 
! Library !! API !! Description !! Remarks
 
|-
 
| style='white-space:nowrap' | JSON-RPC || [https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_call <tt>eth_call</tt>]
 
| Executes a new message call immediately without creating a transaction on the block chain. || No signing, 0 gas
 
|-
 
| || [https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendtransaction <tt>eth_sendTransaction</tt>]
 
| Creates new message call transaction or a contract creation, if the data field contains code. ||
 
|-
 
| || style='white-space:nowrap' | [https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendrawtransaction <tt>eth_sendRawTransaction</tt>]
 
| Creates new message call transaction or a contract creation for signed transactions. || single parameter for the signed transaction data.
 
|-
 
| style='white-space:nowrap' | web3js 1.2 || style='white-space:nowrap' | [https://web3js.readthedocs.io/en/v1.2.6/web3-eth-contract.html#methods-mymethod-call <tt>methods.myMethod.call</tt>]
 
| Will call a “constant” method and execute its smart contract method in the EVM without sending any transaction. Note calling can not alter the smart contract state.
 
| <tt>constant</tt> function -> <tt>view</tt> function in Solidity 0.5
 
|-
 
| || style='white-space:nowrap' | [https://web3js.readthedocs.io/en/v1.2.6/web3-eth-contract.html#methods-mymethod-send <tt>methods.myMethod.send</tt>]
 
| Will send a transaction to the smart contract and execute its method. Note this can alter the smart contract state. ||
 
|}
 
 
===Hard Forks===
 
 
* [https://docs.ethhub.io/ethereum-basics/history-and-forks/ History and Network Upgrades]
 
* [https://consensys.net/blog/blockchain-explained/a-short-history-of-ethereum/ A Short History of Ethereum MAY 13, 2019]
 
* [https://blog.ethereum.org/2015/07/30/ethereum-launches/ Ethereum Launches] (July 30, 2015)
 
 
{| class='wikitable'
 
! Fork !! Date !! Block # !! Description !! Remarks
 
|-
 
| Olympic || 2015-05-09 || N/A || The final PoC testnet ||
 
|-
 
| [https://blog.ethereum.org/2015/07/30/ethereum-launches/ Frontier] || 2015-06-30 || 0 || The 1st official public mainnet || Block Reward, Gas
 
|-
 
| Homestead || 2016-03-14 || 1,150,000 || The 1st planned hard fork || Solidity, Mist wallet
 
|-
 
| DAO Fork || 2016-06-20 || 1,192,000 || To restore $50M stolen in DAO hack || Ethereum Classic
 
|-
 
| Spurious Dragon || 2016-11-22 || 2,675,000 || EIP 155, EIP 160, EIP 161, EIP 170 ||
 
|-
 
| [https://blog.ethereum.org/2017/10/12/byzantium-hf-announcement/ Metropolis: Byzantium] || 2017-10-16 || 4,370,000
 
| Add <tt>REVERT</tt> and <tt>STATICCALL</tt> opcode ||
 
|-
 
| style='white-space:nowrap' | [https://blog.ethereum.org/2019/02/22/ethereum-constantinople-st-petersburg-upgrade-announcement/ Metropolis: Constantinople]
 
| style='white-space:nowrap' | 2019-02-28 || 7,280,000 || Smart Contract Verification<br/>State Channel<br/>Block Reward Reduction(3ETH -> 2ETH) ||
 
|-
 
| [https://blog.ethereum.org/2019/11/20/ethereum-istanbul-upgrade-announcement/ Istanbul] || 2019-12-07 || 9,069,000
 
| Zcash interoperability enhancement<br/>SNARK and STARK performance enhancement || EIP 1344, EIP 152, EIP 1108, EIP 2028, EIP 2200 ||
 
|-
 
| [https://blog.ethereum.org/2019/12/23/ethereum-muir-glacier-upgrade-announcement/ Muir Glacier]
 
| 2020-01-02 || style='white-space:nowrap' | 9,200,000 || Delays the “difficulty bomb” by 4M blocks. ||
 
|}
 
 
* [https://www.coindesk.com/ethereums-istanbul-hard-fork-is-now-live Ethereum’s Istanbul Hard Fork Is Now Live] (Dec 8, 2019)
 
** ''Ethereum has successfully completed the Istanbul hard fork.''
 
* [https://www.coindesk.com/muir-glacier-ethereum-hard-forks-for-second-time-in-one-month Muir Glacier: Ethereum Hard Forks for Second Time in One Month] (Jan 2, 2020)
 
** ''Ethereum has completed its second hard fork in less than 30 days.''
 
 
===EVM===
 
 
* [https://hackernoon.com/getting-deep-into-evm-how-ethereum-works-backstage-ac7efa1f0015 Getting Deep Into EVM: How Ethereum Works Backstage] (August 16th 2018)
 
* [https://hackernoon.com/getting-deep-into-ethereum-how-data-is-stored-in-ethereum-e3f669d96033?ref=hackernoon.com Getting Deep Into Ethereum: How Data Is Stored In Ethereum?] (July 29th 2018)
 
 
===Ethereum 2.0===
 
 
* [https://docs.ethhub.io/ethereum-roadmap/ethereum-2.0/eth-2.0-phases/ Ethereum 2.0 (Serenity) Phases]
 
* [https://eth2.info/ Ethereum 2.0 Info]
 
* [https://eth2.news/ What’s new in Eth2]
 
* [https://medium.com/@chromaticcapital/eth2-for-dummies-11ff9b11509f ETH2 for Dummies](Jan 8 2020)
 
* [https://notes.ethereum.org/@serenity/handbook Ethereum 2.0 Devs Handbook and FAQs]
 
* [https://github.com/ethereum/eth2.0-specs Ethereum 2.0 Specifications]
 
* [https://hackmd.io/UzysWse1Th240HELswKqVA ETH 2 Phase 2 WIKI]
 
* [https://notes.ethereum.org/@vbuterin/Bkoaj4xpN Phase 2 Proposal 2]
 
 
* [https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ Proof of Stake FAQ]
 
* [https://github.com/ethereum/wiki/wiki/Sharding-FAQ Sharding FAQ]
 
* [https://github.com/ethereum/cbc-casper/wiki/FAQ CBC Casper FAQ]
 
* [https://github.com/ewasm/design Ewasm Design Overview and Specification]
 
 
* [https://docs.google.com/presentation/d/1G5UZdEL71XAkU5B2v-TC3lmGaRIu2P6QSeF8m3wg6MU/ What you can do for Ethereum 2.0 a.k.a. sharding] (June 12th, 2018)
 
* [https://media.consensys.net/state-of-ethereum-protocol-1-d3211dd0f6 State of Ethereum Protocol #1] (Aug 29, 2018)
 
* [https://media.consensys.net/state-of-ethereum-protocol-2-the-beacon-chain-c6b6a9a69129 State of Ethereum Protocol #2: The Beacon Chain] (Oct 27, 2018)
 
 
* [https://medium.com/chainsafe-systems/ethereum-2-0-a-complete-guide-3739a74be61a Ethereum 2.0: A Complete Guide. Scaling, Part One] (Jun 20, 2019)
 
** Plasma Chains, State Channels
 
* [https://medium.com/chainsafe-systems/ethereum-2-0-a-complete-guide-scaling-ethereum-part-two-sharding-902370ac3be Ethereum 2.0: A Complete Guide. Scaling Ethereum — Part Two: Sharding] (Jul 11 2019)
 
* [https://medium.com/chainsafe-systems/ethereum-2-0-a-complete-guide-casper-and-the-beacon-chain-be95129fc6c1 Ethereum 2.0: A Complete Guide. Casper and the Beacon Chain] (Aug 6 2019)
 
* [https://our.status.im/two-point-oh-explaining-validators/ Two Point Oh: Explaining Validators] (02 November 2018)
 
* [https://our.status.im/two-point-oh-explaining-validators/ Two Point Oh: The Beacon Chain] (21 November 2018)
 
 
* [https://medium.com/@william.j.villanueva/a-journey-through-phase-2-of-ethereum-2-0-c7a2397a36cb A Journey Through Phase 2 of Ethereum 2.0]
 
* [https://blockexplorer.com/news/ethereum-scaling-roadmap-casper-plasma-sharding/ The Future of Ethereum: A Scaling Roadmap to Casper, Plasma, and Sharding] (JANUARY 8, 2019)
 
* [https://medium.com/l4-media/making-sense-of-ethereums-layer-2-scaling-solutions-state-channels-plasma-and-truebit-22cb40dcc2f4 Making Sense of Ethereum’s Layer 2 Scaling Solutions: State Channels, Plasma, and Truebit] (Feb 12, 2018)
 
* [https://hackernoon.com/2019-blockchain-layer-2-solution-review-d00385147396 2019 Blockchain Layer 2 Solution Review] (February 27th 2019)
 
 
====Casper====
 
 
* [https://arxiv.org/pdf/1710.09437.pdf '''Casper the Friendly Finality Gadget'''] (Vitalik and Virgil's Paper)
 
** [https://arxiv.org/pdf/1710.09437v1.pdf Casper the Friendly Finality Gadget v1] (25 Oct 2017)
 
* [https://vitalik.ca/files/casper_note.html Casper The Friendly Finality Gadget] (Vitalik's Notes)
 
* [https://medium.com/unitychain/intro-to-casper-ffg-9ed944d98b2d Casper FFG: Consensus Protocol for the Realization of Proof-of-Stake]
 
* [https://www.skalex.io/ethereum-casper/ Ethereum Casper: A Comprehensive Guide]
 
* [https://medium.com/onther-tech/casper-ffg-overview-e09fbe4f7d2c Casper FFG Overview] (Korean)
 
* [https://medium.com/@VitalikButerin/minimal-slashing-conditions-20f0b500fc6c Minimal Slashing Conditions] (Mar 2, 2017)
 
* [https://arxiv.org/pdf/1406.5694.pdf Cryptocurrencies without Proof of Work]
 
* [https://ethresear.ch/t/convenience-link-to-casper-sharding-chain-v2-1-spec/2332 Convenience link to Casper+Sharding chain v2.1 spec] (Jun '18)
 
 
* [https://vitalik.ca/general/2018/12/05/cbc_casper.html A CBC Casper Tutorial] (Dec 5, 2018)
 
 
====Misc====
 
 
* [https://ethresear.ch/t/the-stateless-client-concept/172?u=benjaminion The Stateless Client Concept]
 
 
===JSON RPC APIs===
 
 
* [https://eth.wiki/json-rpc/API JSON RPC API] (Generic)
 
* [https://eips.ethereum.org/EIPS/eip-1474 EIP-1474: Remote procedure call specification] : defines a standard set of remote procedure call methods that an Ethereum node should implement.
 
 
{| class='wikitable'
 
! Object !! Description !! Properties !! Remarks
 
|-
 
| [https://eth.wiki/json-rpc/API#returns-29 '''transaction'''] || || <tt>from</tt>, <tt>to</tt>, <tt>gas</tt>, <tt>gasPrice</tt>, <tt>value</tt>, <tt>data</tt>, <tt>nonce</tt> ||
 
|-
 
| [https://eth.wiki/json-rpc/API#returns-32 '''transaction receipt'''] || || ||
 
|}
 
 
<div style='font-size:smaller'>
 
{| class='wikitable'
 
! JSON-RPC Method !! Description !! JavaScript API !! Python API
 
|-
 
| [https://eth.wiki/json-rpc/API#web3_clientversion <tt>web3_clientVersion</tt>] || the current client version
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getnodeinfo <tt>web3.eth.getNodeInfo()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.main.html#web3.Web3.clientVersion <tt>web3.clientVersion</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#web3_sha3 <tt>web3_sha3</tt>] || Keccak-256 (not the standardized SHA3-256) of the given data.
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-utils.html#sha3 <tt>web3.utils.sha3()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.main.html#web3.Web3.keccak <tt>Web3.keccak()</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_protocolversion <tt>eth_protocolVersion</tt>] || the current ethereum protocol version
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getprotocolversion <tt>web3.eth.getProtocolVersion()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.protocolVersion <tt>web3.eth.protocolVersion</tt>]
 
|-
 
| [https://eips.ethereum.org/EIPS/eip-695 <tt>eth_chainId</tt>]
 
| a single string result for an integer value in hexadecimal format, describing the currently configured CHAIN_ID value used for signing replay-protected transactions
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getchainid <tt>web3.eth.getChainId()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.chain_id <tt>web3.eth.chain_id</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_syncing <tt>eth_syncing</tt>] || an object with data about the sync status or <tt>false</tt>
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#issyncing <tt>web3.eth.isSyncing()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.syncing <tt>web3.eth.syncing</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_coinbase <tt>eth_coinbase</tt>] || the coinbase address to which mining rewards will go
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getcoinbase <tt>web3.eth.getCoinbase()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.coinbase <tt>web3.eth.coinbase</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_mining <tt>eth_mining</tt>] || whether the node is mining or not
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#ismining <tt>web3.eth.isMining()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.mining <tt>web3.eth.mining</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_hashrate <tt>eth_hashrate</tt>] || the number of hashes per second that the node is mining with
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#gethashrate <tt>web3.eth.getHashrate()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.hashrate <tt>web3.eth.hashrate</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_gasprice <tt>eth_gasPrice</tt>] || the current price per gas in wei
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getgasprice <tt>web3.eth.getGasPrice()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.gasPrice <tt>web3.eth.gasPrice</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_accounts <tt>eth_accounts</tt>] || a list of addresses owned by client
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getaccounts <tt>web3.eth.getAccounts()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.accounts <tt>web3.eth.accounts</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_blocknumber <tt>eth_blockNumber</tt>] || the number of most recent block
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getblocknumber <tt>web3.eth.getBlockNumber()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.blockNumber <tt>web3.eth.blockNumber</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_getbalance <tt>eth_getBalance</tt>] || the balance of the account of given address
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getbalance <tt>web3.eth.getBalance()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.get_balance <tt>web3.eth.get_balance()</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_gettransactioncount <tt>eth_getTransactionCount</tt>] || the number of transactions sent from an address. (nonce)
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#gettransactioncount <tt>web3.eth.getTransactionCount()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.getTransactionCount <tt>web3.eth.getTransactionCount()</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_getstorageat <tt>eth_getStorageAt</tt>] || the value from a storage position at a given address.
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getstorageat <tt>web3.eth.getStorageAt()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.get_storage_at <tt>web3.eth.get_storage_at()</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_getcode <tt>eth_getCode</tt>] || code at a given address
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getcode <tt>web3.eth.getCode()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.getCode <tt>web3.eth.getCode()</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_getblocktransactioncountbynumber <tt>eth_getBlockTransactionCountByNumber</tt>] || the number of transactions in a block matching the given block number.
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getblocktransactioncount <tt>web3.eth.getBlockTransactionCount()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.get_block_transaction_count <tt>web3.eth.get_block_transaction_count()</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_sign <tt>eth_sign</tt>] || calculates an Ethereum specific signature
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#sign <tt>web3.eth.sign()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.sign <tt>web3.eth.sign()</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_signtransaction <tt>eth_signTransaction</tt>] || signs a transaction that can be submitted to the network at a later time.
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#signtransaction <tt>web3.eth.signTransaction()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.signTransaction <tt>web3.eth.signTransaction()</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_sendtransaction <tt>eth_sendTransaction</tt>] || creates new message call transaction or a contract creation
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#sendtransaction <tt>web3.eth.sendTransaction()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.sendTransaction <tt>web3.eth.sendTransaction()</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_sendrawtransaction <tt>eth_sendRawTransaction</tt>] || creates new message call transaction or a contract creation for signed transactions.
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#sendsignedtransaction <tt>web3.eth.sendSignedTransaction()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.sendRawTransaction <tt>web3.eth.sendRawTransaction()</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_call <tt>eth_call</tt>] || executes a new message call immediately without creating a transaction on the block chain.
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#call <tt>web3.eth.call()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.call <tt>we3.eth.call()</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_getblockbynumber <tt>eth_getBlockByNumber</tt>] || information about a block by block number.
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getblock <tt>web3.eth.getBlock()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.get_block <tt>web3.eth.get_block()</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#eth_gettransactionbyblocknumberandindex <tt>eth_getTransactionByBlockNumberAndIndex</tt>] || information about a transaction by block number and transaction index position.
 
|
 
| [https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.getTransactionByBlock <tt>web3.eth.getTransactionByBlock()</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#net_version <tt>net_version</tt>] || the current network id
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-net.html#getid <tt>web3.eth.net.getId()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.net.html#web3.net.version <tt>web3.net.version</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#net_peercount <tt>net_peerCount</tt>] || number of peers currently connected to the client.
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-net.html#getpeercount <tt>web3.eth.net.getPeerCount()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.net.html#web3.net.peer_count <tt>web3.net.peer_count</tt>]
 
|-
 
| [https://eth.wiki/json-rpc/API#net_listening <tt>net_listening</tt>] || whether or not client is actively listening for network connections.
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-net.html#islistening <tt>web3.eth.net.isListening()</tt>]
 
| [https://web3py.readthedocs.io/en/latest/web3.net.html#web3.net.listening <tt>web3.net.listening</tt>]
 
|}
 
</div>
 
 
* Looking around the local client using JSON RPC API
 
<syntaxhighlight lang='bash' enclose='div'>
 
$ # Get the client coinbase address. (https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_coinbase)
 
$ curl -sSX POST --data '{"jsonrpc":"2.0","method":"eth_coinbase","params":[],"id":11}' http://127.0.0.1:8545
 
 
$ # Get the client version. (https://github.com/ethereum/wiki/wiki/JSON-RPC#web3_clientversion)
 
$ curl -sSX POST --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":21}' http://127.0.0.1:8545
 
 
$ # Get the Ethereum protocol version. (https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_protocolversion)
 
$ # For more on Ethereum protocol version, refer https://github.com/ethereum/devp2p/blob/master/caps/eth.md
 
$ curl -sSX POST --data '{"jsonrpc":"2.0","method":"eth_protocolVersion","params":[],"id":31}' http://127.0.0.1:8545
 
 
$ # Get the number of peers currently connected to the client. (https://github.com/ethereum/wiki/wiki/JSON-RPC#net_peercount)
 
$ curl -sSX POST --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":41}' http://127.0.0.1:8545
 
 
$ # Check whether the client is mining or not. (https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_mining)
 
$ curl -sSX POST --data '{"jsonrpc":"2.0","method":"eth_mining","params":[],"id":51}' http://127.0.0.1:8545
 
 
$ # Get a list of addresses owned by client (https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_accounts)
 
$ curl -sSX POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":61}' http://127.0.0.1:8545
 
 
$ # Get the network ID. (https://github.com/ethereum/wiki/wiki/JSON-RPC#net_version)
 
$ curl -sSX POST --data '{"jsonrpc":"2.0","method":"net_version","params":[],"id":71}' http://127.0.0.1:8545
 
 
$ # Get the current price per gas in wei. (https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gasprice)
 
$ curl -sSX POST --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":81}' http://127.0.0.1:8545
 
 
$ # Get the number of most recent block. (https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_blocknumber)
 
$ curl -sSX POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":91}' http://127.0.0.1:8545
 
 
$ # Get the gas limit of the most recent block
 
$ curl -sSX POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":92}' http://127.0.0.1:8545 | jq .result.gasLimit
 
 
$ # Get information about a block by block number. (https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getblockbynumber)
 
$ curl -sSX POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":[0, false],"id":101}' http://127.0.0.1:8545 | jq . # block 0
 
$ curl -sSX POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x1", false],"id":102}' http://127.0.0.1:8545 | jq . # block 1
 
$ curl -sSX POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":[2, false],"id":103}' http://127.0.0.1:8545 | jq . # block 1
 
</syntaxhighlight>
 
 
 
<syntaxhighlight lang='javascript' lines enclose='div'>
 
#! /bin/bash
 
 
function print_help {
 
echo "Executes some basic Ethereum JSON RPC method to check the specified Ethereum client."
 
echo ""
 
echo "Usage:"
 
echo " $ ${0##*/} [-h | --help | rpc_addr]"
 
echo ""
 
echo "If '-h' or '--help' is given, only display this help and quit."
 
echo "If rpc_addr is given, execute some basic Ethereum JSON RPC "
 
echo "methods to the specified address."
 
echo "If no argument is given, excute the same method to local RPC"
 
echo "address of 'http://127.0.0.1:8545'."
 
}
 
 
if [ $# -gt 1 ]; then
 
echo "Too many parameters. At the most, one parameter is possible"
 
echo ""
 
print_help
 
exit 100
 
fi
 
 
declare rpc_addr='http://127.0.0.1:8545'
 
 
if [ $# -eq 1 ]; then
 
if [ "$1" == "-h" -o "$1" == "--help" ]; then
 
print_help
 
exit 0
 
fi
 
rpc_addr=$1
 
fi
 
 
# check the specified RPC address
 
curl -sS $rpc_addr
 
if [ $? -ne 0 ]; then
 
echo "Fail to connect to the specified RPC adderss '$rpc_addr'"
 
exit 200
 
fi
 
 
echo "Executing some basic JSON RPC methods to '$rpc_addr'"
 
echo ""
 
 
declare -ar titles=(
 
'the client coinbase address'
 
'current client version'
 
'the current ethereum protocol version'
 
'number of peers currently connected to the client'
 
'whether or not client is actively mining new blocks'
 
'a list of addresses owned by client'
 
'current network ID'
 
'the current price per gas in wei'
 
'the number of most recent block'
 
'about the genesis block'
 
)
 
 
declare -ar data=(
 
'{"jsonrpc":"2.0","method":"eth_coinbase","params":[],"id":11}'
 
'{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":21}'
 
'{"jsonrpc":"2.0","method":"eth_protocolVersion","params":[],"id":31}'
 
'{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":41}'
 
'{"jsonrpc":"2.0","method":"eth_mining","params":[],"id":51}'
 
'{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":61}'
 
'{"jsonrpc":"2.0","method":"net_version","params":[],"id":71}'
 
'{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":81}'
 
'{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":91}'
 
'{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x0", false],"id":101}'
 
)
 
 
for (( i = 0; i < ${#titles[@]}; i++ )); do
 
 
cmd="curl -sSX POST --data '${data[$i]}' $rpc_addr"
 
 
echo "// ${titles[$i]}"
 
echo $cmd
 
eval $cmd
 
echo -e "\n"
 
done
 
</syntaxhighlight>
 
 
* Verifying a confusing result or situation at the most fundamental level using <tt>eth_getTransactionByHash</tt> and <tt>eth_getTransactionReceipt</tt> APIs for each transaction concenred
 
<syntaxhighlight lang='bash' enclose='div'>
 
 
$ # Get information for the specified transaction (result is not included) (https://eth.wiki/json-rpc/API#eth_gettransactionbyhash)
 
$ curl -sSX POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x10f612a42b04ace427b0057caf76d7c7446840f419d4b424f117ecb1bd2cb0e8"],"id":201}' http://127.0.0.1:8545
 
 
$ # Get the receipt for the specified transaction, which include the result status and logs (https://eth.wiki/json-rpc/API#eth_gettransactionreceipt)
 
$ curl -sSX POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x10f612a42b04ace427b0057caf76d7c7446840f419d4b424f117ecb1bd2cb0e8"],"id":211}' http://127.0.0.1:8545
 
</syntaxhighlight>
 
 
* [https://stackoverflow.com/questions/46349202/rinkeby-replacement-transaction-underpricedo Rinkeby: “replacement transaction underpriced”] (Sep 21 '17)
 
 
===Smart Contract===
 
 
{| class='wikitable'
 
! ERC !! Reference !! Description !! Remarks
 
|-
 
| ERC-725 || [https://github.com/ERC725Alliance/erc725 ERC 725 Alliance Reference Implementation] || ||
 
|-
 
| || [https://github.com/uport-project/uport-identity uPort Identity Contracts] || ||
 
|}
 
 
* [https://www.researchgate.net/figure/An-overview-of-key-elements-of-uPort-a-user-identity-is-comprised-of-a-mobile_fig1_322383187 An overview of key elements of uPort]
 
 
===Oracle===
 
 
* [https://link.smartcontract.com/whitepaper ChainLink Whitepaper - A Decentralized Oracle Network]
 
* [https://medium.com/the-capital/the-four-biggest-use-cases-for-chainlink-a0245bd07b66 ChainLink and Its 4 Main Use Cases] (Nov 26, 2018)
 
 
* [https://blog.chain.link/breaking-down-mixicles-and-its-potential-to-unlock-enterprise-demand-for-defi-applications-on-public-blockchains/ Breaking Down Mixicles and Their Potential to Unlock Enterprise Demand for DeFi Applications On Public Blockchains] (4 OCTOBER 2019)
 
 
===Programming===
 
 
* [https://blog.zeppelin.solutions/a-gentle-introduction-to-ethereum-programming-part-1-783cc7796094 A Gentle Introduction to Ethereum Programming, Part 1] (Nov 15, 2017)
 
* [https://blog.zeppelin.solutions/a-gentle-introduction-to-ethereum-programming-part-2-7bbf15e1a953 A Gentle Introduction to Ethereum Programming, Part 2] (Nov 17, 2017)
 
* [https://blog.zeppelin.solutions/a-gentle-introduction-to-ethereum-programming-part-3-abdd9644d0c2 A Gentle Introduction to Ethereum Programming, Part 3] (Jan 13, 2018)
 
* [https://ethereum.stackexchange.com/questions/1587/how-can-i-get-the-data-of-the-latest-10-blocks-via-web3-js How can I get the data of the latest 10 blocks via web3.js?] (Feb 25 '16)
 
** <syntaxhighlight lang='javascript' inline class='inline'>web3.eth.getBlock(web3.eth.blockNumber - i)</syntaxhighlight>
 
 
===Clients===
 
 
* [https://ethereum.org/cli GETH & ETH Command line tools for the Ethereum Network]
 
* [https://ethereum.stackexchange.com/questions/11248/how-to-call-geth-attach-on-testnet-better-than-writing-full-path How to call “geth attach” on --testnet better than writing full path?] (Jan 9 '17)
 
** <syntaxhighlight lang='javascript' inline class='inline'>geth attach http://127.0.0.1:8545</syntaxhighlight>
 
 
===Test Network, Private Network===
 
 
* [https://chainid.network/ EVM Networks] : list of EVM networks more than 30 networks
 
 
* [https://github.com/ethereum/go-ethereum/blob/master/README.md#running-geth Running geth]
 
** Full node on the main Ethereum network, Full node on the Ethereum test network, Operating a private network
 
* [https://github.com/ethereum/go-ethereum/wiki/Private-network Private network]
 
* [https://medium.com/@solangegueiros/https-medium-com-solangegueiros-setting-up-ethereum-private-network-on-windows-a72ec59f2198 The Geth’s saga: setting up Ethereum private network on windows] (Sep 25, 2017)
 
* [https://github.com/ethereum/go-ethereum/wiki/Setting-up-private-network-or-local-cluster Setting up private network or local cluster]
 
* [https://etherworld.co/2017/01/17/running-ethereum-testnet-using-geth/ Running Ethereum testnet using Geth]
 
* [https://web3j.readthedocs.io/en/latest/transactions.html#ethereum-testnets Ethereum testnets]
 
* [https://github.com/chafey/ethereum-private-network ethereum-private-network]
 
** Instructions on how to setup an ethereum private network
 
* [https://rogeliorodriguez.net/2016/08/29/adding-nodes-to-your-private-blockchain/ ADDING NODES TO YOUR PRIVATE BLOCKCHAIN]
 
* [https://ethereum.stackexchange.com/a/2377 '''Genesis block Explanation''']
 
* [https://ethereum.stackexchange.com/questions/37533/what-is-a-chainid-in-ethereum-how-is-it-different-than-networkid-and-how-is-it What is a chainID in Ethereum, how is it different than NetworkID, and how is it used?] (Jan 26 '18)
 
** ''Subsequent to EIP-155, ETH has a chainID of 1, while ETC has a chainID of 61 (even though they still have the same networkID of 1)''
 
 
* [https://kauri.io/ethereum-101-part-6-mainnet-testnets/3eba08b801a44776a07607b9e046dd08/a Ethereum 101 - Part 6 - Mainnet & Testnets]
 
* [https://medium.com/coinmonks/ethereum-test-network-21baa86072fa Ethereum Test network] (May 15, 2018)
 
* [https://ethereum.stackexchange.com/questions/27048/comparison-of-the-different-testnets Comparison of the different TestNets] (Sep 25 '17)
 
 
{| class='wikitable' style='font-size:smaller'
 
! Network !! [https://github.com/ethereum/wiki/wiki/JSON-RPC#net_version ID] !! Consensus !! Avg. Block Time
 
! Faucet !! Explorer !! GitHub !! Remark
 
|-
 
| Ropsten || style='text-align:center' | 3 || style='text-align:center' | PoW || style='text-align:center' | 30 sec.
 
| https://faucet.ropsten.be/ || https://ropsten.etherscan.io/ || https://github.com/ethereum/ropsten ||
 
|-
 
| [https://www.rinkeby.io/ Rinkeby] || style='text-align:center' | 4 || style='text-align:center' | PoA || style='text-align:center' | 15 sec.
 
| https://faucet.rinkeby.io/ || https://www.rinkeby.io/#explorer || ||
 
|-
 
| [https://kovan-testnet.github.io/website/ Kovan] || style='text-align:center' | 42 || style='text-align:center' | PoA || style='text-align:center' | 4 sec.
 
| https://faucet.kovan.network/ || https://kovan.etherscan.io/ || https://github.com/kovan-testnet ||
 
|-
 
| [https://goerli.net/ Görli] || style='text-align:center' | 5 || style='text-align:center' | PoA || style='text-align:center' | 15 sec.
 
| || https://goerli.etherscan.io/ || https://github.com/goerli/testnet ||
 
|}
 
 
===Services===
 
 
* [https://etherscan.io/ a Block Explorer and Analytics Platform for Ethereum]
 
* [https://ethgasstation.info/ ETH GAS STATION]
 
 
===Recommendations===
 
 
* [https://karl.tech/5-essential-ethereum-dapp-tools/ 5 Essential Ethereum Dapp Tools]
 
* [https://hackernoon.com/11-best-ethereum-development-tools-to-grow-your-stack-e782fd7156ab 11 Best Ethereum Development Tools to Grow Your Stack] (Feb 25, 2017)
 
 
===Hackings===
 
 
* [https://medium.com/chain-cloud-company-blog/parity-multisig-hack-again-b46771eaa838 Parity Multisig Hacked. Again] (Nov 8, 2017)
 
** ''About $300M is frozen and (probably) lost forever.''
 
 
===misc===
 
 
* [https://github.com/ethereum/pyethapp/tree/develop/pyethapp/genesisdata Example <code>genesis.json</code>]
 
 
====Ethereum Network Statistics====
 
 
* [https://etherscan.io/charts Etherscan > Ethereum Charts & Statistics]
 
* [https://etherscan.io/topstat Etherscan > Top Statistics]
 
 
* [https://ethstats.net/ Ethstats]
 
* [https://www.ethernodes.org/ Ethereum Mainnet Statistics]
 
** Clients, Countries, Sync Status, OS, Network Type
 
 
{| class='wikitable'
 
! Topic !! Charts and Tables !! Remarks
 
|-
 
| Time || [https://etherscan.io/chart/blocktime Average Block Time Chart] ||
 
|-
 
| Mining Difficulty || [https://etherscan.io/chart/difficulty Etherscan / Ethereum Network Difficulty Chart] ||
 
|-
 
| || [https://www.coinwarz.com/mining/ethereum/difficulty-chart Ethereum Difficulty Chart] ||
 
|-
 
| Data Size || [https://etherscan.io/chartsync/chaindefault Full Node Data Size Chart] ||
 
|-
 
| || [https://etherscan.io/chartsync/chainarchive Archive Node Data Size Chart] ||
 
|}
 
 
====Ethereum Blocks====
 
 
{| class='wikitable mw-datatable' style='text-align:right'
 
! Block # !! Hash !! Date !! Difficulty !! Block Reward !! Fee Reward !! Transactions
 
|-
 
| style='white-space:nowrap' | [https://etherchain.org/block/10000000 10,000,000] || <tt>0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe</tt>
 
| 2020-05-04 || || 2 || 0.07667 || 103
 
|-
 
| [https://etherchain.org/block/9500000 9,500,000]
 
| style='white-space:nowrap' | <tt>0xfd233684d9cbabc563ccc5c3b316ab1f3a22c46cb1495777264f191f5fb96115</tt>
 
| style='white-space:nowrap' | 2020-02-17 || 2,230,523,668,588,724 || 2 || 0.04033 || 33
 
|-
 
| [https://etherchain.org/block/9000000 9,000,000] || <tt>0x388f34dd94b899f65bbd23006ee93d61434a2f2a57053c9870466d8e142960e3</tt>
 
| 2019-11-26 || 2,573,664,196,528,490 || 2 || 0.14161 || 95
 
|-
 
| [https://etherchain.org/block/8000000 8,000,000] || <tt>0x4e454b49dc8a2e2a229e0ce911e9fd4d2aa647de4cf6e0df40cf71bff7283330</tt>
 
| 2019-06-21 || 2,037,888,242,889,388 || 2 || 0.09102 || 168
 
|-
 
| [https://etherchain.org/block/7000000 7,000,000] || <tt>0x17aa411843cb100e57126e911f51f295f5ddb7e9a3bd25e708990534a828c4b7</tt>
 
| 2019-01-03 || 2,553,711,764,445,236 || 3 || 0.01631 || 38
 
|-
 
| [https://etherchain.org/block/6000000 6,000,000] || <tt>0xbe847be2bceb74e660daf96b3f0669d58f59dc9101715689a00ef864a5408f43</tt>
 
| 2018-07-21 || 3,483,739,548,912,554 || 3 || 0.17281 || 101
 
|-
 
| [https://etherchain.org/block/3000000 3,000,000] || <tt>0xee396a86beaade9d6057b72a92b7bf5b40be4997745b437857469557b562a7c3</tt>
 
| 2017-01-16 || 103,975,266,902,792 || 5 || 0.00851 || 6
 
|-
 
| [https://etherchain.org/block/2000000 2,000,000] || <tt>0xc0f4906fea23cf6f3cce98cb44e8e1449e455b28d684dfa9ff65426495584de6</tt>
 
| 2016-08-03 || 49,824,742,724,615 || 5 || 0.00063 || 1
 
|-
 
| [https://etherchain.org/block/1 1] || <tt>0x88e96d4537bea4d9c05d12549907b32561d3bf31f45aae734cdc119f13406cb6</tt>
 
| 2015-07-31 || 17,171,480,576 || 5 || 0 || 0
 
|}
 
 
====Tokens====
 
 
* [https://etherscan.io/tokens Etherscan ERC-20 Token Tracker]
 
* [https://etherscan.io/tokens-nft Etherscan ERC-721 Non-Fungible Token Tracker]
 
* [https://bloxy.info/list_tokens/ERC20 ERC-20 Token List] (Bloxy)
 
* [https://bloxy.info/list_tokens/ERC721 ERC-721 Token List] (Bloxy)
 
 
* [https://ethplorer.io/ Ethereum Tokens Explorer]
 
 
==Solidity==
 
 
* https://github.com/ethereum/solidity
 
* Desc. : a contract-oriented, high-level language for implementing smart contracts
 
* License : GPL v3.0
 
* Sources : https://github.com/ethereum/solidity/
 
 
===References===
 
 
* [https://en.wikipedia.org/wiki/Solidity Solidity] (on Wikipedia)
 
** ''an object-oriented programming language for writing smart contracts.''
 
 
* [https://solidity.readthedocs.io/en/v0.6.1 Solidity v0.6.x official documentation]
 
{| style='margin-left:80px'
 
| [https://solidity.readthedocs.io/en/v0.6.1/types.html Data types]
 
| [https://solidity.readthedocs.io/en/v0.6.1/units-and-global-variables.html#address-related Address]
 
| [https://solidity.readthedocs.io/en/v0.6.1/types.html#arrays Array]
 
|-
 
| [https://solidity.readthedocs.io/en/v0.6.1/contracts.html Contracts]
 
| [https://solidity.readthedocs.io/en/v0.6.1/contracts.html#functions Functions]
 
| [https://solidity.readthedocs.io/en/v0.6.1/types.html#structs Structs]
 
|-
 
| [https://solidity.readthedocs.io/en/v0.6.1/contracts.html#inheritance Inheritance]
 
| [https://solidity.readthedocs.io/en/v0.6.1/contracts.html#interfaces Interfaces]
 
| [https://solidity.readthedocs.io/en/v0.6.1/contracts.html#libraries Libraries]
 
|-
 
| [https://solidity.readthedocs.io/en/v0.6.1/units-and-global-variables.html Units / Global Variables]
 
| [https://solidity.readthedocs.io/en/v0.6.1/units-and-global-variables.html#block-and-transaction-properties Block / Transaction]
 
| [https://solidity.readthedocs.io/en/v0.6.1/units-and-global-variables.html#time-units Time Units]
 
|-
 
| [https://solidity.readthedocs.io/en/v0.6.1/layout-of-source-files.html#pragmas Pragmas]
 
| [https://solidity.readthedocs.io/en/v0.6.1/miscellaneous.html#cheatsheet Cheatsheet]
 
|
 
|}
 
* [https://solidity.readthedocs.io/en/v0.6.0/060-breaking-changes.html Solidity v0.6.0 Breaking Changes]
 
** Function overriding should be explicit. - <tt>virtual</tt>, <tt>override</tt> keywords
 
** Array's <tt>length</tt> property become '''immutable'''.
 
** Abstract contract should be explicit. - <tt>abstract</tt> keyword
 
** State variable shadowing become '''disallowed'''.
 
 
* [https://solidity.readthedocs.io/en/v0.5.15 Solidity v0.5.x official documentation]
 
{| style='margin-left:80px'
 
| [https://solidity.readthedocs.io/en/v0.5.15/types.html Data types]
 
| [https://solidity.readthedocs.io/en/v0.5.15/units-and-global-variables.html#address-related Address]
 
| [https://solidity.readthedocs.io/en/v0.5.15/types.html#arrays Array]
 
|-
 
| [https://solidity.readthedocs.io/en/v0.5.15/contracts.html Contracts]
 
| [https://solidity.readthedocs.io/en/v0.5.15/contracts.html#functions Functions]
 
| [https://solidity.readthedocs.io/en/v0.5.15/types.html#structs Structs]
 
|-
 
| [https://solidity.readthedocs.io/en/v0.5.15/contracts.html#inheritance Inheritance]
 
| [https://solidity.readthedocs.io/en/v0.5.15/contracts.html#interfaces Interfaces]
 
| [https://solidity.readthedocs.io/en/v0.5.15/contracts.html#libraries Libraries]
 
|-
 
| [https://solidity.readthedocs.io/en/v0.5.15/units-and-global-variables.html Units / Global Variables]
 
| [https://solidity.readthedocs.io/en/v0.5.15/units-and-global-variables.html#block-and-transaction-properties Block / Transaction]
 
| [https://solidity.readthedocs.io/en/v0.5.15/units-and-global-variables.html#time-units Time Units]
 
|-
 
| [https://solidity.readthedocs.io/en/v0.5.15/layout-of-source-files.html#pragmas Pragmas]
 
| [https://solidity.readthedocs.io/en/v0.5.15/miscellaneous.html#cheatsheet Cheatsheet]
 
|
 
|}
 
* [https://solidity.readthedocs.io/en/v0.5.0/050-breaking-changes.html Solidity v0.5.0 Breaking Changes]
 
** Function visibility (<tt>external</tt>, <tt>public</tt>, <tt>internal</tt>, <tt>private</tt>) should be explicit.
 
** Data location for reference types (struct, array, mapping) should be explicit.
 
** Conversion from contract type to address should be explicit. - <tt>address(contract).balance</tt>
 
** Explicit conversion between unrelated contract types are '''disallowed'''.
 
** Split <tt>address</tt> type into <tt>address</tt> type and <tt>address payable</tt> type.
 
** For a contract <tt>c</tt>, <tt>address(c)</tt> is <tt>address payable</tt> iff <tt>c</tt> has '''payable fallback''' function.
 
 
* [https://github.com/ethereum/solidity-examples Standard library (draft)]
 
* [https://github.com/ethereum/solidity/blob/develop/Changelog.md Change Log]
 
* [http://solidity.readthedocs.io/en/latest/common-patterns.html Common Patterns]
 
* [https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI Ethereum Contract ABI]
 
* [https://ethervm.io/ Ethereum Virtual Machine Opcodes]
 
 
* [https://github.com/ethereum/solidity/blob/v0.5.8/docs/grammar.txt Solidity Grammar in Extended BNF]
 
* [https://github.com/intellij-solidity/intellij-solidity/blob/master/src/main/grammars/solidity.bnf Solidity Grammar in BNF for IntelliJ]
 
 
* [https://ethereumbuilders.gitbooks.io/guide/content/en/solidity_tutorials.html Solidity Tutorials]
 
* [https://monax.io/docs/solidity/ Solidity Tutorials]
 
* [https://learnxinyminutes.com/docs/solidity/ Learn Solidity in Y minutes]
 
* [https://solidity-by-example.org/ Solidity by Example]
 
* [https://blockgeeks.com/guides/solidity/ How To Learn Solidity: The Ultimate Ethereum Coding Guide]
 
* [https://medium.com/block-journal/writing-solidity-0-5-smart-contracts-101-5efd1ee9f53e Writing Smart Contracts with Solidity 0.5 and Above]
 
* [https://consensys.github.io/smart-contract-best-practices/recommendations/ Solidity Recommendations]
 
 
====Breaking Changes====
 
 
{| class='wikitable'
 
! Version !! Category !! Change !! Remark
 
|-
 
| [https://docs.soliditylang.org/en/v0.8.1/080-breaking-changes.html 0.8]
 
| Arithmetic Operation || Arithmetic operations revert on underflow and overflow. ||
 
|-
 
| || ABI Coder v2 || ABI coder v2 is activated by default. || <tt>pragma abicoder</tt>
 
|-
 
| || Opcode || Failing assertions and other internal checks like division by zero or arithmetic overflow do not use the invalid opcode but instead the revert opcode. ||
 
|-
 
| || Data-type || The type <tt>byte</tt> has been removed. || <tt>bytes1</tt>
 
|-
 
| || Data-type || Address literals have the type <tt>address</tt> instead of <tt>address payable</tt>. || <tt>payable()</tt>
 
|-
 
| || Function || Function call options can only be given once. ||
 
|-
 
| || Global Function || The global functions <tt>log0</tt>, <tt>log1</tt>, <tt>log2</tt>, <tt>log3</tt> and <tt>log4</tt> have been removed. || inline assembly
 
|-
 
| || Global Variable || The global variables <tt>tx.origin</tt> and <tt>msg.sender</tt> have the type address instead of address payable. || <tt>payable(tx.origin)</tt>, <tt>payable(msg.sender)</tt>
 
|-
 
| || Type Conversion || Explicit conversion into <tt>address</tt> type always returns a non-payable address type. ||
 
|-
 
| [https://docs.soliditylang.org/en/v0.8.1/070-breaking-changes.html 0.7]
 
| Function || Ether and gas is now specified using a new syntax: <tt>x.f{gas: 10000, value: 2 ether}(arg1, arg2)</tt>. ||
 
|-
 
| || Global Variable || The global variable now is deprecated. || <tt>block.timestamp</tt>
 
|-
 
| || Data-type || String literals now can only contain printable ASCII characters and this also includes a variety of escape sequences, such as hexadecimal (<tt>\xff</tt>) and unicode escapes (<tt>\u20ac</tt>).
 
|-
 
| || Data-type || Unicode string literals are supported now. || <tt>unicode"Hello 😃"</tt>
 
|-
 
| || State Mutability || The state mutability of functions can now be restricted during inheritance. ||
 
|-
 
| || Mapping || If a struct or array contains a mapping, it can only be used in storage. ||
 
|-
 
| || Mapping || Assignments to structs or arrays in storage does not work if they contain mappings. ||
 
|-
 
| || Constructor || Visibility (<tt>public</tt> / <tt>external</tt>) is not needed for constructors anymore. || <tt>abstract</tt> contract
 
|-
 
| || Function || Disallow virtual for library functions since libraries cannot be inherited from. ||
 
|-
 
| || Inheritance || <tt>using A for B</tt> is NOT inherited. ||
 
|-
 
| || Shift Operation || Shifts by signed types are disallowed. ||
 
|-
 
| || Variable || The keyword <tt>var</tt> cannot be used anymore. || (compile-time) parser error
 
|}
 
 
===Grammar===
 
 
<syntaxhighlight lang='text' enclose='div' style='margin-left:40px'>
 
Contract = State Variable*, Function*, Function Modifier*, Event*, Struct Type*, Enum Type*
 
 
function (<parameter types>) {internal|external} [pure|view|payable] [returns (<return types>)]
 
</syntaxhighlight>
 
 
* [https://solidity.readthedocs.io/en/v0.5.8/types.html?#value-types Value Types]
 
** ''Value types will always be passed by value''
 
 
* [https://solidity.readthedocs.io/en/v0.5.8/types.html#reference-types Reference Types]
 
** ''Every reference type, i.e. arrays and structs, has an additional annotation, the “data location”, about where it is stored.''
 
** ''All complex types must now give an explicit data location.''
 
 
* [https://solidity.readthedocs.io/en/v0.5.8/contracts.html#functions Functions]
 
** ''Functions may also return an arbitrary number of values as output.''
 
** ''Data location must be <tt>memory</tt> for return parameter in function''
 
 
* [https://solidity.readthedocs.io/en/v0.5.8/contracts.html#constructors Constructors]
 
** ''Before the constructor code is executed, state variables are initialised to their specified value if you initialise them inline, or zero if you do not.''
 
** ''After the constructor has run, the final code of the contract is deployed to the blockchain.''
 
** ''The constructors of all the base contracts will be called following the linearization rules explained below.''
 
 
* Contracts
 
** ''State variables are accessed via their name and not via e.g. `this.owner`. Functions can be accessed directly or through `this.f`, but the latter provides an external view to the function. Especially in the constructor, you should not access functions externally, because the function does not exist yet.''
 
 
* '''''Mappings''' can only have a data location of <tt>storage</tt> and thus are allowed for state variables, as storage reference types in functions, or as parameters for library functions. They cannot be used as parameters or return parameters of contract functions that are publicly visible.''
 
 
====Visibility====
 
 
* [https://solidity.readthedocs.io/en/v0.6.1/contracts.html#visibility-and-getters Visibility]
 
 
{| class='wikitable'
 
! Visibility !! Description !! Remarks
 
|-
 
| <tt>external</tt> || Part of the contract interface, which means they can be called from other contracts and via transactions but cannot be called internally || <tt>f()</tt> does not work, but <tt>this.f()</tt> works
 
|-
 
| <tt>public</tt> || Part of the contract interface and can be either called internally or via messages. ||
 
|-
 
| <tt>internal</tt> || Can only be accessed internally (i.e. from within the current contract or contracts deriving from it) ||
 
|-
 
| <tt>private</tt> || Only visible for the contract they are defined in and not in derived contracts. ||
 
|}
 
 
====Mutability====
 
 
{| class='wikitable'
 
! Mutability !! Description !! Remarks
 
|-
 
| [https://solidity.readthedocs.io/en/v0.5.8/contracts.html#pure-functions <tt>pure</tt>] || Promise not to read from or modify the state. ||
 
|-
 
| [https://solidity.readthedocs.io/en/v0.5.8/contracts.html#view-functions <tt>view</tt>] || Promise not to modify the state. ||
 
|-
 
| <tt>nonpayable</tt> || Does not accept Ether ||
 
|-
 
| <tt>payable</tt> || Accepts Ether ||
 
|}
 
 
====Types====
 
 
* [https://solidity.readthedocs.io/en/v0.6.5/abi-spec.html#types Contract ABI Spec > Types]
 
* [https://solidity.readthedocs.io/en/develop/types.html Types]
 
 
{| class='wikitable'
 
! Category !! Types !! Remarks
 
|-
 
| Value Type || Booleans, Integers, Fixed Point Number, Address, Fixed-size Byte Array, Enum ||
 
|-
 
| Reference Type || Arrays, Structs, Mappings ||
 
|}
 
 
* [https://www.bitdegree.org/learn/solidity-types '''Solidity Types: Mapping, Conversion, Value & Reference Types Explained'''] (Jul 1, 2019)
 
 
=====Value Types=====
 
 
{| class='wikitable'
 
! Type !! Description !! Remarks
 
|-
 
| [https://solidity.readthedocs.io/en/latest/types.html#integers '''<tt>int8</tt>''', '''<tt>int16</tt>''', '''<tt>int24</tt>''', ... , '''<tt>int248</tt>''', '''<tt>int256</tt>'''] || signed integer in 8 ~ 256 bits || 8 bits step
 
|-
 
| [https://solidity.readthedocs.io/en/latest/types.html#integers '''<tt>uint8</tt>''', '''<tt>uint16</tt>''', '''<tt>uint24</tt>''', ... , '''<tt>uint248</tt>''', '''<tt>uint256</tt>'''] || unsigned integer in 8 ~ 256 bits || 8 bits step
 
|-
 
| [https://solidity.readthedocs.io/en/latest/types.html#integers '''<tt>int</tt>'''] || alias for '''<tt>int256</tt>''' || 2<sup>256</sup> ~ 10<sup>77</sup>
 
|-
 
| [https://solidity.readthedocs.io/en/latest/types.html#integers '''<tt>uint</tt>'''] || alias for '''<tt>uint256</tt>''' || 2<sup>256</sup> ~ 10<sup>77</sup>
 
|-
 
| [https://solidity.readthedocs.io/en/develop/types.html#address '''<tt>address</tt>'''] || Holds a 20 byte value (size of an Ethereum address) ||
 
|-
 
| [https://solidity.readthedocs.io/en/develop/types.html#address '''<tt>address payable</tt>'''] || Same as <tt>address</tt>, but with the additional members <tt>transfer</tt> and <tt>send</tt> ||
 
|-
 
| [https://solidity.readthedocs.io/en/latest/types.html#fixed-size-byte-arrays '''<tt>byte1</tt>'''] || ||
 
|-
 
| [https://solidity.readthedocs.io/en/latest/types.html#fixed-size-byte-arrays '''<tt>byte32</tt>'''] || ||
 
|-
 
| [https://solidity.readthedocs.io/en/latest/types.html#enums '''<tt>enum</tt>'''] || ||
 
|}
 
 
=====Literals=====
 
 
<syntaxhighlight lang='javascript' enclose='div'>
 
 
bool b1 = true; // boolean literal 'true'
 
bool b2 = false; // boolean literal 'false'
 
 
uint[] arr1 = [uint(1), 2, 3]; // array literal using square bracket
 
 
</syntaxhighlight>
 
 
======Address Type======
 
 
* [https://solidity.readthedocs.io/en/latest/units-and-global-variables.html#members-of-address-types Members of Address Types]
 
* [https://solidity.readthedocs.io/en/latest/types.html#members-of-addresses Members of Addresses]
 
 
{| class='wikitable'
 
! Member !! Description !! Remarks
 
|-
 
| <tt>balance</tt> || ||
 
|-
 
| <tt>transfer(uint256 amount)</tt> || ||
 
|-
 
| <tt>send(uint256 amount) returns (bool)</tt> || ||
 
|-
 
| <tt>call(bytes memory) returns (bool, bytes memory)</tt> || issue low-level <tt>CALL</tt> with the given payload, returns success condition and return data, forwards all available gas, adjustable ||
 
|-
 
| style='white-space:nowrap' | <tt>delegatecall(bytes memory) returns (bool, bytes memory)</tt> || issue low-level <tt>DELEGATECALL</tt> with the given payload, returns success condition and return data, forwards all available gas, adjustable. ||
 
|-
 
| <tt>staticcall(bytes memory) returns (bool, bytes memory)</tt> || issue low-level <tt>STATICCALL</tt> with the given payload, returns success condition and return data, forwards all available gas, adjustable. ||
 
|}
 
 
=====Reference Types=====
 
 
{| class='wikitable'
 
! Type !! Description !! Remarks
 
|-
 
| [https://solidity.readthedocs.io/en/latest/types.html#arrays '''<tt>Arrays</tt>'''] || ||
 
|-
 
| [https://solidity.readthedocs.io/en/latest/types.html#bytes-and-strings-as-arrays '''<tt>bytes</tt>'''] || ||
 
|-
 
| [https://solidity.readthedocs.io/en/latest/types.html#bytes-and-strings-as-arrays '''<tt>string</tt>'''] || ||
 
|-
 
| [https://solidity.readthedocs.io/en/latest/types.html#Structs '''<tt>Struct</tt>'''] || ||
 
|-
 
| [https://solidity.readthedocs.io/en/latest/types.html#mapping-types '''<tt>Mappings</tt>'''] || ||
 
|}
 
 
======Array Type======
 
 
{| class='wikitable'
 
! Category !! Variable/Function !! Type !! Description !! Remarks
 
|-
 
| Array || <tt>length</tt> || ... || ||
 
|-
 
| || <tt>push()</tt> || || || not for <tt>string</tt>
 
|-
 
| || <tt>pop()</tt> || || || not for <tt>string</tt>
 
|}
 
 
* <tt>bytes</tt>
 
** similar to but cheaper than <tt>bytes[]</tt>
 
** packed tightly in calldata and memory.
 
** should be used for arbitrary-length raw byte data
 
 
* <tt>string</tt>
 
** equal to <tt>bytes</tt>
 
** not allow length or index access
 
** should be used for for arbitrary-length UTF-8 data
 
** no built-in manipulation function
 
** comparing two strings : <tt>keccak256(abi.encodePacked(s1)) == keccak256(abi.encodePacked(s2))</tt>
 
** concatenating two strings : <tt>abi.encodePacked(s1, s2)</tt>
 
 
=====Mapping Types=====
 
 
<blockquote class='bared'>
 
You can think of mappings as hash tables, which are virtually initialised such that every possible key exists and is mapped to a value whose byte-representation is all zeros, a type’s default value.
 
 
... mappings do not have a length or a concept of a key or value being set, and therefore cannot be erased without extra information regarding the assigned keys.
 
</blockquote>
 
 
* [https://medium.com/upstate-interactive/mappings-in-solidity-explained-in-under-two-minutes-ecba88aff96e Mappings in Solidity Explained in Under Two Minutes] (May 23, 2018)
 
 
====Data Location====
 
 
* [https://solidity.readthedocs.io/en/v0.6.12/types.html?#data-location Data location]
 
 
{| class='wikitable' style='margin-left:60px'
 
! Data Location !! Features !! Lifetime
 
|-
 
| <tt>storage</tt> || ||
 
|-
 
| <tt>memory</tt> || non-persistent || function call
 
|-
 
| <tt>calldata</tt> || non-modifiable, non-persistent ||
 
|}
 
 
* Currently, '''reference types''' comprise '''structs''', '''arrays''' and '''mappings'''.
 
* All reference types(<tt>array</tt>, <tt>struct</tt>, <tt>mapping</tt>) must give an explicit data location when used in function parameter, local variable.
 
* Data location for reference type '''state variable''' is always '''<tt>storage</tt>''' '''implicitly'''.
 
* Data location for reference type '''local variable''' should be ''''<tt>storage</tt>'''' or ''''<tt>memory</tt>''''.
 
* Data location for reference type '''return parameter''' should be ''''<tt>memory</tt>''''.
 
* Data location for reference type '''<tt>external</tt> function parameter''' should be ''''<tt>calldata</tt>''''.
 
 
* ''If you can, try to use <tt>calldata</tt> as data location because it will avoid copies and also makes sure that the data cannot be modified. Arrays and structs with <tt>calldata</tt> data location can also be returned from functions, but it is not possible to allocate such types.''
 
 
{| class='wikitable'
 
! Case !! Data Location !! Remarks
 
|-
 
| state variable || always '''<tt>storage</tt>''' implicitly ||
 
|-
 
| local variable || '''storage''' or '''memory''' ||
 
|-
 
| <tt>external</tt> function parameter || '''calldata''' ||
 
|-
 
| return parameter || '''memory''' ||
 
|}
 
 
* Data location and assignment
 
 
{| class='wikitable'
 
! Assignment !! Semantics !! Remarks
 
|-
 
| Assignments between <tt>storage</tt> and <tt>memory</tt> || always create an independent copy ||
 
|-
 
| Assignments from <tt>memory</tt> to <tt>memory</tt> || only create references ||
 
|-
 
| Assignments from <tt>storage</tt> to a local storage variable || only assign a reference ||
 
|-
 
| Assignments to state variables || always copy ||
 
|-
 
| Assignments to members of local variables of storage struct type || always copy ||
 
|}
 
 
* [https://medium.com/coinmonks/ethereum-solidity-memory-vs-storage-which-to-use-in-local-functions-72b593c3703a '''Ethereum Solidity: Memory vs Storage & When to Use Them'''] (Mar 18, 2018)
 
** ''<tt>storage</tt> cannot be newly created in a function. Any <tt>storage</tt> referenced variable in a function always refers a piece of data pre-allocated on the contract storage (state variable). Any mutation persists after function call.''
 
** ''<tt>memory</tt> can only be newly created in a function. It can either be newly instantiated complex types like array/struct (e.g. via <tt>new int[...]</tt>) or copied from a <tt>storage</tt> referenced variable.''
 
** ''As references are passed internally through function parameters, remember they default to <tt>memory</tt> and if the variable was on storage it would create a '''copy''' and any modification would not persist.''
 
 
{| class='wikitable'
 
! Usage !! <tt>storage</tt> !! <tt>memory</tt> !! <tt>calldata</tt> !! Preferred !! Remarks
 
|-
 
| State variables || O || X || X || || forced to <tt>storage</tt>
 
|-
 
| Parameters of external functions || X || X || O || || forced to <tt>calldata</tt>
 
|-
 
| Parameters and returns of functions || O || O || O || <tt>memory</tt> ||
 
|-
 
| Local variables || O || O || O || ||
 
|}
 
 
====Literal====
 
 
{| class='wikitable'
 
! Type !! Literal !! Remarks
 
|-
 
| <tt>address</tt> || 0xdCad3a6d3569DF655070DEd06cb7A1b2Ccd1D3AF || Hexadecimal literals that are between 39 and 41 digits long
 
|}
 
 
* [https://solidity.readthedocs.io/en/v0.5.3/types.html#address-literals Address Literals]
 
 
====Default Values (Zero Values)====
 
 
* default value : initial value whose byte-representation is all zeros
 
* [https://solidity.readthedocs.io/en/v0.5.15/control-structures.html#scoping-and-declarations Scoping and Declarations]
 
 
{| class='wikitable'
 
! Type !! Default Value !! Remarks
 
|-
 
| <tt>bool</tt> || <tt>false</tt> ||
 
|-
 
| <tt>uint</tt>, <tt>int</tt> || <tt>0</tt> ||
 
|-
 
| <tt>address</tt> || <tt>address(0)</tt> ||
 
|-
 
| <tt>enum</tt> || the first element of the enum ||
 
|-
 
| fixed sized array || zero-valued array || an array of the fixed size where all elements are set to initial values
 
|-
 
| dynamic sized array || empty array || <tt>[]</tt>
 
|-
 
| <tt>string</tt> || empty string || <tt>""</tt>
 
|-
 
| <tt>mapping</tt> || empty mapping ||
 
|-
 
| <tt>struct</tt> || empty struct || a <tt>struct</tt> value where all members are set to initial values
 
|}
 
 
* [https://ethereum.stackexchange.com/questions/40559/what-are-the-initial-zero-values-for-different-data-types-in-solidity/40571 What are the initial/zero values for different data types in Solidity?] (Feb 22 '18)
 
* [https://stackoverflow.com/questions/37852682/are-there-null-like-thing-in-solidity Are there null like thing in solidity] (Jun 16 '16)
 
 
====Special Variables and Functions====
 
 
{| class='wikitable'
 
! Category !! Variable/Function !! Description !! Remarks
 
|-
 
| Block/Transaction || <tt>block.coinbase::address payable</tt> || current block miner’s address ||
 
|-
 
| || <tt>block.number::uint</tt> || current block number ||
 
|-
 
| || <tt>block.timestamp::uint</tt> || current block timestamp as seconds since unix epoch ||
 
|-
 
| || <tt>msg.sender::address payable</tt> || sender of the message ||
 
|-
 
| || <tt>msg.data::bytes</tt> || complete calldata ||
 
|-
 
| || <tt>msg.sig::bytes4</tt> || first four bytes of the calldata || function identifier(selector)
 
|-
 
| || <tt>msg.value::uint</tt> || number of '''wei''' sent with the message ||
 
|-
 
| || style='white-space:nowrap' | <tt>tx.origin::address payable</tt> || sender of the transaction (full call chain) || tx = &sum;call
 
|-
 
|-
 
| Error Handling || [https://solidity.readthedocs.io/en/develop/units-and-global-variables.html#special-variables-and-functions '''<tt>assert(bool condition)</tt>''']
 
| causes an invalid opcode and thus state change reversion if the condition is not met - to be used for internal errors. ||
 
|-
 
| || [https://solidity.readthedocs.io/en/develop/units-and-global-variables.html#special-variables-and-functions '''<tt>require(bool condition)</tt>''']
 
| reverts if the condition is not met - to be used for errors in inputs or external components. ||
 
|-
 
| Contract || <tt>this</tt> || the current contract || <tt>address(this)</tt>
 
|}
 
 
====Contract====
 
 
* ''A constructor is optional. '''Only one constructor''' is allowed.''
 
* ''If there is no constructor, the contract will assume the '''default constructor''', which is equivalent to <tt>constructor() public {}</tt>''.
 
* ''Before the constructor code is executed, state variables are initialised to their specified value if you initialise them inline, or zero if you do not.''
 
* ''The deployment of the code costs additional gas linear to the length of the code.''
 
* ''Constructor functions can be either <tt>public</tt> or <tt>internal</tt>.''
 
* ''A constructor set as <tt>internal</tt> causes the contract to be marked as abstract.''
 
 
* ''If the base constructors have arguments, derived contracts need to specify all of them.''
 
* ''If a derived contract does not specify the arguments to all of its base contracts’ constructors, it will be <tt>abstract</tt>.''
 
 
* ''Contracts may be marked as <tt>abstract</tt> even though all functions are implemented.''
 
* ''Abstract contracts can not be instantiated directly.''
 
* ''Abstract contracts cannot override an implemented virtual function with an unimplemented one.''
 
 
* ''We perform an explicit type conversion from `address` to `TokenCreator` and assume that the type of the calling contract is `TokenCreator`, there is no real way to verify that. This does not create a new contract.''
 
** <tt>TokenCreator creator;</tt>
 
** <tt>creator = TokenCreator(msg.sender);</tt>
 
* ''Explicit conversions to and from <tt>address</tt> are allowed for integers, integer literals, <tt>bytes20</tt> and contract types with the following caveat: The result of a conversion of the form <tt>address(x)</tt> has the type <tt>address payable</tt>, if <tt>x</tt> is of integer or fixed bytes type, a literal or a contract with a receive or payable fallback function. If <tt>x</tt> is a contract without a receive or payable fallback function, then <tt>address(x)</tt> will be of type <tt>address</tt>.''
 
 
* ''Functions with the <tt>private</tt> visibility cannot be <tt>virtual</tt>.''
 
 
====Library====
 
 
<blockquote class='bared'>
 
If library functions are called, their code is executed in the context of the calling contract,...
 
...
 
 
As a library is an isolated piece of source code, it can only access state variables of the calling contract if they are explicitly supplied...
 
...
 
 
Furthermore, internal functions of libraries are visible in all contracts, just as if the library were a base contract.
 
</blockquote>
 
 
====Error Handling====
 
 
* [https://solidity.readthedocs.io/en/latest/control-structures.html#error-handling-assert-require-revert-and-exceptions Error handling: Assert, Require, Revert and Exceptions]
 
 
{| class='wikitable'
 
! Built-in !! Description !! Remarks
 
|-
 
| style='white-space:nowrap' | [https://solidity.readthedocs.io/en/latest/control-structures.html#id4 <tt>assert(bool)</tt>]
 
| causes an invalid opcode and thus state change reversion if the condition is not met - to be used for internal errors.
 
| imply bug, revert operation(<tt>0xfd</tt>)
 
|-
 
| style='white-space:nowrap' | [https://solidity.readthedocs.io/en/latest/control-structures.html#id4 <tt>require(bool)</tt>]
 
| reverts if the condition is not met - to be used for errors in inputs or return values from calls to external contracts.
 
| invalid operation (<tt>0xfe</tt>)
 
|}
 
 
* Solidity performs a revert operation (instruction <tt>0xfd</tt>) for a <tt>require</tt>-style exception and executes an invalid operation (instruction <tt>0xfe</tt>) to throw an <tt>assert</tt>-style exception. In both cases, this causes the EVM to revert all changes made to the state.
 
* <tt>assert</tt>-style exceptions consume all gas available to the call, while <tt>require</tt>-style exceptions do not consume any gas starting from the Metropolis release.
 
 
====Events====
 
 
* ''The Log and its event data is not accessible from within contracts (not even from the contract that created them)''
 
 
===Readings===
 
 
====Data-type====
 
 
* [https://ethereum.stackexchange.com/questions/871/what-is-the-zero-empty-or-null-value-of-a-struct What is the zero, empty or null value of a struct?] (Feb 2 '16)
 
 
* [https://medium.com/coinmonks/ethereum-solidity-memory-vs-storage-which-to-use-in-local-functions-72b593c3703a Ethereum Solidity: Memory vs Storage & When to Use Them] (Mar 18, 2018)
 
* [https://ethereum.stackexchange.com/questions/10108/is-it-possible-to-have-enum-as-a-mapping-key-type Is it possible to have enum as a mapping key type?] (Nov 17 '16)
 
 
=====String=====
 
 
* [https://ethereum.stackexchange.com/questions/5683/what-is-the-zero-value-for-a-string What is the zero value for a string?] (Jun 5 '16)
 
* [https://ethereum.stackexchange.com/questions/729/how-to-concatenate-strings-in-solidity How to concatenate strings in solidity?] (Jan 28 '16)
 
 
=====Structs=====
 
 
* [https://medium.com/@jeancvllr/solidity-tutorial-all-about-structs-b3e7ca398b1e Solidity Tutorial: all about Structs] (Aug 1, 2019)
 
* [https://ethereum.stackexchange.com/questions/27259/how-can-you-share-a-struct-definition-between-contracts-in-separate-files How can you share a struct definition between contracts in separate files?] (Sep 27 '17)
 
* [https://stackoverflow.com/questions/53895532/returning-struct-array-in-solidity Returning Struct Array in solidity] (Dec 22 '18)
 
* [https://medium.com/coinmonks/solidity-tutorial-returning-structs-from-public-functions-e78e48efb378 Solidity tutorial: returning structs from public functions] (Jul 12, 2017)
 
** ''In the current version of Solidity (0.4.13, as of this writing), it’s impossible to return a struct from a public function.''
 
 
====Contract====
 
 
* [https://ethereum.stackexchange.com/questions/11618/how-to-test-if-a-struct-state-variable-is-set How to test if a struct state variable is set] (Jan 24 '17)
 
 
====Call====
 
 
* [https://medium.com/coinmonks/ethernaut-lvl-6-walkthrough-how-to-abuse-the-delicate-delegatecall-466b26c429e4 Ethernaut Lvl 6 Delegation Walkthrough: How to abuse the delicate delegatecall] (Aug 22, 2018)
 
* [http://getoutsidedoor.com/2019/09/01/delegatecall-in-solidity/ '''DelegateCall: Calling Another Contract Function in Solidity'''] (2019/09/01)
 
 
* [https://vomtom.at/solidity-0-6-4-and-call-value-curly-brackets/ Solidity 0.6.4 and call{value: ...}() instead of call.value()()] (21 APRIL 2020)
 
* [https://medium.com/@blockchain101/calling-the-function-of-another-contract-in-solidity-f9edfa921f4c Calling the Function of Another Contract in Solidity] (Mar 5, 2018)
 
** <tt>AnotherContract another;</tt>
 
** <tt>constructor(address _at) public{ another = AnotherContract(_at); }</tt>
 
 
* [https://kauri.io/getting-return-values-from-a-solidity-transaction/ea44be3e30264e0ea116c7ec0621bb51/a Getting return values from a solidity transaction](22 Jun 19)
 
 
====Ether Transfer====
 
 
* [https://solidity.readthedocs.io/en/v0.6.11/units-and-global-variables.html#members-of-address-types Members of Address Types]
 
** <tt>send()</tt>, <tt>transfer()</tt>, <tt>value</tt>
 
** <tt>require(send(amount))</tt> == <tt>transfer(amount)</tt>
 
 
* [https://fravoll.github.io/solidity-patterns/secure_ether_transfer.html Secure Ether Transfer]
 
** Secure transfer of ether from a contract to another address.
 
** <tt>call.value(amount)()</tt>, <tt>transfer(amount)</tt>, <tt>send(amount)</tt>
 
* [https://ethereum.stackexchange.com/questions/19341/address-send-vs-address-transfer-best-practice-usage <address>.send vs <address>.transfer best practice usage?] (Jul 3 '17)
 
 
====Debugging====
 
 
* [https://remix-ide.readthedocs.io/en/latest/tutorial_debug.html Remix / Debugging transactions]
 
 
====Security====
 
 
* [https://blog.sigmaprime.io/solidity-security.html Solidity Security: Comprehensive list of known attack vectors and common anti-patterns] (20 October 2018)
 
 
====Guidelines====
 
 
* [https://github.com/crytic/slither/wiki/Detector-Documentation Slither Detector Documentation]
 
* [https://protofire.github.io/solhint/rules.html Solhint List of Rules]
 
* [https://swcregistry.io/ SWC Registry Smart Contract Weakness Classification]
 
 
====Tools====
 
 
* [https://ethereum.github.io/browser-solidity/ Solidity browser based compiler]
 
* [https://github.com/ethereum/solc-js Javascript bindings for the solidity compiler]
 
** [https://github.com/ethereum/solc-js/blob/master/wrapper.js#L44 <code>compile</code> function]
 
* [https://ethereum.stackexchange.com/questions/7656/what-are-c-e-and-s-properties-in-message-call-return-object What are *C*, *E* and *S* properties in message call return object?] (Aug 1 '16) : BigNumber
 
 
====Libraries====
 
 
* [https://blog.aragon.org/library-driven-development-in-solidity-2bebcaf88736/ Library Driven Development in Solidity] (13 February 2017)
 
* [https://blog.zeppelin.solutions/proxy-libraries-in-solidity-79fbe4b970fd Proxy Libraries in Solidity] (Mar 6, 2017)
 
* [https://github.com/ethereum/dapp-bin A place for all the ÐApps to live]
 
 
====Patterns====
 
 
* [https://github.com/fravoll/solidity-patterns Solidity Patterns]
 
 
* [https://blog.zeppelinos.org/proxy-patterns/ Proxy Patterns] (APRIL 19, 2018)
 
* [https://docs.zeppelinos.org/docs/pattern.html?utm_source=zos&utm_medium=blog&utm_campaign=proxy-pattern ZeppelinOS Upgrades Pattern]
 
* [https://blog.gnosis.pm/solidity-delegateproxy-contracts-e09957d0f201 Solidity DelegateProxy Contracts] (May 17, 2018)
 
* [https://solidity.readthedocs.io/en/v0.5.8/common-patterns.html#state-machine State Machine Pattern]
 
 
====Collections====
 
 
* [https://github.com/bkrem/awesome-solidity '''awesome-solidity'''] : A curated list of awesome Solidity resources, libraries, tools and more
 
 
====misc====
 
 
* [https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736 Library Driven Development in Solidity]
 
* [https://ethereum.stackexchange.com/questions/11589/how-do-oracle-services-work-under-the-hood How do oracle services work under the hood?] (Jan 23 '17)
 
* [https://medium.com/@jeancvllr/solidity-tutorial-all-about-comments-bc31c729975a Solidity Tutorial : all about Comments] (Aug 1, 2019)
 
 
===Best Practices===
 
 
* [https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.4.0/contracts/token/ERC20/ERC20.sol OpenZeppelin ERC-20 implementation]
 
* [https://github.com/ConsenSys/Tokens/blob/v1.0.0/contracts/eip20/EIP20.sol ConsenSys ERC-20 implementation]
 
 
* [http://solidity.readthedocs.io/en/develop/solidity-by-example.html#voting Voting]
 
* [http://truffleframework.com/tutorials/pet-shop Ethereum Pet Shop]
 
 
{| class='wikitable sortable'
 
! Category !! Title !! Description !! Remarks
 
|-
 
| ERC-1400 || style='white-space:nowrap' | [https://github.com/SecurityTokenStandard/EIP-Spec/tree/master/contracts Security Token Standard Contracts] || ||
 
|-
 
| ERC-1400 || style='white-space:nowrap' | [https://github.com/ConsenSys/UniversalToken/tree/master/contracts ConsenSys Codefi Universal Token]
 
| a hybrid token standard precisely designed for the use case of tokenized financial assets ||
 
|-
 
| DeFi || style='white-space:nowrap' | [https://github.com/makerdao/dss MakerDao Multi Collateral Dai Contracts] || ||
 
|-
 
| Wallet || style='white-space:nowrap' | [https://github.com/authereum/contracts Authereum Contracts] || ||
 
|-
 
| Oracle || style='white-space:nowrap' | [https://github.com/smartcontractkit/chainlink/tree/develop/evm-contracts Chainlink's Solidity Contracts] || ||
 
|}
 
 
===Libraries===
 
 
====Fixidity====
 
 
* https://github.com/CementDAO/Fixidity
 
* Desc. : A fixed point mathematics library for Solidity
 
* License : MIT
 
 
==Ethereum Clients==
 
 
* [https://www.ethernodes.org/ Ethereum Mainnet Statistics &gt; Clients]
 
 
===Go Ethereum===
 
 
* https://github.com/ethereum/go-ethereum
 
* Desc. : Official golang implementation of the Ethereum protocol
 
* License
 
 
====References====
 
 
* [https://github.com/ethereum/go-ethereum/wiki Go Ethereum Wiki]
 
* [https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options <tt>geth</tt> Command Line Options]
 
* [https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console JavaScript Console]
 
** <syntaxhighlight lang='bash' inline class='inline'>$ geth attach ipc:/some/custom/path</syntaxhighlight>
 
** <syntaxhighlight lang='bash' inline class='inline'>$ geth attach http://191.168.1.1:8545</syntaxhighlight>
 
** <syntaxhighlight lang='bash' inline class='inline'>$ geth attach ws://191.168.1.1:8546</syntaxhighlight>
 
* [https://github.com/ethereum/wiki/wiki/JSON-RPC JSON RPC API] (<tt>web3, net, eth, db, ssh</tt>)
 
* [https://github.com/ethereum/wiki/wiki/JavaScript-API JavaScript API]
 
* [https://github.com/ethereum/go-ethereum/wiki/Management-APIs Management APIs] (<tt>admin, debug, miner, personal, txpool</tt>)
 
 
====Readings====
 
 
* [https://ethereum.stackexchange.com/questions/6500/executing-custom-javascript-snippets-through-non-interactive-console-geth-exe Executing custom JavaScript Snippets through Non-Interactive console (geth --exec)] (Jun 24 '16)
 
** <syntaxhighlight lang='bash' inline class='inline'>geth --exec "personal.unlockAccount('$addr', '$passwd', 0)" --verbosity 4 attach http://127.0.0.1:$rpc_port</syntaxhighlight>
 
 
----
 
 
===Ethereumj===
 
 
* https://github.com/ethereum/ethereumj
 
* Desc. : a pure-Java implementation of the Ethereum protocol
 
* License : LGPL v3.0
 
 
----
 
 
===Parity Ethereum===
 
 
* https://www.parity.io/
 
* Desc. : an Ethereum client, written from the ground-up for correctness-verifiability, modularisation, low-footprint and high-performance
 
* License : GPL v3.0
 
* Written in : Rust
 
* Sources : https://github.com/paritytech/parity
 
 
====Readings====
 
 
* [https://paritytech.github.io/wiki/ Parity official documentation]
 
 
* [https://ethereum.stackexchange.com/questions/66307/whats-the-difference-between-the-parity-ethereum-and-the-parity-client What's the difference between the Parity-Ethereum and the Parity client?] (Jan 29, 2019)
 
 
----
 
 
===Pantheon===
 
 
* https://pegasys.tech/
 
* Desc. : public chain compatible, with a more modular architecture and roadmap to add privacy, permissioning, and new consensus algorithms.
 
* License : Apache 2.0
 
* Written in : Java
 
* Sources
 
** https://github.com/PegaSysEng/pantheon
 
 
====Readings====
 
 
* [https://docs.pantheon.pegasys.tech/en/latest/ Pantheon official documentation]
 
* [https://media.consensys.net/scaling-consensus-for-enterprise-explaining-the-ibft-algorithm-ba86182ea668 Scaling Consensus for Enterprise: Explaining the IBFT Algorithm]
 
* [https://github.com/ethereum/EIPs/issues/650 Istanbul Byzantine Fault Tolerance]
 
 
----
 
 
===Hyperledger Besu===
 
 
* https://besu.hyperledger.org/en/stable/
 
* Desc. : an open-source Ethereum client developed under the Apache 2.0 license and written in Java.
 
* License : Apache 2.0
 
* Written in : Java
 
* Sources
 
 
====Readings====
 
 
* [https://besu.hyperledger.org/en/stable/Reference/CLI/CLI-Syntax/#network Besu CLI]
 
* [https://besu.hyperledger.org/en/stable/HowTo/Configure/Using-Configuration-File/ Besu Configuration]
 
* [https://besu.hyperledger.org/en/stable/Reference/Config-Items/ Besu Genesis File]
 
* [https://besu.hyperledger.org/en/stable/Reference/API-Methods/ Besu API Methods]
 
* [https://consensys.github.io/web3js-eea/latest/ <tt>web3-eea</tt> API]
 
 
* [https://besu.hyperledger.org/en/stable/HowTo/Get-Started/Starting-node/ Starting Hyperledger Besu]
 
 
----
 
 
===Quorum===
 
 
* https://www.jpmorgan.com/global/Quorum
 
* Desc. : an Ethereum-based distributed ledger protocol with transaction/contract privacy and new consensus mechanisms
 
* License : LGPL v3.0 + GPL v3.0
 
* Written in :
 
* Sources :
 
** https://github.com/jpmorganchase/quorum
 
** https://github.com/jpmorganchase/constellation
 
 
====References====
 
 
* [https://github.com/jpmorganchase/quorum/wiki Quorum wiki]
 
** [https://github.com/jpmorganchase/quorum/wiki/Using-Quorum#running-quorum Running Quorum]
 
 
* '''Provisioning'''
 
** [https://github.com/jpmorganchase/quorum/wiki/Getting-Set-Up Getting Set Up]
 
** [https://github.com/jpmorganchase/quorum/blob/master/docs/running.md Running Quorum]
 
** [https://github.com/jpmorganchase/constellation Installing and running Constellation]
 
** [https://github.com/jpmorganchase/constellation/blob/master/sample.conf Constellation Configuration Sample]
 
** [https://github.com/jpmorganchase/quorum-examples Quorum Examples]
 
 
====Readings====
 
 
* [http://truffleframework.com/tutorials/building-dapps-for-quorum-private-enterprise-blockchains BUILDING DAPPS FOR QUORUM: PRIVATE ENTERPRISE BLOCKCHAINS]
 
* [https://github.com/jpmorganchase/quorum/blob/master/raft/doc.md Raft-based consensus for Ethereum/Quorum]
 
* [https://github.com/Nethereum/Nethereum/issues/120 Gas price issue in Quorum]
 
 
----
 
 
==Ethereum Libraries and Tools==
 
 
* Wallets
 
{| class='wikitable'
 
! Wallet !! Description !! Type !! Remarks
 
|-
 
| [https://metamask.io MetaMask] || A crypto wallet & gateway to blockchain apps || Web, Mobile ||
 
|-
 
| style='white-space:nowrap' | [https://walletconnect.org WalletConnect] || an open protocol for connecting desktop Dapps to mobile Wallets using end-to-end encryption by scanning a QR code. || ||
 
|-
 
| [https://fortmatic.com Fortmatic] || allows you to easily integrate your app with the Ethereum blockchain || ||
 
|}
 
 
===solc-js===
 
 
* JavaScript bindings for the Solidity compiler
 
* Desc. : https://github.com/ethereum/solc-js
 
* License : MIT License
 
 
----
 
 
===web3.js===
 
 
* [https://github.com/ethereum/web3.js web3.js]
 
 
* [https://web3js.readthedocs.io/en/v1.2.4/ JavaScript API (<tt>web3.js</tt>) 1.2.4]
 
* [https://web3js.readthedocs.io/en/1.0/ JavaScript API (<tt>web3.js</tt>) 1.0]
 
* [https://github.com/ethereum/wiki/wiki/JavaScript-API JavaScript API (<tt>web3.js</tt>) 0.2.x.x]
 
* [https://github.com/ethereum/go-ethereum/wiki/Management-APIs Management APIs]
 
 
{| class="wikitable"
 
! Package !! Description !! Remarks
 
|-
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html <tt>web3.eth</tt>] || Allows you to interact with an Ethereum blockchain and Ethereum smart contracts. ||
 
|-
 
| style='white-space:nowrap' | [https://web3js.readthedocs.io/en/v1.2.4/web3-eth-accounts.html <tt>web3.eth.accounts</tt>]
 
| Contains functions to generate Ethereum accounts and sign transactions and data. ||
 
|-
 
| style='white-space:nowrap' | [https://web3js.readthedocs.io/en/v1.2.6/web3-eth-contract.html <tt>web3.eth.Contract</tt>]
 
| The object makes it easy to interact with smart contracts on the ethereum blockchain. ||
 
|-
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-utils.html <tt>web3.utils</tt>] || Provides utility functions for Ethereum dapps and other web3.js packages. ||
 
|-
 
| [https://web3js.readthedocs.io/en/v1.2.6/web3-eth-abi.html <tt>web3.eth.abi</tt>] || Let you de- and encode parameters to ABI (Application Binary Interface) for function calls to the EVM. ||
 
|}
 
 
{| class="wikitable" style='font-size:smaller'
 
! API !! Parameters !! Description !! Remarks
 
|-
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getblocknumber <tt>web3.eth.blockNumber</tt>] ||
 
| Returns the current block number. ||
 
|-
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getblock <tt>web3.eth.getBlock</tt>] ||
 
| Returns a block matching the block number or block hash ||
 
|-
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getaccounts <tt>web3.eth.getAccounts</tt>]
 
| <tt>''Function callback''</tt>
 
| Will return a list of the unlocked accounts in the Web3 wallet or it will return the accounts from the currently connected node ||
 
|-
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#getbalance <tt>web3.eth.getBalance</tt>]
 
| style='white-space:nowrap' | <tt>String address</tt><br/><tt>''<nowiki>String|Number defaultBlock</nowiki>''</tt><br/><tt>''Function callback''</tt>
 
| Get the balance of an address at a given block ||
 
|-
 
| style='white-space:nowrap' | [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#gettransactionreceipt <tt>web3.eth.getTransactionReceipt</tt>] ||
 
| Returns the receipt of a transaction by transaction hash. ||
 
|-
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#call <tt>web3.eth.call</tt>] ||
 
| Executes a message call transaction, which is directly executed in the VM of the node, but never mined into the blockchain. ||
 
|-
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth.html#sendtransaction <tt>web3.eth.sendTransaction</tt>] ||
 
| Sends a transaction to the network. || transaction object (<tt>from</tt>, <tt>to</tt>, <tt>value</tt>, <tt>gas</tt>, <tt>gasPrice</tt>, <tt>data</tt>, <tt>nonce</tt>)
 
|-
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-eth-accounts.html#privatekeytoaccount <tt>web3.eth.accounts.privateKeyToAccount</tt>] || <tt>String privateKey</tt>
 
| Creates an account '''object''' from a private key. || create not an account but an account object
 
|-
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-utils.html#sha3 <tt>web3.utils.sha3</tt>] || <tt>String string</tt>
 
| Calculate the sha3 of the input. || Alias: <tt>keccak256</tt>
 
|-
 
| [https://web3js.readthedocs.io/en/v1.2.4/web3-utils.html#asciitohex <tt>web3.utils.asciiToHex</tt>] || <tt>String string</tt><br/><tt>''Number length''</tt>
 
| Transform an ASCII string into a valid <tt>bytes4</tt>, <tt>bytes8</tt> etc
 
| Alias: <tt>fromAscii</tt>
 
|-
 
| style='white-space:nowrap' | [https://web3js.readthedocs.io/en/v1.2.6/web3-eth-abi.html#encodefunctioncall <tt>web3.eth.abi.encodeFunctionCall</tt>]
 
| <tt>Object jsonInterfacer</tt><br/><tt>Array parameters</tt>
 
| Encodes a function call using its JSON interface object and given parameters. ||
 
|}
 
 
<syntaxhighlight lang='javascript' enclose='div'>
 
 
web3.utils
 
// safely convert any given value (including BigNumber.js instances) into a BN.js instance,
 
// for handling big numbers in JavaScript.
 
web3.utils.toBN(String|Number|HEX);
 
 
// calculate the sha3 of the input.
 
web3.utils.sha3(String);
 
web3.utils.keccack256(String);
 
 
// returns the HEX representation of a given ASCII string.
 
web3.utils.asciiToHex(String);
 
web3.utils.fromAscii(String); // deprecated
 
 
</syntaxhighlight>
 
 
====Basic Usage====
 
 
<syntaxhighlight lang='javascript' enclose='div'>
 
$ truffle console --network ropsten
 
Warning: Please rename truffle.js to truffle-config.js to ensure Windows compatibility.
 
truffle(ropsten)> web3.version
 
'1.2.1'
 
truffle(ropsten)> web3.eth.getCoinbase()
 
...
 
truffle(ropsten)> web3.eth.getCoinbase().then(web3.eth.getBalance).then(v => parseInt(v).toLocaleString())
 
...
 
truffle(ropsten)> web3.eth.getNodeInfo()
 
'Geth/v1.9.9-omnibus-e320ae4c-20191206/linux-amd64/go1.13.4'
 
truffle(ropsten)> web3.eth.getProtocolVersion()
 
'0x40'
 
truffle(ropsten)> web3.eth.net.getPeerCount()
 
100
 
truffle(ropsten)> web3.eth.isMining()
 
false
 
truffle(ropsten)> web3.eth.getAccounts()
 
[ ... ]
 
truffle(ropsten)> web3.eth.getAccounts().then(accts => accts.forEach(acct => web3.eth.getBalance(acct.toString()).then(console.log)))
 
...
 
truffle(ropsten)> web3.eth.net.getId()
 
3
 
truffle(ropsten)> web3.eth.getGasPrice().then(v => parseInt(v).toLocaleString())
 
'1,000,000,000'
 
truffle(ropsten)> web3.eth.getBlock("latest").then(b => parseInt(b.gasLimit).toLocaleString())
 
'8,000,029'
 
truffle(ropsten)> web3.eth.getBlockNumber().then(v => v.toLocaleString())
 
'7,553,661'
 
truffle(ropsten)> web3.eth.getBlock(0)
 
{ difficulty: '1048576',
 
extraData:
 
'0x3535353535353535353535353535353535353535353535353535353535353535',
 
gasLimit: '0x1000000',
 
gasUsed: '0x0',
 
hash:
 
'0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d',
 
logsBloom:
 
'0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
 
miner: '0x0000000000000000000000000000000000000000',
 
mixHash:
 
'0x0000000000000000000000000000000000000000000000000000000000000000',
 
nonce: '0x0000000000000042',
 
number: 0,
 
parentHash:
 
'0x0000000000000000000000000000000000000000000000000000000000000000',
 
receiptsRoot:
 
'0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
 
sha3Uncles:
 
'0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',
 
size: 540,
 
stateRoot:
 
'0x217b0bbcfb72e2d57e28f33cb361b9983513177755dc3f33ce3e7022ed62b77b',
 
timestamp: 0,
 
totalDifficulty: '1048576',
 
transactions: [],
 
transactionsRoot:
 
'0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
 
uncles: [] }
 
</syntaxhighlight>
 
 
* [https://medium.com/@piyopiyo/how-to-get-ethereum-block-gas-limit-eba2c8f32ce How to get Ethereum Block Gas Limit] (May 4, 2018)
 
** <tt>web3.eth.getBlock("latest").gasLimit</tt>
 
 
----
 
 
===Web3j===
 
 
* https://web3j.io/
 
* Desc. : a lightweight, highly modular, reactive, type safe Java and Android library for working with Smart Contracts and integrating with clients (nodes) on the Ethereum network
 
* License : Apache License 2.0
 
* Written in : Java
 
* Sources
 
** https://github.com/web3j/web3j
 
** https://github.com/web3j/quorum
 
** https://github.com/web3j/examples
 
 
====References====
 
 
* [https://docs.web3j.io/ web3j official documentation]
 
* [https://ethereum.org/java/ Ethereum for Java Developers]
 
 
* API Documentation
 
{| style='margin-left:60px'
 
! Version !! API
 
|-
 
| 4.5.18 || [https://javadoc.io/doc/org.web3j/core/4.5.18/index.html Web3j Core API]
 
|-
 
| || [https://javadoc.io/doc/org.web3j/crypto/4.5.18/index.html Web3j Crypto API]
 
|-
 
| || [https://javadoc.io/doc/org.web3j/utils/4.5.18/index.html Web3j Utils API]
 
|}
 
 
* Core APIs
 
<syntaxhighlight lang='text' style='margin-left:40px'>
 
 
extends
 
+------------ Ethereum
 
JsonRpc2_0Web3j ---------------- Web3j ---|
 
implements +------------ Web3jRx
 
extends
 
 
</syntaxhighlight>
 
 
{| class='wikitable' style='margin-left:40px'
 
! Class !! Source !! API !! Remark
 
|-
 
| ''<tt>public class HttpService extends Service</tt>''
 
| [https://github.com/web3j/web3j/blob/master/core/src/main/java/org/web3j/protocol/http/HttpService.java <tt>HttpService.java</tt>]
 
|
 
| HTTP implementation of our services API
 
|-
 
| ''<tt>org.web3j.protocol.Service</tt>''
 
| [https://github.com/web3j/web3j/blob/master/core/src/main/java/org/web3j/protocol/Service.java <tt>Service.java</tt>]
 
|
 
| Base service implementation
 
|-
 
| ''<tt>public class JsonRpc2_0Web3j implements Web3j</tt>
 
| [https://github.com/web3j/web3j/blob/master/core/src/main/java/org/web3j/protocol/core/JsonRpc2_0Web3j.java <tt>JsonRpc2_0Web3j.java</tt>]
 
|
 
| JSON-RPC 2.0 factory implementation
 
|-
 
| ''<tt>interface org.web3j.protocol.Web3j</tt>''
 
| [https://github.com/web3j/web3j/blob/master/core/src/main/java/org/web3j/protocol/Web3j.java <tt>Web3j.java</tt>]
 
|
 
| <tt>extends Ethereum, Web3jRx</tt>
 
|-
 
| ''<tt>interface org.web3j.protocol.core.Ethereum</tt>''
 
| [https://github.com/web3j/web3j/blob/master/core/src/main/java/org/web3j/protocol/core/Ethereum.java <tt>Ethereum.java</tt>]
 
|
 
| [https://github.com/ethereum/wiki/wiki/JSON-RPC#json-rpc-methods JSON-RPC methods]
 
|-
 
| ''<tt>interface org.web3j.protocol.rx.Web3jRx</tt>''
 
| [https://github.com/web3j/web3j/blob/master/core/src/main/java/org/web3j/protocol/rx/Web3jRx.java <tt>Web3jRx.java</tt>]
 
|
 
|
 
|-
 
| ''<tt>interface org.web3j.quorum.Quorum</tt>''
 
| [https://github.com/web3j/quorum/blob/master/src/main/java/org/web3j/quorum/Quorum.java <tt>Quorum.java</tt>]
 
|
 
| <tt>extends Web3j</tt>
 
|-
 
| <tt>org.web3j.tx.Contract</tt>
 
| [https://github.com/web3j/web3j/blob/master/core/src/main/java/org/web3j/tx/Contract.java <tt>Contract.java</tt>]
 
|
 
|
 
|-
 
| <tt>org.web3j.protocol.core.RemoteCall<T></tt>
 
| [https://github.com/web3j/web3j/blob/master/core/src/main/java/org/web3j/protocol/core/RemoteCall.java <tt>RemoteCall.java</tt>]
 
|
 
|
 
|-
 
| <tt>org.web3j.protocol.core.methods.request.Transaction</tt>
 
| [https://github.com/web3j/web3j/blob/master/core/src/main/java/org/web3j/protocol/core/methods/request/Transaction.java <tt>Transaction.java</tt>]
 
|
 
|
 
|-
 
| ''<tt>abstract org.web3j.abi.TypeReference<T extends org.web3j.abi.datatypes.Type></tt>''
 
| [https://github.com/web3j/web3j/blob/master/abi/src/main/java/org/web3j/abi/TypeReference.java <tt>TypeReference.java</tt>]
 
|
 
|
 
|-
 
| <tt>org.web3j.abi.datatypes.Function</tt>
 
| [https://github.com/web3j/web3j/blob/master/abi/src/main/java/org/web3j/abi/datatypes/Function.java <tt>Function.java</tt>]
 
|
 
|
 
|}
 
 
* ABI Types
 
<syntaxhighlight lang='text'>
 
 
Type<T> ---+--- NumericType implements Type<BigInteger> ---+--- IntType ---+--- Uint ---+--- Uint8
 
| | | |
 
| | | +--- Uint16
 
| | |
 
| | +--- Int ---+--- Int8
 
| | |
 
| | +--- Int8
 
| |
 
| +--- FixedPointType ---+--- Ufixed
 
| |
 
| +--- Fixed
 
|
 
+--- BytesType implements Type<bytes[]> ---+--- Bytes ---+--- Bytes1
 
| | |
 
| | +--- Bytes2
 
 
</syntaxhighlight>
 
 
=====Crypto/Util APIs=====
 
 
{| class='wikitable'
 
! Class !! Method !! Description !! Remarks
 
|-
 
| [https://javadoc.io/static/org.web3j/crypto/4.5.18/index.html?org/web3j/crypto/Keys.html <tt>Keys</tt>]
 
| <tt>static ECKeyPair createEcKeyPair(SecureRandom random)</tt> || Generate Elliptic Curve key pair for a Ethereum account ||
 
|-
 
| || <tt>static ECKeyPair createEcKeyPair()</tt> || Generate Elliptic Curve key pair for a Ethereum account ||
 
|-
 
| || <tt>static String getAddress(ECKeyPair pair)</tt> || address in 40-bytes hexadecimal format. || Without prefix
 
|-
 
| || <tt>static String toChecksumAddress(String address)</tt> || Checksum address encoding as per EIP-55. || EIP-55, With '0x' prefix
 
|-
 
| [https://javadoc.io/static/org.web3j/crypto/4.5.18/index.html?org/web3j/crypto/RawTransaction.html <tt>RawTransaction</tt>]
 
| <tt>static createTransaction createTransaction(...)</tt>
 
| create raw transaction object that is not signed || [https://web3js.readthedocs.io/en/v1.2.9/web3-eth.html#id84 transaction object]
 
|-
 
| [https://javadoc.io/static/org.web3j/crypto/4.5.18/index.html?org/web3j/crypto/TransactionEncoder.html <tt>TransactionEncoder</tt>]
 
| <tt>static byte[] signMessage(RawTransaction rawTx, Credentials cred)</tt>
 
| sign a raw transaction ||
 
|-
 
| [https://javadoc.io/static/org.web3j/utils/4.5.18/index.html?org/web3j/utils/Numeric.html <tt>Numeric</tt>]
 
| <tt>static BigInteger toBigInt(String hexValue)</tt> || Get integer representation from the hexadecimal representation for private key, public key, or so on ||
 
|-
 
| || <tt>static String toHexStringNoPrefixZeroPadded(BigInteger value, int size)</tt>
 
| Get hexadecimal represenation with prefix `0x` and in the specified length from the integer repesentation for private key, public key, or so on ||
 
|-
 
| || <tt>static String toHexString(byte[] input)</tt> || Get hexadecimal representation of the specified byte array with prefix '0x' ||
 
|-
 
| || <tt>static String toHexStringNoPrefix(byte[] input)</tt> || Get hexadecimal representation fo the specified byte array without prefix ||
 
|-
 
| || <tt>byte[] hexStringToByteArray(String input)</tt> || Convert string in hexdecimal format into byte array after removing prefix `0x` if any ||
 
|}
 
 
<syntaxhighlight lang='java' enclose='div'>
 
 
// create Elliptic Curved key pair
 
ECKeyPair pair = Keys.createEcKeyPair();
 
 
// get EIP-55(checksum) address with '0x' prefix from EC key-pair
 
String addr = Keys.toChecksumAddress(Keys.getAddress(pair));
 
 
// or get EIP-55 address with '0x' prefix from public key
 
add = Keys.toChecksumAddress(Keys.getAddress(pair.getPublicKey());
 
 
// get private key in hexadecimal string without any prefix - 64 characters with left zero padding
 
Numeric.toHexStringNoPrefixZeroPadded(pair.getPrivateKey(), Keys.PRIVATE_KEY_LENGTH_IN_HEX);
 
 
// get public key in hexadecimal string without any prefix - 128 characters with left zero padding
 
Numeric.toHexStringNoPrefixZeroPadded(pair.getPublicKey(), 2 * Keys.PRIVATE_KEY_LENGTH_IN_HEX);
 
 
// convert hexadecimal string to integer in 'BigInteger' type
 
final BigInteger gas = Numeric.toBigInt("0x12e140");
 
 
</syntaxhighlight>
 
 
====Readings====
 
 
* [https://web3j.readthedocs.io/en/latest/smart_contracts.html#deploying-and-interacting-with-smart-contracts Deploying and interacting with smart contracts]
 
** [https://web3j.readthedocs.io/en/latest/transactions.html#creation-of-smart-contract Creation of a smart contract]
 
** [https://web3j.readthedocs.io/en/latest/transactions.html#transacting-with-contract Transacting with a smart contract]
 
** [https://web3j.readthedocs.io/en/latest/transactions.html#querying-the-state-of-a-smart-contract Querying the state of a smart contract]
 
 
* [https://kauri.io/connecting-to-an-ethereum-client-with-java-eclipse/b9eb647c47a546bc95693acc0be72546/a Connecting to an Ethereum client with Java, Eclipse and Web3j] (20 Jul 19)
 
* [https://kauri.io/manage-an-ethereum-account-with-java-and-web3j/925d923e12c543da9a0a3e617be963b4/a '''Manage an Ethereum account with Java and Web3j'''] (06 Nov 19)
 
* [https://kauri.io/interacting-with-an-ethereum-smart-contract-in-jav/14dc434d11ef4ee18bf7d57f079e246e/a '''Interacting with an Ethereum Smart Contract in Java'''] (27 Jan 20)
 
 
* [https://ethereum.stackexchange.com/questions/2531/common-useful-javascript-snippets-for-geth/3478#3478 Script To Find Transactions To/From An Account]
 
** <syntaxhighlight lang='javascript' inline class='inline'>for (var i = startBlockNumber; i <= endBlockNumber; i++)</syntaxhighlight>
 
* [https://kauri.io/connecting-to-an-ethereum-client-with-java-eclipse/b9eb647c47a546bc95693acc0be72546/a Connecting to an Ethereum client with Java, Eclipse and Web3j]
 
* [https://kauri.io/manage-an-ethereum-account-with-java-and-web3j/925d923e12c543da9a0a3e617be963b4/a Open or create an account with Web3j]
 
** <tt>WalletUtils.loadCredentials</tt>, <tt>WalletUtils.loadBip39Credentials</tt>
 
 
* [https://www.programcreek.com/java-api-examples/?api=org.web3j.crypto.ECKeyPair Java Code Examples for org.web3j.crypto.ECKeyPair]
 
** <tt>Numeric.toHexStringWithPrefix</tt>
 
 
----
 
 
===Web3.py===
 
 
* https://github.com/ethereum/web3.py
 
* Desc. : A Python library for interacting with Ethereum, inspired by web3.js.
 
* License : MPL-2.0 (Mozilla Public License 2.0)
 
* Written in : Python
 
 
* [https://web3py.readthedocs.io/en/latest/ Web3.py documentation]
 
 
====API====
 
 
{| class='wikitable'
 
! Category !! API !! Description !! Remarks
 
|-
 
| Web3 || [https://web3py.readthedocs.io/en/latest/web3.main.html#web3.Web3.api <tt>web3.api</tt>] || the current Web3 version ||
 
|-
 
| || [https://web3py.readthedocs.io/en/latest/web3.main.html#web3.Web3.clientVersion <tt>web3.clientVersion</tt>] || the current client version||
 
|-
 
|}
 
 
====Basic Usage====
 
 
Using <tt>Brownie</tt> and <tt>Web3.py</tt> together.
 
 
<syntaxhighlight lang='python' enclose='div'>
 
>>> web3.eth.coinbase
 
'0xb009cd53957c0D991CAbE184e884258a1D7b77D9'
 
>>> web3.eth.getBalance(web3.eth.coinbase)
 
9995080120300000000000
 
>>> for acc in web3.eth.accounts[:10]: print(f'{acc}, {web3.eth.getBalance(acc):,}')
 
...
 
0xb009cd53957c0D991CAbE184e884258a1D7b77D9, 9,995,080,120,300,000,000,000
 
0x05f9301Be8F3C133fC474F8d538fD732CaCa274c, 10,000,000,000,000,000,000,000
 
0x3DC9b4063a130535913137E40Bed546Ff93b1131, 10,000,000,000,000,000,000,000
 
0x770b1A8d293d152B8Cc9fC01531B1baB3469AF05, 10,000,000,000,000,000,000,000
 
0xAB3ca295454D4A4de79aE32474d2C82f2D0836b1, 10,000,000,000,000,000,000,000
 
0x876e0cab3dfC5d2EA19f9A9e6029E8C1b90452Ed, 10,000,000,000,000,000,000,000
 
0xBb9Bb87EfE2Cf5E024f32c5943311FdA471848Ca, 9,999,898,673,800,000,000,000
 
0x950ea7798112705f487F657E93Fe5D64557CD138, 9,999,950,898,650,000,000,000
 
0xA797051B95915F31464440A590332e3360bfEDb9, 9,999,696,040,100,000,000,000
 
0x9Ebe0ec1f5f2c0f6BA7d9f7187d6f5c540F2b5fa, 10,000,000,000,000,000,000,000
 
>>> web3.eth.blockNumber
 
289
 
>>> web3.eth.getBlock('latest')
 
AttributeDict({'number': 289, 'hash': HexBytes('0x6e432624d1d6730962cab95e48bf67be818a589f038851d63af3b8c748992633'), 'parentHash': HexBytes('0x8187ad82fc911ffe4658e491dc561ff1526690f4380ea6ff4250b80b865f363e'), 'mixHash': HexBytes('0x0000000000000000000000000000000000000000000000000000000000000000'), 'nonce': HexBytes('0x0000000000000000'), 'sha3Uncles': HexBytes('0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347'), 'logsBloom': HexBytes('0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'), 'transactionsRoot': HexBytes('0x2ab22b1c6b26e27b38af339fa2680a78801de67d7caba46b8c7a01f9fdca9ec7'), 'stateRoot': HexBytes('0x395bc4b216dfcd92a25124d3233010e5c130dc3f07cfd75a0a4c7670346a3f62'), 'receiptsRoot': HexBytes('0xc216ea002b476d3fcf65c0e0d5412cb69831da68ded61246d306b6060c57d82f'), 'miner': '0x0000000000000000000000000000000000000000', 'difficulty': 0, 'totalDifficulty': 0, 'extraData': HexBytes('0x'), 'size': 1000, 'gasLimit': 400000000, 'gasUsed': 26697, 'timestamp': 1609224132, 'transactions': [HexBytes('0x4ef99b474888675edb0f3aa28c310eeb506fa00390f06723b58cc960c9b1ff48')], 'uncles': []})
 
>>> web3.eth.getBlock(0)
 
AttributeDict({'number': 0, 'hash': HexBytes('0x515ff4d96e5ab4131d4cd9443ba4dd51ba92b1402f2a79416372efa9945b5094'), 'parentHash': HexBytes('0x0000000000000000000000000000000000000000000000000000000000000000'), 'mixHash': HexBytes('0x0000000000000000000000000000000000000000000000000000000000000000'), 'nonce': HexBytes('0x0000000000000000'), 'sha3Uncles': HexBytes('0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347'), 'logsBloom': HexBytes('0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'), 'transactionsRoot': HexBytes('0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421'), 'stateRoot': HexBytes('0xb477958b9dd0e44345b14ca1dc539ee49098710340252b3ba9ecb289a93a4b89'), 'receiptsRoot': HexBytes('0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421'), 'miner': '0x0000000000000000000000000000000000000000', 'difficulty': 0, 'totalDifficulty': 0, 'extraData': HexBytes('0x'), 'size': 1000, 'gasLimit': 400000000, 'gasUsed': 0, 'timestamp': 1609222192, 'transactions': [], 'uncles': []})
 
>>>
 
</syntaxhighlight>
 
 
----
 
 
===ethereumjs-tx===
 
 
* https://github.com/ethereumjs/ethereumjs-tx
 
* Desc. : A simple module for creating, manipulating and signing ethereum transactions
 
* License : MPL-2.0
 
* Written in : JavaScript
 
 
* [https://github.com/ethereumjs/ethereumjs-tx/blob/master/docs/README.md API]
 
 
----
 
 
===OpenZeppelin ===
 
 
* https://openzeppelin.com/
 
* Desc. : provides tools to write, deploy and operate decentralized applications.
 
* License : MIT
 
* Sources : https://github.com/OpenZeppelin
 
** Contracts library : https://github.com/OpenZeppelin/openzeppelin-contracts
 
** Upgrades library : https://github.com/OpenZeppelin/openzeppelin-upgrades
 
** Test Helpers library : https://github.com/OpenZeppelin/openzeppelin-test-helpers
 
** Test Environment library : https://github.com/OpenZeppelin/openzeppelin-test-environment
 
 
====References====
 
 
=====Contracts=====
 
 
* [https://docs.openzeppelin.com/contracts/2.x/ OpenZeppelin Contracts v2.x Guides]
 
* [https://docs.openzeppelin.com/contracts/2.x/api/access OpenZeppelin Contracts v2.x API]
 
* [https://github.com/OpenZeppelin/openzeppelin-contracts OpenZeppelin Contracts Sources]
 
 
{| class='wikitable'
 
! Contract !! Source !! Description !! Remarks
 
|-
 
| [https://docs.openzeppelin.org/v2.3.0/api/ownership Ownable]
 
| [https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/ownership/Ownable.sol <tt>Ownable.sol</tt>] || ||
 
|-
 
| [https://docs.openzeppelin.org/v2.3.0/api/access#roles Roles]
 
| [https://docs.openzeppelin.org/v2.3.0/api/access#roles Roles.sol] || ||
 
|-
 
| [https://docs.openzeppelin.com/contracts/2.x/api/token/erc20 ERC 20]
 
| [https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/contracts/token/ERC20 ERC20 Sources] || the most widespread token standard for fungible assets ||
 
|-
 
| [https://docs.openzeppelin.com/contracts/2.x/api/token/erc721 ERC 721]
 
| [https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/contracts/token/ERC721 ERC721 Sources] || the de-facto solution for non-fungible tokens ||
 
|-
 
| [https://docs.openzeppelin.com/contracts/2.x/erc777 ERC 777]
 
| [https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/contracts/token/ERC777 ERC 777] || a richer standard for fungible tokens ||
 
|}
 
 
* [https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226 How to implement ERC20 supply mechanisms] (Jan '19)
 
 
=====Test Helpers=====
 
 
* Desc. : Assertion library for Ethereum smart contract testing
 
 
* [https://docs.openzeppelin.com/test-helpers/0.5/api OpenZeppelin Test Helpers API]
 
* [https://docs.openzeppelin.com/test-helpers/0.5/configuration OpenZeppelin Test Helpers Configuration]
 
 
{| class='wikitable'
 
! API !! Description !! Remarks
 
|-
 
| [https://docs.openzeppelin.com/test-helpers/0.5/api#expect-event <tt>expectEvent</tt>] || ||
 
|-
 
| [https://docs.openzeppelin.com/test-helpers/0.5/api#intransaction <tt>expectEvent.inTransaction</tt>] || ||
 
|-
 
| [https://docs.openzeppelin.com/test-helpers/0.5/api#notemitted <tt>expectEvent.notEmitted</tt>] || ||
 
|}
 
 
=====Test Environment=====
 
 
* Desc. : Blazing fast smart contract testing.
 
 
* [https://docs.openzeppelin.com/test-environment/0.1/api OpenZeppelin Test Environment API]
 
 
----
 
 
===MetaMask===
 
 
* https://metamask.io
 
* Desc. : A crypto wallet & gateway to blockchain apps
 
* License :
 
* Sources : https://github.com/MetaMask
 
 
* [https://medium.com/metamask/https-medium-com-metamask-breaking-change-injecting-web3-7722797916a8 Breaking Change: No Accounts Exposed by Default] (Aug 8, 2018)
 
 
----
 
 
===LightWallet===
 
 
* https://github.com/ConsenSys/eth-lightwallet
 
* Desc. : Lightweight JS Wallet for Node and the browser
 
* License : MIT
 
* Written in : JavaScript
 
 
----
 
 
===Remix IDE===
 
 
* https://github.com/ethereum/remix-ide
 
* Desc. : a browser-based compiler and IDE that enables users to build Ethereum contracts with Solidity language and to debug transactions
 
* License : MIT License
 
 
====Readings====
 
 
* [https://remix-ide.readthedocs.io/en/latest/ Remix official documentation]
 
 
* [https://steemit.com/ethereum/@cryptoizotx/decentralized-programmer-part-3-remix-ide-ganache-cli Remix IDE + Ganache-CLI]
 
* [https://github.com/nodejs/node-gyp#on-windows Installing <tt>node-gyp</tt> on Windows]
 
 
* [https://stackoverflow.com/questions/53083582/mainnet-deploying-array-of-addresses-as-constructor-parameter-in-remix-solidity Mainnet deploying '''array of addresses''' as constructor parameter in Remix Solidity smart contract does not work] (Oct 31 '18)
 
** <tt style='font-size:smaller'>["0xca35b7d915458ef540ade6068dfe2f44e8fa733c", "0x14723a09acff6d2a60dcdf7aa4aff308fddc160c", "0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"]</tt>
 
 
----
 
 
===Truffle===
 
 
* http://truffleframework.com/
 
* Desc. : a development environment, testing framework and asset pipeline for Ethereum, aiming to make life as an Ethereum developer easier
 
* License : MIT
 
* Sources : https://github.com/trufflesuite/truffle
 
 
====References====
 
 
* [http://truffleframework.com/docs/ Truffle official documentation]
 
* [http://truffleframework.com/docs/advanced/commands Command Reference]
 
* [http://truffleframework.com/docs/getting_started/contracts '''Interacting with your contracts''']
 
* [https://github.com/trufflesuite/truffle/tree/master/packages/contract '''Truffle Contract Package''']
 
* [http://truffleframework.com/docs/getting_started/migrations#deployer-api Deployer API]
 
* [https://github.com/trufflesuite/truffle/blob/master/packages/truffle-core/lib/testing/Assert.sol <tt>Assert.sol</tt>]
 
* [http://www.chaijs.com/api/assert/ Chai <code>assert</code> API]
 
* [http://truffleframework.com/tutorials/ Truffle Tutorials]
 
 
* [https://github.com/mochajs/mocha/blob/v5.2.0/lib/mocha.js#L64 <tt>Mocha</tt> class constructor source code]
 
* [https://mochajs.org/api/mocha <tt>Mocha</tt> class API]
 
* [https://mochajs.org/#command-line-usage Mocha command-line usage]
 
 
=====Commands=====
 
 
{| class='wikitable'
 
! Command !! Description !! Options !! Remarks
 
|-
 
| [https://truffleframework.com/docs/truffle/reference/truffle-commands#init '''<tt>init</tt>''']
 
| Initialize new and empty Ethereum project || <tt>--force</tt> ||
 
|-
 
| [https://truffleframework.com/docs/truffle/reference/truffle-commands#compile '''<tt>compile</tt>''']
 
| Compile contract source files. || <tt>--list</tt>, <tt>--all</tt>, <tt>--network</tt>, <tt>--quiet</tt> ||
 
|-
 
| [https://truffleframework.com/docs/truffle/reference/truffle-commands#migrate '''<tt>migrate</tt>''']
 
| Run migrations to deploy contracts. || <tt>--reset</tt>, <tt>--f</tt>, <tt>--to</tt>, <tt>--dry-run</tt> ||
 
|-
 
| [https://truffleframework.com/docs/truffle/reference/truffle-commands#test '''<tt>test</tt>''']
 
| Runs some or all tests within the <tt>test/</tt> directory as specified. || <tt>--show-events</tt> ||
 
|}
 
 
====Readings====
 
 
* [https://github.com/amazingandyyy/the-ethereum-blockchain-development-tutorials-draft The Complete Ethereum Blockchain development Tutorials (Draft)]
 
* [http://truffleframework.com/tutorials/bundling-with-webpack Building with Webpack]
 
* [https://ethereum.stackexchange.com/questions/21210/syntaxerror-unexpected-token-import-on-truffle-test/21409 “SyntaxError: Unexpected token import” on truffle test] (Jul 14 '17) : require Babel
 
* [https://www.codeooze.com/blockchain/ethereum-geth-private-blockchain/ Ethereum: Deploy on a Private Blockchain - truffle, geth, and private blockchains] (07 Mar 2017)
 
* [https://github.com/trufflesuite/truffle/issues/466 truffle compile error on windows] (29 Jun 2017) : <code>truffle.cmd compile</code>
 
* [http://truffleframework.com/tutorials/using-infura-custom-provider USING INFURA (OR A CUSTOM PROVIDER)]
 
* [https://ethereum.stackexchange.com/questions/73849/simple-truffle-tests-timeout-before-all-hook-prepare-suite Simple Truffle tests timeout “before all” hook: prepare suite] (Aug 12 '19)
 
* [https://github.com/trufflesuite/truffle/issues/2834 Cannot destructure property `body` of 'undefined' or 'null' (5.1.10 to any later version)]
 
* [https://kalis.me/assert-reverts-solidity-smart-contract-test-truffle/ Asserting reverts when testing Solidity smart contracts with Truffle] (13 OCT, 2018)
 
** [https://github.com/rkalis/truffle-assertions <tt>truffle-assertions</tt>] : adds additional assertions that can be used to test Ethereum smart contracts inside Truffle tests.
 
** <tt>await truffleAssert.reverts(token.mint(user1, amt, {from: user2}), truffleAssert.ErrorType.REVERT)</tt>
 
 
=====Test=====
 
 
* [https://ethereum.stackexchange.com/questions/67087/how-to-use-bignumbers-in-truffle-tests '''How to use bignumbers in truffle tests?'''] (Feb 14 '19)
 
** '''Avoid using <tt>toNumber()</tt> on any value returned from a contract function'''
 
** Keep the returned value in its original type (<tt>BigNumber</tt> on Truffle 4.x / web3 0.x, and <tt>BN</tt> on Truffle 5.x / web3 1.x)
 
** For printout, you're best off using <tt>toFixed()</tt> (or <tt>toLocaleString()</tt> maybe)
 
 
====Examples====
 
 
* [https://github.com/ConsenSys/example-truffle-library example-truffle-library] : Example project showing how to use Truffle to create javascript libraries
 
* [https://github.com/ConsenSys/truffle-webpack-demo truffle-webpack-demo] : A demo Webpack + React App using truffle-solidity-loader
 
* [https://github.com/biern/truffle-typescript-example truffle-typescript-example] : Minimal example integration of Truffle + TypeScript + TestRPC run in docker, for writing smart contracts on Ethereum blockchain.
 
* [https://github.com/truffle-box Truffle Box] : A set of boilerplates to help developers quickly build distributed applications on the Ethereum blockchain with Truffle.
 
 
====Tips and Tricks====
 
 
=====Typical Truffle Configuration=====
 
 
<syntaxhighlight lang='javascript' enclose='div'>
 
 
/**
 
* You'll also need a mnemonic - the twelve word phrase the wallet uses to generate
 
* public/private key pairs. If you're publishing your code to GitHub make sure you load this
 
* phrase from a file you've .gitignored so it doesn't accidentally become public.
 
*
 
*/
 
 
const HDWalletProvider = require('@truffle/hdwallet-provider');
 
// const infuraKey = "fj4jll3k.....";
 
//
 
// const fs = require('fs');
 
// const mnemonic = fs.readFileSync(".secret").toString().trim();
 
 
// http://truffleframework.com/docs/advanced/configuration
 
module.exports = {
 
 
networks: {
 
 
development: {
 
host: '127.0.0.1',
 
port: 8545,
 
network_id: '31',
 
gas: 4E8,
 
gasPrice: 2.5E10,
 
websockets: true
 
},
 
 
//GitHub : https://github.com/ethereum/ropsten/
 
//Explorer : https://ropsten.etherscan.io/
 
//Faucet : https://faucet.ropsten.be/
 
ropsten: {
 
provider: () => new HDWalletProvider(process.env.BIP39_MNEMONIC,"https://ropsten.infura.io/v3/" + process.env.INFURA_PROJECT_ID),
 
network_id: '3',
 
gas: 7E6,
 
gasPrice: 1E10
 
},
 
 
//Explorer : https://rinkeby.etherscan.io/
 
//Faucet : https://faucet.rinkeby.io/
 
rinkeby: {
 
provider: () => new HDWalletProvider(process.env.BIP39_MNEMONIC, "https://rinkeby.infura.io/v3/" + process.env.INFURA_PROJECT_ID),
 
network_id: '4',
 
},
 
 
//GitHub : https://github.com/kovan-testnet/
 
//Explorer : https://kovan.etherscan.io/
 
//Faucet : https://faucet.kovan.network/
 
kovan: {
 
provider: () => new HDWalletProvider(process.env.BIP39_MNEMONIC, "https://kovan.infura.io/v3/" + process.env.INFURA_PROJECT_ID),
 
network_id: '42', //https://github.com/ethereum/wiki/wiki/JSON-RPC#net_version
 
gas: 7E6,
 
gasPrice: 5E10
 
}
 
},
 
 
// https://github.com/mochajs/mocha/blob/v5.2.0/lib/mocha.js#L64
 
// https://mochajs.org/#command-line-usage
 
mocha: {
 
useColors: true,
 
enableTimeouts: true,
 
timeout: 180000
 
},
 
 
// http://truffleframework.com/docs/advanced/configuration
 
compilers: {
 
solc: {
 
version: "^0.5.0",
 
// version: "^0.6.0",
 
settings: {
 
optimizer: {
 
enabled: false,
 
runs: 200
 
},
 
evmVersion: "petersburg"
 
}
 
},
 
},
 
};
 
 
</syntaxhighlight>
 
 
=====Typical Truffle Test-case=====
 
 
<syntaxhighlight lang='javascript' enclose='div'>
 
const Token = artifacts.require("TrustedToken");
 
const Chance = require('chance');
 
const toBN = web3.utils.toBN;
 
const { constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers');
 
 
//References
 
//Truffle test in JavaScript : https://www.trufflesuite.com/docs/truffle/testing/writing-tests-in-javascript
 
//Truffle Contract Guide : https://www.trufflesuite.com/docs/truffle/getting-started/interacting-with-your-contracts
 
//Truffle Contract Package : https://github.com/trufflesuite/truffle/tree/master/packages/contract
 
//Mocha Documentation : https://mochajs.org/#getting-started
 
//Chai Assert API : https://www.chaijs.com/api/assert/
 
//Chai Expect/Should API : https://www.chaijs.com/api/bdd/
 
//OpenZeppelin Test Helpers API : https://docs.openzeppelin.com/test-helpers/0.5/api
 
//web3 API : https://web3js.readthedocs.io/en/v1.2.11/
 
//chance.js : https://chancejs.com/
 
//bn.js : https://github.com/indutny/bn.js/
 
//JavaScript Reference (MDN) : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
 
//The Modern JavaScript Tutorial : http://javascript.info/
 
 
contract("TrustedToken Test Suite 1", async accounts => {
 
'use strict';
 
 
// avoid too many accounts
 
if(accounts.length > 8) accounts = accounts.slice(0, 8);
 
 
const EventNames = {
 
Transfer: 'Transfer',
 
Approval: 'Approval'
 
};
 
 
async function createFixtures(){
 
const chance = new Chance();
 
const admin = chance.pickone(accounts);
 
const token = await Token.new('Color Token', 'RGB', {from: admin});
 
console.debug(`New token contract deployed - address: ${token.address}`);
 
 
return [chance, admin, token];
 
}
 
 
before(async() => {
 
const table = [];
 
let balance = 0;
 
 
// Before test suite, unlock all accounts and display the balances
 
for(const acct of accounts){
 
await web3.eth.personal.unlockAccount(acct);
 
balance = await web3.eth.getBalance(acct);
 
await table.push([acct, balance]);
 
}
 
 
console.debug(`The number of accounts : ${accounts.length}`);
 
console.table(table);
 
});
 
 
describe("Minting", () => {
 
// mint(), totalSupply(), balanceOf()
 
it("Minting tokens should increase the owners balance and total supply", async() =>{
 
const [chance, admin, token] = await createFixtures();
 
 
...
 
});
 
 
// mint(), grantRole()
 
it("Only minter can 'mint' a token.", async() => {
 
const [chance, admin, token] = await createFixtures();
 
 
...
 
});
 
});
 
 
describe("Transfer", () => {
 
 
// transfer(), mint()
 
it("Transfer should decrease sender's balance and increase recipient's balance as much", async() => {
 
const [chance, admin, token] = await createFixtures();
 
 
...
 
});
 
 
// mint(), transfer(), totalSupply()
 
it("Token transfer should not change total supply.", async() => {
 
const [chance, admin, token] = await createFixtures();
 
 
....
 
});
 
 
// transfer(), mint()
 
it("Transfer to ZERO address is illegal.", async() => {
 
const [chance, admin, token] = await createFixtures();
 
 
....
 
});
 
 
 
...
 
});
 
 
...
 
});
 
</syntaxhighlight>
 
 
----
 
 
===truffle-assertions===
 
 
* https://github.com/rkalis/truffle-assertions
 
* Desc. : adds additional assertions that can be used to test Ethereum smart contracts inside Truffle tests.
 
* Written-in : JavaScript
 
* Artifacts : https://www.npmjs.com/package/truffle-assertions
 
 
* [https://kalis.me/assert-reverts-solidity-smart-contract-test-truffle/ Asserting reverts when testing Solidity smart contracts with Truffle] (13 OCT, 2018)
 
* [https://kalis.me/check-events-solidity-smart-contract-test-truffle/ Checking events when testing Solidity smart contracts with Truffle] (3 MAY, 2018)
 
 
----
 
 
===Embark===
 
 
* https://github.com/iurimatias/embark-framework
 
* Desc. : Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms
 
* License : MIT
 
 
----
 
 
===Brownie===
 
 
* https://github.com/iamdefinitelyahuman/brownie-v2
 
* Desc. : a Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine.
 
* License : MIT
 
* Sources :
 
 
====Readings====
 
 
* [https://eth-brownie.readthedocs.io/en/stable/ Brownie Documentation]
 
* [https://eth-brownie.readthedocs.io/en/latest/config.html Brownie Configuration File] (<tt>brownie-config.yaml</tt>)
 
 
* [https://medium.com/@iamdefinitelyahuman/getting-started-with-brownie-part-1-9b2181f4cb99 Getting Started with Brownie: Part 1] (Apr 20, 2020)
 
* [https://medium.com/better-programming/getting-started-with-brownie-part-2-615a1eec167f Getting Started with Brownie: Part 2] (Apr 20, 2020)
 
* [https://medium.com/better-programming/getting-started-with-brownie-part-3-ef6bfa9867d7 Getting Started with Brownie: Part 3] (Apr 20, 2020)
 
 
{| class='wikitable'
 
! Command !! Description !! Remarks
 
|-
 
| <tt>brownie init</tt> || Initialize a new brownie project ||
 
|-
 
| <tt>brownie compile</tt> || Compile the contract source file ||
 
|-
 
| <tt>brownie test</tt> || Run test cases in the <tt>tests/</tt> folder ||
 
|-
 
| <tt>brownie run</tt> || Run a script in the <tt>scripts/</tt> folder ||
 
|-
 
| <tt>brownie console</tt> || Load the console ||
 
|-
 
| [https://eth-brownie.readthedocs.io/en/latest/network-management.html <tt>brownie networks</tt>] || Manage network settings ||
 
|-
 
| style='white-space:nowrap' | <tt><nowiki>brownie networks list [verbose=false]</nowiki></tt> || List existing networks ||
 
|}
 
 
----
 
 
===ZeppelinOS===
 
 
* https://zeppelinos.org/
 
* Desc. : a development platform designed specifically for smart contract projects
 
 
----
 
 
===Mist Browser===
 
 
* https://github.com/ethereum/mist
 
* Desc. : the tool of choice to browse and use Ðapps
 
 
----
 
 
===Ganache CLI===
 
 
* https://github.com/trufflesuite/ganache-cli
 
* Desc. : simulate full client behavior and make developing Ethereum applications faster, easier, and safer.
 
* License : MIT
 
 
<syntaxhighlight lang='bash' enclose='div'>
 
#! /bin/bash
 
 
# TODO
 
# - Check the availability of the TCP port for Linux
 
# - Setup 'logrotate' for Linux
 
 
readonly verbose=1 # 1: true, 0: false - Hard coded yet
 
readonly dryrun=0 # 1: true, 0: false - Not Used Yet
 
readonly uname=`uname -s` # OS type
 
readonly script_dir=$(cd `dirname $0` && pwd)
 
 
declare data_dir
 
declare log_dir
 
case $uname in
 
Linux) #Linux
 
data_dir='/var/lib/ganache-cli'
 
log_dir='/var/log'
 
;;
 
MINGW*) #Git Bash on Windows
 
readonly run_dir=$(mkdir -p "${script_dir}/../run/ganache" && cd "${script_dir}/../run/ganache" && pwd)
 
data_dir=${run_dir}/data
 
log_dir=${run_dir}
 
;;
 
Darwin*) #Bash on macOS
 
readonly run_dir=$(mkdir -p "${script_dir}/../run/ganache" && cd "${script_dir}/../run/ganache" && pwd)
 
data_dir=${run_dir}/data
 
log_dir=${run_dir}
 
;;
 
*)
 
echo "The current system is Unknown of which 'uname -s' shows '$uname'."
 
exit 600
 
esac
 
 
 
# check whether GNU getopt is available or not
 
if [ `getopt --test; echo $?` -ne 4 ]; then
 
echo "The avaiable 'getopt' is not GNU getopt which supports long options."
 
echo "For MacOS, install 'gnu-getopt' refering 'https://formulae.brew.sh/formula/gnu-getopt'."
 
exit 410
 
fi
 
 
options=$(getopt -o rb --long "refresh,background" --name 'ganache-cli-start-options' -- "$@");
 
 
if [ $? -ne 0 ]; then
 
command=${0##*/}
 
echo "Unable to parse command line, which expect '$command [-r|--refresh] [-b|--background]'."
 
echo ""
 
exit 400
 
fi
 
 
eval set -- "$options"
 
 
declare refreshes=0 #false
 
declare backgrounds=0 #false
 
while true; do
 
case "$1" in
 
-r | --refresh )
 
echo "refresh specified"
 
refreshes=1
 
shift ;;
 
-b | --background )
 
backgrounds=1
 
shift ;;
 
-- ) shift; break ;;
 
esac
 
done
 
 
if [ ! -d "${data_dir}" ]; then
 
echo "Creating data directory on '${data_dir}'"
 
if [ "$uname" == "Linux" ]; then
 
sudo mkdir -p "${data_dir}"
 
else
 
mkdir -p "${data_dir}"
 
fi
 
fi
 
 
if [ $refreshes -eq 1 ]; then
 
echo "Removing all current data under '${data_dir}'"
 
if [ "$uname" == "Linux" ]; then
 
sudo rm -Rf "${data_dir}"
 
sleep 3
 
sudo mkdir -p "${data_dir}"
 
else
 
rm -Rf "${data_dir}"
 
sleep 3
 
mkdir -p "${data_dir}"
 
fi
 
fi
 
 
cd "${script_dir}"
 
 
readonly eth_ver=`cat ganache-cli.properties | grep -E "^ethereum\.netVersion=" | sed -E 's/ethereum\.netVersion=//'`
 
readonly eth_host=`cat ganache-cli.properties | grep -E "^ethereum\.host=" | sed -E 's/ethereum\.host=//'`
 
readonly eth_port=`cat ganache-cli.properties | grep -E "^ethereum\.port=" | sed -E 's/ethereum\.port=//'`
 
readonly eth_gas_price=`cat ganache-cli.properties | grep -E "^ethereum\.gasPrice=" | sed -E 's/ethereum\.gasPrice=//'`
 
readonly eth_gas_limit=`cat ganache-cli.properties | grep -E "^ethereum\.gasLimit=" | sed -E 's/ethereum\.gasLimit=//'`
 
readonly eth_keys=`cat ganache-cli.properties | grep -E "^ethereum\.keys" | sed -E 's/ethereum\.keys\.[0-9]*=//'`
 
 
if [ $verbose -ne 0 ]; then
 
echo "Ethereum Network ID : $eth_ver"
 
echo "Ethereum Client Host Address: $eth_host"
 
echo "Ethereum Client TCP Port: $eth_port"
 
echo "Ethereum Gas Limit: $eth_gas_limit"
 
echo "Ethereum Gas Price: $eth_gas_price"
 
echo "Ethereum Private Keys for Accounts: "
 
for key in $eth_keys; do echo " $key"; done
 
echo "uname: $uname"
 
fi
 
 
case $uname in
 
Linux) #Linux
 
echo "Current system is 'Linux'"
 
;;
 
MINGW*) #Git Bash on Windows
 
echo "Curreun system is 'Windows'"
 
# check whether the address is alreasy in use or not
 
if [ `netstat -anp tcp | awk '$4 == "LISTENING" {print $2}' | grep -E "^($eth_host|0.0.0.0):$eth_port$" | wc -l` -gt 0 ]; then
 
readonly pid=`netstat -anop tcp | awk '$4 == "LISTENING" {print $2 " " $5}' | grep -E "^($eth_host|0.0.0.0):$eth_port\s" | head -n 1 | awk '{print $2}'`
 
echo "The address '$eth_host:$eth_port' is already in use by the process of which PID is $pid."
 
echo "Fail to start ganache-cli."
 
exit 500
 
fi
 
;;
 
Darwin*) #Bash on macOS
 
echo "Current system is 'macOS'"
 
;;
 
*)
 
echo "Current system is Unknown of which 'uname -s' shows '$uname'."
 
exit 600
 
esac
 
 
# Ganache CLI : https://github.com/trufflesuite/ganache-cli#using-ganache-cli
 
# BIP 32 : https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
 
# BIP 39 : https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki
 
#
 
# Options
 
# - gasLimit : The block gas limit (defaults to 0x6691b7)
 
# - gasPrice: The price of gas in wei (defaults to 20000000000)
 
 
cmd="ganache-cli --networkId $eth_ver \
 
--host '$eth_host' \
 
--port $eth_port \
 
--gasPrice $eth_gas_price \
 
--gasLimit $eth_gas_limit"
 
 
if [ -n "$eth_keys" ]; then
 
echo ""
 
echo "Private keys for Ethereum accounts are explicitly specified. They will be used."
 
for key in $eth_keys;
 
do cmd="${cmd} --account=\"${key},10000000000000000000000\""
 
done;
 
else
 
if [ -z "$BIP39_MNEMONIC" ]; then
 
echo "'BIP39_MNEMONIC' env. variable is not defined, so implicit default mnemonic will be used."
 
echo "If you want to use user defined mnemonic, define it via 'BIP39_MNEMONIC' env. variable and restart this script."
 
cmd="${cmd} --deterministic"
 
else
 
echo "'BIP39_MNEMONIC' env. variable is defined, so it will be used."
 
cmd="${cmd} --mnemonic '$BIP39_MNEMONIC'"
 
fi
 
cmd="${cmd} --defaultBalanceEther 10000 --accounts 10 --secure"
 
fi
 
 
cmd="${cmd} --unlock 0 --unlock 1 --unlock 2 --unlock 3 --unlock 4 \
 
--hardfork 'petersburg' \
 
--blockTime 0 \
 
--db '${data_dir}' >> '${log_dir}'/ganache.log 2>&1"
 
 
if [ "$uname" == "Linux" ]; then
 
cmd="sudo sh -c \"$cmd\""
 
# cmd="sudo sh -c -- $cmd"
 
fi
 
 
if [ $dryrun -ne 0 ]; then
 
echo $cmd
 
echo ""
 
echo "This is 'DRY' run."
 
echo "The right above command would be executed, if run again without 'dryrun' option."
 
exit 700
 
fi
 
 
if [ $backgrounds -eq 0 ]; then
 
echo ""
 
echo $cmd
 
eval $cmd
 
else
 
cmd=$cmd' &'
 
echo ""
 
echo $cmd
 
eval $cmd
 
 
if [ $? -eq 0 ]; then
 
sleep 3
 
tail "${log_dir}"/ganache.log -n 50
 
echo "The loacal Ganache has started."
 
echo "The log file is located at '${log_dir}/ganache.log'."
 
fi
 
fi
 
</syntaxhighlight>
 
 
----
 
 
===Oraclize===
 
 
* http://www.oraclize.it/
 
* Desc. : the leading oracle service for smart contracts and blockchain applications, serving thousands of requests for day every day on Ethereum, Bitcoin and Rootstock.
 
* License :
 
 
* Readings
 
** [https://docs.oraclize.it/ Oraclzie official documentation]
 
 
----
 
 
===Aleth.io===
 
 
* https://aleth.io/
 
* Desc. :
 
* Sources : https://github.com/Alethio
 
 
====Readings====
 
 
* [https://aleth.io/v1/docs Alethio API]
 
 
===Memento===
 
 
* https://github.com/Alethio/memento
 
* Desc. : a tool to scrape and index data from any web3-compatible networks.
 
* License : MIT
 
 
* [https://alethio.gitbook.io/memento/ Memento documentation]
 
 
===Lity===
 
 
* https://www.litylang.org/
 
* Desc. : A rule-based contract-oriented high-level language.
 
* License : GPL-3.0
 
* Written in : C++
 
* Sources : https://github.com/second-state/lity
 
 
* Components
 
** a dynamically extensible language : a superset of the Solidity language
 
** a compiler
 
** a virtual machine
 
 
====Readings====
 
 
* [https://lity.readthedocs.io/en/latest/ Lity documentation]
 
 
===Ethereum plugin for Vault===
 
 
* https://github.com/immutability-io/vault-ethereum
 
* Desc. : A plugin that turns Vault into an Ethereum wallet.
 
* License : Apache-2.0
 
* Sources : https://github.com/immutability-io/vault-ethereum
 
 
====Readings====
 
 
* [https://www.hashicorp.com/blog/using-vault-to-build-an-ethereum-wallet/ Using Vault to Build an Ethereum Wallet]
 
 
===EthSigner===
 
 
* https://github.com/PegaSysEng/ethsigner/
 
* Desc. : A transaction signing application to be used with a web3 provider.
 
* License : Apache-2.0
 
* Sources : https://github.com/PegaSysEng/ethsigner/
 
 
====Readings====
 
 
* [https://pegasys.tech/protecting-your-ethereum-private-key-with-ethsigner/ Protecting Your Ethereum Private Key With EthSigner] (August 14, 2019)
 
 
===Slither===
 
 
* https://github.com/crytic/slither
 
* Desc. : a Solidity static analysis framework
 
* License : AGPL-3.0
 
 
====Readings====
 
 
* [https://github.com/crytic/slither/wiki/Usage Official documentation]
 
* [https://github.com/crytic/slither/wiki/Detector-Documentation Detector Documentation]
 
 
===Solhint===
 
 
* https://github.com/protofire/solhint
 
* Desc. : provides both Security and Style Guide validations.
 
* License : MIT
 
 
====Readings====
 
 
* [https://protofire.github.io/solhint/ Official documentation]
 
* [https://protofire.github.io/solhint/rules.html List of Rules]
 
* [https://github.com/protofire/solhint/blob/master/docs/configuration.md Configuration]
 
 
===Mythril===
 
 
* https://github.com/ConsenSys/mythril
 
* Desc. : detects security vulnerabilities in smart contracts built for Ethereum, Hedera, Quorum, Vechain, Roostock, Tron and other EVM-compatible blockchains.
 
* License : MIT
 
 
===Certora===
 
 
* https://www.certora.com/
 
* Desc. : Formal verification tool for Solidity
 
* License : ?
 
 
* [https://github.com/compound-finance/compound-protocol/tree/master/spec Compound Smart Contract Spec in Certora Verification Language (CVL)]
 
 
===Securify===
 
 
* https://github.com/eth-sri/securify2
 
* Desc. : a security scanner for Ethereum smart contracts supported by the Ethereum Foundation and ChainSecurity.
 
* License :
 
 
===Manticore===
 
 
* https://github.com/trailofbits/manticore
 
* Desc. : a symbolic execution tool for analysis of smart contracts and binaries.
 
* License : AGPL-3.0
 
 
===SmartBugs===
 
 
* https://github.com/smartbugs/smartbugs
 
* Desc. : A Framework to Analyze Solidity Smart Contracts
 
* License : Apache-2.0
 
 
===uPort Identity Contracts===
 
 
* https://github.com/uport-project/uport-identity
 
* Desc. :
 
* License : Apache License
 
   
  +
* &gt;&gt; [[On Ethereum| On Ethereum]]
* [https://medium.com/uport/different-approaches-to-ethereum-identity-standards-a09488347c87 Different Approaches to Ethereum Identity Standards] (Jan 25, 2018)
 
   
 
==Substrate==
 
==Substrate==
Line 3,442: Line 555:
   
 
* [https://en.wikipedia.org/wiki/Stellar_(payment_network) Stellar on Wikipedia]
 
* [https://en.wikipedia.org/wiki/Stellar_(payment_network) Stellar on Wikipedia]
  +
  +
==Solana==
  +
  +
* https://solana.com/
  +
* Desc. :
  +
  +
* [https://docs.solana.com/ Solana official documentation]
  +
* [https://solanacookbook.com/ Solana Cookbook]
  +
* [https://solana.wiki/ Solana Developer Wiki]
  +
* [https://solana.wiki/docs/solidity-guide/dev-environment/tools/ Development Tools]
  +
* [https://docs.rs/solana-cli-config/latest/solana_cli_config/struct.Config.html Solana Configuration Fields]
  +
** <code>json_rpc_url</code>, <code>websocket_url</code>, <code>keypair_path</code>, <code>address_labels</code>, <code>commitment</code>
  +
  +
* [https://docs.solana.com/cluster/fork-generation#message-flow Message Flow]
  +
* [https://docs.solana.com/cluster/turbine-block-propagation Turbine Block Propagation]
  +
  +
* [https://docs.solana.com/developing/test-validator Solana Test Validator]
  +
  +
<blockquote class='bared'>
  +
A Solana cluster is capable of subsecond confirmation for up to 150 nodes with plans to scale up to hundreds of thousands of nodes. Once fully implemented, confirmation times are expected to increase only with the logarithm of the number of validators, where the logarithm's base is very high.
  +
</blockquote>
  +
  +
<blockquote class='bared'>
  +
A Solana cluster uses a multi-layer block propagation mechanism called Turbine to broadcast transaction shreds to all nodes with minimal amount of duplicate messages.
  +
</blockquote>
  +
  +
===CLI===
  +
  +
* [https://docs.solana.com/cli Solana Command-line Guide]
  +
  +
<syntaxhighlight lang='bash' enclose='div'>
  +
  +
$ solana --help
  +
  +
$ solana <command> --help
  +
</syntaxhighlight>
  +
  +
{| class='wikitable'
  +
! Command !! Description !! Remarks
  +
|-
  +
| <code>solana config get</code> || Get current config settings ||
  +
|-
  +
| <code>solana config set</code> || Set a config setting ||
  +
|-
  +
| <code>solana config set --url ''url''</code> || || <tt>solana config set --url http://127.0.0.1:8899</tt>
  +
|-
  +
| <code>solana cluster-version</code> || Get the version of the cluster entrypoint ||
  +
|}
  +
  +
===Transaction===
  +
  +
{| class='wikitable'
  +
! Field !! Description !! Remarks
  +
|-
  +
| signatures || List of signatures.
  +
|-
  +
| accounts || List of accounts (read-only / read-write)
  +
|-
  +
| recentBlockhash || Blockhash of recently produced block used as nonce.
  +
|-
  +
| instructions || List of instructions which each call an on-chain program.
  +
|}
  +
  +
* [https://solana.wiki/docs/solidity-guide/transactions/ Major differences between Ethereum and Solana transactions]
  +
  +
===Smart Contract===
  +
  +
* [https://docs.solana.com/developing/on-chain-programs/developing-rust Developing with Rust]
  +
* [https://docs.solana.com/developing/on-chain-programs/developing-c Developing with C/C++]
  +
  +
===JSON RPC API===
  +
  +
* Desc. : Interact with Solana nodes directly with the JSON RPC API via the HTTP and Websocket methods.
  +
Explore the API
  +
  +
* [https://docs.solana.com/api/http JSON RPC HTTP Methods]
  +
* [https://docs.solana.com/api/websocket JSON RPC Websocket API]
  +
  +
===JavaScript API===
  +
  +
* [https://github.com/solana-labs/solana-web3.js/ Solana-Web3.js GitHub]
  +
  +
* [https://docs.solana.com/developing/clients/javascript-api Solana-Web3.js]
  +
* [https://docs.solana.com/developing/clients/javascript-reference Solana-Web3.js API Reference]
  +
* [https://solana-labs.github.io/solana-web3.js/ Solana-Web3.js TypeScript API Reference]
  +
  +
===Rust API===
  +
  +
* [https://docs.solana.com/developing/clients/rust-api Rust API]
  +
  +
===Readings===
  +
  +
* [https://www.becomebetterprogrammer.com/create-solana-smart-contract/ How to Build & Deploy a Solana Smart Contract using Anchor]
  +
** Installing Rust, Installing Solana, Installing Anchor
  +
* [https://soliditydeveloper.com/solana Deploying Solidity Smart Contracts to Solana]
  +
  +
----
  +
  +
==Anchor==
  +
  +
* https://github.com/coral-xyz/anchor
  +
* Desc. : a framework for Solana's Sealevel runtime providing several convenient developer tools for writing smart contracts.
  +
* License : Apache-2.0 license
  +
* Sources : https://github.com/coral-xyz/anchor
  +
  +
===Readings===
  +
  +
* [https://www.anchor-lang.com/ Anchor documentation]
  +
* [https://book.anchor-lang.com/ Anchor Book]
  +
* [https://www.anchor-lang.com/docs/manifest <code>Anchor.toml</code> Reference]
  +
  +
* [https://hackmd.io/@ironaddicteddog/solana-anchor-escrow Anchor: A Powerful Framework for Solana Developers]
   
 
==Hyperledger==
 
==Hyperledger==
Line 3,764: Line 989:
 
* [https://petertodd.org/2016/state-machine-consensus-building-blocks Building Blocks of the State Machine Approach to Consensus] (Jun 20, 2016)
 
* [https://petertodd.org/2016/state-machine-consensus-building-blocks Building Blocks of the State Machine Approach to Consensus] (Jun 20, 2016)
 
* [https://petertodd.org/2016/closed-seal-sets-and-truth-lists-for-privacy Closed Seal Sets and Truth Lists for Better Privacy and Censorship Resistance] (Jun 22, 2016)
 
* [https://petertodd.org/2016/closed-seal-sets-and-truth-lists-for-privacy Closed Seal Sets and Truth Lists for Better Privacy and Censorship Resistance] (Jun 22, 2016)
  +
  +
==Terra==
  +
  +
* https://www.terra.money/
  +
* Desc. :
  +
* Sources : https://github.com/terra-project
  +
  +
* [https://medium.com/terra-money/announcing-terrausd-ust-the-interchain-stablecoin-53eab0f8f0ac Announcing TerraUSD (UST)— the Interchain Stablecoin] (Sep 22, 2020)
   
 
==Eris==
 
==Eris==
Line 3,815: Line 1,048:
 
* https://ipfs.io/
 
* https://ipfs.io/
 
* Desc. : A peer-to-peer hypermedia protocol to make the web faster, safer, and more open
 
* Desc. : A peer-to-peer hypermedia protocol to make the web faster, safer, and more open
  +
  +
* [https://docs.ipfs.io/concepts/ IPFS concepts]
  +
* [https://docs.ipfs.io/how-to/ IPFS how-tos and tutorials]
  +
* [https://docs.ipfs.io/concepts/ipfs-gateway/ IPFS Gateway]
  +
* [https://github.com/ipfs/specs IPFS Specifications]
  +
* [https://docs.ipfs.io/reference/ IPFS API & CLI reference]
  +
** [https://github.com/ipfs/specs/blob/main/http-gateways/PATH_GATEWAY.md Path Gateway Specification]
  +
** [https://github.com/ipfs/specs/blob/main/http-gateways/TRUSTLESS_GATEWAY.md Trustless Gateway Specification]
  +
** [https://github.com/ipfs/specs/blob/main/http-gateways/SUBDOMAIN_GATEWAY.md Subdomain Gateway Specification]
  +
  +
{| class='wikitable'
  +
! Type !! API !! Description !! Remarks
  +
|-
  +
| Path Gateway || [https://docs.ipfs.tech/reference/http/gateway/#api <code><nowiki>GET /ipfs/{cid}[/{path}][?{params}]</nowiki></code>]
  +
| ||
  +
|-
  +
| Subdomain Gateway || [https://github.com/ipfs/specs/blob/main/http-gateways/SUBDOMAIN_GATEWAY.md#http-api <code><nowiki>GET /[{path}][?{params}]</nowiki></code>]
  +
| ||
  +
|}
  +
  +
* [https://docs.ipfs.io/how-to/address-ipfs-on-web/#dweb-addressing-in-brief Address IPFS on the Web]
  +
* [https://blog.infura.io/an-introduction-to-ipfs/ An Introduction to IPFS] (SEPTEMBER 17, 2020)
  +
* [https://github.com/ipfs/awesome-ipfs Awesome IPFS]
  +
  +
* [https://proto.school/content-addressing Content Addressing on the Decentralized Web]
  +
* [https://proto.school/anatomy-of-a-cid Anatomy of a CID]
  +
{| class='wikitable'
  +
! Version !! Feature !! Format !! Description !! Remarks
  +
|-
  +
| <code>CIDv0</code> || multihash ||
  +
| [https://en.wikipedia.org/wiki/Type%E2%80%93length%E2%80%93value TLV(Type-Length-Value)] pattern, [https://en.wikipedia.org/wiki/Binary-to-text_encoding#Encoding_standards Base58]
  +
|-
  +
| <code>CIDv1</code> || multicodec, multihash
  +
| <code>&lt;multicodec&gt;&lt;multihash-algorithm&gt;&lt;multihash-length&gt;&lt;multihash-hash&gt;</code> ||
  +
|}
  +
* [https://proto.school/merkle-dags Merkle DAGs: Structuring Data for the Distributed Web]
  +
  +
* [https://sourceforge.net/software/ipfs-pinning/ IPFS Pinning Services]
  +
** Filebase, Kaleido, Infura, Pinata]
  +
  +
===IPFS Client===
  +
  +
{| class='wikitable'
  +
! Category !! Library !! Description !! Documentation !! Remarks
  +
|-
  +
| Go || [https://github.com/ipfs/go-ipfs-api Go Embedded Client(<code>go-ipfs-api</code>)]
  +
| The go interface to ipfs's HTTP API
  +
| [https://pkg.go.dev/github.com/ipfs/go-ipfs-api go-ipfs-api API] ||
  +
|-
  +
| || [https://github.com/ipfs/go-ipfs-http-client Go HTTP Client(<code>go-ipfs-http-api</code>)]
  +
| IPFS CoreAPI implementation using HTTP API]
  +
| [https://pkg.go.dev/github.com/ipfs/go-ipfs-http-client go-ipfs-http-api API] || experimental
  +
|-
  +
| JavaScript || [https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client JS-IPFS HTTP Client]
  +
| The JavaScript HTTP RPC API client library for IPFS implementations. || ||
  +
|-
  +
| Java || [https://github.com/ipfs-shipyard/java-ipfs-http-client Java IPFS HTTP Client(<code>java-ipfs-http-client</code>)]
  +
| A Java client for the IPFS http api || ||
  +
|}
  +
  +
* [https://greg.jeanmart.me/2019/08/14/managing-storage-in-a-java-application-with-ipfs/ Managing storage in a Java application with IPFS] (2019-08-14)
  +
  +
===IPFS Gateway===
  +
  +
* [https://luke.lol/ipfs.php IPFS Gateway List]
  +
* [https://ipfs.github.io/public-gateway-checker/ Public IPFS Gateways List]
  +
* [https://www.reddit.com/r/ipfs/comments/lvwn4o/ipfs_http_gateways_ranked_by_performance/ IPFS HTTP Gateways ranked by performance]
  +
* [https://medium.com/temporal-cloud/comparing-ipfs-pinning-services-pricing-functionality-temporal-eternum-pinata-d38b87a279d8 Comparing IPFS Pinning Services Pricing/Functionality. Temporal, Eternum & Pinata] (Nov 11, 2019)
  +
  +
{| class='wikitable'
  +
! Provider !! Service !! Description !! Documentation !! Remarks
  +
|-
  +
| Cloudflare || [https://www.cloudflare.com/distributed-web-gateway/ Cloudflare IPFS Gateway]
  +
| Cloudflare's read-only Distributed Web Gateway lets you access content stored on the IPFS quickly and easily, without downloading any special software or giving up any storage space on your computer.
  +
| [https://developers.cloudflare.com/distributed-web/ipfs-gateway IPFS Gateway] ||
  +
|-
  +
| [https://www.pinata.cloud/ Pinata] || [https://docs.pinata.cloud/gateways/dedicated-gateways Pinata Dedicated Gateways]
  +
| Get even faster speed with your own IPFS dedicated server. || || $20/Month
  +
|}
  +
  +
  +
===Sample Resources===
  +
  +
{| class='wikitable'
  +
! Title !! Format !! Category !! URI !! Remarks
  +
|-
  +
| 'Impression, Sunrise' || <tt>JPEG</tt> || Image
  +
| [https://ipfs.io/ipfs/Qmaa4Lv37rBqZU6Kes6EkddHjnm333FtLrfByodyow5wZo ipfs://Qmaa4Lv37rBqZU6Kes6EkddHjnm333FtLrfByodyow5wZo] ||
  +
|-
  +
| Metadata for 'Impression, Sunrise' || <tt>JSON</tt> || NFT Token Meta
  +
| [https://ipfs.io/ipfs/QmZnYQBBk4SDQohfamMeoiquT3p7HuJ9GoFLbVbodDJ6GP ipfs://QmZnYQBBk4SDQohfamMeoiquT3p7HuJ9GoFLbVbodDJ6GP] ||
  +
|-
  +
| [https://www.moma.org/collection/works/79802 'The Starry Night'] || || Image
  +
| [https://ipfs.io/ipfs/QmPUxNiwMR3etcisHkcm2k1hYfTVJtS9w4uMFsNmtRcqAi ipfs://QmPUxNiwMR3etcisHkcm2k1hYfTVJtS9w4uMFsNmtRcqAi] ||
  +
|-
  +
| Metadata for 'The Starry Night' || <tt>JSON</tt> || NFT Token Meta
  +
| [https://ipfs.io/ipfs/QmYmEyspK37Q1eJvMo17eovzpWxZ53LDVRJGFmuSPcNaVd ipfs://QmYmEyspK37Q1eJvMo17eovzpWxZ53LDVRJGFmuSPcNaVd] ||
  +
|}
  +
  +
==NFT==
  +
  +
* [https://opensea.io/ OpenSea] (NFT Marketplace)
  +
* [https://nonfungible.com/ NonFungible] : The world's largest NFT data resource
  +
  +
* [https://en.wikipedia.org/wiki/List_of_most_expensive_non-fungible_tokens List of most expensive non-fungible tokens]
  +
* [https://en.wikipedia.org/wiki/List_of_most_expensive_paintings List of most expensive paintings]
  +
  +
* [https://www.theverge.com/22310188/nft-explainer-what-is-blockchain-crypto-art-faq NFTs, explained] (Mar 11, 2021)
  +
* [https://www.bbc.com/news/entertainment-arts-56368868 Everydays: The First 5000 Days - Will Gompertz reviews Beeple's digital work]
  +
* [https://www.theverge.com/2021/3/11/22325054/beeple-christies-nft-sale-cost-everydays-69-million Beeple sold an NFT for $69 million] (Mar 11, 2021)
  +
  +
===Assets===
  +
  +
{| class='wikitable'
  +
! Asset !! Creator !! Description !! Contract !! Marketplace !! Highest Price !! Remark
  +
|-
  +
| [https://onlineonly.christies.com/s/beeple-first-5000-days/beeple-b-1981-1/112924 EVERYDAYS: THE FIRST 5000 DAYS] || [https://twitter.com/beeple Beeple] ||
  +
| [https://etherscan.io/address/0x2a46f2ffd99e19a89476e2f62270e0a35bbf0756 MKT2 Token] || [https://makersplace.com/ MakersPlace]
  +
| [https://www.theverge.com/2021/3/11/22325054/beeple-christies-nft-sale-cost-everydays-69-million $69M] ('21.3.11) || Digital Artwork (JPG, 21,069 x 21,069)
  +
|-
  +
| [https://foundation.app/@Snowden/~/24437 Stay Free] || Edward Snowden ||
  +
| [https://etherscan.io/address/0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405 FNDNFT Token] || [https://foundation.app/ Foundation]
  +
| 2,224.00 ETH ('21.4.16) || Digital Artwork (PNG, IPFS)
  +
|-
  +
| [https://foundation.app/@pplpleasr/~/13623 x*y=k] || [https://opensea.io/pplpleasr?tab=created pplpleasr] ||
  +
| [https://etherscan.io/address/0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405 FNDNFT Token] || [https://foundation.app/ Foundation] || || Digital Artwork (MP4)
  +
|-
  +
| [https://zora.co/collections/zora/3366 Doge] || [https://en.wikipedia.org/wiki/Doge_(meme) Atsuko Sato] || The original image that started it all
  +
| [https://etherscan.io/address/0xabefbc9fd2f806065b4f3c237d4b59d9a97bcac7 ZORA] || [https://zora.co/ Zora] || || Digital Photo
  +
|}
  +
  +
{| class='wikitable'
  +
! Asset !! Etherscan !! OpenSea !! Remarks
  +
|-
  +
| [https://foundation.app/@Snowden/~/24437 Stay Free]
  +
| [https://etherscan.io/token/0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405?a=24437 0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405?a=24437]
  +
| [https://opensea.io/assets/0x3b3ee1931dc30c1957379fac9aba94d1c48a5405/24437 0x3b3ee1931dc30c1957379fac9aba94d1c48a5405/24437] ||
  +
|-
  +
| [https://foundation.app/@pplpleasr/~/13623 x*y=k]
  +
| [https://etherscan.io/token/0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405?a=13623 0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405?a=13623]
  +
| [https://opensea.io/assets/0x3b3ee1931dc30c1957379fac9aba94d1c48a5405/13623 0x3b3ee1931dc30c1957379fac9aba94d1c48a5405/13623] ||
  +
|-
  +
| [https://zora.co/collections/zora/3366 Doge]
  +
| [https://etherscan.io/token/0xabEFBc9fD2F806065b4f3C237d4b59D9A97Bcac7?a=3366 0xabEFBc9fD2F806065b4f3C237d4b59D9A97Bcac7?a=3366]
  +
| [https://opensea.io/assets/0xabefbc9fd2f806065b4f3c237d4b59d9a97bcac7/3366 0xabefbc9fd2f806065b4f3c237d4b59d9a97bcac7/3366] ||
  +
|}
  +
  +
===Contracts===
  +
  +
{| class='wikitable'
  +
! Player !! Description !! Contract Source !! Contract Address !! Documentation !! Remarks
  +
|-
  +
| [https://www.larvalabs.com/cryptopunks CryptoPunks] || 10,000 unique collectible characters with proof of ownership stored on the Ethereum blockchain.
  +
| [https://github.com/larvalabs/cryptopunks/blob/master/contracts/CryptoPunksMarket.sol <tt>CryptoPunksMarket.sol</tt>]
  +
| [https://etherscan.io/address/0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb <tt>CryptoPunksMarket</tt>]
  +
| ||
  +
|-
  +
| [https://rarible.com/ Rarible] || || [https://etherscan.io/address/0x60f80121c31a0d46b5279700f9df786054aa5ee5 MintableToken] (May-27-2020) || || ||
  +
|-
  +
| [https://superrare.co/ SuperRare] || Collect SuperRare Digital Artworks
  +
| [https://etherscan.io/address/0xb932a70a57673d89f4acffbe830e8ed7f75fb9e0 SuperRareV2] (Sep-05-2019) || || ||
  +
|-
  +
| style='white-space:nowrap' | [https://niftygateway.com/ Nifty Gateway] || the premier marketplace for Nifties, which are digital items you can truly own.
  +
| || || ||
  +
|-
  +
| [https://decentraland.org/ Decentraland] || a decentralized virtual reality platform powered by the Ethereum blockchain.
  +
| [https://github.com/decentraland/land Land Contracts]
  +
<br/>[https://github.com/decentraland/marketplace-contracts Marketplace Contracts]
  +
<br/>[https://github.com/decentraland/wearables-contracts Collection Contracts]<br/>
  +
| [https://etherscan.io/address/0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d <tt>LANDProxy</tt>]
  +
<br/>[https://etherscan.io/address/0xa57e126b341b18c262ad25b86bb4f65b5e2ade45 <tt>LANDRegistry</tt>]
  +
<br/>[https://etherscan.io/address/0x959e104e1a4db6317fa58f8295f586e1a978c297 <tt>EstateProxy</tt>]
  +
<br/>[https://etherscan.io/address/0x1784ef41af86e97f8d28afe95b573a24aeda966e <tt>EstateRegistry</tt>]
  +
<br/>[https://etherscan.io/address/0x8e5660b4ab70168b5a6feea0e0315cb49c8cd539 <tt>MarketplaceProxy</tt>]
  +
<br/>[https://etherscan.io/address/0x19a8ed4860007a66805782ed7e0bed4e44fc6717 <tt>Marketplace</tt>]
  +
<br/>[https://etherscan.io/address/0x0f5d2fb29fb7d3cfee444a200298f468908cc942 <tt>MANAToken</tt>]
  +
| [https://docs.decentraland.org/ Decentraland documentation] ||
  +
|}
  +
  +
====Rariable Contracts====
  +
  +
* [https://etherscan.io/token/0x60f80121c31a0d46b5279700f9df786054aa5ee5 Rarible ERC721 Contract on Etherscan]
  +
* [https://etherscan.io/token/0xd07dc4262bcdbf85190c01c996b4c06a461d2430 Rarible ERC1155 Contract on Etherscan]
  +
  +
===Marketplaces===
  +
  +
{| class='wikitable'
  +
! Marketplace !! Service Type !! Contents Type !! Collections !! Networks !! Sources !! API !! Remarks
  +
|-
  +
| [https://opensea.io/ OpenSea] || Open Marketplace ||
  +
| CryptoPunks, The Sandbox, Decentraland. SuperRare, Rarible, PolygonPunks, KlayFox || Ethereum, Polygon, Klaytn
  +
| || || [https://opensea.io/assets OpenSea Explorer]
  +
|-
  +
| [https://rarible.com/ Rarible] || Open Marketplace ||
  +
| parallel, The Sandbox, Rarible, Decentraland || || || || [https://rarible.com/top-collections Rarible Top Collections]
  +
|-
  +
| [https://niftygateway.com/marketplace Nifty Gateway] || [https://niftygateway.com/about Curated Marketplace] || Digital Art
  +
| || Ethereum || || [https://niftygateway.notion.site/Nifty-Gateway-OAuth-Public-API-12d0a73c3ca24ab096084fa0334ba895 Nifty Gateway Public API] ||
  +
|-
  +
| [https://superrare.com/ SuperRare] || Curated Marketplace || Digital Art
  +
| || Ethereum || || ||
  +
|-
  +
| [https://foundation.app/ Foundation] || Curated Marketplace || Digital Art
  +
| || Ethereum || || ||
  +
|-
  +
| [https://nbatopshot.com/ NBA Top Shot] || Curated Marketplace || Sports
  +
| || [https://www.onflow.org/ Flow] (PoS) || || ||
  +
|-
  +
| [https://axieinfinity.com/ Axie Infinity] || Curated Marketplace || Game
  +
| || Ethereum || || ||
  +
|-
  +
| [https://decentraland.org/ Decentraland] || Curated Marketplace || Metaverse
  +
| || Ethereum || || ||
  +
|-
  +
| [https://www.sandbox.game/ The Sandbox] || Curated Marketplace || Metaverse
  +
| || Ethereum || || ||
  +
|}
  +
  +
* [https://www.fool.com/investing/stock-market/market-sectors/financials/non-fungible-tokens/nft-marketplaces/ 10 Top NFT Marketplaces] (Nov 2, 2021)
  +
** OpenSea, Axie Infinity, CryptoPunks, NBA Top Shot, Rarible, SuperRare, Foundation, Nifty Gateway, Mintable, Theta Drop
  +
* [https://cryptonews.com/guides/top-10-nft-marketplaces.htm Top 10 NFT Marketplaces]
  +
** Open Marketpalces : OpenSea, Rarible,
  +
** Curated Marketpalce : Foundation, SuperRare, Nifty Gateway,
  +
** Collectibles Marketplace : CryptoPunks, NBA Top Shot, Ether Cards
  +
** Games Marketplaces : Axie Infinity, Decentraland,
  +
* [https://www.blockdata.tech/blog/general/what-is-the-biggest-nft-marketplace-a-top-10-comparison What is the biggest NFT marketplace? A top 10 comparison] (Oct 29th, 2021)
  +
** OpenSea, Axie Infinity, NBA Top Shot, Rarible, SuperRare, Sorare, Foundation, Aavegotchi, Decentraland, Hic et Nunc
  +
* [https://www.one37pm.com/nft/finance/best-nft-marketplace The 8 Best NFT Marketplaces to Explore Right Now] (September 21, 2021)
  +
** OpenSea, SuperRare, Foundation, Rarible, NiftyGateway, KnownOrigin, AsyncArt, Hic Et Nunc
  +
  +
* [https://www.finextra.com/blogposting/20847/whitelabel-nft-marketplace-development-all-you-need-to-know-about-this-innovative-platform Whitelabel NFT Marketplace Development - All You Need To Know About This Innovative Platform] (04 September 2021)
  +
  +
* Media format/size support
  +
{| class='wikitable'
  +
! Marketplace !! Supported Type !! Max Size !! Remarks
  +
|-
  +
| [https://support.opensea.io/hc/en-us/articles/360061943574-What-file-formats-can-I-use-to-make-NFTs-Is-there-a-maximum-size- OpenSea]
  +
| JPG, PNG, GIF, SVG, MP4, WEBM, WAV, OGG, GLTF, GLB || 100MB ||
  +
|-
  +
| [https://guide.rarible.com/how-to-create-an-nft/how-to-create-an-nft-erc721 Rarible]
  +
| JPG, PNG, GIF, WEBP, MP4, MP3 || 30MB ||
  +
|-
  +
| [https://help.foundation.app/en/articles/5930126-a-complete-guide-to-creating-a-collection-and-minting-an-nft Foundation]
  +
| JPG, GIF, SVG, PNG, MP4, GLTF || 50MB ||
  +
|}
  +
  +
====Decentraland====
  +
  +
<blockquote class='bared'>The finite, traversable, 3D virtual space within Decentraland is called LAND, a non-fungible digital asset maintained in an Ethereum smart contract. Land is divided into parcels that are identified by cartesian coordinates (x,y). These parcels are permanently owned by members of the community and are purchased using MANA, Decentraland’s cryptocurrency token. This gives users full control over the environments and applications that they create, which can range from anything like static 3D scenes to more interactive applications or games.
  +
  +
Some parcels are further organized into themed communities, or Districts. By organizing parcels into Districts, the community can create shared spaces with common interests and uses. You can find a list of the original District Proposals on GitHub. The content that makes up Decentraland is stored and distributed via a decentralized network while ownership and transactions are validated on the Ethereum blockchain.
  +
</blockquote>
  +
  +
<blockquote class='bared'>Decentraland is partnering with Matic to create a sidechain (a special kind of blockchain) that will be able to handle transactions faster and cheaper than the main Ethereum network. This sidechain will be ideal for in-game transactions, as changes can occur closer to real time and at a very low cost. For transactions that involve valuable items, we’ll still recommend the main Ethereum chain, as it will be more secure.
  +
</blockquote>
  +
  +
* [https://github.com/3rdstage/models/blob/master/smart-contracts/decentraland/README.md Class diagrams for Decentraland contracts for lands and wearables]
  +
* [https://contracts.decentraland.org/addresses.json Decentraland Contract Addresses]
  +
  +
* [https://venturebeat.com/2017/12/15/decentraland-shows-the-potential-of-blockchain-and-vr-combined/ Decentraland shows the potential of blockchain and VR combined] (December 15, 2017)
  +
  +
====Cryptovoxels====
  +
  +
* [https://wiki.cryptovoxels.com/ Cryptovoxels Wiki]
  +
  +
* [https://nftplazas.com/cryptovoxels/cryptovoxels-tools/ Cryptovoxels Tools & Resources]
  +
{| class='wikitable'
  +
! Tool !! Description !! Remarks
  +
|-
  +
| [https://chrome.google.com/webstore/detail/cryptovoxel-generator/kodjbgifejfaajgpjjddifagocboccab Cryptovoxel Generator]
  +
| Chrome app to help easily manage your land parcels. ||
  +
|-
  +
| [https://nftcryptonews.com/cv/sales.html Cryptovoxels land sales map]
  +
| Highlights all parcels for sale, plotted on the map. ||
  +
|-
  +
| [https://ephtracy.github.io/ MagicaVoxel] || A free lightweight GPU-based voxel art editor and interactive path tracing renderer.||
  +
|-
  +
| [https://www.babylonjs.com/ Babylon.js] || a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework. ||
  +
|}
  +
  +
* Smart Contracts
  +
{| class='wikitable'
  +
! Contract !! Description !! Source !! Address !! Remarks
  +
|-
  +
| Parcel || || [https://github.com/cryptovoxels/contracts/blob/master/contracts/Parcel.sol <tt>Parcel.sol</tt>] || [https://etherscan.io/address/0x79986af15539de2db9a5086382daeda917a9cf0c <tt>0x79986af15539de2db9a5086382daeda917a9cf0c</tt>](Jun-05-2018) ||
  +
|-
  +
| Wearables || || || [https://etherscan.io/address/0xa58b5224e2fd94020cb2837231b2b0e4247301a6 <tt>0xa58b5224e2fd94020cb2837231b2b0e4247301a6</tt>](Oct-29-2019) ||
  +
|}
  +
  +
====Axie Infinity====
  +
  +
* [https://whitepaper.axieinfinity.com/technology/ronin-ethereum-sidechain Ronin Ethereum Sidechain]
  +
* [https://whitepaper.axieinfinity.com/technology/key-smart-contracts Smart contracts and GitHub Repo]
   
 
==STO==
 
==STO==
Line 3,828: Line 1,354:
 
* [https://www.sfc.hk/web/EN/files/ER/PDF/20191106%20Position%20Paper%20and%20Appendix%201%20to%20Position%20Paper%20(Eng).pdf Regulation of virtual asset trading platforms] (Hongkong Securities and Futures Commission)
 
* [https://www.sfc.hk/web/EN/files/ER/PDF/20191106%20Position%20Paper%20and%20Appendix%201%20to%20Position%20Paper%20(Eng).pdf Regulation of virtual asset trading platforms] (Hongkong Securities and Futures Commission)
   
  +
* [https://www.investopedia.com/terms/s/security.asp What are Financial Securities? Examples, Types, Regulation, and Importance] (June 11, 2022)
 
* [https://en.wikipedia.org/wiki/Offer_and_acceptance Offer and acceptance]
 
* [https://en.wikipedia.org/wiki/Offer_and_acceptance Offer and acceptance]
 
* [https://en.wikipedia.org/wiki/ABA_routing_transit_number ABA routing transit number]
 
* [https://en.wikipedia.org/wiki/ABA_routing_transit_number ABA routing transit number]
 
* [https://transferwise.com/us/routing-number/ Routing number (ABA)]
 
* [https://transferwise.com/us/routing-number/ Routing number (ABA)]
 
* [https://www.investopedia.com/articles/personal-finance/063015/routing-number-vs-account-number-how-they-differ.asp Routing Number vs. Account Number: What's the Difference?] (Jun 25, 2019)
 
* [https://www.investopedia.com/articles/personal-finance/063015/routing-number-vs-account-number-how-they-differ.asp Routing Number vs. Account Number: What's the Difference?] (Jun 25, 2019)
  +
* [https://www.investopedia.com/terms/s/securitiesact1933.asp Securities Act of 1933]
   
===AML===
+
===KYC/AML===
   
 
* [https://www.trulioo.com/blog/kyc/ KYC: 3 Steps to Know Your Customer] (MARCH 20, 2019)
 
* [https://www.trulioo.com/blog/kyc/ KYC: 3 Steps to Know Your Customer] (MARCH 20, 2019)
 
* [https://www.imf.org/external/np/leg/amlcft/eng/ Anti-Money Laundering/Combating the Financing of Terrorism (AML/CFT)] (IMF)
 
* [https://www.imf.org/external/np/leg/amlcft/eng/ Anti-Money Laundering/Combating the Financing of Terrorism (AML/CFT)] (IMF)
   
  +
* [https://statrys.com/blog/what-is-a-proof-of-address What is a Proof of Address and how can you get one?]
  +
* [https://payoneer.custhelp.com/app/answers/detail/a_id/23395/~/what-is-a-proof-of-residence What is a Proof of Residence?]
 
* [https://medium.com/@CandiceS/top-10-kyc-aml-service-providers-d8bee5744904 Top 10 KYC & AML Service Providers] (Aug 17, 2018)
 
* [https://medium.com/@CandiceS/top-10-kyc-aml-service-providers-d8bee5744904 Top 10 KYC & AML Service Providers] (Aug 17, 2018)
   
Line 3,851: Line 1,381:
 
* https://github.com/ConsenSys/ERC1400
 
* https://github.com/ConsenSys/ERC1400
 
* Desc. : an advanced institutional technology platform for issuing and exchanging tokenized financial assets, powered by the Ethereum blockchain.
 
* Desc. : an advanced institutional technology platform for issuing and exchanging tokenized financial assets, powered by the Ethereum blockchain.
  +
  +
===Polymesh===
  +
  +
* https://polymesh.network/
  +
* Desc. : an institutional-grade permissioned blockchain built specifically for regulated assets.
  +
  +
* [https://polymesh.network/security-tokens Why security tokens?]
   
 
==De-Fi==
 
==De-Fi==
   
 
* [https://defipulse.com DeFi Pulse] : a site where you can find the latest analytics and rankings of DeFi protocols.
 
* [https://defipulse.com DeFi Pulse] : a site where you can find the latest analytics and rankings of DeFi protocols.
  +
  +
{| class='wikitable'
  +
! Service !! Chain !! Sector !! Description !! Remarks
  +
|-
  +
| [https://makerdao.com/en/ Maker] || Ethereum || Lending || ||
  +
|-
  +
| [https://uniswap.io/ Uniswap] || Ethereum || DEXes || ||
  +
|-
  +
| [https://aave.com/ Aave] || Multichain || Lending || ||
  +
|-
  +
| [https://www.curve.fi/ Curve] || Ethereum || DEXes || ||
  +
|-
  +
| [https://compound.finance/ Compound] || Ethereum || Lending || ||
  +
|}
  +
  +
* [https://academy.ivanontech.com/blog/defi-deep-dive-what-is-aave DeFi Deep Dive – What is Aave?] (Aug 03, 2020)
  +
* [https://academy.ivanontech.com/blog/defi-deep-dive-what-is-curve-finance DeFi Deep Dive – What is Curve Finance?] (Jul 23, 2020)
  +
* [https://academy.ivanontech.com/blog/defi-deep-dive-what-is-yield-farming DeFi Deep Dive – What Is Yield Farming?] (Aug 11, 2020)
  +
  +
* [https://decrypt.co/resources/what-is-yield-farming-beginners-guide What is Yield Farming? Beginner's Guide] (Nov 23, 2020)
  +
** At its core, yield farming is a process that allows cryptocurrency holders to lock up their holdings, which in turn provides them with rewards.
   
 
===MakerDAO===
 
===MakerDAO===
Line 3,896: Line 1,454:
 
* Desc: a crypto-backed synthetic asset platform.
 
* Desc: a crypto-backed synthetic asset platform.
 
* Sources : https://github.com/Synthetixio/synthetix
 
* Sources : https://github.com/Synthetixio/synthetix
  +
  +
===Mirror Protocol===
  +
  +
* https://mirror.finance/
  +
* Desc. : Allows the creation of fungible assets, “synthetics”, that track the price of real world assets.
  +
* Sources : https://github.com/Mirror-Protocol
  +
  +
* [https://docsend.com/view/kcsm42mqiyu5t6ej Mirror Whitepaper]
  +
<blockquote class='bared'>
  +
Synthetic tokens are tokens that provide "synthetic" exposure to the physical or abstract good that they represent without requiring one-to-one backing.
  +
  +
Synthetic tokens tend to be more affordable to hold as they typically charge no holding fee.
  +
  +
Mirror is a protocol that allows anyone to issue and trade synthetic assets that track the price of real world assets.
  +
  +
Anyone can mint an mAsset by locking up collateral, either in the form of as stablecoin or a different mAsset.
  +
  +
The Mirror protocol creates incentives for minters to mint assets and provide liquidity for traders.
  +
  +
The Mirror protocol utilizes AMMs to facilitate mAsset, trading against stablecoins.
  +
  +
When the collateral ratio drops below the minimum, the Mirror protocol needs a way to retrieve and burn the respective mAssets. It does so by seizing a portion of the collateral and initiating an auction at a discount for anyone willing to sell the mAsset in exchange.
  +
</blockquote>
  +
  +
{| class='wikitable'
  +
! Resource/Tool !! Description !! Remarks
  +
|-
  +
| style='white-space:nowrap' | [https://docsend.com/view/kcsm42mqiyu5t6ej Mirror Whitepaper] || ||
  +
|-
  +
| style='white-space:nowrap' | [https://docs.mirror.finance/ Mirror Documentation] || ||
  +
|-
  +
| style='white-space:nowrap' | [https://github.com/Mirror-Protocol/mirror-contracts Mirror Smart Contract] || implementing Mirror Protocol on the Terra blockchain || <tt>Mint</tt>, <tt>Factory</tt>, <tt>Gov</tt>
  +
|-
  +
| [https://github.com/Mirror-Protocol/mirror.js Mirror.js] || a client SDK for building applications that can interact with Mirror Protocol from within JavaScript runtimes ||
  +
|-
  +
| [https://github.com/Mirror-Protocol/mirrorcli mirrorcli] || Command-line interface for Mirror Protocol on Terra ||
  +
|-
  +
| [https://docs.mirror.finance/developer-tools/mirror-api Mirror API] || an GraphQL-based data service that allows anybody to query data regarding the current and aggregate application state of the Mirror Protocol ||
  +
|}
  +
  +
* [https://docs.mirror.finance/protocol/mirrored-assets-massets#collateralized-debt-position '''Collateralized Debt Position''']
  +
  +
===Anchor Protocol===
  +
  +
* https://anchorprotocol.com/
  +
* Desc. : a savings protocol offering low-volatile yields on Terra stablecoin deposits.
  +
* Sources : https://github.com/Anchor-Protocol
  +
  +
<blockquote class='bared'>
  +
The Anchor rate is powered by a diversified stream of staking rewards from major proof-of-stake blockchains, and therefore can be expected to be much more stable than money market interest rates.
  +
  +
The Anchor protocol defines a '''money market''' between a '''lender''', looking to earn stable yields on their stablecoins, and a '''borrower''', looking to borrow stablecoins on stakeable assets.
  +
</blockquote>
  +
  +
{| class='wikitable'
  +
! Resource/Tool !! Description !! Remarks
  +
|-
  +
| [https://docs.anchorprotocol.com/ Anchor Documentation] || ||
  +
|-
  +
| style='white-space:nowrap' | [https://github.com/Anchor-Protocol/money-market-contracts Anchor Money Market Contracts] || implementing Anchor Protocol on the Terra blockchain. || Rust
  +
|-
  +
| style='white-space:nowrap' | [https://github.com/Anchor-Protocol/anchor-bAsset-contracts Anchor Bonded Asset Contracts] || implementing <tt>bAsset</tt>(Bonded Asset) Protocol on the Terra blockchain. ||
  +
|-
  +
| [https://anchor-protocol.github.io/anchor.js/ Anchor.js] || a client SDK for building applications that can interact with Anchor Protocol from within JavaScript runtimes ||
  +
|}
  +
  +
* [https://docs.anchorprotocol.com/protocol/money-market Money Market]
   
 
==DID==
 
==DID==
   
 
* [https://w3c-ccg.github.io/did-primer/ A Primer for Decentralized Identifiers]
 
* [https://w3c-ccg.github.io/did-primer/ A Primer for Decentralized Identifiers]
* [https://www.w3.org/TR/vc-data-model/ Verifiable Credentials Data Model 1.0]
+
* [https://www.w3.org/TR/vc-data-model/ Verifiable Credentials Data Model 1.1]
  +
 
{| class='wikitable'
 
{| class='wikitable'
 
! Concept !! Description !! Remarks
 
! Concept !! Description !! Remarks
Line 3,916: Line 1,542:
 
| Credential || A set of one or more claims made by an issuer. ||
 
| Credential || A set of one or more claims made by an issuer. ||
 
|-
 
|-
| Verifiable Credential || a tamper-evident credential that has authorship that can be cryptographically verified. ||
+
| Verifiable Credential || a tamper-evident credential that has authorship that can be cryptographically verified. || VC
 
|}
 
|}
  +
  +
<syntaxhighlight lang='ebnf' enclose='div'>
  +
  +
Verifiable Credential = Credential Metadata, { Claim }, { Proof }
  +
  +
Verifiable Presentation = Presentation Metadata, { Verifiable Credential }, { Proof }
  +
  +
</syntaxhighlight>
  +
  +
* [https://tsmatz.wordpress.com/2019/12/24/decentralized-identifiers-did-tutorial/ Walkthrough of Decentralized Identity (DID) Network] (2019-12-24)
  +
  +
----
  +
  +
==CBDC==
  +
  +
* [https://www.bankofengland.co.uk/research/digital-currencies UK central bank digital currency] ([https://en.wikipedia.org/wiki/Bank_of_England BoE])
  +
  +
==Metaverse==
  +
  +
* [https://coinsutra.com/metaverse/ What is Metaverse in The Context of Cryptocurrency] (March 31, 2021)
   
 
</div>
 
</div>

Latest revision as of 07:47, 17 May 2023

General

Consensus Algorithm

Style Description Remarks
PoW Deters denial of service attacks and other service abuses such as spam on a network by requiring some work from the service requester, usually meaning processing time by a computer.
PoS
DPoS
PoS
PoH

PoW

BFT (Byzantine Fault Tolerance)

pBFT

ZKP

misc

  • Paxos : a family of protocols for solving consensus in a network of unreliable processors
Fault Type Cryptography Replica Requirement
Non Byzantine Failures Non Cryptographic 2F + 1
Non-malicious Byzantine Failures Non Cryptographic 2F + 1
Malicious Byzantine Failures Non Cryptographic 3F + 1
Malicious Byzantine Failures Cryptographic 2F + 1

Blockchain Networks

Network Symbol Consensus Style Description Remarks
BitCoin BTC PoW
Ethereum ETH PoW
EOS EOS DPoS

Blockchain Platforms

Smart Contract

Blockchain Language Remark
Ethereum Solidity
EOSIO C++

Key and Wallet

  • Shamir's Secret Sharing
    • a form of secret sharing, where a secret is divided into parts, giving each participant its own unique part.
Blockchain Signing Algorithm Curve Remark
Bitcoin ECDSA secp256k1
Ethereum ECDSA secp256k1
Ripple EdDSA, ECDSA curve25519, secp256k1
Polkadot EdDSA, ECDSA, Schnorr curve25519, secp256k1, ristretto25519
Stellar EdDSA curve25519
EOS ECDSA secp256k1
Cosmos ECDSA secp256k1
Solana EdDSA curve25519
  • Curve25519
    • an elliptic curve used in elliptic-curve cryptography (ECC) offering 128 bits of security (256-bit key size) and designed for use with the elliptic curve Diffie–Hellman (ECDH) key agreement scheme.

Cryptocurrency

Automata Theory

Theory Description Remarks
Finite State Machine an abstract machine that can be in exactly one of a finite number of states at any given time. State Machine
Turing Machine a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to a table of rules.
Turing Completeness a system of data-manipulation rules that can be used to simulate any Turing machine. Virtually all programming languages today are Turing-complete

Glossary

Term Description Remarks
Total Supply the number of coins or tokens that currently exists and are either in circulation or locked somehow.
Circulating Supply the number of cryptocurrency coins or tokens that are publicly available and circulating in the market.
Maximum Supply the maximum number of coins or tokens that will be ever created. Supply Cap
Supply Cap a permanent limit on the number of units of a cryptocurrency (or coins) that can ever be created alias : Max Supply

Misc

Performance

Bitcoin

  • What are transaction fees and why do I need to pay them?
    • In the case of Bitcoin transactions, the reward for miners consists of two things: all transaction fees in the block that the miner validated and the additional incentive of a specific block reward of newly minted coins in the process.
    • Reward = Incentive + Fee
  • What is inflation?
    • But because the amount of new bitcoin is automatically reduced by 50 percent every four years, Bitcoin’s inflation rate will also decrease.
  • Controlled supply

Concepts

BIP

BIP Title Description Type Status Remarks Related
BIP-32 Hierarchical Deterministic Wallets Describes hierarchical deterministic wallets (or "HD Wallets") Informational Final
BIP-39 Mnemonic code for generating deterministic keys Describes the implementation of a mnemonic code or mnemonic sentence -- a group of easy to remember words -- for the generation of deterministic wallets. Standards Track Proposed
BIP-43 Purpose Field for Deterministic Wallets Introduces a "Purpose Field" for use in deterministic wallets based on algorithm described in BIP-0032 Informational Draft m/purpose'/* BIP 32
BIP-44 Multi-Account Hierarchy for Deterministic Wallets Defines a logical hierarchy for deterministic wallets based on an algorithm described in BIP-0032 Standards Track Proposed m/44'/*'/*'/*/* BIP 32, BIP 43, SLIP-0044

SLIP

HD Wallet

Format Purpose Description Remarks
m/0'/* Default Account
m/44'/coin_type'/*'/*/* Multi-Account m/44'/0': BTC, m/44'/60': ETH, m/44'/61': ETC

BIP 32

private parent key → private child key : possible
public parent key → public child key : possible
private parent key → public child key : possible
public parent key → private child key : impossible
  • Each leaf node in the tree corresponds to an actual key, while the internal nodes correspond to the collections of keys that descend from them.
  • The chain codes of the leaf nodes are ignored, and only their embedded private or public key is relevant.
  • Knowing an extended private key allows reconstruction of all descendant private keys and public keys.
  • Knowing an extended public keys allows reconstruction of all descendant non-hardened public keys.
256 bit entropy
private key
public key
extended private key
extended public key
private child key derivation(CKD) function
public child key derivation(CKD) function
computes extended public key
private key node m : master extended private key
public key node M : master extended public key
Serialization Format
Position Value Remarks
4 bytes version bytes
  • mainnet/public: 0x0488B21E
  • mainnet/private: 0x0488ADE4
  • testnet/public: 0x043587CF
  • testnet/private: 0x04358394
1 bytes depth
  • master node: 0x00
  • level-1 derived: 0x01
4 bytes the fingerprint of the parent's key master key: 0x00000000
4 bytes child number
32 bytes chain code 256 bit
33 bytes the public key or private key data

Statistics

Topic Chart/Table Remarks Avg. Block Time https://bitinfocharts.com/comparison/bitcoin-confirmationtime.html

Ethereum

Substrate

Ripple

References

rippled API

Category API Methods Description Remarks
Public subscribe WebSocket requests periodic notifications from the server when certain events happen Ledger Stream, Validations Stream, Transaction Streams, Peer Status Stream, Order Book Streams
Admin ledger_request WebSocket, Commandline tells server to fetch a specific ledger version from its connected peers

Consensus

   Round Start --------------- Close -------------------- Consensus -------------------- Round End
                 Open phase            Establish phase                  Accept phase
  • The XRP Ledger Consensus Process
  • Consensus
    • Concensus
      • Through the consensus process, validating nodes agree on a specific subset of the candidate transactions to be considered for the next ledger
      • Consensus is an iterative process in which nodes relay proposals, or sets of candidate transactions.
      • Nodes communicate and update proposals until a supermajority 5 of peers agree on the same set of candidate transactions.
    • Validation
      • The validating nodes calculate a new version of the ledger and relay their results to the network, each sending a signed hash of the ledger it calculated based on the candidate transactions proposed during consensus.
      • In cases where a node is in the minority, having computed a ledger that differs from its peers, the node disregards the ledger it computed 9. It recomputes the correct ledger, or retrieves the correct ledger as needed.
  • rippled Server States
                                                            +--> full
                                                            |
   disconnected ---> connected ---> syncing ---> tracking --| 
                                                            |
                                                            +--> validating <-----> proposing

Transaction

  • Reliable Transaction Submission
    • Best Practices
    • Your rippled server should automatically acquire the missing ledger versions when it has spare resources (CPU/RAM/disk IO) to do so, unless the ledgers are older than its configured amount of history to store. Depending on the size of the gap and the resource usage of your server, acquiring missing ledgers should take a few minutes. You can also manually request your server to acquire historical ledger versions using the ledger_request method.
    • Use the LastLedgerSequence parameter to prevent undesirable cases where a transaction is not confirmed promptly but could be included in a future ledger. You should specify the LastLedgerSequence parameter on every transaction. Automated processes should use a value of 4 greater than the last validated ledger index to make sure that a transaction is validated or rejected in a predictable and prompt way.

Ledger

  • Ledgers
    • Ledger = Header + Transaction Tree + State Tree (Ledger Objects)
    • At any given time, a rippled instance has an in-progress "current" open ledger, plus some number of closed ledgers that have not yet been approved by consensus, and any number of historical ledgers that have been validated by consensus.
    • Only the validated ledgers are certain to be correct and immutable.
  • Ledger Header
    • Two ledgers with the same hash are always the same.
    • For validated ledgers, hash values and sequence numbers are equally valid and correlate 1:1.
    • Two different rippled servers may have different contents for a current ledger with the same ledger index, due to latency in propagating transactions throughout the network.
    • There may be multiple closed ledger versions competing to be validated by consensus. These ledger versions have the same sequence number but different contents (and different hashes). Only one of these closed ledgers can become validated.
    • A current ledger's contents change over time, which would cause its hash to change, even though its ledger index number stays the same. The hash of a ledger is not calculated until the ledger is closed.

Amendments

Readings

Troubleshooting

Sources

Component Type Description Remarks
SHAMapStoreImp.h, SHAMapStoreImp.cpp class
Setup struct deleteInterval, advisoryDelete, ledgerHistory, databasePath, deleteBatch, backOff, ageThreshold
Config.h class

Stellar

Solana

A Solana cluster is capable of subsecond confirmation for up to 150 nodes with plans to scale up to hundreds of thousands of nodes. Once fully implemented, confirmation times are expected to increase only with the logarithm of the number of validators, where the logarithm's base is very high.

A Solana cluster uses a multi-layer block propagation mechanism called Turbine to broadcast transaction shreds to all nodes with minimal amount of duplicate messages.

CLI

$ solana --help

$ solana <command> --help
Command Description Remarks
solana config get Get current config settings
solana config set Set a config setting
solana config set --url url solana config set --url http://127.0.0.1:8899
solana cluster-version Get the version of the cluster entrypoint

Transaction

Field Description Remarks
signatures List of signatures.
accounts List of accounts (read-only / read-write)
recentBlockhash Blockhash of recently produced block used as nonce.
instructions List of instructions which each call an on-chain program.

Smart Contract

JSON RPC API

  • Desc. : Interact with Solana nodes directly with the JSON RPC API via the HTTP and Websocket methods.

Explore the API

JavaScript API

Rust API

Readings


Anchor

Readings

Hyperledger

Hyperledger Fabric

Readings

  • Concepts
    • Channels
      • Channel = Organizations + Ordering Service + Anchor Peers + Chaincodes + Ledger
      • At least one anchor peer per organization

Examples

Demos

Sources

  • fabric/core/ledger/ledgerconfig/ledger_config.go

Issues

Docker Images

fabric-peer

Config which is printed by "docker inspect --format='{{json .Config}}' ..." is

   
 "Config": {
   "Hostname": "e7eddde82bec",
   "Domainname": "",
   "User": "",
   "AttachStdin": false,
   "AttachStdout": false,
   "AttachStderr": false,
   "Tty": false,
   "OpenStdin": false,
   "StdinOnce": false,
   "Env": [
     "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
     "PEER_CFG_PATH=/etc/hyperledger/fabric",
     "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp/sampleconfig"
   ],
   "Cmd": [
     "peer",
     "node",
     "start"
   ],
   "ArgsEscaped": true,
   "Image": "sha256:793719e9dd193f580f32c5984ac47a8c0f986819e4795c039703b26bb6ad15ce",
   "Volumes": null,
   "WorkingDir": "",
   "Entrypoint": null,
   "OnBuild": [],
   "Labels": {
     "org.hyperledger.fabric.base.version": "0.3.0",
     "org.hyperledger.fabric.version": "1.0.0-alpha"
   }
 },

Fabric CA

Fabric SDK for Node.js

Performance Tuning

  • LVM (Logical Volume Manager)

Companions

PTE

R3 Corda

Concepts

Concept Description Remarks
State Object a digital document which records the existence, content and current state of an agreement between two or more parties
Ledger a set of immutable state objects
Consensus pure function whose responsibility is either to accept or reject a proposed transaction and which can be composed from simpler, reusable functions
Transaction Consume existing state objects and produce new state objects Transaction Validity, Transaction Uniqueness
Smart Contract
Uniqueness and Timestamping Services
Flow Framework
          State Object ----+----> Contract Code
                           +----> Legal Prose

Features

References

  • End-State Principles
Principle Description Remarks
Inclusion Parties are able to discover each other freely, and transact directly, in a single, open network
Assured identity Parties will have assurance over the identity of participants in the network
Privacy The only parties who have access to the details of a transaction are those who participate in the transaction and those who need to assure themselves of transaction provenance.
Shared logic The behavior of agreements managed by the system will be described in computer code that is shared to ensure onsistency and validity of agreements
Legal footing Deals recorded by the ledger are, by contract, accepted as admissible evidence and legally binding by all parties in any dispute
Authoritative Facts recorded by the ledger are regarded as authoritative rather than “shadows” of authoritative data held elsewhere
Immutability Facts recorded on the ledger are final and immutable; errors and unwinds must be processed through a subsequent transaction
Open The system is open: open source, participation, development, governance and standards to ensure the platform balances the needs of its diverse user-base in a transparent fashion

Readings

Terra

Eris

References

Readings

Tendermint Core

Readings

IPFS

  • https://ipfs.io/
  • Desc. : A peer-to-peer hypermedia protocol to make the web faster, safer, and more open
Type API Description Remarks
Path Gateway GET /ipfs/{cid}[/{path}][?{params}]
Subdomain Gateway GET /[{path}][?{params}]
Version Feature Format Description Remarks
CIDv0 multihash TLV(Type-Length-Value) pattern, Base58
CIDv1 multicodec, multihash <multicodec><multihash-algorithm><multihash-length><multihash-hash>

IPFS Client

Category Library Description Documentation Remarks
Go Go Embedded Client(go-ipfs-api) The go interface to ipfs's HTTP API go-ipfs-api API
Go HTTP Client(go-ipfs-http-api) IPFS CoreAPI implementation using HTTP API] go-ipfs-http-api API experimental
JavaScript JS-IPFS HTTP Client The JavaScript HTTP RPC API client library for IPFS implementations.
Java Java IPFS HTTP Client(java-ipfs-http-client) A Java client for the IPFS http api

IPFS Gateway

Provider Service Description Documentation Remarks
Cloudflare Cloudflare IPFS Gateway Cloudflare's read-only Distributed Web Gateway lets you access content stored on the IPFS quickly and easily, without downloading any special software or giving up any storage space on your computer. IPFS Gateway
Pinata Pinata Dedicated Gateways Get even faster speed with your own IPFS dedicated server. $20/Month


Sample Resources

Title Format Category URI Remarks
'Impression, Sunrise' JPEG Image ipfs://Qmaa4Lv37rBqZU6Kes6EkddHjnm333FtLrfByodyow5wZo
Metadata for 'Impression, Sunrise' JSON NFT Token Meta ipfs://QmZnYQBBk4SDQohfamMeoiquT3p7HuJ9GoFLbVbodDJ6GP
'The Starry Night' Image ipfs://QmPUxNiwMR3etcisHkcm2k1hYfTVJtS9w4uMFsNmtRcqAi
Metadata for 'The Starry Night' JSON NFT Token Meta ipfs://QmYmEyspK37Q1eJvMo17eovzpWxZ53LDVRJGFmuSPcNaVd

NFT

Assets

Asset Creator Description Contract Marketplace Highest Price Remark
EVERYDAYS: THE FIRST 5000 DAYS Beeple MKT2 Token MakersPlace $69M ('21.3.11) Digital Artwork (JPG, 21,069 x 21,069)
Stay Free Edward Snowden FNDNFT Token Foundation 2,224.00 ETH ('21.4.16) Digital Artwork (PNG, IPFS)
x*y=k pplpleasr FNDNFT Token Foundation Digital Artwork (MP4)
Doge Atsuko Sato The original image that started it all ZORA Zora Digital Photo
Asset Etherscan OpenSea Remarks
Stay Free 0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405?a=24437 0x3b3ee1931dc30c1957379fac9aba94d1c48a5405/24437
x*y=k 0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405?a=13623 0x3b3ee1931dc30c1957379fac9aba94d1c48a5405/13623
Doge 0xabEFBc9fD2F806065b4f3C237d4b59D9A97Bcac7?a=3366 0xabefbc9fd2f806065b4f3c237d4b59d9a97bcac7/3366

Contracts

Player Description Contract Source Contract Address Documentation Remarks
CryptoPunks 10,000 unique collectible characters with proof of ownership stored on the Ethereum blockchain. CryptoPunksMarket.sol CryptoPunksMarket
Rarible MintableToken (May-27-2020)
SuperRare Collect SuperRare Digital Artworks SuperRareV2 (Sep-05-2019)
Nifty Gateway the premier marketplace for Nifties, which are digital items you can truly own.
Decentraland a decentralized virtual reality platform powered by the Ethereum blockchain. Land Contracts


Marketplace Contracts
Collection Contracts

LANDProxy


LANDRegistry
EstateProxy
EstateRegistry
MarketplaceProxy
Marketplace
MANAToken

Decentraland documentation

Rariable Contracts

Marketplaces

Marketplace Service Type Contents Type Collections Networks Sources API Remarks
OpenSea Open Marketplace CryptoPunks, The Sandbox, Decentraland. SuperRare, Rarible, PolygonPunks, KlayFox Ethereum, Polygon, Klaytn OpenSea Explorer
Rarible Open Marketplace parallel, The Sandbox, Rarible, Decentraland Rarible Top Collections
Nifty Gateway Curated Marketplace Digital Art Ethereum Nifty Gateway Public API
SuperRare Curated Marketplace Digital Art Ethereum
Foundation Curated Marketplace Digital Art Ethereum
NBA Top Shot Curated Marketplace Sports Flow (PoS)
Axie Infinity Curated Marketplace Game Ethereum
Decentraland Curated Marketplace Metaverse Ethereum
The Sandbox Curated Marketplace Metaverse Ethereum
  • Media format/size support
Marketplace Supported Type Max Size Remarks
OpenSea JPG, PNG, GIF, SVG, MP4, WEBM, WAV, OGG, GLTF, GLB 100MB
Rarible JPG, PNG, GIF, WEBP, MP4, MP3 30MB
Foundation JPG, GIF, SVG, PNG, MP4, GLTF 50MB

Decentraland

The finite, traversable, 3D virtual space within Decentraland is called LAND, a non-fungible digital asset maintained in an Ethereum smart contract. Land is divided into parcels that are identified by cartesian coordinates (x,y). These parcels are permanently owned by members of the community and are purchased using MANA, Decentraland’s cryptocurrency token. This gives users full control over the environments and applications that they create, which can range from anything like static 3D scenes to more interactive applications or games.

Some parcels are further organized into themed communities, or Districts. By organizing parcels into Districts, the community can create shared spaces with common interests and uses. You can find a list of the original District Proposals on GitHub. The content that makes up Decentraland is stored and distributed via a decentralized network while ownership and transactions are validated on the Ethereum blockchain.

Decentraland is partnering with Matic to create a sidechain (a special kind of blockchain) that will be able to handle transactions faster and cheaper than the main Ethereum network. This sidechain will be ideal for in-game transactions, as changes can occur closer to real time and at a very low cost. For transactions that involve valuable items, we’ll still recommend the main Ethereum chain, as it will be more secure.

Cryptovoxels

Tool Description Remarks
Cryptovoxel Generator Chrome app to help easily manage your land parcels.
Cryptovoxels land sales map Highlights all parcels for sale, plotted on the map.
MagicaVoxel A free lightweight GPU-based voxel art editor and interactive path tracing renderer.
Babylon.js a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework.
  • Smart Contracts
Contract Description Source Address Remarks
Parcel Parcel.sol 0x79986af15539de2db9a5086382daeda917a9cf0c(Jun-05-2018)
Wearables 0xa58b5224e2fd94020cb2837231b2b0e4247301a6(Oct-29-2019)

Axie Infinity

STO

KYC/AML

Polymath

CoFi OS

  • https://github.com/ConsenSys/ERC1400
  • Desc. : an advanced institutional technology platform for issuing and exchanging tokenized financial assets, powered by the Ethereum blockchain.

Polymesh

De-Fi

  • DeFi Pulse : a site where you can find the latest analytics and rankings of DeFi protocols.
Service Chain Sector Description Remarks
Maker Ethereum Lending
Uniswap Ethereum DEXes
Aave Multichain Lending
Curve Ethereum DEXes
Compound Ethereum Lending
  • What is Yield Farming? Beginner's Guide (Nov 23, 2020)
    • At its core, yield farming is a process that allows cryptocurrency holders to lock up their holdings, which in turn provides them with rewards.

MakerDAO

DAI

  • DAI
    • Decentralized Stable Coin
    • Backed by Ether

Compound

Synthetix

Mirror Protocol

Synthetic tokens are tokens that provide "synthetic" exposure to the physical or abstract good that they represent without requiring one-to-one backing.

Synthetic tokens tend to be more affordable to hold as they typically charge no holding fee.

Mirror is a protocol that allows anyone to issue and trade synthetic assets that track the price of real world assets.

Anyone can mint an mAsset by locking up collateral, either in the form of as stablecoin or a different mAsset.

The Mirror protocol creates incentives for minters to mint assets and provide liquidity for traders.

The Mirror protocol utilizes AMMs to facilitate mAsset, trading against stablecoins.

When the collateral ratio drops below the minimum, the Mirror protocol needs a way to retrieve and burn the respective mAssets. It does so by seizing a portion of the collateral and initiating an auction at a discount for anyone willing to sell the mAsset in exchange.

Resource/Tool Description Remarks
Mirror Whitepaper
Mirror Documentation
Mirror Smart Contract implementing Mirror Protocol on the Terra blockchain Mint, Factory, Gov
Mirror.js a client SDK for building applications that can interact with Mirror Protocol from within JavaScript runtimes
mirrorcli Command-line interface for Mirror Protocol on Terra
Mirror API an GraphQL-based data service that allows anybody to query data regarding the current and aggregate application state of the Mirror Protocol

Anchor Protocol

The Anchor rate is powered by a diversified stream of staking rewards from major proof-of-stake blockchains, and therefore can be expected to be much more stable than money market interest rates.

The Anchor protocol defines a money market between a lender, looking to earn stable yields on their stablecoins, and a borrower, looking to borrow stablecoins on stakeable assets.

Resource/Tool Description Remarks
Anchor Documentation
Anchor Money Market Contracts implementing Anchor Protocol on the Terra blockchain. Rust
Anchor Bonded Asset Contracts implementing bAsset(Bonded Asset) Protocol on the Terra blockchain.
Anchor.js a client SDK for building applications that can interact with Anchor Protocol from within JavaScript runtimes

DID

Concept Description Remarks
Holder A role an entity might perform by possessing one or more verifiable credentials and generating verifiable presentations from them. students, employees, customers
Issuer A role an entity performs by asserting claims about one or more subjects, creating a verifiable credential from these claims, and transmitting the verifiable credential to a holder. corporations, trade associations, governments
Verifier A role an entity performs by receiving one or more verifiable credentials, optionally inside a verifiable presentation, for processing.
Subject An entity about which claims are made. In many cases the holder of a verifiable credential is the subject, but in certain cases it is not. human beings, animals, things
Claim An assertion made about a subject.
Credential A set of one or more claims made by an issuer.
Verifiable Credential a tamper-evident credential that has authorship that can be cryptographically verified. VC
Verifiable Credential = Credential Metadata, { Claim }, { Proof }

Verifiable Presentation = Presentation Metadata, { Verifiable Credential }, { Proof }

CBDC

Metaverse