From 2cf7ae38dc4e910df49736efc44322a86e945316 Mon Sep 17 00:00:00 2001 From: Erik Zhang Date: Thu, 12 Nov 2020 13:06:18 +0800 Subject: [PATCH 01/19] Replace NEP-5 with NEP-17 --- nep-17.mediawiki | 109 ++++++++++++++++++++ nep-5.mediawiki => obsolete/nep-5.mediawiki | 3 +- 2 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 nep-17.mediawiki rename nep-5.mediawiki => obsolete/nep-5.mediawiki (99%) mode change 100755 => 100644 diff --git a/nep-17.mediawiki b/nep-17.mediawiki new file mode 100644 index 00000000..3b412844 --- /dev/null +++ b/nep-17.mediawiki @@ -0,0 +1,109 @@ +
+  NEP: 17
+  Title: Token Standard
+  Author: Erik Zhang 
+  Type: Standard
+  Status: Draft
+  Created: 2020-11-12
+  Replaces: 5
+
+ +==Abstract== + +This proposal outlines a token standard for the NEO blockchain that will provide systems with a generalized interaction mechanism for tokenized Smart Contracts. This mechanic, along with the justification for each feature are defined. A template and examples are also provided to enable the development community. + +==Motivation== + +As the NEO blockchain scales, Smart Contract deployment and invocation will become increasingly important. Without a standard interaction method, systems will be required to maintain a unique API for each contract, regardless of their similarity to other contracts. Tokenized contracts present themselves as a prime example of this need because their basic operating mechanism is the same. A standard method for interacting with these tokens relieves the entire ecosystem from maintaining a definition for basic operations that are required by every Smart Contract that employs a token. + +==Specification== + +In the method definitions below, we provide both the definitions of the functions as they are defined in the contract as well as the invoke parameters. + +===Methods=== + +====symbol==== + +
+public static string symbol()
+
+ +Returns a short string symbol of the token managed in this contract. e.g. "MYT". This symbol SHOULD be short (3-8 characters is recommended), with no whitespace characters or new-lines and SHOULD be limited to the uppercase latin alphabet (i.e. the 26 letters used in English). + +This method MUST always return the same value every time it is invoked. + +====decimals==== + +
+public static byte decimals()
+
+ +Returns the number of decimals used by the token - e.g. 8, means to divide the token amount by 100,000,000 to get its user representation. + +This method MUST always return the same value every time it is invoked. + +====totalSupply==== + +
+public static BigInteger totalSupply()
+
+ +Returns the total token supply deployed in the system. + +====balanceOf==== + +
+public static BigInteger balanceOf(byte[] account)
+
+ +Returns the token balance of the account. + +The parameter account SHOULD be a 20-byte address. If not, this method SHOULD throw an exception. + +If the account is an unused address, this method MUST return 0. + +====transfer==== + +
+public static bool transfer(byte[] from, byte[] to, BigInteger amount)
+
+ +Transfers an amount of tokens from the from account to the to account. + +The parameters from and to SHOULD be 20-byte addresses. If not, this method SHOULD throw an exception. + +The parameter amount MUST be greater than or equal to 0. If not, this method SHOULD throw an exception. + +The function MUST return false if the from account balance does not have enough tokens to spend. + +If the method succeeds, it MUST fire the transfer event, and MUST return true, even if the amount is 0, or from and to are the same address. + +The function SHOULD check whether the from address equals the caller contract hash. If so, the transfer SHOULD be processed; If not, the function SHOULD use the SYSCALL Neo.Runtime.CheckWitness to verify the transfer. + +If the to address is a deployed contract, the function SHOULD check the payable flag of this contract to decide whether it should transfer the tokens to this contract. + +If the transfer is not processed, the function SHOULD return false. + +The function MUST call onPayment method AFTER fire the Transfer event if the receiver is a deployed contract. If the receiver doesn't want to receive this transfer it MUST call ABORT. + +
+public static void onPayment(BigInteger amount)
+
+ +===Events=== + +====Transfer==== + +
+public static event Transfer(byte[] from, byte[] to, BigInteger amount)
+
+ +MUST trigger when tokens are transferred, including zero value transfers. + +A token contract which creates new tokens MUST trigger a Transfer event with the from address set to null when tokens are created. + +A token contract which burns tokens MUST trigger a Transfer event with the to address set to null when tokens are burned. + +==Implementation== + +https://github.com/neo-project/neo/pull/2024 diff --git a/nep-5.mediawiki b/obsolete/nep-5.mediawiki old mode 100755 new mode 100644 similarity index 99% rename from nep-5.mediawiki rename to obsolete/nep-5.mediawiki index 03d78b26..b13863da --- a/nep-5.mediawiki +++ b/obsolete/nep-5.mediawiki @@ -3,8 +3,9 @@ Title: Token Standard Author: Tyler Adams , luodanwg , tanyuan , Alan Fong Type: Standard - Status: Final + Status: Obsolete Created: 2017-08-10 + Superseded-By: 17 ==Abstract== From b987594a62a6e414a08b4ed9440a055e109eb12c Mon Sep 17 00:00:00 2001 From: Erik Zhang Date: Thu, 12 Nov 2020 22:29:43 +0800 Subject: [PATCH 02/19] MUST --- nep-17.mediawiki | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nep-17.mediawiki b/nep-17.mediawiki index 3b412844..b1165009 100644 --- a/nep-17.mediawiki +++ b/nep-17.mediawiki @@ -58,7 +58,7 @@ public static BigInteger balanceOf(byte[] account) Returns the token balance of the account. -The parameter account SHOULD be a 20-byte address. If not, this method SHOULD throw an exception. +The parameter account MUST be a 20-byte address. If not, this method SHOULD throw an exception. If the account is an unused address, this method MUST return 0. @@ -70,7 +70,7 @@ public static bool transfer(byte[] from, byte[] to, BigInteger amount) Transfers an amount of tokens from the from account to the to account. -The parameters from and to SHOULD be 20-byte addresses. If not, this method SHOULD throw an exception. +The parameters from and to MUST be 20-byte addresses. If not, this method SHOULD throw an exception. The parameter amount MUST be greater than or equal to 0. If not, this method SHOULD throw an exception. @@ -82,7 +82,7 @@ The function SHOULD check whether the from address equals the calle If the to address is a deployed contract, the function SHOULD check the payable flag of this contract to decide whether it should transfer the tokens to this contract. -If the transfer is not processed, the function SHOULD return false. +If the transfer is not processed, the function MUST return false. The function MUST call onPayment method AFTER fire the Transfer event if the receiver is a deployed contract. If the receiver doesn't want to receive this transfer it MUST call ABORT. From ea04daad74ef4cf6e2b0ba73a508a15a5fe72bf2 Mon Sep 17 00:00:00 2001 From: Erik Zhang Date: Thu, 12 Nov 2020 22:31:28 +0800 Subject: [PATCH 03/19] Remove payable check --- nep-17.mediawiki | 2 -- 1 file changed, 2 deletions(-) diff --git a/nep-17.mediawiki b/nep-17.mediawiki index b1165009..fa382d62 100644 --- a/nep-17.mediawiki +++ b/nep-17.mediawiki @@ -80,8 +80,6 @@ If the method succeeds, it MUST fire the transfer event, and MUST r The function SHOULD check whether the from address equals the caller contract hash. If so, the transfer SHOULD be processed; If not, the function SHOULD use the SYSCALL Neo.Runtime.CheckWitness to verify the transfer. -If the to address is a deployed contract, the function SHOULD check the payable flag of this contract to decide whether it should transfer the tokens to this contract. - If the transfer is not processed, the function MUST return false. The function MUST call onPayment method AFTER fire the Transfer event if the receiver is a deployed contract. If the receiver doesn't want to receive this transfer it MUST call ABORT. From 96dfadde6d3647a2a80d5b3e6995f9c445547a70 Mon Sep 17 00:00:00 2001 From: Erik Zhang Date: Thu, 12 Nov 2020 22:36:14 +0800 Subject: [PATCH 04/19] self-transfers --- nep-17.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nep-17.mediawiki b/nep-17.mediawiki index fa382d62..9d33d465 100644 --- a/nep-17.mediawiki +++ b/nep-17.mediawiki @@ -96,7 +96,7 @@ public static void onPayment(BigInteger amount) public static event Transfer(byte[] from, byte[] to, BigInteger amount) -MUST trigger when tokens are transferred, including zero value transfers. +MUST trigger when tokens are transferred, including zero value transfers and self-transfers. A token contract which creates new tokens MUST trigger a Transfer event with the from address set to null when tokens are created. From 70629795568a36b1893f99ea53cf456b4995a64b Mon Sep 17 00:00:00 2001 From: Erik Zhang Date: Fri, 13 Nov 2020 13:10:19 +0800 Subject: [PATCH 05/19] Update nep-17.mediawiki Co-authored-by: Igor Machado Coelho --- nep-17.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nep-17.mediawiki b/nep-17.mediawiki index 9d33d465..6eb1531a 100644 --- a/nep-17.mediawiki +++ b/nep-17.mediawiki @@ -82,7 +82,7 @@ The function SHOULD check whether the from address equals the calle If the transfer is not processed, the function MUST return false. -The function MUST call onPayment method AFTER fire the Transfer event if the receiver is a deployed contract. If the receiver doesn't want to receive this transfer it MUST call ABORT. +If the receiver is a deployed contract, the function MUST call onPayment method on receiver contract AFTER firing the Transfer event. If the receiver doesn't want to receive this transfer it MUST call ABORT.
 public static void onPayment(BigInteger amount)

