diff --git a/nep-3.mediawiki b/nep-3.mediawiki index aeb2c56b..d75b5356 100644 --- a/nep-3.mediawiki +++ b/nep-3.mediawiki @@ -32,7 +32,6 @@ The NeoContract ABI is defined by JSON format, which has the following basic str
{ "hash": "0x562851057d8afbc08fabc8c438d7cc771aef2195", - "entryPoint": {}, "methods": [], "events": [] } @@ -40,8 +39,6 @@ The NeoContract ABI is defined by JSON format, which has the following basic strhash
is the script hash of the contract. It is encoded as a hexadecimal string in big-endian. -entryPoint
is a Method object which describe the details of the entrypoint of the contract. -methods
is an array of Method objects which describe the details of each method in the contract.events
is an array of Event objects which describe the details of each event in the contract. @@ -53,6 +50,7 @@ Method object has the following structure:{ "name": "transfer", + "offset": 0, "parameters": [], "returntype": "Boolean" } @@ -60,6 +58,8 @@ Method object has the following structure:name
is the name of the method, which can be any valid identifier. +offset
is the offset of this method in the script. +parameters
is an array of Parameter objects which describe the details of each parameter in the method.returntype
indicates the return type of the method. It can be one of the following values:Signature
,Boolean
,Integer
,Hash160
,Hash256
,ByteArray
,PublicKey
,String
,Array
,InteropInterface
,Void
. @@ -138,26 +138,3 @@ ParameterType enum has the following values: | Void | Void means that the method has no return value. This value cannot be the type of a parameter. |} - -===EntryPoint=== - -It is strongly recommended that each contract have the following entry point: - --{ - "name": "main", - "parameters": [ - { - "name": "operation", - "type": "String" - }, - { - "name": "args", - "type": "Array" - } - ], - "returntype": "Any" -} -- -In this way, the caller can easily access the methods through the entry point, specifying the name of the method to be invoked with the first parameter, and specifying the parameters of the method with the second parameter.