pragma solidity ^0.4.24;
contract EIP20Interface{
//获取_owner地址的余额
function balanceOf(address _owner) public view returns (uint256 balance);
//转账:从自己账户向_to地址转入_value个Token
function transfer(address _to, uint256 _value)public returns (bool success);
//转账:从_from向_to转_value个Token
function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
//允许_spender从自己(调用方)账户转走_value个Token
function approve(address _spender, uint256 _value) returns (bool success);
//自己_owner查询__spender地址可以转走自己多少个Token
function allowance(address _owner, address _spender) view returns (uint256 remaining);
//转账的时候必须要调用的时间,比如Tranfer,TransferFrom
event Transfer(address indexed _from, address indexed _to, uint256 _value);
//成功执行approve方法后调用的事件
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract YJCToken is EIP20Interface {
//1.获取token名字,比如"YaJing Coin"
string public name;
//2.获取Token简称,比如"YJC
部署以太坊智能合约(Token发行)
最新推荐文章于 2024-03-31 20:04:04 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)