From 5bf633f644637e6c3d9247790b330ccefa79691b Mon Sep 17 00:00:00 2001
From: Erik Zhang 
Date: Fri, 13 Nov 2020 13:26:26 +0800
Subject: [PATCH 06/19] Update nep-17.mediawiki

---
 nep-17.mediawiki | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nep-17.mediawiki b/nep-17.mediawiki
index 6eb1531a..b4c1880f 100644
--- a/nep-17.mediawiki
+++ b/nep-17.mediawiki
@@ -28,7 +28,7 @@ In the method definitions below, we provide both the definitions of the function
 public static string symbol()
 
-Returns a short string symbol of the token managed in this contract. e.g. "MYT". This symbol SHOULD be short (3-8 characters is recommended), with no whitespace characters or new-lines and SHOULD be limited to the uppercase latin alphabet (i.e. the 26 letters used in English). +Returns a short string representing symbol of the token managed in this contract. e.g. "MYT". This string MUST be valid ASCII, MUST NOT contain whitespace or control characters, SHOULD be limited to uppercase Latin alphabet (i.e. the 26 letters used in English) and SHOULD be short (3-8 characters is recommended). This method MUST always return the same value every time it is invoked. From c3fec11a9147334f2f6eb578d8162855874e27e7 Mon Sep 17 00:00:00 2001 From: Erik Zhang Date: Fri, 13 Nov 2020 13:40:05 +0800 Subject: [PATCH 07/19] Use abi to describe the methods and events --- nep-17.mediawiki | 76 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 70 insertions(+), 6 deletions(-) diff --git a/nep-17.mediawiki b/nep-17.mediawiki index b4c1880f..511ab189 100644 --- a/nep-17.mediawiki +++ b/nep-17.mediawiki @@ -25,7 +25,11 @@ In the method definitions below, we provide both the definitions of the function ====symbol====
-public static string symbol()
+{
+	"name": "symbol",
+	"parameters": [],
+	"returntype": "String"
+}
 
