From e0339392cbf1226f6704c70cc6b3eb7003109def Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Fri, 2 Sep 2022 18:31:24 +0800 Subject: [PATCH 01/27] Add loyalty standard in NEP-11 --- nep-11.mediawiki | 68 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/nep-11.mediawiki b/nep-11.mediawiki index 663d5b6c..a4be1099 100644 --- a/nep-11.mediawiki +++ b/nep-11.mediawiki @@ -18,6 +18,7 @@ A non-fungible token (NFT) can be thought of like a property deed - each one is Other information, such as the owner of the property, can be changed. Also, we provide built-in optional divisibility within each non-fungible asset. This allows for high value objects to be tokenized more effectively. +We also support royalty information which is for royalty payments across NFT marketplaces. ==Specification== @@ -290,6 +291,42 @@ If the owner is an unused address, or it's not the owner of the spe ===Optional methods=== +====royaltyInfo==== + +
+{
+  "name": "royaltyInfo",
+  "safe": true,
+  "parameters": [],
+  "returntype": "Array"
+}
+
+ +Returns a JSON Array which includes receiver and royaltyAmount. + +MUST follow the JSON Array below: +
+[
+        {
+            "name": "royaltyRecipient",
+            "type": "Hash160"
+        },
+        {
+            "name": "royaltyAmount",
+            "type": "Integer"
+        }
+]
+
+ +royaltyRecipient is the address of who should be sent the royalty payment, SHOULD be a 20-byte address. +royaltyAmount Must be a percentage fixed point with a scaling factor of 10000 (x/10000). For example: "75000" for 7.5%. + +This method is not for initial sale or mint, it's only for secondary martketplaces. + +Marketplaces that support this method MAY implement any method of calculating or transferring royalties to the royalty recipient. + +Marketplaces that support this method MUST emit the event, ReceivedRoyalties, after sending a payment. + ====tokens====
@@ -438,6 +475,37 @@ A token contract which creates new tokens MUST trigger a Transfer e
 
 A token contract which burns tokens MUST trigger a Transfer event with the to address set to null when tokens are burned.
 
+===Optional Events===
+
+====ReceivedRoyalties====
+
+
+{
+  "name": "ReceivedRoyalties",
+  "parameters": [
+    {
+      "name": "royaltyRecipient",
+      "type": "Hash160"
+    },
+    {
+      "name": "buyer",
+      "type": "Hash160"
+    },
+    {
+      "name": "tokenId",
+      "type": "ByteString"
+    },
+    {
+      "name": "amount",
+      "type": "Integer"
+    }
+  ]
+}
+
+ +royaltyRecipient MUST be the same address as that in royaltyInfo method. +MUST trigger after marketplaces transferring royalties to the royalty recipient if royaltyInfo method is implemented. + ==Implementation== https://github.com/neo-project/neo-devpack-dotnet/blob/master/src/Neo.SmartContract.Framework/Nep11Token.cs From 60ad29371bcb7b4b3752a0d0db781fbe871ed5ed Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Fri, 2 Sep 2022 18:38:19 +0800 Subject: [PATCH 02/27] add mail --- nep-11.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nep-11.mediawiki b/nep-11.mediawiki index a4be1099..cdd67916 100644 --- a/nep-11.mediawiki +++ b/nep-11.mediawiki @@ -1,7 +1,7 @@
   NEP: 11
   Title: Non-Fungible Token Standard
-  Author: Joe Stewart , Shane Mann , Wyatt Mufson , Erik Zhang 
+  Author: Joe Stewart , Shane Mann , Wyatt Mufson , Erik Zhang , Owen Zhang
   Type: Standard
   Status: Final
   Created: 2018-04-18

From f01b43688ca1825c1df8ddf9fdc6b1506b5ff80f Mon Sep 17 00:00:00 2001
From: superboyiii <573504781@qq.com>
Date: Mon, 5 Sep 2022 18:36:30 +0800
Subject: [PATCH 03/27] Change it to an independent standard

---
 nep-11.mediawiki | 70 +------------------------------------
 nep-x1.mediawiki | 89 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+), 69 deletions(-)
 create mode 100644 nep-x1.mediawiki

diff --git a/nep-11.mediawiki b/nep-11.mediawiki
index cdd67916..663d5b6c 100644
--- a/nep-11.mediawiki
+++ b/nep-11.mediawiki
@@ -1,7 +1,7 @@
 
   NEP: 11
   Title: Non-Fungible Token Standard
-  Author: Joe Stewart , Shane Mann , Wyatt Mufson , Erik Zhang , Owen Zhang
+  Author: Joe Stewart , Shane Mann , Wyatt Mufson , Erik Zhang 
   Type: Standard
   Status: Final
   Created: 2018-04-18
@@ -18,7 +18,6 @@ A non-fungible token (NFT) can be thought of like a property deed - each one is
 Other information, such as the owner of the property, can be changed.
 Also, we provide built-in optional divisibility within each non-fungible asset.
 This allows for high value objects to be tokenized more effectively.
-We also support royalty information which is for royalty payments across NFT marketplaces.
 
 ==Specification==
 
@@ -291,42 +290,6 @@ If the owner is an unused address, or it's not the owner of the spe
 
 ===Optional methods===
 
-====royaltyInfo====
-
-
-{
-  "name": "royaltyInfo",
-  "safe": true,
-  "parameters": [],
-  "returntype": "Array"
-}
-
- -Returns a JSON Array which includes receiver and royaltyAmount. - -MUST follow the JSON Array below: -
-[
-        {
-            "name": "royaltyRecipient",
-            "type": "Hash160"
-        },
-        {
-            "name": "royaltyAmount",
-            "type": "Integer"
-        }
-]
-
- -royaltyRecipient is the address of who should be sent the royalty payment, SHOULD be a 20-byte address. -royaltyAmount Must be a percentage fixed point with a scaling factor of 10000 (x/10000). For example: "75000" for 7.5%. - -This method is not for initial sale or mint, it's only for secondary martketplaces. - -Marketplaces that support this method MAY implement any method of calculating or transferring royalties to the royalty recipient. - -Marketplaces that support this method MUST emit the event, ReceivedRoyalties, after sending a payment. - ====tokens====
@@ -475,37 +438,6 @@ A token contract which creates new tokens MUST trigger a Transfer e
 
 A token contract which burns tokens MUST trigger a Transfer event with the to address set to null when tokens are burned.
 
-===Optional Events===
-
-====ReceivedRoyalties====
-
-
-{
-  "name": "ReceivedRoyalties",
-  "parameters": [
-    {
-      "name": "royaltyRecipient",
-      "type": "Hash160"
-    },
-    {
-      "name": "buyer",
-      "type": "Hash160"
-    },
-    {
-      "name": "tokenId",
-      "type": "ByteString"
-    },
-    {
-      "name": "amount",
-      "type": "Integer"
-    }
-  ]
-}
-
- -royaltyRecipient MUST be the same address as that in royaltyInfo method. -MUST trigger after marketplaces transferring royalties to the royalty recipient if royaltyInfo method is implemented. - ==Implementation== https://github.com/neo-project/neo-devpack-dotnet/blob/master/src/Neo.SmartContract.Framework/Nep11Token.cs diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki new file mode 100644 index 00000000..8984c3c3 --- /dev/null +++ b/nep-x1.mediawiki @@ -0,0 +1,89 @@ +
+  NEP: Undefined
+  Title: NFT Royalty Standard
+  Author: Owen Zhang
+  Type: Standard
+  Status: Draft
+  Created: 2022-09-05
+
+ +==Abstract== + +This NEP defines a global standard to get royalty payment information for non-fungible tokens (NFTs) to enable support for royalty payments across all NFT marketplaces in the NEO Smart Economy. + +==Motivation== + +Need support royalty information which is not only for royalty payments across NFT marketplaces, but also good to protect creative copyright. Currently, no standard for creators to declare loyalty to all marketplaces in their NFTs. They have to discuss the loyalty with different marketplaces, otherwise these marketplaces which haven't touched with the creators can't get royalty details and have to define the loyalty in their marketplace contract by themselves. This standard is compatible with [https://github.com/neo-project/proposals/blob/master/nep-11.mediawiki NEP-11]. + +==Specification== + +===Common methods=== + +====royaltyInfo==== + +
+{
+  "name": "royaltyInfo",
+  "safe": true,
+  "parameters": [],
+  "returntype": "Array"
+}
+
+ +Returns a JSON Array which includes receiver and royaltyAmount. + +MUST follow the JSON Array below: +
+[		
+        {
+            "name": "royaltyRecipient",
+            "type": "Hash160"
+        },
+        {
+            "name": "royaltyAmount",
+            "type": "Integer"
+        }
+]
+
+ +royaltyRecipient is the address of who should be sent the royalty payment, SHOULD be a 20-byte address. +royaltyAmount Must be a percentage fixed point with a scaling factor of 10000 (x/10000). For example: "75000" for 7.5%. + +This method is not for initial sale or mint, it's only for secondary martketplaces. + +Marketplaces that support this method MAY implement any method of calculating or transferring royalties to the royalty recipient. + +Marketplaces that support this standard MUST emit the event, ReceivedRoyalties, after sending a payment. + +===Events=== + +====ReceivedRoyalties==== + +
+{
+  "name": "ReceivedRoyalties",
+  "parameters": [
+    {
+      "name": "royaltyRecipient",
+      "type": "Hash160"
+    },
+    {
+      "name": "buyer",
+      "type": "Hash160"
+    },
+    {
+      "name": "tokenId",
+      "type": "ByteString"
+    },
+    {
+      "name": "amount",
+      "type": "Integer"
+    }
+  ]
+}
+
+ +royaltyRecipient MUST be the same address as that in royaltyInfo method. +MUST trigger after marketplaces transferring royalties to the royalty recipient if royaltyInfo method is implemented. + + From b229a555727c06e42b56a2dccc4bd0d1f6df4885 Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Wed, 7 Sep 2022 11:29:44 +0800 Subject: [PATCH 04/27] Apply some feedback --- nep-x1.mediawiki | 64 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 13 deletions(-) diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki index 8984c3c3..0c62316b 100644 --- a/nep-x1.mediawiki +++ b/nep-x1.mediawiki @@ -19,8 +19,27 @@ Need support royalty information which is not only for royalty payments across N ===Common methods=== +====isGlobalRoyalty==== + +
+{
+  "name": "isGlobalRoyalty",
+  "safe": true,
+  "parameters": [],
+  "returntype": "Boolean"
+}
+
+ +This founction shows if this contract has global royalty or specific royalty to different tokenId. + +If return true, then it has global royalty. All tokenId MUST implement the same royalty amount. + +If return false, then it has specific royalty. MUST store specific royalty amount for each tokenId. + ====royaltyInfo==== +If globalRoyalty return true, this function should be: +
 {
   "name": "royaltyInfo",
@@ -30,24 +49,39 @@ Need support royalty information which is not only for royalty payments across N
 }
 
-Returns a JSON Array which includes receiver and royaltyAmount. +If globalRoyalty return false, this function should be: + +
+{
+  "name": "royaltyInfo",
+  "safe": true,
+  "parameters": [
+    {
+      "name": "tokenId",
+      "type": "ByteString"
+    }
+  ],
+  "returntype": "Array"
+}
+
+ +Returns a JSON Array which includes royaltyRecipient and royaltyAmount. MUST follow the JSON Array below:
-[		
-        {
-            "name": "royaltyRecipient",
-            "type": "Hash160"
-        },
-        {
-            "name": "royaltyAmount",
-            "type": "Integer"
-        }
+[
+    {
+        "name":"royaltyRecipient",
+        "type":"Hash160"
+    },
+    {
+        "name":"royaltyAmount",
+        "type":"Integer"
+    }
 ]
 
- royaltyRecipient is the address of who should be sent the royalty payment, SHOULD be a 20-byte address. -royaltyAmount Must be a percentage fixed point with a scaling factor of 10000 (x/10000). For example: "75000" for 7.5%. +royaltyAmount Must be a percentage fixed point with a scaling factor of 100 (x/100). For example: "1000" for 10%. This method is not for initial sale or mint, it's only for secondary martketplaces. @@ -57,12 +91,16 @@ Marketplaces that support this standard MUST emit the event, ReceivedRoyal ===Events=== -====ReceivedRoyalties==== +====RoyaltiesTransferred====
 {
   "name": "ReceivedRoyalties",
   "parameters": [
+    {
+      "name": "contractHash",
+      "type": "Hash160"
+    },
     {
       "name": "royaltyRecipient",
       "type": "Hash160"

From 0ef359d920d6b53efff50c1c9077c933b0053345 Mon Sep 17 00:00:00 2001
From: superboyiii <573504781@qq.com>
Date: Wed, 7 Sep 2022 11:32:42 +0800
Subject: [PATCH 05/27] fix

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

diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki
index 0c62316b..0ae3affd 100644
--- a/nep-x1.mediawiki
+++ b/nep-x1.mediawiki
@@ -38,7 +38,7 @@ If return false, then it has specific royalty. MUST store specific
 
 ====royaltyInfo====
 
-If globalRoyalty return true, this function should be:
+If isGlobalRoyalty return true, this function should be:
 
 
 {
@@ -49,7 +49,7 @@ If globalRoyalty return true, this function should be:
 }
 
-If globalRoyalty return false, this function should be: +If isGlobalRoyalty return false, this function should be:
 {

From ac114e9024f32fb15c64b900b8c781cf2fd41626 Mon Sep 17 00:00:00 2001
From: superboyiii <573504781@qq.com>
Date: Wed, 7 Sep 2022 12:13:53 +0800
Subject: [PATCH 06/27] update

---
 nep-x1.mediawiki | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki
index 0ae3affd..92683cd5 100644
--- a/nep-x1.mediawiki
+++ b/nep-x1.mediawiki
@@ -32,9 +32,9 @@ Need support royalty information which is not only for royalty payments across N
 
 This founction shows if this contract has global royalty or specific royalty to different tokenId. 
 
-If return true, then it has global royalty.  All tokenId MUST implement the same royalty amount.
+If return true, then it has global royalty.  All tokenId MUST implement the same static royalty amount.
 
-If return false, then it has specific royalty. MUST store specific royalty amount for each tokenId.
+If return false, then it has specific royalty. MUST store specific royalty amount for each tokenId, static or dynamic, either is OK .
 
 ====royaltyInfo====
 
@@ -54,11 +54,15 @@ If isGlobalRoyalty return false, this function should be:
 
 {
   "name": "royaltyInfo",
-  "safe": true,
+  "safe": false,
   "parameters": [
     {
       "name": "tokenId",
       "type": "ByteString"
+    },
+    {
+      "name": "salePrice",
+      "type": "Integer"
     }
   ],
   "returntype": "Array"
@@ -80,13 +84,19 @@ MUST follow the JSON Array below:
     }
 ]
 
+ royaltyRecipient is the address of who should be sent the royalty payment, SHOULD be a 20-byte address. + royaltyAmount Must be a percentage fixed point with a scaling factor of 100 (x/100). For example: "1000" for 10%. This method is not for initial sale or mint, it's only for secondary martketplaces. Marketplaces that support this method MAY implement any method of calculating or transferring royalties to the royalty recipient. +Marketplaces MUST pay the royalty in the same unit of exchange as that of the salePrice passed to royaltyInfo(). For example, if the sale price is in NEO, then the royalty payment must also be paid in NEO, and if the sale price is in GAS, then the royalty payment must also be paid in GAS. + +The royaltyInfo() function MUST NOT ignore the salePrice, royaltyAmount MAY be dynamic due to salePrice and time. + Marketplaces that support this standard MUST emit the event, ReceivedRoyalties, after sending a payment. ===Events=== From 7c5aa745a3d3388fd015aaa233819e03fa145fc8 Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Wed, 7 Sep 2022 14:10:58 +0800 Subject: [PATCH 07/27] fix --- nep-x1.mediawiki | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki index 92683cd5..644799a7 100644 --- a/nep-x1.mediawiki +++ b/nep-x1.mediawiki @@ -89,7 +89,7 @@ MUST follow the JSON Array below: royaltyAmount Must be a percentage fixed point with a scaling factor of 100 (x/100). For example: "1000" for 10%. -This method is not for initial sale or mint, it's only for secondary martketplaces. +This function is not for initial sale or mint, it's only for secondary marketplaces. Marketplaces that support this method MAY implement any method of calculating or transferring royalties to the royalty recipient. @@ -105,7 +105,7 @@ Marketplaces that support this standard MUST emit the event, ReceivedRoyal
 {
-  "name": "ReceivedRoyalties",
+  "name": "RoyaltiesTransferred",
   "parameters": [
     {
       "name": "contractHash",

From c5c82d5b071c910a1c8f24341a04a70bb9a02d02 Mon Sep 17 00:00:00 2001
From: superboyiii <573504781@qq.com>
Date: Thu, 8 Sep 2022 15:10:02 +0800
Subject: [PATCH 08/27] fix

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

diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki
index 644799a7..670f9ae1 100644
--- a/nep-x1.mediawiki
+++ b/nep-x1.mediawiki
@@ -30,7 +30,7 @@ Need support royalty information which is not only for royalty payments across N
 }
 
-This founction shows if this contract has global royalty or specific royalty to different tokenId. +This function shows if this contract has global royalty or specific royalty to different tokenId. If return true, then it has global royalty. All tokenId MUST implement the same static royalty amount. From 4a56389d086a68b59b2a4d0bff7388db3fab4755 Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Thu, 8 Sep 2022 15:40:14 +0800 Subject: [PATCH 09/27] fix safe --- nep-x1.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki index 670f9ae1..eeeec212 100644 --- a/nep-x1.mediawiki +++ b/nep-x1.mediawiki @@ -54,7 +54,7 @@ If isGlobalRoyalty return false, this function should be:
 {
   "name": "royaltyInfo",
-  "safe": false,
+  "safe": true,
   "parameters": [
     {
       "name": "tokenId",

From 6ccfe0cb632281e8b77a516c985baeb2490472bf Mon Sep 17 00:00:00 2001
From: superboyiii <573504781@qq.com>
Date: Tue, 13 Sep 2022 15:18:58 +0800
Subject: [PATCH 10/27] remove isGlobalRoyalty() & modify the description

---
 nep-x1.mediawiki | 33 +--------------------------------
 1 file changed, 1 insertion(+), 32 deletions(-)

diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki
index eeeec212..0109127d 100644
--- a/nep-x1.mediawiki
+++ b/nep-x1.mediawiki
@@ -19,38 +19,8 @@ Need support royalty information which is not only for royalty payments across N
 
 ===Common methods===
 
-====isGlobalRoyalty====
-
-
-{
-  "name": "isGlobalRoyalty",
-  "safe": true,
-  "parameters": [],
-  "returntype": "Boolean"
-}
-
- -This function shows if this contract has global royalty or specific royalty to different tokenId. - -If return true, then it has global royalty. All tokenId MUST implement the same static royalty amount. - -If return false, then it has specific royalty. MUST store specific royalty amount for each tokenId, static or dynamic, either is OK . - ====royaltyInfo==== -If isGlobalRoyalty return true, this function should be: - -
-{
-  "name": "royaltyInfo",
-  "safe": true,
-  "parameters": [],
-  "returntype": "Array"
-}
-
- -If isGlobalRoyalty return false, this function should be: -
 {
   "name": "royaltyInfo",
@@ -69,9 +39,8 @@ If isGlobalRoyalty return false, this function should be:
 }
 
-Returns a JSON Array which includes royaltyRecipient and royaltyAmount. +Returns a NeoVM Array stack item with two elements inside as below: -MUST follow the JSON Array below:
 [
     {

From 2d0ceb7c961e8d03a7fcf0d3c5c308f43e34b7e6 Mon Sep 17 00:00:00 2001
From: superboyiii <573504781@qq.com>
Date: Tue, 13 Sep 2022 15:22:00 +0800
Subject: [PATCH 11/27] udpate

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

diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki
index 0109127d..98bc7445 100644
--- a/nep-x1.mediawiki
+++ b/nep-x1.mediawiki
@@ -39,7 +39,7 @@ Need support royalty information which is not only for royalty payments across N
 }
 
-Returns a NeoVM Array stack item with two elements inside as below: +Returns a NeoVM Array stack item with two elements inside as this:
 [

From 2ddf6a3dc6e81ad395d260201e0ac6425b4d894a Mon Sep 17 00:00:00 2001
From: superboyiii <573504781@qq.com>
Date: Thu, 15 Sep 2022 11:18:12 +0800
Subject: [PATCH 12/27] Vincent's advice

---
 nep-x1.mediawiki | 64 +++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 52 insertions(+), 12 deletions(-)

diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki
index 98bc7445..4cf83323 100644
--- a/nep-x1.mediawiki
+++ b/nep-x1.mediawiki
@@ -39,20 +39,61 @@ Need support royalty information which is not only for royalty payments across N
 }
 
-Returns a NeoVM Array stack item with two elements inside as this: +Returns a NeoVM Array stack item with single or multi array, each array still has two elements, for example: + +Single royaltyRecipient
 [
-    {
-        "name":"royaltyRecipient",
-        "type":"Hash160"
-    },
-    {
-        "name":"royaltyAmount",
-        "type":"Integer"
-    }
+    [
+        {
+            "name":"royaltyRecipient",
+            "type":"Hash160"
+        },
+        {
+            "name":"royaltyAmount",
+            "type":"Integer"
+        }
+    ]
 ]
-
+
+
+Multi royaltyRecipient
+
+
+[
+    [
+        {
+            "name":"royaltyRecipient1",
+            "type":"Hash160"
+        },
+        {
+            "name":"royaltyAmount1",
+            "type":"Integer"
+        }
+    ],
+    [
+        {
+            "name":"royaltyRecipient2",
+            "type":"Hash160"
+        },
+        {
+            "name":"royaltyAmount2",
+            "type":"Integer"
+        }
+    ],
+    [
+        {
+            "name":"royaltyRecipient3",
+            "type":"Hash160"
+        },
+        {
+            "name":"royaltyAmount3",
+            "type":"Integer"
+        }
+    ]
+]
+
 
 royaltyRecipient is the address of who should be sent the royalty payment, SHOULD be a 20-byte address.
 
@@ -102,5 +143,4 @@ Marketplaces that support this standard MUST emit the event, ReceivedRoyal
 
 royaltyRecipient MUST be the same address as that in royaltyInfo method.
 MUST trigger after marketplaces transferring royalties to the royalty recipient if royaltyInfo method is implemented.
-
-
+Each royaltyRecipient has 1 events. That means if 5 royaltyRecipient in royaltyInfo method, 5 RoyaltiesTransferred event MUST be triggered.

From f6d6939cf3827ad747ca79e352147996929bb092 Mon Sep 17 00:00:00 2001
From: superboyiii <573504781@qq.com>
Date: Thu, 15 Sep 2022 11:33:49 +0800
Subject: [PATCH 13/27] add Vincent to author

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

diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki
index 4cf83323..3ea78977 100644
--- a/nep-x1.mediawiki
+++ b/nep-x1.mediawiki
@@ -1,7 +1,7 @@
 
   NEP: Undefined
   Title: NFT Royalty Standard
-  Author: Owen Zhang
+  Author: Owen Zhang, Vincent Geneste
   Type: Standard
   Status: Draft
   Created: 2022-09-05

From e769920265f31c76af7abc8d3c507ec8025e8714 Mon Sep 17 00:00:00 2001
From: superboyiii <573504781@qq.com>
Date: Thu, 15 Sep 2022 11:36:12 +0800
Subject: [PATCH 14/27] format

---
 nep-x1.mediawiki | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki
index 3ea78977..ec5a6797 100644
--- a/nep-x1.mediawiki
+++ b/nep-x1.mediawiki
@@ -142,5 +142,7 @@ Marketplaces that support this standard MUST emit the event, ReceivedRoyal
 
royaltyRecipient MUST be the same address as that in royaltyInfo method. + MUST trigger after marketplaces transferring royalties to the royalty recipient if royaltyInfo method is implemented. -Each royaltyRecipient has 1 events. That means if 5 royaltyRecipient in royaltyInfo method, 5 RoyaltiesTransferred event MUST be triggered. + +Each royaltyRecipient has 1 events. That means if 5 royaltyRecipient in royaltyInfo method, 5 RoyaltiesTransferred events MUST be triggered. From fbcaaf568ffcc8f14bd586c69f837eb189c849c3 Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Tue, 31 Jan 2023 11:36:48 +0800 Subject: [PATCH 15/27] add royaltyToken in royaltyInfo --- nep-x1.mediawiki | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki index ec5a6797..3ebc9257 100644 --- a/nep-x1.mediawiki +++ b/nep-x1.mediawiki @@ -30,6 +30,11 @@ Need support royalty information which is not only for royalty payments across N "name": "tokenId", "type": "ByteString" }, + { + "name": "royaltyToken", + "type": "Hash160" + }, + } { "name": "salePrice", "type": "Integer" From 674bfa3d480e3a11b333f155ae3af1d1484e60d9 Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Tue, 31 Jan 2023 16:43:30 +0800 Subject: [PATCH 16/27] update RoyaltiesTransferred --- nep-x1.mediawiki | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki index 3ebc9257..c929b2ff 100644 --- a/nep-x1.mediawiki +++ b/nep-x1.mediawiki @@ -123,7 +123,7 @@ Marketplaces that support this standard MUST emit the event, ReceivedRoyal "name": "RoyaltiesTransferred", "parameters": [ { - "name": "contractHash", + "name": "royaltyToken", "type": "Hash160" }, { @@ -146,6 +146,8 @@ Marketplaces that support this standard MUST emit the event, ReceivedRoyal }
+royaltyToken MUST be the same address as that in royaltyInfo method. + royaltyRecipient MUST be the same address as that in royaltyInfo method. MUST trigger after marketplaces transferring royalties to the royalty recipient if royaltyInfo method is implemented. From c126eb1958cdc65ac4bae61eb3051a1b95fc4ce0 Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Thu, 9 Feb 2023 14:24:20 +0800 Subject: [PATCH 17/27] Fix description --- nep-x1.mediawiki | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki index c929b2ff..7e10c068 100644 --- a/nep-x1.mediawiki +++ b/nep-x1.mediawiki @@ -112,7 +112,7 @@ Marketplaces MUST pay the royalty in the same unit of exchange as that of the salePrice, royaltyAmount MAY be dynamic due to salePrice and time. -Marketplaces that support this standard MUST emit the event, ReceivedRoyalties, after sending a payment. +Marketplaces that support this standard MUST emit the event, RoyaltiesTransferred, after sending a payment. ===Events=== @@ -145,7 +145,6 @@ Marketplaces that support this standard MUST emit the event, ReceivedRoyal ] }
- royaltyToken MUST be the same address as that in royaltyInfo method. royaltyRecipient MUST be the same address as that in royaltyInfo method. From a0d3bc60db13388ddb818d9d17f5f6a2141648a3 Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Fri, 10 Feb 2023 12:50:58 +0800 Subject: [PATCH 18/27] format --- nep-x1.mediawiki | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki index 7e10c068..1abc5def 100644 --- a/nep-x1.mediawiki +++ b/nep-x1.mediawiki @@ -61,7 +61,7 @@ Single royaltyRecipient } ] ] -
+
Multi royaltyRecipient @@ -98,7 +98,7 @@ Multi royaltyRecipient } ] ] -
+
royaltyRecipient is the address of who should be sent the royalty payment, SHOULD be a 20-byte address. @@ -145,6 +145,7 @@ Marketplaces that support this standard MUST emit the event, RoyaltiesTran ] }
+ royaltyToken MUST be the same address as that in royaltyInfo method. royaltyRecipient MUST be the same address as that in royaltyInfo method. From 088aad560cd46037f9b920d10acb64f64706f453 Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Fri, 10 Feb 2023 18:37:45 +0800 Subject: [PATCH 19/27] Fix the definition of royaltyAmount --- nep-x1.mediawiki | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki index 1abc5def..f565cafa 100644 --- a/nep-x1.mediawiki +++ b/nep-x1.mediawiki @@ -17,6 +17,8 @@ Need support royalty information which is not only for royalty payments across N ==Specification== +NEP-11 compliant contracts MAY implement this NEP for royalties to provide a standard method of specifying royalty payment information. + ===Common methods=== ====royaltyInfo==== @@ -100,9 +102,13 @@ Multi royaltyRecipient ]
+royaltyToken is the token hash for royalty payment. + +salePrice MUST be amount without decimals. + royaltyRecipient is the address of who should be sent the royalty payment, SHOULD be a 20-byte address. -royaltyAmount Must be a percentage fixed point with a scaling factor of 100 (x/100). For example: "1000" for 10%. +royaltyAmount MUST be the royalty amount without decimals rather than a percentage so there's no dispute between marketplaces about how much is the calculated result. This function is not for initial sale or mint, it's only for secondary marketplaces. From d31194e405e6e2bf66e2b2105e898414f66441ec Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Tue, 9 May 2023 11:40:45 +0800 Subject: [PATCH 20/27] fix Motivation --- nep-x1.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki index f565cafa..b21ba0d8 100644 --- a/nep-x1.mediawiki +++ b/nep-x1.mediawiki @@ -13,7 +13,7 @@ This NEP defines a global standard to get royalty payment information for non-fu ==Motivation== -Need support royalty information which is not only for royalty payments across NFT marketplaces, but also good to protect creative copyright. Currently, no standard for creators to declare loyalty to all marketplaces in their NFTs. They have to discuss the loyalty with different marketplaces, otherwise these marketplaces which haven't touched with the creators can't get royalty details and have to define the loyalty in their marketplace contract by themselves. This standard is compatible with [https://github.com/neo-project/proposals/blob/master/nep-11.mediawiki NEP-11]. +Need support royalty information which is not only for royalty payments across NFT marketplaces, but also good to protect creative copyright. Currently, no standard for creators to declare royalty to all marketplaces in their NFTs. They have to discuss the royalty with different marketplaces, otherwise these marketplaces which haven't touched with the creators can't get royalty details and have to define the royalty in their marketplace contract by themselves. This standard is compatible with [https://github.com/neo-project/proposals/blob/master/nep-11.mediawiki NEP-11]. ==Specification== From bb726a5db12caecf175a0af72333f95b1f11a9f4 Mon Sep 17 00:00:00 2001 From: Owen Zhang <38493437+superboyiii@users.noreply.github.com> Date: Tue, 10 Oct 2023 17:17:29 +0800 Subject: [PATCH 21/27] Update nep-x1.mediawiki Co-authored-by: Shargon --- nep-x1.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki index b21ba0d8..3797192f 100644 --- a/nep-x1.mediawiki +++ b/nep-x1.mediawiki @@ -106,7 +106,7 @@ Multi royaltyRecipient salePrice MUST be amount without decimals. -royaltyRecipient is the address of who should be sent the royalty payment, SHOULD be a 20-byte address. +royaltyRecipient is the address of who will be sent the royalty payment, MUST be a 20-byte address. royaltyAmount MUST be the royalty amount without decimals rather than a percentage so there's no dispute between marketplaces about how much is the calculated result. From 8b61cc969ff007c02effa49c497ce25ce8a91fbe Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Wed, 20 Mar 2024 18:12:17 +0800 Subject: [PATCH 22/27] some improvement on description --- nep-x1.mediawiki | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nep-x1.mediawiki b/nep-x1.mediawiki index 3797192f..508b794b 100644 --- a/nep-x1.mediawiki +++ b/nep-x1.mediawiki @@ -9,11 +9,11 @@ ==Abstract== -This NEP defines a global standard to get royalty payment information for non-fungible tokens (NFTs) to enable support for royalty payments across all NFT marketplaces in the NEO Smart Economy. +This NEP defines a global standard to get royalty payment information for Non-Fungible Tokens (NFTs) in order to enable support for royalty payments across all NFT marketplaces in the NEO Smart Economy. ==Motivation== -Need support royalty information which is not only for royalty payments across NFT marketplaces, but also good to protect creative copyright. Currently, no standard for creators to declare royalty to all marketplaces in their NFTs. They have to discuss the royalty with different marketplaces, otherwise these marketplaces which haven't touched with the creators can't get royalty details and have to define the royalty in their marketplace contract by themselves. This standard is compatible with [https://github.com/neo-project/proposals/blob/master/nep-11.mediawiki NEP-11]. +There is a need for supporting royalty information, which is useful not only for royalty payments across NFT marketplaces but also good to protect creative copyright. Currently, there is no standard for creators to declare royalty to all marketplaces in their NFTs. In this sense, they have to discuss the royalty with different marketplaces, otherwise these marketplaces, which haven't touched with the creators, can't get royalty details and define the royalty in their marketplace contract by themselves. This standard is compatible with [NEP-11](https://github.com/neo-project/proposals/blob/master/nep-11.mediawiki). ==Specification== @@ -118,7 +118,7 @@ Marketplaces MUST pay the royalty in the same unit of exchange as that of the salePrice, royaltyAmount MAY be dynamic due to salePrice and time. -Marketplaces that support this standard MUST emit the event, RoyaltiesTransferred, after sending a payment. +Marketplaces that support this standard MUST emit the event, RoyaltiesTransferred for each recipient, after sending a payment. ===Events=== From 1066b628285e3fffb447ef6c14a1b1a452d98376 Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Tue, 26 Mar 2024 10:53:29 +0800 Subject: [PATCH 23/27] name proposal as NEP-24 --- README.mediawiki | 15 +++++++++++++-- nep-x1.mediawiki => nep-24.mediawiki | 10 +++++----- 2 files changed, 18 insertions(+), 7 deletions(-) rename nep-x1.mediawiki => nep-24.mediawiki (92%) diff --git a/README.mediawiki b/README.mediawiki index 00266209..43af8a02 100644 --- a/README.mediawiki +++ b/README.mediawiki @@ -99,7 +99,18 @@ First review [[nep-1.mediawiki|NEP-1]]. Then clone the repository and add your N | Informational | Accepted |- -| +| [https://github.com/neo-project/proposals/pull/156 23] +| RPC Errors Proposal +| Anna Shaleva, Roman Khimov +| Standard +| Accepted +|- +| [https://github.com/neo-project/proposals/pull/155 24] +| NFT Royalty Standard +| Owen Zhang, Vincent Geneste +| Standard +| Accepted +|- | Dynamic Sharding | | Standard @@ -140,4 +151,4 @@ First review [[nep-1.mediawiki|NEP-1]]. Then clone the repository and add your N | | Standard | Stub -|} +|} \ No newline at end of file diff --git a/nep-x1.mediawiki b/nep-24.mediawiki similarity index 92% rename from nep-x1.mediawiki rename to nep-24.mediawiki index 508b794b..b1a61a47 100644 --- a/nep-x1.mediawiki +++ b/nep-24.mediawiki @@ -1,15 +1,16 @@
-  NEP: Undefined
+  NEP: 24
   Title: NFT Royalty Standard
   Author: Owen Zhang, Vincent Geneste
   Type: Standard
-  Status: Draft
+  Status: Accepted
   Created: 2022-09-05
 
==Abstract== -This NEP defines a global standard to get royalty payment information for Non-Fungible Tokens (NFTs) in order to enable support for royalty payments across all NFT marketplaces in the NEO Smart Economy. +This NEP defines a global standard to get royalty payment information for Non-Fungible Tokens (NFTs) in order to enable support for royalty payments across all NFT marketplaces in the NEO Smart Economy. +Reference: The NFT Standard [NEP-11](https://github.com/neo-project/proposals/blob/master/nep-11.mediawiki) ==Motivation== @@ -36,7 +37,6 @@ NEP-11 compliant contracts MAY implement this NEP for royalties to provide a sta "name": "royaltyToken", "type": "Hash160" }, - } { "name": "salePrice", "type": "Integer" @@ -158,4 +158,4 @@ Marketplaces that support this standard MUST emit the event, RoyaltiesTran MUST trigger after marketplaces transferring royalties to the royalty recipient if royaltyInfo method is implemented. -Each royaltyRecipient has 1 events. That means if 5 royaltyRecipient in royaltyInfo method, 5 RoyaltiesTransferred events MUST be triggered. +Each royaltyRecipient has 1 event. That means if there are 5 royaltyRecipient in royaltyInfo method, 5 RoyaltiesTransferred events MUST be triggered. From 8a8b8c229262d46e553b00f9110eae3ccad6c1a3 Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Thu, 28 Mar 2024 10:47:15 +0800 Subject: [PATCH 24/27] fix README.mediawiki --- README.mediawiki | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/README.mediawiki b/README.mediawiki index 43af8a02..f3fae05a 100644 --- a/README.mediawiki +++ b/README.mediawiki @@ -99,18 +99,13 @@ First review [[nep-1.mediawiki|NEP-1]]. Then clone the repository and add your N | Informational | Accepted |- -| [https://github.com/neo-project/proposals/pull/156 23] -| RPC Errors Proposal -| Anna Shaleva, Roman Khimov -| Standard -| Accepted -|- | [https://github.com/neo-project/proposals/pull/155 24] | NFT Royalty Standard | Owen Zhang, Vincent Geneste | Standard | Accepted |- +| | Dynamic Sharding | | Standard From b0d22119f57f1475bf82e5e38786442d11d0dcfd Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Thu, 28 Mar 2024 16:37:17 +0800 Subject: [PATCH 25/27] Add Implementation --- nep-24.mediawiki | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nep-24.mediawiki b/nep-24.mediawiki index b1a61a47..3eb97e7d 100644 --- a/nep-24.mediawiki +++ b/nep-24.mediawiki @@ -159,3 +159,8 @@ Marketplaces that support this standard MUST emit the event, RoyaltiesTran MUST trigger after marketplaces transferring royalties to the royalty recipient if royaltyInfo method is implemented. Each royaltyRecipient has 1 event. That means if there are 5 royaltyRecipient in royaltyInfo method, 5 RoyaltiesTransferred events MUST be triggered. + +==Implementation== + +https://github.com/OnBlockIO/n3-tokens-contracts/blob/6b01ac3f46b18629f880dcac4e2f5bb4e7f94a37/contracts/NEP11/GhostMarket.NFT.py#L475 + From 4cde4d310b4bc4db4fdcf7f561a7a2d06a7ce76f Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Fri, 29 Mar 2024 11:16:39 +0800 Subject: [PATCH 26/27] little-fix --- nep-24.mediawiki | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nep-24.mediawiki b/nep-24.mediawiki index 3eb97e7d..c6ecfdd2 100644 --- a/nep-24.mediawiki +++ b/nep-24.mediawiki @@ -71,31 +71,31 @@ Multi royaltyRecipient [ [ { - "name":"royaltyRecipient1", + "name":"royaltyRecipient", "type":"Hash160" }, { - "name":"royaltyAmount1", + "name":"royaltyAmount", "type":"Integer" } ], [ { - "name":"royaltyRecipient2", + "name":"royaltyRecipient", "type":"Hash160" }, { - "name":"royaltyAmount2", + "name":"royaltyAmount", "type":"Integer" } ], [ { - "name":"royaltyRecipient3", + "name":"royaltyRecipient", "type":"Hash160" }, { - "name":"royaltyAmount3", + "name":"royaltyAmount", "type":"Integer" } ] From fd7035a240ae0c71edaf08439be0a8b1729cd776 Mon Sep 17 00:00:00 2001 From: superboyiii <573504781@qq.com> Date: Wed, 17 Apr 2024 15:00:30 +0800 Subject: [PATCH 27/27] add example --- nep-24.mediawiki | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nep-24.mediawiki b/nep-24.mediawiki index c6ecfdd2..c5b05626 100644 --- a/nep-24.mediawiki +++ b/nep-24.mediawiki @@ -164,3 +164,5 @@ Each royaltyRecipient has 1 event. That means if there are 5 https://github.com/OnBlockIO/n3-tokens-contracts/blob/6b01ac3f46b18629f880dcac4e2f5bb4e7f94a37/contracts/NEP11/GhostMarket.NFT.py#L475 +https://github.com/neo-project/neo-devpack-dotnet/blob/master/examples/Example.SmartContract.SampleRoyaltyNEP11Token/SampleRoyaltyNEP11Token.cs +