Tokens
加密貨幣是否與代幣一樣轉移?
如果我理解正確,當我想使用錢包發送代幣(例如,ERC20 代幣)時,我會:
- 創建一個交易(使用我的錢包界面上的發送按鈕),“to”地址包含令牌合約地址(如https://etherscan.io/tx/0xa0d13ee62d9013ec0d704abe746e3e0fc1822771b8a039db0926d831971fa157中給出)和我想要呼叫的函式(例如,轉移(收件人地址,#tokens))
- 全節點執行此事務,該事務呼叫具有給定參數的函式
- 這樣就完成了代幣從我的錢包地址到接收方錢包地址的轉移
如果這是正確的,那麼這如何用於傳輸加密貨幣,例如比特幣或乙太幣。感謝您幫助更好地理解這些事情。
將要
乙太坊區塊鏈上的代幣轉移交易:
to : token contract address data : the encoded function call gas : the amount of units required to execute the transaction, or more gasPrice : the higher this value is, the faster you transaction will execute value : none (0)
乙太坊區塊鏈上的乙太幣轉賬交易:
to : destination address data : none (empty string) gas : 21000 (or more if the destination address is that of a contract) gasPrice : the higher this value is, the faster you transaction will execute value : amount of ether