Returns a short string representing symbol of the token managed in this contract. e.g. "MYT". This string MUST be valid ASCII, MUST NOT contain whitespace or control characters, SHOULD be limited to uppercase Latin alphabet (i.e. the 26 letters used in English) and SHOULD be short (3-8 characters is recommended). @@ -35,7 +39,11 @@ This method MUST always return the same value every time it is invoked. ====decimals====
-public static byte decimals()
+{
+	"name": "decimals",
+	"parameters": [],
+	"returntype": "Integer"
+}
 
Returns the number of decimals used by the token - e.g. 8, means to divide the token amount by 100,000,000 to get its user representation. @@ -45,7 +53,11 @@ This method MUST always return the same value every time it is invoked. ====totalSupply====
-public static BigInteger totalSupply()
+{
+	"name": "totalSupply",
+	"parameters": [],
+	"returntype": "Integer"
+}
 
Returns the total token supply deployed in the system. @@ -53,7 +65,16 @@ Returns the total token supply deployed in the system. ====balanceOf====
-public static BigInteger balanceOf(byte[] account)
+{
+	"name": "balanceOf",
+	"parameters": [
+		{
+			"name": "account",
+			"type": "Hash160"
+		}
+	],
+	"returntype": "Integer"
+}
 
Returns the token balance of the account. @@ -65,7 +86,24 @@ If the account is an unused address, this method MUST return ====transfer====
-public static bool transfer(byte[] from, byte[] to, BigInteger amount)
+{
+	"name": "transfer",
+	"parameters": [
+		{
+			"name": "from",
+			"type": "Hash160"
+		},
+		{
+			"name": "to",
+			"type": "Hash160"
+		},
+		{
+			"name": "amount",
+			"type": "Integer"
+		}
+	],
+	"returntype": "Boolean"
+}
 
