日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

以太坊知识教程------账户

發布時間:2025/3/21 编程问答 18 豆豆
生活随笔 收集整理的這篇文章主要介紹了 以太坊知识教程------账户 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

以太坊有兩種不同類型的賬戶:

  • 外部擁有的賬戶,公私鑰。
  • 合約賬戶

一個以太坊的賬戶包含四個部分

內容外部賬戶合約賬戶
該地址交易的次數( nonce )a counter that indicates the number of transactions sent from the account.代表從此賬戶地址發送的交易序號它是用于保障每筆交易能且只能被處理一次的計數器,有效避免重放( replay )攻擊the number of contracts created by the account此賬戶創建的合約序號
賬戶目前的以太幣余額the number of Wei owned by this address. Wei is a denomination of ETH and there are 1e+18 Wei per ETH.
codeHash 賬戶的合約二進制代碼empty string存儲的是 codeHash(這個賬戶的以太坊虛擬機代碼的哈希值)。這個字段在生成后是不可修改的,這意味著智能合約代碼是不可修改的
賬戶的存儲默認為空A 256-bit hash of the root node of a Merkle Patricia tree that encodes the storage contents of the account (a mapping between 256-bit integer values), encoded into the trie as a mapping from the Keccak 256-bit hash of the 256-bit integer keys to the RLP-encoded 256-bit integer values. This tree encodes the hash of the storage contents of this account, and is empty by default.

Key differences

Externally-owned

  • Creating an account costs nothing Can initiate transactions
  • Transactions between externally-owned accounts can only be ETH
  • transfers

Contract

  • Creating an account has a cost because you’re using network storage
  • Can only send transactions in response to receiving a transaction
  • Transactions from an external account to a contract account can trigger code which can execute any different actions, such as transfering tokens or even creating a new contract

總結

以上是生活随笔為你收集整理的以太坊知识教程------账户的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。