diff --git a/docs/faq/basic.md b/docs/faq/basic.md
index b957309..fd8fe3c 100644
--- a/docs/faq/basic.md
+++ b/docs/faq/basic.md
@@ -52,7 +52,7 @@ Since each new block is require to pass majority consensus, forks may not occur.
Neo consensus nodes are elected by NEO holders. The network itself is permissionless; anyone may register as a candidate or cast a vote for a candidate. Candidates with a sufficient share of the total number of votes are elected as Neo Council members. The top 7 of these 21 Council members are the network's consensus (validator) nodes.
-For more information, visit the following [link](https://docs.neo.org/docs/en-us/basic/consensus/vote_validator.html).
+For more information, visit the following [link](../n3/foundation/consensus/vote_validator.md).
## How do I check the status of my transaction?
diff --git a/docs/n3/develop/deploy/invoke.md b/docs/n3/develop/deploy/invoke.md
index 2094a55..7c6bd95 100644
--- a/docs/n3/develop/deploy/invoke.md
+++ b/docs/n3/develop/deploy/invoke.md
@@ -8,7 +8,7 @@ You can query a contract details using Neo-CLI or Neo-GUI, such as the contract
### Querying using Neo-CLI
-Use the RPC API [getcontractstate method](../../reference/rpc/latest-version/api/getcontractstate.md) to query the contract information.
+Use the RPC API [getcontractstate method](../../reference/rpc/getcontractstate.md) to query the contract information.
### Querying using Neo-GUI
@@ -31,7 +31,7 @@ You can choose one of the following ways to invoke the contract using Neo-CLI:
For more information refer to [invoke](../../node/cli/cli.md#invoke).
-- Use the RPC API [invokefunction](../../reference/rpc/latest-version/api/invokefunction.md) or [invokescript](../../reference/rpc/latest-version/api/invokescript.md). The former is recommended.
+- Use the RPC API [invokefunction](../../reference/rpc/invokefunction.md) or [invokescript](../../reference/rpc/invokescript.md). The former is recommended.
### Invoking a contract using Neo-GUI
@@ -108,7 +108,7 @@ The key statement is `Contract.Call(scriptHash, method, flags, params)`, where:
### Invocation permission
-Three fields related to the contract invocation permission are defined in the contract manifest file, as shown in the following table. The wallet decides whether to give a security warning to the user based on the setting in the Groups and Trusts fields. Permissions and signature scopes determine whether contracts can be called by each other. For more information about signature scopes, refer to parameters description in [invokefunction method](../../reference/rpc/latest-version/api/invokefunction.md).
+Three fields related to the contract invocation permission are defined in the contract manifest file, as shown in the following table. The wallet decides whether to give a security warning to the user based on the setting in the Groups and Trusts fields. Permissions and signature scopes determine whether contracts can be called by each other. For more information about signature scopes, refer to parameters description in [invokefunction method](../../reference/rpc/invokefunction.md).
| Fields | Type | Description |
| ------------- | ----------------------------- | ------------------------------------------------------------ |
diff --git a/docs/n3/develop/write/basics.md b/docs/n3/develop/write/basics.md
index a037f9e..e497ef8 100644
--- a/docs/n3/develop/write/basics.md
+++ b/docs/n3/develop/write/basics.md
@@ -24,8 +24,7 @@ namespace Helloworld
public class Contract1 : SmartContract
{
//TODO: Replace it with your own address.
- [InitialValue("NiNmXL8FjEUEs1nfX9uHFBNaenxDHJtmuB", ContractParameterType.Hash160)]
- static readonly UInt160 Owner = default;
+ static readonly UInt160 Owner = "NiNmXL8FjEUEs1nfX9uHFBNaenxDHJtmuB";
private static bool IsOwner() => Runtime.CheckWitness(Owner);
@@ -69,8 +68,7 @@ Inside the contract class, the property defined with `static readonly` or `const
```cs
// Represents onwner of this contract, which is a fixed address. Usually should be the contract creator
-[InitialValue("NiNmXL8FjEUEs1nfX9uHFBNaenxDHJtmuB", ContractParameterType.Hash160)]
-static readonly UInt160 Owner = default;
+static readonly UInt160 Owner = "NiNmXL8FjEUEs1nfX9uHFBNaenxDHJtmuB";
// A constant number
private const ulong factor = 100000000;
@@ -196,8 +194,8 @@ You can declare more features:
[ContractSourceCode("https://github.com/neo-project/neo-devpack-dotnet/tree/master/examples/")]
[ContractVersion("0.0.1")]
[DisplayName("SampleNep17Token")]
-[SupportedStandards("NEP-17")]
-[ContractPermission("*", "onNEP17Payment")]
+[SupportedStandards(NepStandard.Nep17)]
+[ContractPermission(Permission.Any, "onNEP17Payment")]
[ContractTrust("0x0a0b00ff00ff00ff00ff00ff00ff00ff00ff00a4")]
[ManifestExtra("WebSite", "https://neo.org")]
public class Contract1 : SmartContract
@@ -210,7 +208,7 @@ public class Contract1 : SmartContract
```
- `DisplayName`: The name of the nef and manifest.json files generated by the compiler, and the DisplayName is also written to the name field of manifest.json.
-- `SupportedStandards`: The NEP standards the contract conform to, such as NEP-17, a token standard on Neo.
+- `SupportedStandards`: The NEP standards the contract conform to, such as `NepStandard.Nep17`, a token standard on Neo.
- `ContractPermission` : The permission requested by the contract, and `ContractTrust` indicates which contracts trust the contract to call itself. See [invocation-permission](../deploy/invoke.md#invocation-permission).
- `ContractAuthor`: The author field, which can be filled with the author's name and email address. It will output to the extra json object in manifest.json.
- `ContractEmail`: The email field. It will be output to the extra json object in manifest.json.
@@ -224,7 +222,9 @@ The generated manifest is as follows:
```json
{
"name": "SampleNep17Token",
- "supportedstandards": [],
+ "supportedstandards": [
+ "NEP-17"
+ ],
"abi": {
},
"permissions": [
diff --git a/docs/n3/develop/write/difference.md b/docs/n3/develop/write/difference.md
index 54d2a14..062c424 100644
--- a/docs/n3/develop/write/difference.md
+++ b/docs/n3/develop/write/difference.md
@@ -57,9 +57,9 @@ using System;
| | Neo Legacy | Neo N3 |
| ----------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
-| Contract info | You need to fill in contract information such as the name, author, email, etc. when deploying the contract. | Add the contract features to the contract file, written as [C# Features](https://docs.microsoft.com/zh-cn/dotnet/csharp/programming-guide/concepts/attributes/), for example:
[ManifestExtra("Author", "Neo")]
[ManifestExtra("Email", "dev@neo.org")]
[ContractTrust("\*")]
[ContractPermission("\*", "\*")]
[SupportedStandards("NEP-17")]
[ManifestExtra("Description", "This is a contract example")]
public class Contract1 : SmartContract |
+| Contract info | You need to fill in contract information such as the name, author, email, etc. when deploying the contract. | Add the contract features to the contract file, written as [C# Features](https://docs.microsoft.com/zh-cn/dotnet/csharp/programming-guide/concepts/attributes/), for example:
[ContractAuthor("core-dev", "dev@neo.org")]
[ContractEmail("dev@neo.org")]
[ContractDescription("A sample NEP-17 token")]
[ContractPermission(Permission.Any, Method.Any)]
[ContractTrust(Permission.Any)]
[SupportedStandards(NepStandard.Nep17)]
public class Contract1 : SmartContract |
| Contract function | When deploying a contract, you need to declare contract features such as whether to use storage, whether it can be called dynamically, and whether to accept NEP-5 assets. | All contracts can use the storage and dynamic calls by default. You can implement the OnNEP17Payment method to accept NEP-17 assets and implement the OnNEP11Payment method to accept NEP-11 (NFT standard) assets. |
-| Declare support for NEP | Code example:
public static string[] SupportedStandards()
{
string[] result = { "NEP-5", "NEP-7", "NEP-10" };
return result;
} | Directly add the feature to the contract class name `[SupportedStandards("NEP-17")]` |
+| Declare support for NEP | Code example:
public static string[] SupportedStandards()
{
string[] result = { "NEP-11", "NEP-17", "NEP-24" };
return result;
} | Directly add the feature to the contract class name `[SupportedStandards(NepStandard.Nep17)]` |
### Declaration of static variables
@@ -72,8 +72,7 @@ private static readonly byte[] InitialOwnerScriptHash = "AJhZmdHxW44FWMiMxD5bTiF
Neo N3
```cs
-[InitialValue("NiNmXL8FjEUEs1nfX9uHFBNaenxDHJtmuB", ContractParameterType.Hash160)]
-static readonly UInt160 Owner = default;
+static readonly UInt160 Owner = "NiNmXL8FjEUEs1nfX9uHFBNaenxDHJtmuB";
```
### Methods and Events
diff --git a/docs/n3/develop/write/nep11.md b/docs/n3/develop/write/nep11.md
index d48dbe9..0185d67 100644
--- a/docs/n3/develop/write/nep11.md
+++ b/docs/n3/develop/write/nep11.md
@@ -74,12 +74,11 @@ using System;
namespace Contract1
{
- [SupportedStandards("NEP-11")]
+ [SupportedStandards(NepStandard.Nep11)]
public class Contract1 : Nep11Token
{
//TODO: Replace it with your own address.
- [InitialValue("NiNmXL8FjEUEs1nfX9uHFBNaenxDHJtmuB", ContractParameterType.Hash160)]
- static readonly UInt160 Owner = default;
+ static readonly UInt160 Owner = "NiNmXL8FjEUEs1nfX9uHFBNaenxDHJtmuB";
private static bool IsOwner() => Runtime.CheckWitness(Owner);
@@ -155,7 +154,7 @@ The base class `Nep11Token` also provides the following methods and events:
### Compatibility check
-Compatibility checks will be activated for any contract that includes the `[SupportedStandards("NEP-17")]` or `[SupportedStandards("NEP-11")]` attribute.
+Compatibility checks will be activated for any contract that includes the `[SupportedStandards(NepStandard.Nep17)]` or `[SupportedStandards(NepStandard.Nep11)]` attribute.
The Compatibility Check reviews method names, parameters, return values, events, and similar elements to ensure they comply with the standard, and alerts about any failures in the check.
### NFT Royalty Standard
diff --git a/docs/n3/develop/write/nep17.md b/docs/n3/develop/write/nep17.md
index 4a98b73..889785d 100644
--- a/docs/n3/develop/write/nep17.md
+++ b/docs/n3/develop/write/nep17.md
@@ -286,7 +286,7 @@ The name method is moved to the manifest file, and you need to add `[DisplayName
[ContractAuthor("core-dev", "dev@neo.org")]
[ContractEmail("dev@neo.org")]
[ContractDescription("This is a NEP17 example")]
-[SupportedStandards("NEP-17")]
+[SupportedStandards(NepStandard.Nep17)]
public class NEP17 : Nep17Token
{
public override string Symbol { [Safe] get => "EXAMPLE"; }
@@ -309,6 +309,6 @@ The ability of the contract to receive assets has been changed from a fixed cons
### Compatibility check
-Compatibility checks will be activated for any contract that includes the `[SupportedStandards("NEP-17")]` or `[SupportedStandards("NEP-11")]` attribute.
+Compatibility checks will be activated for any contract that includes the `[SupportedStandards(NepStandard.Nep17)]`, `[SupportedStandards(NepStandard.Nep11)]` or `[SupportedStandards(NepStandard.Nep24)]` attribute.
The Compatibility Check reviews method names, parameters, return values, events, and similar elements to ensure they comply with the standard, and alerts about any failures in the check.
diff --git a/docs/n3/exchange/client.md b/docs/n3/exchange/client.md
index 3b1ee43..2a5679d 100644
--- a/docs/n3/exchange/client.md
+++ b/docs/n3/exchange/client.md
@@ -84,7 +84,7 @@ There are two methods to generate deposit addresses:
- When the user deposit (NEO/GAS) for the first time, the program dynamically generates a NEO address. The advantage is that there is no need to generate addresses at fixed time intervals, while the disadvantage is that it's not convenient for backup.
- To develop the program to dynamically generate addresses, use the RpcServer API [getnewaddress Method](../reference/rpc/latest-version/api/getnewaddress). The created address is returned.
+ To develop the program to dynamically generate addresses, use the RpcServer API [getnewaddress Method](../reference/rpc/getnewaddress). The created address is returned.
- The exchange creates a batch of NEO addresses in advance. When the user charges (NEO/GAS) for the first time, the exchange assigns a NEO address to him or her. The advantage is the convenience to backup the wallet, while the disadvantage is the need to generate NEO addresses manually.
To generate addresses in batch, run the NEO- CLI command `create address [n]`. The addresses are exported automatically to the address.txt file.
diff --git a/docs/n3/exchange/gas.md b/docs/n3/exchange/gas.md
index 6392f84..2c6b0ca 100644
--- a/docs/n3/exchange/gas.md
+++ b/docs/n3/exchange/gas.md
@@ -45,7 +45,7 @@ The following RPC method can be used to help exchanges query users' GAS informat
| Method | Description |
| ------------------------------------------------------------ | ------------------------------------------------------- |
-| [getunclaimedgas](../reference/rpc/latest-version/api/getunclaimedgas.md) | Returns the unclaimed GAS amount in the current wallet. |
+| [getunclaimedgas](../reference/rpc/getunclaimedgas.md) | Returns the unclaimed GAS amount in the current wallet. |
## Claiming GAS
diff --git a/docs/n3/foundation/Wallets.md b/docs/n3/foundation/Wallets.md
index cf3eab8..6a16113 100644
--- a/docs/n3/foundation/Wallets.md
+++ b/docs/n3/foundation/Wallets.md
@@ -369,7 +369,7 @@ Example:
The full-node wallet is a complete backup of blockchain data, which saves all the onchain data and participates in p2p network, therefore it needs a large storage space.
-Neo-CLI and Neo-GUI are all full-node wallet. For more information refer to [Neo node](../../node/introduction.md).
+Neo-CLI and Neo-GUI are all full-node wallet. For more information refer to [Neo node](../node/introduction.md).
### SPV wallet
diff --git a/docs/n3/node/cli/config.md b/docs/n3/node/cli/config.md
index f257d2a..6203ae7 100644
--- a/docs/n3/node/cli/config.md
+++ b/docs/n3/node/cli/config.md
@@ -106,7 +106,7 @@ The following table lists all the plugins:
|Plugin|Description|API Included||
|--- |--- |--- |--- |
-|ApplicationLogs|Synchronizes the smart contract log with the NativeContract log (Notify)|[getapplicationlog](../../reference/rpc/latest-version/api/getapplicationlog)|Recommended|
+|ApplicationLogs|Synchronizes the smart contract log with the NativeContract log (Notify)|[getapplicationlog](../../reference/rpc/getapplicationlog)|Recommended|
|DBFTPlugin|dBFT consensus plugin||Mandatory when served as a consensus node|
|LevelDBStore|Uses LevelDB to store the blockchain data||Mandatory|
|MPTTrie|Uses LevelDB to store the MPT data||Mandatory when served as a StateRoot consensus node|
@@ -115,8 +115,8 @@ The following table lists all the plugins:
|RpcServer|Enables RPC for the node|[RPC API](../../reference/rpc/latest-version/api)|Mandatory|
|SQLiteWallet|A SQLite-based wallet provider that supports wallet files with .db3 suffix||Optional|
|StatesDumper|Exports Neo-CLI status data.||Optional|
-|StateService|StateRoot consensus service plugin|[getstateroot](../../reference/rpc/latest-version/api/getstateroot) [getproof](../../reference/rpc/latest-version/api/getproof) [verifyproof](../../reference/rpc/latest-version/api/verifyproof.md) [getstateheight](../../reference/rpc/latest-version/api/getstateheight.md) |Mandatory when served as a StateRoot consensus node|
-|TokensTracker|Enquiries NEP-11 and NEP-17 assets balance and transactions history of accounts through RPC|[getnep11balances](../../reference/rpc/latest-version/api/getnep11balances) [getnep11properties](../../reference/rpc/latest-version/api/getnep11properties) [getnep11transfers](../../reference/rpc/latest-version/api/getnep11transfers) [getnep17balances](../../reference/rpc/latest-version/api/getnep17balances) [getnep17transfers](../../reference/rpc/latest-version/api/getnep17transfers) |Recommended|
+|StateService|StateRoot consensus service plugin|[getstateroot](../../reference/rpc/getstateroot) [getproof](../../reference/rpc/getproof) [verifyproof](../../reference/rpc/verifyproof.md) [getstateheight](../../reference/rpc/getstateheight.md) |Mandatory when served as a StateRoot consensus node|
+|TokensTracker|Enquiries NEP-11 and NEP-17 assets balance and transactions history of accounts through RPC|[getnep11balances](../../reference/rpc/getnep11balances) [getnep11properties](../../reference/rpc/getnep11properties) [getnep11transfers](../../reference/rpc/getnep11transfers) [getnep17balances](../../reference/rpc/getnep17balances) [getnep17transfers](../../reference/rpc/getnep17transfers) |Recommended|
You can choose one of the following ways to install plugins:
diff --git a/docs/n3/reference/rpc/api.md b/docs/n3/reference/rpc/api.md
new file mode 100644
index 0000000..37364e0
--- /dev/null
+++ b/docs/n3/reference/rpc/api.md
@@ -0,0 +1,191 @@
+# API Reference
+
+Each NEO-CLI node provides an API interface for obtaining blockchain data from it, making it easy to develop blockchain applications. The interface is provided via [JSON-RPC](http://wiki.geekdream.com/Specification/json-rpc_2.0.html), and the underlying protocol uses HTTP/HTTPS for communication.
+
+To start a node that provides an RPC service, you must install the plugin [RpcServer](https://github.com/neo-project/neo-modules/releases). Refer to [Installing plugins](../../node/cli/config#installing-plugins) for instructions. No need to add an argument when starting Neo-CLI.
+
+:::note
+
+If the desired version of file is not found during installation, it is because the corresponding version of RpcServer plug-in has not been released yet. In that case, you can compile the project [neo-modules](https://github.com/neo-project/neo-modules) by yourself:
+
+1. Create the folder Plugins under the directory where neo-cli.dll locates.
+2. Put the RpcServer file you has complied in the Plugins folder and then restart Neo-CLI.
+
+:::
+
+## Listening ports
+
+After the JSON-RPC server is started, it will listen to the TCP port. By default it is the port 10332 of the local address (127.0.0.1), which is
+
+```
+http://127.0.0.1:10332/
+```
+
+You can modify the port in config.json in the RpcServer folder.
+
+## Command Lists
+
+### Blockchain
+
+| Method | Parameter | Description |
+| --------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------ |
+| [getbestblockhash](getbestblockhash.md) | | Gets the hash of the latest block in the blockchain. |
+| [getblock](getblock.md) | [verbose=0] | Returns the block information with the specified hash value or index. |
+| [getblockcount](getblockcount.md) | | Gets the block count of the blockchain. |
+| [getblockhash](getblockhash.md) | | Returns the block hash with the specified index. |
+| [getblockheader](getblockheader.md) | [verbose=0] | Returns the information of the block header with the specified script hash or index. |
+| [getcommittee](getcommittee.md) | | Gets the public key list of current Neo committee members. |
+| [getnativecontracts](getnativecontracts.md) | | Gets the list of native contracts. |
+| [getnextblockvalidators](getnextblockvalidators.md) | | Gets the validators list of the next block. |
+| [getcontractstate](getcontractstate.md) | | Returns information of the contract with the specified script hash. |
+| [getrawmempool](getrawmempool.md) | [shouldGetUnverified=0] | Gets a list of confirmed transactions in memory. If the value is 1 it gets all the transactions including both confirmed and unconfirmed transactions. |
+| [getrawtransaction](getrawtransaction.md) | [verbose=0] | Returns the transaction information with the specified hash value. |
+| [getstorage](getstorage.md) | | Returns the value with the contract script hash and the key. |
+| [gettransactionheight](gettransactionheight.md) | | Returns the transaction height with the specified transaction hash. |
+| [findStorage](findStorage.md) | \ | Finds storage items by contract ID or script hash and prefix. |
+
+
+### Node
+
+| Method | Parameter | Description |
+| --------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------ |
+| [getconnectioncount](getconnectioncount.md) | | Gets the current connection count of the node. |
+| [getpeers](getpeers.md) | | Gets a list of nodes that are currently connected/disconnected by this node. |
+| [getversion](getversion.md) | | Gets the version information of the node. |
+| [sendrawtransaction](sendrawtransaction.md) | | Broadcasts a transaction over the network. |
+| [submitblock](submitblock.md) | | Submits a new block to the network.
**Note**: Need to be a validator |
+
+### Smart Contract
+
+| Method | Parameter | Description |
+| --------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------ |
+| [getunclaimedgas](getunclaimedgas.md) | | Get unclaimed gas of the specified address. |
+| [invokefunction](invokefunction.md) | \[params] \[sender] \[signers] | Invokes a smart contract with the specified script hash, passing in the method name and its params. |
+| [invokescript](invokescript.md) |