Transfers an amount of tokens from the from account to the to account. @@ -86,6 +124,16 @@ If the receiver is a deployed contract, the function MUST call onPayment public static void onPayment(BigInteger amount) +{ + "name": "onPayment", + "parameters": [ + { + "name": "amount", + "type": "Integer" + } + ], + "returntype": "Void" +} ===Events=== @@ -93,7 +141,23 @@ public static void onPayment(BigInteger amount) ====Transfer====
-public static event Transfer(byte[] from, byte[] to, BigInteger amount)
+{
+	"name": "Transfer",
+	"parameters": [
+		{
+			"name": "from",
+			"type": "Hash160"
+		},
+		{
+			"name": "to",
+			"type": "Hash160"
+		},
+		{
+			"name": "amount",
+			"type": "Integer"
+		}
+	]
+}
 
MUST trigger when tokens are transferred, including zero value transfers and self-transfers. From 33c6876c1f729bbdbe3d7f94f71102cf95a856ec Mon Sep 17 00:00:00 2001 From: Erik Zhang Date: Fri, 13 Nov 2020 13:44:59 +0800 Subject: [PATCH 08/19] format --- nep-17.mediawiki | 112 +++++++++++++++++++++++------------------------ 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/nep-17.mediawiki b/nep-17.mediawiki index 511ab189..9df1bd19 100644 --- a/nep-17.mediawiki +++ b/nep-17.mediawiki @@ -26,9 +26,9 @@ In the method definitions below, we provide both the definitions of the function
 {
-	"name": "symbol",
-	"parameters": [],
-	"returntype": "String"
+  "name": "symbol",
+  "parameters": [],
+  "returntype": "String"
 }
 
@@ -40,9 +40,9 @@ This method MUST always return the same value every time it is invoked.
 {
-	"name": "decimals",
-	"parameters": [],
-	"returntype": "Integer"
+  "name": "decimals",
+  "parameters": [],
+  "returntype": "Integer"
 }
 
@@ -54,9 +54,9 @@ This method MUST always return the same value every time it is invoked.
 {
-	"name": "totalSupply",
-	"parameters": [],
-	"returntype": "Integer"
+  "name": "totalSupply",
+  "parameters": [],
+  "returntype": "Integer"
 }
 
@@ -66,14 +66,14 @@ Returns the total token supply deployed in the system.
 {
-	"name": "balanceOf",
-	"parameters": [
-		{
-			"name": "account",
-			"type": "Hash160"
-		}
-	],
-	"returntype": "Integer"
+  "name": "balanceOf",
+  "parameters": [
+    {
+      "name": "account",
+      "type": "Hash160"
+    }
+  ],
+  "returntype": "Integer"
 }
 
@@ -87,22 +87,22 @@ If the account is an unused address, this method MUST return
 {
-	"name": "transfer",
-	"parameters": [
-		{
-			"name": "from",
-			"type": "Hash160"
-		},
-		{
-			"name": "to",
-			"type": "Hash160"
-		},
-		{
-			"name": "amount",
-			"type": "Integer"
-		}
-	],
-	"returntype": "Boolean"
+  "name": "transfer",
+  "parameters": [
+    {
+      "name": "from",
+      "type": "Hash160"
+    },
+    {
+      "name": "to",
+      "type": "Hash160"
+    },
+    {
+      "name": "amount",
+      "type": "Integer"
+    }
+  ],
+  "returntype": "Boolean"
 }
 
