Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEP 5: Token Standard #3

Closed
tanZiWen opened this issue Aug 10, 2017 · 1 comment
Closed

NEP 5: Token Standard #3

tanZiWen opened this issue Aug 10, 2017 · 1 comment

Comments

@tanZiWen
Copy link

tanZiWen commented Aug 10, 2017

Proposal

Name: NEP-5
Title:Token Standard
Author: luodanwg [email protected], tanyuan [email protected]
Status: Draft
Created: 10 August 2017
Resolution: Proposals
Template: NEO_NEP_5

Abstract

The following describes standard functions a token contract can implement.

Specification

Token
Contracts that work with tokens

Methods

NOTE: The contract developers must implement all function if they want to work with the specified tokens.

TotalSupply

 private static BigInteger TotalSupply()

Get the total token supply

Name

private static string Name()

Get the name of token

Symbol

private static string Symbol()

Get the symbol of token, symbol used to represent a unit of token

Decimals

private static BigInteger Decimals()

Get decimals of token

BalanceOf

private static BigInteger BalanceOf(object[] args) 

Get the account balance of another account with address which is first element of args and type is byte[]

Transfer

private static bool Transfer(object[] args) 

function that is always called when someone wants to transfer tokens. The first element is sender address and type is byte[], the second element is receiver address and type is byte[], the third element is the number of token and type is BigInteger .

Event

Transferred

private static void Transferred(object[] args)

Triggered when tokens are transferred. args is the same with transfer.

@erikzhang
Copy link
Member

Hi, can you work with @lllwvlvwlll in #4 who has done much work already?

erikzhang pushed a commit that referenced this issue Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants