HRC20代币和如何创建你的代币


HRC20 Token 标准

HECO 完全兼容以太坊 ERC20 标准,interface 和 event 如下:

// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ethereum/E...
// ----------------------------------------------------------------------------
contract ERC20Interface {

function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function allowance(address tokenOwner, address spender) public constant returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens);

}
标准请参考:

eip-20

实现请参考:

openzeppelin-contracts

创建合约教程

1.下载MetaMask钱包

官网地址:https://metamask.io

浏览器插件下载(国内):https://ext.chrome.360.cn/web...

2.选择网络,自定义RPC

 

3.填入HECO网络信息

网络名称(随意填):火币生态链或Huobi ECO Chain

新增 RPC 网址:https://http-mainnet-node.huo...

链 ID:128

符号(选填):HT

区块浏览器 URL(选填): https://hecoinfo.com

 

4.访问HRC20网站 https://huofabi.com

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM