From 2ada14796389f22b67b693439c1e74f0f9438879 Mon Sep 17 00:00:00 2001 From: bettybao1209 <1062108372@qq.com> Date: Fri, 20 Mar 2020 16:27:15 +0800 Subject: [PATCH 01/19] NEP14: NeoContract Manifest --- README.mediawiki | 6 +++ nep-14.mediawiki | 108 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 nep-14.mediawiki diff --git a/README.mediawiki b/README.mediawiki index cb410725..79cd90a4 100644 --- a/README.mediawiki +++ b/README.mediawiki @@ -75,6 +75,12 @@ First review [[nep-1.mediawiki|NEP-1]]. Then clone the repository and add your N | Standard | Accepted |- +| [[nep-14.mediawiki|14]] +| NeoContract Manifest +| Erik Zhang, shargon, Vitor Nazário Coelho, Li Jianying +| Standard +| Final +|- | | Dynamic Sharding | diff --git a/nep-14.mediawiki b/nep-14.mediawiki new file mode 100644 index 00000000..cfa4e440 --- /dev/null +++ b/nep-14.mediawiki @@ -0,0 +1,108 @@ +
+ NEP: 14 + Title: NeoContract Manifest + Author: Erik Zhang+ +==Abstract== + +When a smart contract is deployed, it must explicitly declare the features and permissions it will use. When it is running, it will be limited by its declared list of features and permissions, and cannot make any behavior beyond the scope of the list. + +This NEP describes the Manifest standards for NEO smart contracts. + +==Motivation== + +There should be a way to expose the access control over the contract. To achieve this, we need a mechanism for describing the features and permissions of smart contracts. With NeoContract Manifest, developers can have clear recognition about the contract and easily create programs to invoke the contract. + +==Rationale== + +We assume the Manifest is strongly typed, known at compilation time and static. No introspection mechanism will be provided. We assert that all contracts will have the interface definitions of any contracts they call available at compile-time. + +==Specification== + +===Manifest=== + +The NeoContract Manifest is defined by JSON format, which has the following basic structure, where some of the top-level objects can have any number of child objects: + +, shargon , Vitor Nazário Coelho , Li Jianying + Type: Standard + Status: Final + Created: 2020-03-20 +
+ +{ + "groups": [], + "features": {}, + "abi": {}, + "permissions": [], + "trusts": [], + "safemethods": [] +} + ++ +===Groups=== + +The groups field is an array of Group objects which represent a set of mutually trusted contracts. A contract will trust and allow any contract in the same group to invoke it, and the user interface will not give any warnings. + +A group is identified by a public key and must be accompanied by a signature for the contract hash to prove that the contract is indeed included in the group. + +
+{ + "pubKey": "028e92a0f582bd3517497eff1a9beb41821991b8589bfcba20c2f40746f5c170a1", + "signature": "f6dbce908e291f5d8a81450292a3674f48ef8079306d613b3783dc263287704a0ef48f47679aa12b7d5e598fdb52d63ca7566afbe0e239437191d05698837e3b" +} ++ +Where pubkey represents the public key of the group and signature is the signature of the contract hash. + +===Features=== + +The features field describes what features are available for the contract. + +
+{ + "storage": true, + "payable": true +} ++ +The storage field is a boolean value indicating whether the contract has a storage. The value true means that it has, and false means not. + +The payable field is a boolean value indicating whether the contract accepts transfers. The value true means that it accepts, and false means not. + +===ABI=== + +For technical details of ABI, please refer to [https://github.com/neo-project/proposals/blob/master/nep-3.mediawiki NEP-3: NeoContract ABI]. + +===Permissions=== + +The permissions field is an array containing a set of Permission objects. It describes which contracts may be invoked and which methods are called. + +The definition of the Permission object is as follows: + +
+{ + "contract": "hash | group | *", + "methods": [] | "*" +} ++ +The contract field indicates the contract to be invoked. It can be a hash of a contract, a public key of a group, or a wildcard *. + +If it specifies a hash of a contract, then the contract will be invoked; If it specifies a public key of a group, then any contract in this group will be invoked; If it specifies a wildcard *, then any contract will be invoked. + +The methods field is an array containing a set of methods to be called. It can also be assigned with a wildcard *. If it is a wildcard *, then it means that any method can be called. + +If a contract invokes a contract or method that is not declared in the manifest at runtime, the invocation will fail. + +===Trusts=== + +The trusts field is an array containing a set of contract hashes or group public keys. It can also be assigned with a wildcard *. If it is a wildcard *, then it means that it trusts any contract. + +If a contract is trusted, the user interface will not give any warnings when called by the contract. + +===Safemethods=== + +The safemethods field is an array containing a set of method names. It can also be assigned with a wildcard *. If it is a wildcard *, then it means that all methods of the contract are safe. + +If a method is marked as safe, the user interface will not give any warnings when it is called by any other contract. \ No newline at end of file From 03280c6439fd8d30249c85e68babc03706fadfa3 Mon Sep 17 00:00:00 2001 From: bettybao1209 <1062108372@qq.com> Date: Fri, 20 Mar 2020 16:51:45 +0800 Subject: [PATCH 02/19] add extra and format --- nep-14.mediawiki | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/nep-14.mediawiki b/nep-14.mediawiki index cfa4e440..1ee3d276 100644 --- a/nep-14.mediawiki +++ b/nep-14.mediawiki @@ -1,7 +1,7 @@
NEP: 14 Title: NeoContract Manifest - Author: Erik Zhang===Groups=== -The groups field is an array of Group objects which represent a set of mutually trusted contracts. A contract will trust and allow any contract in the same group to invoke it, and the user interface will not give any warnings. +The, shargon , Vitor Nazário Coelho , Li Jianying + Author: Erik Zhang , shargon , Vitor Nazário Coelho , Igor Machado Coelho , Li Jianying Type: Standard Status: Final Created: 2020-03-20 @@ -35,14 +35,15 @@ The NeoContract Manifest is defined by JSON format, which has the following basi "abi": {}, "permissions": [], "trusts": [], - "safemethods": [] + "safemethods": [], + "extra": {} }
groups
field is an array of Group objects which represent a set of mutually trusted contracts. A contract will trust and allow any contract in the same group to invoke it, and the user interface will not give any warnings.
A group is identified by a public key and must be accompanied by a signature for the contract hash to prove that the contract is indeed included in the group.
@@ -53,11 +54,11 @@ A group is identified by a public key and must be accompanied by a signature for
}
-Where pubkey represents the public key of the group and signature is the signature of the contract hash.
+Where pubKey
represents the public key of the group and signature is the signature of the contract hash.
===Features===
-The features field describes what features are available for the contract.
+The features
field describes what features are available for the contract.
{ @@ -66,9 +67,9 @@ The features field describes what features are available for the contract. }-The storage field is a boolean value indicating whether the contract has a storage. The value true means that it has, and false means not. +The
storage
field is a boolean value indicating whether the contract has a storage. The value true means that it has, and false means not.
-The payable field is a boolean value indicating whether the contract accepts transfers. The value true means that it accepts, and false means not.
+The payable
field is a boolean value indicating whether the contract accepts transfers. The value true means that it accepts, and false means not.
===ABI===
@@ -76,9 +77,9 @@ For technical details of ABI, please refer to [https://github.com/neo-project/pr
===Permissions===
-The permissions field is an array containing a set of Permission objects. It describes which contracts may be invoked and which methods are called.
+The permissions
field is an array containing a set of Permission
objects. It describes which contracts may be invoked and which methods are called.
-The definition of the Permission object is as follows:
+The definition of the Permission
object is as follows:
{ @@ -87,22 +88,26 @@ The definition of the Permission object is as follows: }-The contract field indicates the contract to be invoked. It can be a hash of a contract, a public key of a group, or a wildcard *. +The
contract
field indicates the contract to be invoked. It can be a hash of a contract, a public key of a group, or a wildcard *
.
If it specifies a hash of a contract, then the contract will be invoked; If it specifies a public key of a group, then any contract in this group will be invoked; If it specifies a wildcard *, then any contract will be invoked.
-The methods field is an array containing a set of methods to be called. It can also be assigned with a wildcard *. If it is a wildcard *, then it means that any method can be called.
+The methods
field is an array containing a set of methods to be called. It can also be assigned with a wildcard *
. If it is a wildcard *
, then it means that any method can be called.
If a contract invokes a contract or method that is not declared in the manifest at runtime, the invocation will fail.
===Trusts===
-The trusts field is an array containing a set of contract hashes or group public keys. It can also be assigned with a wildcard *. If it is a wildcard *, then it means that it trusts any contract.
+The trusts
field is an array containing a set of contract hashes or group public keys. It can also be assigned with a wildcard *
. If it is a wildcard *
, then it means that it trusts any contract.
If a contract is trusted, the user interface will not give any warnings when called by the contract.
===Safemethods===
-The safemethods field is an array containing a set of method names. It can also be assigned with a wildcard *. If it is a wildcard *, then it means that all methods of the contract are safe.
+The safemethods
field is an array containing a set of method names. It can also be assigned with a wildcard *
. If it is a wildcard *
, then it means that all methods of the contract are safe.
-If a method is marked as safe, the user interface will not give any warnings when it is called by any other contract.
\ No newline at end of file
+If a method is marked as safe, the user interface will not give any warnings when it is called by any other contract.
+
+===Extra===
+
+The extra
field describes the custom user data, such as name, code version, author, description, etc.
\ No newline at end of file
From 36ccdebbcf26335b504814cb39e3d8201bdb8777 Mon Sep 17 00:00:00 2001
From: bettybao1209 <1062108372@qq.com>
Date: Fri, 20 Mar 2020 17:19:41 +0800
Subject: [PATCH 03/19] minor fix
---
nep-14.mediawiki | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/nep-14.mediawiki b/nep-14.mediawiki
index 1ee3d276..53effa65 100644
--- a/nep-14.mediawiki
+++ b/nep-14.mediawiki
@@ -45,16 +45,16 @@ The NeoContract Manifest is defined by JSON format, which has the following basi
The groups
field is an array of Group objects which represent a set of mutually trusted contracts. A contract will trust and allow any contract in the same group to invoke it, and the user interface will not give any warnings.
-A group is identified by a public key and must be accompanied by a signature for the contract hash to prove that the contract is indeed included in the group.
+A group
is identified by a public key and must be accompanied by a signature for the contract hash to prove that the contract is indeed included in the group.
{ - "pubKey": "028e92a0f582bd3517497eff1a9beb41821991b8589bfcba20c2f40746f5c170a1", - "signature": "f6dbce908e291f5d8a81450292a3674f48ef8079306d613b3783dc263287704a0ef48f47679aa12b7d5e598fdb52d63ca7566afbe0e239437191d05698837e3b" + "pubKey": "0333b24ee50a488caa5deec7e021ff515f57b7993b93b45d7df901e23ee3004916", + "signature": "bAhbpx1J8eIPLb5\u002BfvDIRQTbX0doilPxQO\u002BQKS\u002B3fpgyjTwV73UPrv0qsb6I3ZuQjfCA7xoePl5rU508B7k\u002B7w==" }-Where
pubKey
represents the public key of the group and signature is the signature of the contract hash.
+Where pubKey
represents the public key of the group and signature
is the signature of the contract hash encoded in Base64.
===Features===
@@ -90,9 +90,9 @@ The definition of the Permission
object is as follows:
The contract
field indicates the contract to be invoked. It can be a hash of a contract, a public key of a group, or a wildcard *
.
-If it specifies a hash of a contract, then the contract will be invoked; If it specifies a public key of a group, then any contract in this group will be invoked; If it specifies a wildcard *, then any contract will be invoked.
+If it specifies a hash of a contract, then the contract will be invoked; If it specifies a public key of a group, then any contract in this group will be invoked; If it specifies a wildcard *
, then any contract will be invoked.
-The methods
field is an array containing a set of methods to be called. It can also be assigned with a wildcard *
. If it is a wildcard *
, then it means that any method can be called.
+The methods
field is an array containing a set of methods to be called. It can also be assigned with a wildcard *
, which means that any method can be called.
If a contract invokes a contract or method that is not declared in the manifest at runtime, the invocation will fail.
From 0eb142ea4a783ef50c75d718c224812be2c51166 Mon Sep 17 00:00:00 2001
From: bettybao1209 <1062108372@qq.com>
Date: Fri, 20 Mar 2020 17:25:46 +0800
Subject: [PATCH 04/19] add author
---
README.mediawiki | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.mediawiki b/README.mediawiki
index 79cd90a4..427632a3 100644
--- a/README.mediawiki
+++ b/README.mediawiki
@@ -77,7 +77,7 @@ First review [[nep-1.mediawiki|NEP-1]]. Then clone the repository and add your N
|-
| [[nep-14.mediawiki|14]]
| NeoContract Manifest
-| Erik Zhang, shargon, Vitor Nazário Coelho, Li Jianying
+| Erik Zhang, shargon, Vitor Nazário Coelho, Igor Machado Coelho, Li Jianying
| Standard
| Final
|-
From fc14a72ed5bbc2c28a05d731d2fbcb809ed06de2 Mon Sep 17 00:00:00 2001
From: bettybao1209 <1062108372@qq.com>
Date: Fri, 20 Mar 2020 18:10:09 +0800
Subject: [PATCH 05/19] modify abstract
---
nep-14.mediawiki | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/nep-14.mediawiki b/nep-14.mediawiki
index 53effa65..31e8b36f 100644
--- a/nep-14.mediawiki
+++ b/nep-14.mediawiki
@@ -9,9 +9,7 @@
==Abstract==
-When a smart contract is deployed, it must explicitly declare the features and permissions it will use. When it is running, it will be limited by its declared list of features and permissions, and cannot make any behavior beyond the scope of the list.
-
-This NEP describes the Manifest standards for NEO smart contracts.
+A Manifest is a file containing metadata for a group of accompanying files. For example, the files of a computer program may have a manifest describing name, trust information, permissions required for execution.
==Motivation==
From b812157d9f1be81be46defeff9faad3bdddb9f97 Mon Sep 17 00:00:00 2001
From: bettybao1209 <1062108372@qq.com>
Date: Fri, 20 Mar 2020 18:17:36 +0800
Subject: [PATCH 06/19] restore Sentence
---
nep-14.mediawiki | 2 ++
1 file changed, 2 insertions(+)
diff --git a/nep-14.mediawiki b/nep-14.mediawiki
index 31e8b36f..89a466eb 100644
--- a/nep-14.mediawiki
+++ b/nep-14.mediawiki
@@ -11,6 +11,8 @@
A Manifest is a file containing metadata for a group of accompanying files. For example, the files of a computer program may have a manifest describing name, trust information, permissions required for execution.
+This NEP describes the Manifest standards for NEO smart contracts.
+
==Motivation==
There should be a way to expose the access control over the contract. To achieve this, we need a mechanism for describing the features and permissions of smart contracts. With NeoContract Manifest, developers can have clear recognition about the contract and easily create programs to invoke the contract.
From 4d4f7d13cc4830b3e686b464cd7d5d2e58594cd3 Mon Sep 17 00:00:00 2001
From: bettybao1209 <1062108372@qq.com>
Date: Sun, 22 Mar 2020 09:33:25 +0800
Subject: [PATCH 07/19] name changed
---
README.mediawiki | 2 +-
nep-14.mediawiki | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.mediawiki b/README.mediawiki
index 427632a3..561f6445 100644
--- a/README.mediawiki
+++ b/README.mediawiki
@@ -77,7 +77,7 @@ First review [[nep-1.mediawiki|NEP-1]]. Then clone the repository and add your N
|-
| [[nep-14.mediawiki|14]]
| NeoContract Manifest
-| Erik Zhang, shargon, Vitor Nazário Coelho, Igor Machado Coelho, Li Jianying
+| Erik Zhang, Fernando Díaz Toledano, Vitor Nazário Coelho, Igor Machado Coelho, Li Jianying
| Standard
| Final
|-
diff --git a/nep-14.mediawiki b/nep-14.mediawiki
index 89a466eb..4f8eea14 100644
--- a/nep-14.mediawiki
+++ b/nep-14.mediawiki
@@ -1,7 +1,7 @@
NEP: 14 Title: NeoContract Manifest - Author: Erik Zhang@@ -111,4 +112,8 @@ If a method is marked as safe, the user interface will not give any warnings whe ===Extra=== -The, shargon , Vitor Nazário Coelho , Igor Machado Coelho , Li Jianying + Author: Erik Zhang , Fernando Díaz Toledano , Vitor Nazário Coelho , Igor Machado Coelho , Li Jianying Type: Standard Status: Final Created: 2020-03-20 From 3e492ad05d9de97abb6524fb9a73714e2cdc5461 Mon Sep 17 00:00:00 2001 From: erikzhang Date: Fri, 27 Mar 2020 15:24:14 +0800 Subject: [PATCH 08/19] Fix NEP numbers and links --- nep-14.mediawiki => nep-15.mediawiki | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename nep-14.mediawiki => nep-15.mediawiki (97%) diff --git a/nep-14.mediawiki b/nep-15.mediawiki similarity index 97% rename from nep-14.mediawiki rename to nep-15.mediawiki index 4f8eea14..60ce5449 100644 --- a/nep-14.mediawiki +++ b/nep-15.mediawiki @@ -1,10 +1,11 @@ - NEP: 14 + NEP: 15 Title: NeoContract Manifest Author: Erik Zhang==Abstract== @@ -73,7 +74,7 @@ The, Fernando Díaz Toledano , Vitor Nazário Coelho , Igor Machado Coelho , Li Jianying Type: Standard - Status: Final + Status: Accepted Created: 2020-03-20 + Requires: 14 payable
field is a boolean value indicating whether the contrac ===ABI=== -For technical details of ABI, please refer to [https://github.com/neo-project/proposals/blob/master/nep-3.mediawiki NEP-3: NeoContract ABI]. +For technical details of ABI, please refer to [https://github.com/neo-project/proposals/pull/119 NEP-14: NeoContract ABI]. ===Permissions=== From c299630812c973e84ebc14a2f1cef49dba145cb8 Mon Sep 17 00:00:00 2001 From: ShargonDate: Wed, 8 Jul 2020 14:04:45 +0200 Subject: [PATCH 09/19] Update for https://github.com/neo-project/neo/pull/1729 https://github.com/neo-project/neo/pull/1729 --- nep-15.mediawiki | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nep-15.mediawiki b/nep-15.mediawiki index 60ce5449..76c8a938 100644 --- a/nep-15.mediawiki +++ b/nep-15.mediawiki @@ -37,7 +37,8 @@ The NeoContract Manifest is defined by JSON format, which has the following basi "permissions": [], "trusts": [], "safemethods": [], - "extra": {} + "extra": {}, + "supportedstandards": [] }
extra
field describes the custom user data, such as name, code version, author, description, etc.
\ No newline at end of file
+The extra
field describes the custom user data, such as name, code version, author, description, etc.
+
+===SupportedStandards===
+
+The supportedstandards
field describes the [https://github.com/bettybao1209/proposals/blob/master/nep-10.mediawiki NEP-10] values.
From 2fb470127c22914d61f64f43ba3bb5030b5282c9 Mon Sep 17 00:00:00 2001
From: erikzhang storage
field is a boolean value indicating whether the contrac
The payable
field is a boolean value indicating whether the contract accepts transfers. The value true means that it accepts, and false means not.
+===SupportedStandards===
+
+The supportedstandards
field describes the [https://github.com/bettybao1209/proposals/blob/master/nep-10.mediawiki NEP-10] values.
+
===ABI===
For technical details of ABI, please refer to [https://github.com/neo-project/proposals/pull/119 NEP-14: NeoContract ABI].
@@ -113,7 +117,3 @@ If a method is marked as safe, the user interface will not give any warnings whe
===Extra===
The extra
field describes the custom user data, such as name, code version, author, description, etc.
-
-===SupportedStandards===
-
-The supportedstandards
field describes the [https://github.com/bettybao1209/proposals/blob/master/nep-10.mediawiki NEP-10] values.
From 7d1ca352f8c8a4e2ec0167aa9a5ec05d4b5ba27b Mon Sep 17 00:00:00 2001
From: bettybao1209 { + "name":"", "groups": [], - "features": {}, "supportedstandards": [], "abi": {}, "permissions": [], @@ -43,6 +43,10 @@ The NeoContract Manifest is defined by JSON format, which has the following basi+===name=== + +The
name
is the name of the contract, which can be any valid identifier.
+
===Groups===
The groups
field is an array of Group objects which represent a set of mutually trusted contracts. A contract will trust and allow any contract in the same group to invoke it, and the user interface will not give any warnings.
@@ -58,21 +62,6 @@ A group
is identified by a public key and must be accompanied by a
Where pubKey
represents the public key of the group and signature
is the signature of the contract hash encoded in Base64.
-===Features===
-
-The features
field describes what features are available for the contract.
-
--{ - "storage": true, - "payable": true -} -- -The
storage
field is a boolean value indicating whether the contract has a storage. The value true means that it has, and false means not.
-
-The payable
field is a boolean value indicating whether the contract accepts transfers. The value true means that it accepts, and false means not.
-
===SupportedStandards===
The supportedstandards
field describes the [https://github.com/bettybao1209/proposals/blob/master/nep-10.mediawiki NEP-10] values.
From 973eed2708348836a72fde5f2b668761ca6576e0 Mon Sep 17 00:00:00 2001
From: bettybao1209 trusts
field is an array containing a set of contract hashes or
If a contract is trusted, the user interface will not give any warnings when called by the contract.
-===Safemethods===
-
-The safemethods
field is an array containing a set of method names. It can also be assigned with a wildcard *
. If it is a wildcard *
, then it means that all methods of the contract are safe.
-
-If a method is marked as safe, the user interface will not give any warnings when it is called by any other contract.
-
===Extra===
The extra
field describes the custom user data, such as name, code version, author, description, etc.
From db8ca0bc2da5bb1470a4f266474522c8d0c973ba Mon Sep 17 00:00:00 2001
From: Erik Zhang name
is the name of the contract, which can be any valid identifier.
-===Groups===
+The groups
field is an array of Group
objects which represent a set of mutually trusted contracts. A contract will trust and allow any contract in the same group to invoke it, and the user interface will not give any warnings.
+
+The supportedstandards
field describes the [https://github.com/bettybao1209/proposals/blob/master/nep-10.mediawiki NEP-10] values.
+
+The abi
field describes which methods and events are included in the contract and how other contracts interact with them. For technical details of ABI, please refer to [https://github.com/neo-project/proposals/pull/119 NEP-14: NeoContract ABI].
-The groups
field is an array of Group objects which represent a set of mutually trusted contracts. A contract will trust and allow any contract in the same group to invoke it, and the user interface will not give any warnings.
+The permissions
field is an array containing a set of Permission
objects. It describes which contracts may be invoked and which methods are called.
-A group
is identified by a public key and must be accompanied by a signature for the contract hash to prove that the contract is indeed included in the group.
+The trusts
field is an array containing a set of contract hashes or group public keys. It can also be assigned with a wildcard *
. If it is a wildcard *
, then it means that it trusts any contract. If a contract is trusted, the user interface will not give any warnings when called by the contract.
+
+The extra
field describes the custom user data, such as name, code version, author, description, etc.
+
+===Group===
+
+A Group
is identified by a public key and must be accompanied by a signature for the contract hash to prove that the contract is indeed included in the group.
{ @@ -61,17 +69,7 @@ Agroup
is identified by a public key and must be accompanied by a WherepubKey
represents the public key of the group andsignature
is the signature of the contract hash encoded in Base64. -===SupportedStandards=== - -Thesupportedstandards
field describes the [https://github.com/bettybao1209/proposals/blob/master/nep-10.mediawiki NEP-10] values. - -===ABI=== - -For technical details of ABI, please refer to [https://github.com/neo-project/proposals/pull/119 NEP-14: NeoContract ABI]. - -===Permissions=== - -Thepermissions
field is an array containing a set ofPermission
objects. It describes which contracts may be invoked and which methods are called. +===Permission=== The definition of thePermission
object is as follows: @@ -89,13 +87,3 @@ If it specifies a hash of a contract, then the contract will be invoked; If it s Themethods
field is an array containing a set of methods to be called. It can also be assigned with a wildcard*
, which means that any method can be called. If a contract invokes a contract or method that is not declared in the manifest at runtime, the invocation will fail. - -===Trusts=== - -Thetrusts
field is an array containing a set of contract hashes or group public keys. It can also be assigned with a wildcard*
. If it is a wildcard*
, then it means that it trusts any contract. - -If a contract is trusted, the user interface will not give any warnings when called by the contract. - -===Extra=== - -Theextra
field describes the custom user data, such as name, code version, author, description, etc. From 48ce600347871335cbd1c21faab11c4cedfad057 Mon Sep 17 00:00:00 2001 From: Erik ZhangDate: Thu, 14 Jan 2021 18:59:07 +0800 Subject: [PATCH 14/19] Fix link --- nep-15.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nep-15.mediawiki b/nep-15.mediawiki index be3c0d83..1e4b6a0f 100644 --- a/nep-15.mediawiki +++ b/nep-15.mediawiki @@ -46,7 +46,7 @@ The name
is the name of the contract, which can be any valid identi Thegroups
field is an array ofGroup
objects which represent a set of mutually trusted contracts. A contract will trust and allow any contract in the same group to invoke it, and the user interface will not give any warnings. -Thesupportedstandards
field describes the [https://github.com/bettybao1209/proposals/blob/master/nep-10.mediawiki NEP-10] values. +Thesupportedstandards
field describes the [[obsolete/nep-1.mediawiki|NEP-10]] values. Theabi
field describes which methods and events are included in the contract and how other contracts interact with them. For technical details of ABI, please refer to [https://github.com/neo-project/proposals/pull/119 NEP-14: NeoContract ABI]. From de0ce45bb46b04ea753720cf2b7d1dfbe7faebd1 Mon Sep 17 00:00:00 2001 From: Erik ZhangDate: Thu, 14 Jan 2021 18:59:55 +0800 Subject: [PATCH 15/19] Fix --- nep-15.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nep-15.mediawiki b/nep-15.mediawiki index 1e4b6a0f..77956f7e 100644 --- a/nep-15.mediawiki +++ b/nep-15.mediawiki @@ -46,7 +46,7 @@ The name
is the name of the contract, which can be any valid identi Thegroups
field is an array ofGroup
objects which represent a set of mutually trusted contracts. A contract will trust and allow any contract in the same group to invoke it, and the user interface will not give any warnings. -Thesupportedstandards
field describes the [[obsolete/nep-1.mediawiki|NEP-10]] values. +Thesupportedstandards
field describes the [[obsolete/nep-10.mediawiki|NEP-10]] values. Theabi
field describes which methods and events are included in the contract and how other contracts interact with them. For technical details of ABI, please refer to [https://github.com/neo-project/proposals/pull/119 NEP-14: NeoContract ABI]. From e74039ea73808c9aad444f2c79474ca386623fb7 Mon Sep 17 00:00:00 2001 From: Erik ZhangDate: Thu, 14 Jan 2021 21:49:19 +0800 Subject: [PATCH 16/19] Add extension name --- nep-15.mediawiki | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nep-15.mediawiki b/nep-15.mediawiki index 77956f7e..6e86b15b 100644 --- a/nep-15.mediawiki +++ b/nep-15.mediawiki @@ -56,6 +56,8 @@ The trusts
field is an array containing a set of contract hashes or Theextra
field describes the custom user data, such as name, code version, author, description, etc. +The extension name of the manifest file should be.manifest.json
. + ===Group=== AGroup
is identified by a public key and must be accompanied by a signature for the contract hash to prove that the contract is indeed included in the group. From 7f3383f83916afcf8f1bf1ae43f39c870dcac01c Mon Sep 17 00:00:00 2001 From: Erik ZhangDate: Sun, 18 Apr 2021 10:10:38 +0800 Subject: [PATCH 17/19] Add features --- nep-15.mediawiki | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nep-15.mediawiki b/nep-15.mediawiki index 6e86b15b..8d9acd58 100644 --- a/nep-15.mediawiki +++ b/nep-15.mediawiki @@ -31,8 +31,9 @@ The NeoContract Manifest is defined by JSON format, which has the following basi { - "name":"", + "name": "", "groups": [], + "features": [], "supportedstandards": [], "abi": {}, "permissions": [], @@ -46,6 +47,8 @@ Thename
is the name of the contract, which can be any valid identi Thegroups
field is an array ofGroup
objects which represent a set of mutually trusted contracts. A contract will trust and allow any contract in the same group to invoke it, and the user interface will not give any warnings. +Thefeatures
field will be used for future expansion and should always be an empty array for now. + Thesupportedstandards
field describes the [[obsolete/nep-10.mediawiki|NEP-10]] values. Theabi
field describes which methods and events are included in the contract and how other contracts interact with them. For technical details of ABI, please refer to [https://github.com/neo-project/proposals/pull/119 NEP-14: NeoContract ABI]. From 61a431f4f76ff12f9256154b139c703656d9c0a1 Mon Sep 17 00:00:00 2001 From: Erik ZhangDate: Sun, 18 Apr 2021 22:42:27 +0800 Subject: [PATCH 18/19] Update nep-15.mediawiki --- nep-15.mediawiki | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nep-15.mediawiki b/nep-15.mediawiki index 8d9acd58..6ca5fd1b 100644 --- a/nep-15.mediawiki +++ b/nep-15.mediawiki @@ -33,7 +33,7 @@ The NeoContract Manifest is defined by JSON format, which has the following basi { "name": "", "groups": [], - "features": [], + "features": {}, "supportedstandards": [], "abi": {}, "permissions": [], @@ -47,7 +47,7 @@ The name
is the name of the contract, which can be any valid identi Thegroups
field is an array ofGroup
objects which represent a set of mutually trusted contracts. A contract will trust and allow any contract in the same group to invoke it, and the user interface will not give any warnings. -Thefeatures
field will be used for future expansion and should always be an empty array for now. +Thefeatures
field will be used for future expansion and should always be an empty object for now. Thesupportedstandards
field describes the [[obsolete/nep-10.mediawiki|NEP-10]] values. From 873781bd8504ef16178cea14cd97c638559d7bb9 Mon Sep 17 00:00:00 2001 From: Erik ZhangDate: Thu, 29 Jul 2021 15:14:05 +0800 Subject: [PATCH 19/19] Final --- README.mediawiki | 4 ++-- nep-15.mediawiki | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.mediawiki b/README.mediawiki index 2694e467..987b26f7 100644 --- a/README.mediawiki +++ b/README.mediawiki @@ -63,11 +63,11 @@ First review [[nep-1.mediawiki|NEP-1]]. Then clone the repository and add your N | Standard | Final |- -| [https://github.com/neo-project/proposals/pull/114 15] +| [[nep-15.mediawiki|15]] | NeoContract Manifest | Erik Zhang, Fernando Díaz Toledano, Vitor Nazário Coelho, Igor Machado Coelho, Li Jianying | Standard -| Accepted +| Final |- | [[nep-16.mediawiki|16]] | NEO Executable Format (NEF) diff --git a/nep-15.mediawiki b/nep-15.mediawiki index 6ca5fd1b..60e4cbd9 100644 --- a/nep-15.mediawiki +++ b/nep-15.mediawiki @@ -3,7 +3,7 @@ Title: NeoContract Manifest Author: Erik Zhang , Fernando Díaz Toledano , Vitor Nazário Coelho , Igor Machado Coelho , Li Jianying Type: Standard - Status: Accepted + Status: Final Created: 2020-03-20 Requires: 14