官术网_书友最值得收藏!

Account

Unlike bitcoin where the term address is used, Ethereum uses the term account. However, Ethereum accounts can have addresses. That is, for bitcoin, the concepts of account and address are combined into one, while Ethereum separates them. Ethereum supports two types of accounts: externally owned accounts (owned by users who keep private keys of the accounts) and contract accounts.

The key facts about externally controlled accounts are listed as follows:

  • They maintain ether balances
  • They can initiate transactions for either transferring ether coins or triggering smart contracts
  • They are controlled by users via private keys
  • They have no associated smart contract code

Facts about contract accounts are as follows:

  • They keep ether balances
  • They have associated smart contract code
  • Smart contract code execution is triggered by transactions or calls that are received from other contracts

For both types of accounts, they consist of four components:

  • Nonce: For an externally owned account, it refers to the number of transactions sent from the account; for a contract account, it is the number of contracts associated with the account
  • Balance: It is the number of Wei owned by this account
  • StorageRoot: A 256-bit hash of contents of an account
  • CodeHash: The hash of the code of this account in EVM—this is the code that gets executed when the code is called

When ether is transferred from contract accounts to an externally owned account, there is a fee, for example, 21,000 unit of gas. When ether is sent from an externally owned account to a contract account, the fee is usually higher, which depends on the smart contract code and the data being sent along with the transaction.

Ethereum addresses of accounts have the following format:

  • They start with the prefix 0x, a common identifier for hexadecimal, followed by the number string to be constructed by following these steps:
    1. First, take the Keccak-256 hash (big-endian) of the elliptic curve digital signature algorithm (ECDSA) public key
    2. Then, take the last 20 bytes of the hash

Since, in hexadecimal, two digits are stored in one byte, a 20-bytes address is represented with 40 hexadecimal digits. The following is an example of an Ethereum address: 0xe99356bde974bbe08721d77712168fa074279267.

With a browsing tool, you can retrieve Ethereum account balances. For example, you can go to https://www.etherchain.org to obtain the top account balances in ether.

主站蜘蛛池模板: 灵台县| 安阳县| 余干县| 当阳市| 遵化市| 久治县| 甘南县| 金门县| 黎川县| 栖霞市| 嘉鱼县| 简阳市| 柳州市| 江门市| 恩施市| 汤原县| 泊头市| 贺兰县| 眉山市| 浦县| 鱼台县| 巩义市| 嘉义县| 偏关县| 科技| 承德市| 布拖县| 红安县| 高淳县| 榕江县| 苏尼特左旗| 鹤岗市| 屯昌县| 察雅县| 宁都县| 万盛区| 新乐市| 伊春市| 海原县| 西城区| 丰镇市|