@@ -125,14 +125,14 @@ If the receiver is a deployed contract, the function MUST call onPayment public static void onPayment(BigInteger amount) { - "name": "onPayment", - "parameters": [ - { - "name": "amount", - "type": "Integer" - } - ], - "returntype": "Void" + "name": "onPayment", + "parameters": [ + { + "name": "amount", + "type": "Integer" + } + ], + "returntype": "Void" } @@ -142,21 +142,21 @@ public static void onPayment(BigInteger amount)
 {
-	"name": "Transfer",
-	"parameters": [
-		{
-			"name": "from",
-			"type": "Hash160"
-		},
-		{
-			"name": "to",
-			"type": "Hash160"
-		},
-		{
-			"name": "amount",
-			"type": "Integer"
-		}
-	]
+  "name": "Transfer",
+  "parameters": [
+    {
+      "name": "from",
+      "type": "Hash160"
+    },
+    {
+      "name": "to",
+      "type": "Hash160"
+    },
+    {
+      "name": "amount",
+      "type": "Integer"
+    }
+  ]
 }
 
From 1a221d420153abe273d97b886c055482c5c5d4ae Mon Sep 17 00:00:00 2001 From: Erik Zhang Date: Fri, 13 Nov 2020 13:56:22 +0800 Subject: [PATCH 09/19] capitalize --- nep-17.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nep-17.mediawiki b/nep-17.mediawiki index 9df1bd19..4f1dd3b6 100644 --- a/nep-17.mediawiki +++ b/nep-17.mediawiki @@ -114,7 +114,7 @@ The parameter amount MUST be greater than or equal to 0false
if the from account balance does not have enough tokens to spend. -If the method succeeds, it MUST fire the transfer event, and MUST return true, even if the amount is 0, or from and to are the same address. +If the method succeeds, it MUST fire the Transfer event, and MUST return true, even if the amount is 0, or from and to are the same address. The function SHOULD check whether the from address equals the caller contract hash. If so, the transfer SHOULD be processed; If not, the function SHOULD use the SYSCALL Neo.Runtime.CheckWitness to verify the transfer. From f74792f0513d93e9f29b2973c7e45eb55764c12f Mon Sep 17 00:00:00 2001 From: Erik Zhang Date: Wed, 18 Nov 2020 15:05:29 +0800 Subject: [PATCH 10/19] Add `from` to `onPayment` --- nep-17.mediawiki | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nep-17.mediawiki b/nep-17.mediawiki index 4f1dd3b6..53c5b826 100644 --- a/nep-17.mediawiki +++ b/nep-17.mediawiki @@ -127,6 +127,10 @@ public static void onPayment(BigInteger amount) { "name": "onPayment", "parameters": [ + { + "name": "from", + "type": "Hash160" + }, { "name": "amount", "type": "Integer" From a60bb7203650f044f961e4e05db45df39e20a9e9 Mon Sep 17 00:00:00 2001 From: Erik Zhang Date: Wed, 18 Nov 2020 15:16:37 +0800 Subject: [PATCH 11/19] accepted --- nep-17.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nep-17.mediawiki b/nep-17.mediawiki index 53c5b826..bcd7b2ab 100644 --- a/nep-17.mediawiki +++ b/nep-17.mediawiki @@ -3,7 +3,7 @@ Title: Token Standard Author: Erik Zhang Type: Standard - Status: Draft + Status: Accepted Created: 2020-11-12 Replaces: 5 From 61839cbe8279dd164f8e93e576f144ac6818500d Mon Sep 17 00:00:00 2001 From: Erik Zhang Date: Wed, 18 Nov 2020 15:19:23 +0800 Subject: [PATCH 12/19] Remove old pseudocode --- nep-17.mediawiki | 1 - 1 file changed, 1 deletion(-) diff --git a/nep-17.mediawiki b/nep-17.mediawiki index bcd7b2ab..38d50bd2 100644 --- a/nep-17.mediawiki +++ b/nep-17.mediawiki @@ -123,7 +123,6 @@ If the transfer is not processed, the function MUST return false. If the receiver is a deployed contract, the function MUST call onPayment method on receiver contract AFTER firing the Transfer event. If the receiver doesn't want to receive this transfer it MUST call ABORT.
-public static void onPayment(BigInteger amount)
 {
   "name": "onPayment",
   "parameters": [

From 0038d3473345c3b8c7e1299361ab841981628022 Mon Sep 17 00:00:00 2001
From: Erik Zhang 
Date: Tue, 24 Nov 2020 16:11:34 +0800
Subject: [PATCH 13/19] Add data to transfer

---
 nep-17.mediawiki | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/nep-17.mediawiki b/nep-17.mediawiki
index 38d50bd2..596b64b1 100644
--- a/nep-17.mediawiki
+++ b/nep-17.mediawiki
@@ -100,6 +100,10 @@ If the account is an unused address, this method MUST return 
     {
       "name": "amount",
       "type": "Integer"
+    },
+    {
+      "name": "data",
+      "type": "Any"
     }
   ],
   "returntype": "Boolean"
@@ -120,7 +124,7 @@ The function SHOULD check whether the from address equals the calle
 
 If the transfer is not processed, the function MUST return false.
 
-If the receiver is a deployed contract, the function MUST call onPayment method on receiver contract AFTER firing the Transfer event. If the receiver doesn't want to receive this transfer it MUST call ABORT.
+If the receiver is a deployed contract, the function MUST call onPayment method on receiver contract with the data parameter from transfer AFTER firing the Transfer event. If the receiver doesn't want to receive this transfer it MUST call ABORT.
 
 
 {
@@ -133,6 +137,10 @@ If the receiver is a deployed contract, the function MUST call onPayment
Date: Tue, 29 Dec 2020 13:29:49 +0800
Subject: [PATCH 14/19] Add python implementation

---
 nep-17.mediawiki | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nep-17.mediawiki b/nep-17.mediawiki
index 596b64b1..5b159f28 100644
--- a/nep-17.mediawiki
+++ b/nep-17.mediawiki
@@ -179,4 +179,5 @@ A token contract which burns tokens MUST trigger a Transfer event w
 
 ==Implementation==
 
-https://github.com/neo-project/neo/pull/2024
+C#: https://github.com/neo-project/neo/pull/2024
+Python: https://github.com/CityOfZion/neo3-boa/blob/development/boa3_test/examples/NEP17.py

From 1937ff56a09ac7e8380637e61129e9359e01a1b6 Mon Sep 17 00:00:00 2001
From: Erik Zhang 
Date: Tue, 29 Dec 2020 13:30:58 +0800
Subject: [PATCH 15/19] new line

---
 nep-17.mediawiki | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nep-17.mediawiki b/nep-17.mediawiki
index 5b159f28..f0ee4088 100644
--- a/nep-17.mediawiki
+++ b/nep-17.mediawiki
@@ -180,4 +180,5 @@ A token contract which burns tokens MUST trigger a Transfer event w
 ==Implementation==
 
 C#: https://github.com/neo-project/neo/pull/2024
+
 Python: https://github.com/CityOfZion/neo3-boa/blob/development/boa3_test/examples/NEP17.py

From 3d119bf4861ac71f882560137570bc77e7806936 Mon Sep 17 00:00:00 2001
From: Erik Zhang 
Date: Tue, 2 Feb 2021 17:38:30 +0800
Subject: [PATCH 16/19] Rename onPayment to onNEP17Payment

---
 nep-17.mediawiki | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nep-17.mediawiki b/nep-17.mediawiki
index f0ee4088..a823686f 100644
--- a/nep-17.mediawiki
+++ b/nep-17.mediawiki
@@ -124,11 +124,11 @@ The function SHOULD check whether the from address equals the calle
 
 If the transfer is not processed, the function MUST return false.
 
-If the receiver is a deployed contract, the function MUST call onPayment method on receiver contract with the data parameter from transfer AFTER firing the Transfer event. If the receiver doesn't want to receive this transfer it MUST call ABORT.
+If the receiver is a deployed contract, the function MUST call onNEP17Payment method on receiver contract with the data parameter from transfer AFTER firing the Transfer event. If the receiver doesn't want to receive this transfer it MUST call ABORT.
 
 
 {
-  "name": "onPayment",
+  "name": "onNEP17Payment",
   "parameters": [
     {
       "name": "from",

From a308ae3eabc240e2e837ababdd2314d0f0587bd8 Mon Sep 17 00:00:00 2001
From: Erik Zhang 
Date: Wed, 10 Mar 2021 17:47:13 +0800
Subject: [PATCH 17/19] Add safe

---
 nep-17.mediawiki | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/nep-17.mediawiki b/nep-17.mediawiki
index a823686f..a122e6ee 100644
--- a/nep-17.mediawiki
+++ b/nep-17.mediawiki
@@ -27,6 +27,7 @@ In the method definitions below, we provide both the definitions of the function
 
 {
   "name": "symbol",
+  "safe": true,
   "parameters": [],
   "returntype": "String"
 }
@@ -41,6 +42,7 @@ This method MUST always return the same value every time it is invoked.
 
 {
   "name": "decimals",
+  "safe": true,
   "parameters": [],
   "returntype": "Integer"
 }
@@ -55,6 +57,7 @@ This method MUST always return the same value every time it is invoked.
 
 {
   "name": "totalSupply",
+  "safe": true,
   "parameters": [],
   "returntype": "Integer"
 }
@@ -67,6 +70,7 @@ Returns the total token supply deployed in the system.
 
 {
   "name": "balanceOf",
+  "safe": true,
   "parameters": [
     {
       "name": "account",
@@ -88,6 +92,7 @@ If the account is an unused address, this method MUST return 
 
 {
   "name": "transfer",
+  "safe": false,
   "parameters": [
     {
       "name": "from",

From 9e25e93da9ff02b36daca9837210153f485c330e Mon Sep 17 00:00:00 2001
From: Erik Zhang 
Date: Thu, 29 Jul 2021 14:48:35 +0800
Subject: [PATCH 18/19] Update implementations

---
 nep-17.mediawiki | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nep-17.mediawiki b/nep-17.mediawiki
index a122e6ee..6133dfce 100644
--- a/nep-17.mediawiki
+++ b/nep-17.mediawiki
@@ -184,6 +184,6 @@ A token contract which burns tokens MUST trigger a Transfer event w
 
 ==Implementation==
 
-C#: https://github.com/neo-project/neo/pull/2024
+C#: https://github.com/neo-project/neo-devpack-dotnet/blob/master/src/Neo.SmartContract.Framework/Nep17Token.cs
 
 Python: https://github.com/CityOfZion/neo3-boa/blob/development/boa3_test/examples/NEP17.py

From 2cce389872091c0c32941df4f93bcf0dc0215670 Mon Sep 17 00:00:00 2001
From: Erik Zhang 
Date: Thu, 29 Jul 2021 14:50:37 +0800
Subject: [PATCH 19/19] Final

---
 README.mediawiki | 4 ++--
 nep-17.mediawiki | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/README.mediawiki b/README.mediawiki
index f784a606..e4fa0b49 100644
--- a/README.mediawiki
+++ b/README.mediawiki
@@ -75,11 +75,11 @@ First review [[nep-1.mediawiki|NEP-1]]. Then clone the repository and add your N
 | Standard
 | Accepted
 |-
-| [https://github.com/neo-project/proposals/pull/126 17]
+| [[nep-17.mediawiki|17]]
 | Token Standard
 | Erik Zhang
 | Standard
-| Accepted
+| Final
 |-
 | 
 | Dynamic Sharding
diff --git a/nep-17.mediawiki b/nep-17.mediawiki
index 6133dfce..050c9bca 100644
--- a/nep-17.mediawiki
+++ b/nep-17.mediawiki
@@ -3,7 +3,7 @@
   Title: Token Standard
   Author: Erik Zhang 
   Type: Standard
-  Status: Accepted
+  Status: Final
   Created: 2020-11-12
   Replaces: 5