什麼是ERC-20代幣?

修改時間 Thu, 23 Feb 2023 於 03:18 PM

ERC-20協議 (Ethereum Request for Comments) 代幣是遵循特定智能合約標準,並且在以太坊主網發行的代幣。以ERC-20協議發行的代幣,是以太坊上最常見的代幣。
這些代幣發行準則允許「智能合約」使用相同的程式語言交流。舉例而言,要獲取「總代幣發行量」時,使用“totalSupply”而不是“totalNumber” or “totalTokens”就是一個例子。使用相同的準則可以避免其他疑慮,並且讓錢包發行商、交易所與其他運行智能合約的單位能夠避免因各個代幣描述不同,而導致不可預期的錯誤。
ERC-20代幣的標準如下:
  1. totalSupply - get the total token supply
  2. balanceOf - get the account balance of account address
  3. transfer - send the amount of tokens 
  4. transferFrom - define where the tokens are transferring from
  5. approve - allow tokens to be withdrawn from sending address
  6. allowance - returns the remaining tokens of the address
在Etherscan上的ERC-20代幣:
當該代幣的「合約地址」被輸入至下方搜尋欄位時,ERC-20代幣會顯示在EtherScan上方 (如下圖)

非ERC-20代幣被輸入時,則會出現下方圖示




這篇文章是否有幫助?

太棒了!

感謝您提供意見回饋

抱歉,沒能幫到您

感謝您提供意見回饋

請讓我們知道如何改善這篇文章!

請選擇至少一個原因

意見已發送

感謝您的寶貴意見,我們將嘗試修改這篇文章