Skip to content

Commit

Permalink
Merge pull request #71 from neo-project/dev
Browse files Browse the repository at this point in the history
master < dev
  • Loading branch information
apisit authored Jun 18, 2023
2 parents c22a1b0 + 545e193 commit 52be662
Show file tree
Hide file tree
Showing 91 changed files with 5,064 additions and 2,718 deletions.
8 changes: 8 additions & 0 deletions docs/n3/Advances/Neo VM instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ The constant instructions mainly complete the function of pushing constants or a
| Fee | 0.00000001 GAS, 0.00000001 GAS, 0.00000001 GAS, 0.00000001 GAS, 0.00000004 GAS, 0.00000004 GAS |
| Function | Push an integer onto the stack, the bit length of which is specified with the number 8\16\32\64\128\256. |

#### PUSHT/PUSHF

| Instruction | PUSHT, PUSHF |
| ----------- | ------------------------------------------------- |
| Bytecode | 0x08, 0x09 |
| Fee | 0.00000001 GAS |
| Function | Push the Boolean value True/False onto the stack. |

#### PUSHA

| Instruction | PUSHA |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label": "NeoFS",
"position": 9
"position": 1
}

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label": "NeoNS",
"position": 10
"position": 2
}

File renamed without changes.
118 changes: 59 additions & 59 deletions docs/n3/neons/api/addRoot.md → docs/n3/Advances/neons/api/addRoot.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
# addRoot

Registers the top-level domain, which can be added by the Neo Committee only. You need to input the committee multi-signature address signature to generate a new transaction.

:::note
Currently only ".neo" is supported.
:::


### Parameters

| Name | Type | Description | Required |
| :--- | ------ | -------------------------- | -------- |
| root | String | The top-level domain name. | Required |

### Example

Request body

```json5
curl --request POST \
--url http://seed1t4.neo.org:20332/ \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "invokefunction",
"params": [ "0x152fa9ceeb2c83f40e3d3d6da6c1f8898dd4891a", "addRoot",
[{"type":"String","value":"test"}],
[
{
"account": "Nfm8y1ZQMmiMwBQhzYqS9cfu3sX4ESAT5g",
"scopes": "CalledByEntry"
}
]
],
"id": 1
}
'
```

Response body

```json5
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"script": "DAR0ZXN0EcAfDAdhZGRSb290DBQaidSNifjBpm09PQ70gyzrzqkvFUFifVtS",
"state": "HALT",
"gasconsumed": "524180",
"exception": null,
"stack": [
{
"type": "Any"
}
]
}
}
```
# addRoot

Registers the top-level domain, which can be added by the Neo Committee only. You need to input the committee multi-signature address signature to generate a new transaction.

:::note
Currently only ".neo" is supported.
:::


### Parameters

| Name | Type | Description | Required |
| :--- | ------ | -------------------------- | -------- |
| root | String | The top-level domain name. | Required |

### Example

Request body

```json5
curl --request POST \
--url http://seed1t4.neo.org:20332/ \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "invokefunction",
"params": [ "0x152fa9ceeb2c83f40e3d3d6da6c1f8898dd4891a", "addRoot",
[{"type":"String","value":"test"}],
[
{
"account": "Nfm8y1ZQMmiMwBQhzYqS9cfu3sX4ESAT5g",
"scopes": "CalledByEntry"
}
]
],
"id": 1
}
'
```

Response body

```json5
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"script": "DAR0ZXN0EcAfDAdhZGRSb290DBQaidSNifjBpm09PQ70gyzrzqkvFUFifVtS",
"state": "HALT",
"gasconsumed": "524180",
"exception": null,
"stack": [
{
"type": "Any"
}
]
}
}
```
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
# balanceOf

Gets the number of second-level domain names of the given address.

If the domain has expired, it counts still.



### Parameters

| Name | Type | Description | Required |
| ----- | ------- | -------------------------------- | -------- |
| owner | Address | The address of the domain owner. | Required |

### Example

Request body

```json5
curl --request POST \
--url http://seed1t4.neo.org:20332/ \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "invokefunction",
"params": [ "0x152fa9ceeb2c83f40e3d3d6da6c1f8898dd4891a", "balanceOf",
[
{
"type":"Hash160","value":"0x713c5666c9710bf6933572cf134a2a8f518f1a30"
}
],
[
{
"account": "NMzaUBM56iumJ8pHfjjCuKsAepKxENkUqN",
"scopes": "CalledByEntry"
}
]
],
"id": 1
}
'
```

Response body

```json5
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"script": "DBQwGo9RjypKE89yNZP2C3HJZlY8cRHAHwwJYmFsYW5jZU9mDBQaidSNifjBpm09PQ70gyzrzqkvFUFifVtS",
"state": "HALT",
"gasconsumed": "265986",
"exception": null,
"stack": [
{
"type": "Integer",
"value": "4"
}
]
}
}
```
# balanceOf

Gets the number of second-level domain names of the given address.

If the domain has expired, it counts still.



### Parameters

| Name | Type | Description | Required |
| ----- | ------- | -------------------------------- | -------- |
| owner | Address | The address of the domain owner. | Required |

### Example

Request body

```json5
curl --request POST \
--url http://seed1t4.neo.org:20332/ \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "invokefunction",
"params": [ "0x152fa9ceeb2c83f40e3d3d6da6c1f8898dd4891a", "balanceOf",
[
{
"type":"Hash160","value":"0x713c5666c9710bf6933572cf134a2a8f518f1a30"
}
],
[
{
"account": "NMzaUBM56iumJ8pHfjjCuKsAepKxENkUqN",
"scopes": "CalledByEntry"
}
]
],
"id": 1
}
'
```

Response body

```json5
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"script": "DBQwGo9RjypKE89yNZP2C3HJZlY8cRHAHwwJYmFsYW5jZU9mDBQaidSNifjBpm09PQ70gyzrzqkvFUFifVtS",
"state": "HALT",
"gasconsumed": "265986",
"exception": null,
"stack": [
{
"type": "Integer",
"value": "4"
}
]
}
}
```
Loading

0 comments on commit 52be662

Please sign in to comment.