Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RPC method getnativecontracts #462

Merged
merged 32 commits into from
Jan 14, 2021

Conversation

chenzhitong
Copy link
Member

close #460

陈志同 and others added 21 commits November 25, 2020 00:36
* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* draft

* draft

* update

* fixed bug with decimal of GAS consumed in invokefunction/invokescript

* remove modify of invokescript

* Querying contracts by ID/name, server side

* update

* Enable using native.name for search

Enable using native.name for search

* Using keyword instead of addressOrScriptHash

* revert

* _initialize

* split

* update

* Update exception message in ApplicationLog

* Update src/ApplicationLogs/LogReader.cs

Co-authored-by: Luchuan <[email protected]>

* update

* a

* More fix

* fix

* Fixed UT

* Simplify Code

* Simplify Code 2

* Update RpcServer

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>
…ject#413)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal

* fix
* [RpcServer] Querying contracts by ID/name (neo-project#378)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* draft

* draft

* update

* fixed bug with decimal of GAS consumed in invokefunction/invokescript

* remove modify of invokescript

* Querying contracts by ID/name, server side

* update

* Enable using native.name for search

Enable using native.name for search

* Using keyword instead of addressOrScriptHash

* revert

* _initialize

* split

* update

* Update exception message in ApplicationLog

* Update src/ApplicationLogs/LogReader.cs

Co-authored-by: Luchuan <[email protected]>

* update

* a

* More fix

* fix

* Fixed UT

* Simplify Code

* Simplify Code 2

* Update RpcServer

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>

* MPT in StateService from core (neo-project#410)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal (neo-project#413)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal

* fix

* Fixed UT (Neo CI01089)

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>
Co-authored-by: ZhangTao <[email protected]>
* [RpcServer] Querying contracts by ID/name (neo-project#378)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* draft

* draft

* update

* fixed bug with decimal of GAS consumed in invokefunction/invokescript

* remove modify of invokescript

* Querying contracts by ID/name, server side

* update

* Enable using native.name for search

Enable using native.name for search

* Using keyword instead of addressOrScriptHash

* revert

* _initialize

* split

* update

* Update exception message in ApplicationLog

* Update src/ApplicationLogs/LogReader.cs

Co-authored-by: Luchuan <[email protected]>

* update

* a

* More fix

* fix

* Fixed UT

* Simplify Code

* Simplify Code 2

* Update RpcServer

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>

* String Substitution

* Modify filename and name methods

* update

* update

* Update src/RpcClient/Models/RpcNep5TokenInfo.cs

Co-authored-by: Vitor Nazário Coelho <[email protected]>

* Update src/RpcClient/Nep17API.cs

Co-authored-by: Vitor Nazário Coelho <[email protected]>

* MPT in StateService from core (neo-project#410)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal (neo-project#413)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal

* fix

* Fixed UT (Neo CI01089)

* Update Nep17API.cs

* Update README.md

Co-authored-by: Owen Zhang <[email protected]>

* update filename

* Fix UT

* Format

* fix

* update

* update UT

* Add Unit Tests

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>
Co-authored-by: ZhangTao <[email protected]>
* [RpcServer] Querying contracts by ID/name (neo-project#378)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* draft

* draft

* update

* fixed bug with decimal of GAS consumed in invokefunction/invokescript

* remove modify of invokescript

* Querying contracts by ID/name, server side

* update

* Enable using native.name for search

Enable using native.name for search

* Using keyword instead of addressOrScriptHash

* revert

* _initialize

* split

* update

* Update exception message in ApplicationLog

* Update src/ApplicationLogs/LogReader.cs

Co-authored-by: Luchuan <[email protected]>

* update

* a

* More fix

* fix

* Fixed UT

* Simplify Code

* Simplify Code 2

* Update RpcServer

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>

* MPT in StateService from core (neo-project#410)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal (neo-project#413)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal

* fix

* Fixed UT (Neo CI01089) (neo-project#416)

* [RpcServer] Querying contracts by ID/name (neo-project#378)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* draft

* draft

* update

* fixed bug with decimal of GAS consumed in invokefunction/invokescript

* remove modify of invokescript

* Querying contracts by ID/name, server side

* update

* Enable using native.name for search

Enable using native.name for search

* Using keyword instead of addressOrScriptHash

* revert

* _initialize

* split

* update

* Update exception message in ApplicationLog

* Update src/ApplicationLogs/LogReader.cs

Co-authored-by: Luchuan <[email protected]>

* update

* a

* More fix

* fix

* Fixed UT

* Simplify Code

* Simplify Code 2

* Update RpcServer

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>

* MPT in StateService from core (neo-project#410)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal (neo-project#413)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal

* fix

* Fixed UT (Neo CI01089)

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>
Co-authored-by: ZhangTao <[email protected]>

* Nep17 (neo-project#412)

* [RpcServer] Querying contracts by ID/name (neo-project#378)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* draft

* draft

* update

* fixed bug with decimal of GAS consumed in invokefunction/invokescript

* remove modify of invokescript

* Querying contracts by ID/name, server side

* update

* Enable using native.name for search

Enable using native.name for search

* Using keyword instead of addressOrScriptHash

* revert

* _initialize

* split

* update

* Update exception message in ApplicationLog

* Update src/ApplicationLogs/LogReader.cs

Co-authored-by: Luchuan <[email protected]>

* update

* a

* More fix

* fix

* Fixed UT

* Simplify Code

* Simplify Code 2

* Update RpcServer

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>

* String Substitution

* Modify filename and name methods

* update

* update

* Update src/RpcClient/Models/RpcNep5TokenInfo.cs

Co-authored-by: Vitor Nazário Coelho <[email protected]>

* Update src/RpcClient/Nep17API.cs

Co-authored-by: Vitor Nazário Coelho <[email protected]>

* MPT in StateService from core (neo-project#410)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal (neo-project#413)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal

* fix

* Fixed UT (Neo CI01089)

* Update Nep17API.cs

* Update README.md

Co-authored-by: Owen Zhang <[email protected]>

* update filename

* Fix UT

* Format

* fix

* update

* update UT

* Add Unit Tests

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>
Co-authored-by: ZhangTao <[email protected]>

* merge

* fixed bug

* clear

* UT

* Add a little code coverage

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>
Co-authored-by: ZhangTao <[email protected]>
* Preview4

* Remove syslog in README.md
Compile failure of RpcNep17Tracker (neo-project#447)
Fix the bug that getnextblockvalidators return empty when there is no…
@chenzhitong
Copy link
Member Author

Request:

{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getnativecontracts",
    "params": []
}

Response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
        {
            "name": "ContractManagement",
            "script": "D0Ea93tn",
            "nef": {
                "magic": 860243278,
                "compiler": "ScriptBuilder",
                "version": "3.0",
                "tokens": [],
                "script": "D0Ea93tn",
                "checksum": 4234537066
            },
            "hash": "0xbee421fdbb3e791265d2104cb34934f53fcc0e45",
            "id": -1,
            "manifest": {
                "name": "ContractManagement",
                "groups": [],
                "supportedstandards": [],
                "abi": {
                    "methods": [
                        {
                            "name": "getMinimumDeploymentFee",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "setMinimumDeploymentFee",
                            "parameters": [
                                {
                                    "name": "value",
                                    "type": "Integer"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Void",
                            "safe": false
                        },
                        {
                            "name": "getContract",
                            "parameters": [
                                {
                                    "name": "hash",
                                    "type": "Hash160"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Array",
                            "safe": true
                        },
                        {
                            "name": "deploy",
                            "parameters": [
                                {
                                    "name": "nefFile",
                                    "type": "ByteArray"
                                },
                                {
                                    "name": "manifest",
                                    "type": "ByteArray"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Array",
                            "safe": false
                        },
                        {
                            "name": "update",
                            "parameters": [
                                {
                                    "name": "nefFile",
                                    "type": "ByteArray"
                                },
                                {
                                    "name": "manifest",
                                    "type": "ByteArray"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Void",
                            "safe": false
                        },
                        {
                            "name": "destroy",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Void",
                            "safe": false
                        }
                    ],
                    "events": [
                        {
                            "name": "Deploy",
                            "parameters": [
                                {
                                    "name": "Hash",
                                    "type": "Hash160"
                                }
                            ]
                        },
                        {
                            "name": "Update",
                            "parameters": [
                                {
                                    "name": "Hash",
                                    "type": "Hash160"
                                }
                            ]
                        },
                        {
                            "name": "Destroy",
                            "parameters": [
                                {
                                    "name": "Hash",
                                    "type": "Hash160"
                                }
                            ]
                        }
                    ]
                },
                "permissions": [
                    {
                        "contract": "*",
                        "methods": "*"
                    }
                ],
                "trusts": [],
                "extra": null
            },
            "activeBlockIndex": 0
        },
        {
            "name": "NeoToken",
            "script": "AP5BGvd7Zw==",
            "nef": {
                "magic": 860243278,
                "compiler": "ScriptBuilder",
                "version": "3.0",
                "tokens": [],
                "script": "AP5BGvd7Zw==",
                "checksum": 4259551467
            },
            "hash": "0x4961bf0ab79370b23dc45cde29f568d0e0fa6e93",
            "id": -2,
            "manifest": {
                "name": "NeoToken",
                "groups": [],
                "supportedstandards": [
                    "NEP-17"
                ],
                "abi": {
                    "methods": [
                        {
                            "name": "totalSupply",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "setGasPerBlock",
                            "parameters": [
                                {
                                    "name": "gasPerBlock",
                                    "type": "Integer"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        },
                        {
                            "name": "getGasPerBlock",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "unclaimedGas",
                            "parameters": [
                                {
                                    "name": "account",
                                    "type": "Hash160"
                                },
                                {
                                    "name": "end",
                                    "type": "Integer"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "registerCandidate",
                            "parameters": [
                                {
                                    "name": "pubkey",
                                    "type": "ByteArray"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        },
                        {
                            "name": "unregisterCandidate",
                            "parameters": [
                                {
                                    "name": "pubkey",
                                    "type": "ByteArray"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        },
                        {
                            "name": "vote",
                            "parameters": [
                                {
                                    "name": "account",
                                    "type": "Hash160"
                                },
                                {
                                    "name": "voteTo",
                                    "type": "ByteArray"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        },
                        {
                            "name": "getCandidates",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Array",
                            "safe": true
                        },
                        {
                            "name": "getCommittee",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Array",
                            "safe": true
                        },
                        {
                            "name": "getNextBlockValidators",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Array",
                            "safe": true
                        },
                        {
                            "name": "balanceOf",
                            "parameters": [
                                {
                                    "name": "account",
                                    "type": "Hash160"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "transfer",
                            "parameters": [
                                {
                                    "name": "from",
                                    "type": "Hash160"
                                },
                                {
                                    "name": "to",
                                    "type": "Hash160"
                                },
                                {
                                    "name": "amount",
                                    "type": "Integer"
                                },
                                {
                                    "name": "data",
                                    "type": "Any"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        },
                        {
                            "name": "symbol",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "String",
                            "safe": true
                        },
                        {
                            "name": "decimals",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        }
                    ],
                    "events": [
                        {
                            "name": "Transfer",
                            "parameters": [
                                {
                                    "name": "from",
                                    "type": "Hash160"
                                },
                                {
                                    "name": "to",
                                    "type": "Hash160"
                                },
                                {
                                    "name": "amount",
                                    "type": "Integer"
                                }
                            ]
                        }
                    ]
                },
                "permissions": [
                    {
                        "contract": "*",
                        "methods": "*"
                    }
                ],
                "trusts": [],
                "extra": null
            },
            "activeBlockIndex": 0
        },
        {
            "name": "GasToken",
            "script": "AP1BGvd7Zw==",
            "nef": {
                "magic": 860243278,
                "compiler": "ScriptBuilder",
                "version": "3.0",
                "tokens": [],
                "script": "AP1BGvd7Zw==",
                "checksum": 571607263
            },
            "hash": "0x9ac04cf223f646de5f7faccafe34e30e5d4382a2",
            "id": -3,
            "manifest": {
                "name": "GasToken",
                "groups": [],
                "supportedstandards": [
                    "NEP-17"
                ],
                "abi": {
                    "methods": [
                        {
                            "name": "totalSupply",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "balanceOf",
                            "parameters": [
                                {
                                    "name": "account",
                                    "type": "Hash160"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "transfer",
                            "parameters": [
                                {
                                    "name": "from",
                                    "type": "Hash160"
                                },
                                {
                                    "name": "to",
                                    "type": "Hash160"
                                },
                                {
                                    "name": "amount",
                                    "type": "Integer"
                                },
                                {
                                    "name": "data",
                                    "type": "Any"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        },
                        {
                            "name": "symbol",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "String",
                            "safe": true
                        },
                        {
                            "name": "decimals",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        }
                    ],
                    "events": [
                        {
                            "name": "Transfer",
                            "parameters": [
                                {
                                    "name": "from",
                                    "type": "Hash160"
                                },
                                {
                                    "name": "to",
                                    "type": "Hash160"
                                },
                                {
                                    "name": "amount",
                                    "type": "Integer"
                                }
                            ]
                        }
                    ]
                },
                "permissions": [
                    {
                        "contract": "*",
                        "methods": "*"
                    }
                ],
                "trusts": [],
                "extra": null
            },
            "activeBlockIndex": 0
        },
        {
            "name": "PolicyContract",
            "script": "APxBGvd7Zw==",
            "nef": {
                "magic": 860243278,
                "compiler": "ScriptBuilder",
                "version": "3.0",
                "tokens": [],
                "script": "APxBGvd7Zw==",
                "checksum": 1792437732
            },
            "hash": "0xc939a4af1c762e5edca36d4b61c06ba82c4c6ff5",
            "id": -4,
            "manifest": {
                "name": "PolicyContract",
                "groups": [],
                "supportedstandards": [],
                "abi": {
                    "methods": [
                        {
                            "name": "getMaxTransactionsPerBlock",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "getMaxBlockSize",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "getMaxBlockSystemFee",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "getFeePerByte",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "getExecFeeFactor",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "getStoragePrice",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "isBlocked",
                            "parameters": [
                                {
                                    "name": "account",
                                    "type": "Hash160"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": true
                        },
                        {
                            "name": "setMaxBlockSize",
                            "parameters": [
                                {
                                    "name": "value",
                                    "type": "Integer"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        },
                        {
                            "name": "setMaxTransactionsPerBlock",
                            "parameters": [
                                {
                                    "name": "value",
                                    "type": "Integer"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        },
                        {
                            "name": "setMaxBlockSystemFee",
                            "parameters": [
                                {
                                    "name": "value",
                                    "type": "Integer"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        },
                        {
                            "name": "setFeePerByte",
                            "parameters": [
                                {
                                    "name": "value",
                                    "type": "Integer"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        },
                        {
                            "name": "setExecFeeFactor",
                            "parameters": [
                                {
                                    "name": "value",
                                    "type": "Integer"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        },
                        {
                            "name": "setStoragePrice",
                            "parameters": [
                                {
                                    "name": "value",
                                    "type": "Integer"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        },
                        {
                            "name": "blockAccount",
                            "parameters": [
                                {
                                    "name": "account",
                                    "type": "Hash160"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        },
                        {
                            "name": "unblockAccount",
                            "parameters": [
                                {
                                    "name": "account",
                                    "type": "Hash160"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        }
                    ],
                    "events": []
                },
                "permissions": [
                    {
                        "contract": "*",
                        "methods": "*"
                    }
                ],
                "trusts": [],
                "extra": null
            },
            "activeBlockIndex": 0
        },
        {
            "name": "RoleManagement",
            "script": "APtBGvd7Zw==",
            "nef": {
                "magic": 860243278,
                "compiler": "ScriptBuilder",
                "version": "3.0",
                "tokens": [],
                "script": "APtBGvd7Zw==",
                "checksum": 1875564659
            },
            "hash": "0xf4bbd95569e8dda2cb84eb609a1488ddd0d9fa91",
            "id": -5,
            "manifest": {
                "name": "RoleManagement",
                "groups": [],
                "supportedstandards": [],
                "abi": {
                    "methods": [
                        {
                            "name": "getDesignatedByRole",
                            "parameters": [
                                {
                                    "name": "role",
                                    "type": "Integer"
                                },
                                {
                                    "name": "index",
                                    "type": "Integer"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Array",
                            "safe": true
                        },
                        {
                            "name": "designateAsRole",
                            "parameters": [
                                {
                                    "name": "role",
                                    "type": "Integer"
                                },
                                {
                                    "name": "nodes",
                                    "type": "Array"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Void",
                            "safe": false
                        }
                    ],
                    "events": []
                },
                "permissions": [
                    {
                        "contract": "*",
                        "methods": "*"
                    }
                ],
                "trusts": [],
                "extra": null
            },
            "activeBlockIndex": 0
        },
        {
            "name": "OracleContract",
            "script": "APpBGvd7Zw==",
            "nef": {
                "magic": 860243278,
                "compiler": "ScriptBuilder",
                "version": "3.0",
                "tokens": [],
                "script": "APpBGvd7Zw==",
                "checksum": 3970697217
            },
            "hash": "0x8cd3889136056b3304ec59f6d424b8767710ed79",
            "id": -6,
            "manifest": {
                "name": "OracleContract",
                "groups": [],
                "supportedstandards": [],
                "abi": {
                    "methods": [
                        {
                            "name": "finish",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Void",
                            "safe": false
                        },
                        {
                            "name": "request",
                            "parameters": [
                                {
                                    "name": "url",
                                    "type": "String"
                                },
                                {
                                    "name": "filter",
                                    "type": "String"
                                },
                                {
                                    "name": "callback",
                                    "type": "String"
                                },
                                {
                                    "name": "userData",
                                    "type": "Any"
                                },
                                {
                                    "name": "gasForResponse",
                                    "type": "Integer"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Void",
                            "safe": false
                        },
                        {
                            "name": "verify",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": true
                        }
                    ],
                    "events": [
                        {
                            "name": "OracleRequest",
                            "parameters": [
                                {
                                    "name": "Id",
                                    "type": "Integer"
                                },
                                {
                                    "name": "RequestContract",
                                    "type": "Hash160"
                                },
                                {
                                    "name": "Url",
                                    "type": "String"
                                },
                                {
                                    "name": "Filter",
                                    "type": "String"
                                }
                            ]
                        },
                        {
                            "name": "OracleResponse",
                            "parameters": [
                                {
                                    "name": "Id",
                                    "type": "Integer"
                                },
                                {
                                    "name": "OriginalTx",
                                    "type": "Hash256"
                                }
                            ]
                        }
                    ]
                },
                "permissions": [
                    {
                        "contract": "*",
                        "methods": "*"
                    }
                ],
                "trusts": [],
                "extra": null
            },
            "activeBlockIndex": 0
        },
        {
            "name": "NameService",
            "script": "APlBGvd7Zw==",
            "nef": {
                "magic": 860243278,
                "compiler": "ScriptBuilder",
                "version": "3.0",
                "tokens": [],
                "script": "APlBGvd7Zw==",
                "checksum": 2817451339
            },
            "hash": "0xa92fbe5bf164170a624474841485b20b45a26047",
            "id": -7,
            "manifest": {
                "name": "NameService",
                "groups": [],
                "supportedstandards": [],
                "abi": {
                    "methods": [
                        {
                            "name": "addRoot",
                            "parameters": [
                                {
                                    "name": "root",
                                    "type": "String"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Void",
                            "safe": false
                        },
                        {
                            "name": "setPrice",
                            "parameters": [
                                {
                                    "name": "price",
                                    "type": "Integer"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Void",
                            "safe": false
                        },
                        {
                            "name": "getPrice",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "isAvailable",
                            "parameters": [
                                {
                                    "name": "name",
                                    "type": "String"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": true
                        },
                        {
                            "name": "register",
                            "parameters": [
                                {
                                    "name": "name",
                                    "type": "String"
                                },
                                {
                                    "name": "owner",
                                    "type": "Hash160"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        },
                        {
                            "name": "renew",
                            "parameters": [
                                {
                                    "name": "name",
                                    "type": "String"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": false
                        },
                        {
                            "name": "setAdmin",
                            "parameters": [
                                {
                                    "name": "name",
                                    "type": "String"
                                },
                                {
                                    "name": "admin",
                                    "type": "Hash160"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Void",
                            "safe": false
                        },
                        {
                            "name": "setRecord",
                            "parameters": [
                                {
                                    "name": "name",
                                    "type": "String"
                                },
                                {
                                    "name": "type",
                                    "type": "Integer"
                                },
                                {
                                    "name": "data",
                                    "type": "String"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Void",
                            "safe": false
                        },
                        {
                            "name": "getRecord",
                            "parameters": [
                                {
                                    "name": "name",
                                    "type": "String"
                                },
                                {
                                    "name": "type",
                                    "type": "Integer"
                                }
                            ],
                            "offset": 0,
                            "returntype": "String",
                            "safe": true
                        },
                        {
                            "name": "deleteRecord",
                            "parameters": [
                                {
                                    "name": "name",
                                    "type": "String"
                                },
                                {
                                    "name": "type",
                                    "type": "Integer"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Void",
                            "safe": false
                        },
                        {
                            "name": "resolve",
                            "parameters": [
                                {
                                    "name": "name",
                                    "type": "String"
                                },
                                {
                                    "name": "type",
                                    "type": "Integer"
                                }
                            ],
                            "offset": 0,
                            "returntype": "String",
                            "safe": true
                        },
                        {
                            "name": "totalSupply",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "ownerOf",
                            "parameters": [
                                {
                                    "name": "tokenId",
                                    "type": "ByteArray"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Hash160",
                            "safe": true
                        },
                        {
                            "name": "properties",
                            "parameters": [
                                {
                                    "name": "tokenId",
                                    "type": "ByteArray"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Any",
                            "safe": true
                        },
                        {
                            "name": "balanceOf",
                            "parameters": [
                                {
                                    "name": "owner",
                                    "type": "Hash160"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        },
                        {
                            "name": "tokensOf",
                            "parameters": [
                                {
                                    "name": "owner",
                                    "type": "Hash160"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Any",
                            "safe": true
                        },
                        {
                            "name": "transfer",
                            "parameters": [
                                {
                                    "name": "to",
                                    "type": "Hash160"
                                },
                                {
                                    "name": "tokenId",
                                    "type": "ByteArray"
                                }
                            ],
                            "offset": 0,
                            "returntype": "Boolean",
                            "safe": false
                        },
                        {
                            "name": "symbol",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "String",
                            "safe": true
                        },
                        {
                            "name": "decimals",
                            "parameters": [],
                            "offset": 0,
                            "returntype": "Integer",
                            "safe": true
                        }
                    ],
                    "events": [
                        {
                            "name": "Transfer",
                            "parameters": [
                                {
                                    "name": "from",
                                    "type": "Hash160"
                                },
                                {
                                    "name": "to",
                                    "type": "Hash160"
                                },
                                {
                                    "name": "amount",
                                    "type": "Integer"
                                },
                                {
                                    "name": "tokenId",
                                    "type": "ByteArray"
                                }
                            ]
                        }
                    ]
                },
                "permissions": [
                    {
                        "contract": "*",
                        "methods": "*"
                    }
                ],
                "trusts": [],
                "extra": null
            },
            "activeBlockIndex": 0
        }
    ]
}

@chenzhitong
Copy link
Member Author

TODO: sync to RpcClient.

shargon
shargon previously approved these changes Jan 13, 2021
Copy link
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such a good and quick programming!
I will soon test.

But fell free to merge before my reply.

@vncoelho
Copy link
Member

I will test after #453 because my setup now relies all on Modules...aehauheua

Copy link
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
  "jsonrpc": "2.0",
  "id": 5,
  "result": [
    {
      "id": -1,
      "hash": "0xbee421fdbb3e791265d2104cb34934f53fcc0e45",
      "nef": {
        "magic": 860243278,
        "compiler": "ScriptBuilder",
        "version": "3.0",
        "tokens": [],
        "script": "D0Ea93tn",
        "checksum": 4234537066
      },
      "manifest": {
        "name": "ContractManagement",
        "groups": [],
        "supportedstandards": [],
        "abi": {
          "methods": [
            {
              "name": "getMinimumDeploymentFee",
              "parameters": [],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "setMinimumDeploymentFee",
              "parameters": [
                {
                  "name": "value",
                  "type": "Integer"
                }
              ],
              "offset": 0,
              "returntype": "Void",
              "safe": false
            },
            {
              "name": "getContract",
              "parameters": [
                {
                  "name": "hash",
                  "type": "Hash160"
                }
              ],
              "offset": 0,
              "returntype": "Array",
              "safe": true
            },
            {
              "name": "deploy",
              "parameters": [
                {
                  "name": "nefFile",
                  "type": "ByteArray"
                },
                {
                  "name": "manifest",
                  "type": "ByteArray"
                }
              ],
              "offset": 0,
              "returntype": "Array",
              "safe": false
            },
            {
              "name": "update",
              "parameters": [
                {
                  "name": "nefFile",
                  "type": "ByteArray"
                },
                {
                  "name": "manifest",
                  "type": "ByteArray"
                }
              ],
              "offset": 0,
              "returntype": "Void",
              "safe": false
            },
            {
              "name": "destroy",
              "parameters": [],
              "offset": 0,
              "returntype": "Void",
              "safe": false
            }
          ],
          "events": [
            {
              "name": "Deploy",
              "parameters": [
                {
                  "name": "Hash",
                  "type": "Hash160"
                }
              ]
            },
            {
              "name": "Update",
              "parameters": [
                {
                  "name": "Hash",
                  "type": "Hash160"
                }
              ]
            },
            {
              "name": "Destroy",
              "parameters": [
                {
                  "name": "Hash",
                  "type": "Hash160"
                }
              ]
            }
          ]
        },
        "permissions": [
          {
            "contract": "*",
            "methods": "*"
          }
        ],
        "trusts": [],
        "extra": null
      },
      "activeblockindex": 0
    },
    {
      "id": -2,
      "hash": "0x4961bf0ab79370b23dc45cde29f568d0e0fa6e93",
      "nef": {
        "magic": 860243278,
        "compiler": "ScriptBuilder",
        "version": "3.0",
        "tokens": [],
        "script": "AP5BGvd7Zw==",
        "checksum": 4259551467
      },
      "manifest": {
        "name": "NeoToken",
        "groups": [],
        "supportedstandards": [
          "NEP-17"
        ],
        "abi": {
          "methods": [
            {
              "name": "totalSupply",
              "parameters": [],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "setGasPerBlock",
              "parameters": [
                {
                  "name": "gasPerBlock",
                  "type": "Integer"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            },
            {
              "name": "getGasPerBlock",
              "parameters": [],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "unclaimedGas",
              "parameters": [
                {
                  "name": "account",
                  "type": "Hash160"
                },
                {
                  "name": "end",
                  "type": "Integer"
                }
              ],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "registerCandidate",
              "parameters": [
                {
                  "name": "pubkey",
                  "type": "ByteArray"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            },
            {
              "name": "unregisterCandidate",
              "parameters": [
                {
                  "name": "pubkey",
                  "type": "ByteArray"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            },
            {
              "name": "vote",
              "parameters": [
                {
                  "name": "account",
                  "type": "Hash160"
                },
                {
                  "name": "voteTo",
                  "type": "ByteArray"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            },
            {
              "name": "getCandidates",
              "parameters": [],
              "offset": 0,
              "returntype": "Array",
              "safe": true
            },
            {
              "name": "getCommittee",
              "parameters": [],
              "offset": 0,
              "returntype": "Array",
              "safe": true
            },
            {
              "name": "getNextBlockValidators",
              "parameters": [],
              "offset": 0,
              "returntype": "Array",
              "safe": true
            },
            {
              "name": "balanceOf",
              "parameters": [
                {
                  "name": "account",
                  "type": "Hash160"
                }
              ],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "transfer",
              "parameters": [
                {
                  "name": "from",
                  "type": "Hash160"
                },
                {
                  "name": "to",
                  "type": "Hash160"
                },
                {
                  "name": "amount",
                  "type": "Integer"
                },
                {
                  "name": "data",
                  "type": "Any"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            },
            {
              "name": "symbol",
              "parameters": [],
              "offset": 0,
              "returntype": "String",
              "safe": true
            },
            {
              "name": "decimals",
              "parameters": [],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            }
          ],
          "events": [
            {
              "name": "Transfer",
              "parameters": [
                {
                  "name": "from",
                  "type": "Hash160"
                },
                {
                  "name": "to",
                  "type": "Hash160"
                },
                {
                  "name": "amount",
                  "type": "Integer"
                }
              ]
            }
          ]
        },
        "permissions": [
          {
            "contract": "*",
            "methods": "*"
          }
        ],
        "trusts": [],
        "extra": null
      },
      "activeblockindex": 0
    },
    {
      "id": -3,
      "hash": "0x9ac04cf223f646de5f7faccafe34e30e5d4382a2",
      "nef": {
        "magic": 860243278,
        "compiler": "ScriptBuilder",
        "version": "3.0",
        "tokens": [],
        "script": "AP1BGvd7Zw==",
        "checksum": 571607263
      },
      "manifest": {
        "name": "GasToken",
        "groups": [],
        "supportedstandards": [
          "NEP-17"
        ],
        "abi": {
          "methods": [
            {
              "name": "totalSupply",
              "parameters": [],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "balanceOf",
              "parameters": [
                {
                  "name": "account",
                  "type": "Hash160"
                }
              ],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "transfer",
              "parameters": [
                {
                  "name": "from",
                  "type": "Hash160"
                },
                {
                  "name": "to",
                  "type": "Hash160"
                },
                {
                  "name": "amount",
                  "type": "Integer"
                },
                {
                  "name": "data",
                  "type": "Any"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            },
            {
              "name": "symbol",
              "parameters": [],
              "offset": 0,
              "returntype": "String",
              "safe": true
            },
            {
              "name": "decimals",
              "parameters": [],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            }
          ],
          "events": [
            {
              "name": "Transfer",
              "parameters": [
                {
                  "name": "from",
                  "type": "Hash160"
                },
                {
                  "name": "to",
                  "type": "Hash160"
                },
                {
                  "name": "amount",
                  "type": "Integer"
                }
              ]
            }
          ]
        },
        "permissions": [
          {
            "contract": "*",
            "methods": "*"
          }
        ],
        "trusts": [],
        "extra": null
      },
      "activeblockindex": 0
    },
    {
      "id": -4,
      "hash": "0xc939a4af1c762e5edca36d4b61c06ba82c4c6ff5",
      "nef": {
        "magic": 860243278,
        "compiler": "ScriptBuilder",
        "version": "3.0",
        "tokens": [],
        "script": "APxBGvd7Zw==",
        "checksum": 1792437732
      },
      "manifest": {
        "name": "PolicyContract",
        "groups": [],
        "supportedstandards": [],
        "abi": {
          "methods": [
            {
              "name": "getMaxTransactionsPerBlock",
              "parameters": [],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "getMaxBlockSize",
              "parameters": [],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "getMaxBlockSystemFee",
              "parameters": [],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "getFeePerByte",
              "parameters": [],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "getExecFeeFactor",
              "parameters": [],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "getStoragePrice",
              "parameters": [],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "isBlocked",
              "parameters": [
                {
                  "name": "account",
                  "type": "Hash160"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": true
            },
            {
              "name": "setMaxBlockSize",
              "parameters": [
                {
                  "name": "value",
                  "type": "Integer"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            },
            {
              "name": "setMaxTransactionsPerBlock",
              "parameters": [
                {
                  "name": "value",
                  "type": "Integer"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            },
            {
              "name": "setMaxBlockSystemFee",
              "parameters": [
                {
                  "name": "value",
                  "type": "Integer"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            },
            {
              "name": "setFeePerByte",
              "parameters": [
                {
                  "name": "value",
                  "type": "Integer"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            },
            {
              "name": "setExecFeeFactor",
              "parameters": [
                {
                  "name": "value",
                  "type": "Integer"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            },
            {
              "name": "setStoragePrice",
              "parameters": [
                {
                  "name": "value",
                  "type": "Integer"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            },
            {
              "name": "blockAccount",
              "parameters": [
                {
                  "name": "account",
                  "type": "Hash160"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            },
            {
              "name": "unblockAccount",
              "parameters": [
                {
                  "name": "account",
                  "type": "Hash160"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            }
          ],
          "events": []
        },
        "permissions": [
          {
            "contract": "*",
            "methods": "*"
          }
        ],
        "trusts": [],
        "extra": null
      },
      "activeblockindex": 0
    },
    {
      "id": -5,
      "hash": "0xf4bbd95569e8dda2cb84eb609a1488ddd0d9fa91",
      "nef": {
        "magic": 860243278,
        "compiler": "ScriptBuilder",
        "version": "3.0",
        "tokens": [],
        "script": "APtBGvd7Zw==",
        "checksum": 1875564659
      },
      "manifest": {
        "name": "RoleManagement",
        "groups": [],
        "supportedstandards": [],
        "abi": {
          "methods": [
            {
              "name": "getDesignatedByRole",
              "parameters": [
                {
                  "name": "role",
                  "type": "Integer"
                },
                {
                  "name": "index",
                  "type": "Integer"
                }
              ],
              "offset": 0,
              "returntype": "Array",
              "safe": true
            },
            {
              "name": "designateAsRole",
              "parameters": [
                {
                  "name": "role",
                  "type": "Integer"
                },
                {
                  "name": "nodes",
                  "type": "Array"
                }
              ],
              "offset": 0,
              "returntype": "Void",
              "safe": false
            }
          ],
          "events": []
        },
        "permissions": [
          {
            "contract": "*",
            "methods": "*"
          }
        ],
        "trusts": [],
        "extra": null
      },
      "activeblockindex": 0
    },
    {
      "id": -6,
      "hash": "0x8cd3889136056b3304ec59f6d424b8767710ed79",
      "nef": {
        "magic": 860243278,
        "compiler": "ScriptBuilder",
        "version": "3.0",
        "tokens": [],
        "script": "APpBGvd7Zw==",
        "checksum": 3970697217
      },
      "manifest": {
        "name": "OracleContract",
        "groups": [],
        "supportedstandards": [],
        "abi": {
          "methods": [
            {
              "name": "finish",
              "parameters": [],
              "offset": 0,
              "returntype": "Void",
              "safe": false
            },
            {
              "name": "request",
              "parameters": [
                {
                  "name": "url",
                  "type": "String"
                },
                {
                  "name": "filter",
                  "type": "String"
                },
                {
                  "name": "callback",
                  "type": "String"
                },
                {
                  "name": "userData",
                  "type": "Any"
                },
                {
                  "name": "gasForResponse",
                  "type": "Integer"
                }
              ],
              "offset": 0,
              "returntype": "Void",
              "safe": false
            },
            {
              "name": "verify",
              "parameters": [],
              "offset": 0,
              "returntype": "Boolean",
              "safe": true
            }
          ],
          "events": [
            {
              "name": "OracleRequest",
              "parameters": [
                {
                  "name": "Id",
                  "type": "Integer"
                },
                {
                  "name": "RequestContract",
                  "type": "Hash160"
                },
                {
                  "name": "Url",
                  "type": "String"
                },
                {
                  "name": "Filter",
                  "type": "String"
                }
              ]
            },
            {
              "name": "OracleResponse",
              "parameters": [
                {
                  "name": "Id",
                  "type": "Integer"
                },
                {
                  "name": "OriginalTx",
                  "type": "Hash256"
                }
              ]
            }
          ]
        },
        "permissions": [
          {
            "contract": "*",
            "methods": "*"
          }
        ],
        "trusts": [],
        "extra": null
      },
      "activeblockindex": 0
    },
    {
      "id": -7,
      "hash": "0xa92fbe5bf164170a624474841485b20b45a26047",
      "nef": {
        "magic": 860243278,
        "compiler": "ScriptBuilder",
        "version": "3.0",
        "tokens": [],
        "script": "APlBGvd7Zw==",
        "checksum": 2817451339
      },
      "manifest": {
        "name": "NameService",
        "groups": [],
        "supportedstandards": [],
        "abi": {
          "methods": [
            {
              "name": "addRoot",
              "parameters": [
                {
                  "name": "root",
                  "type": "String"
                }
              ],
              "offset": 0,
              "returntype": "Void",
              "safe": false
            },
            {
              "name": "setPrice",
              "parameters": [
                {
                  "name": "price",
                  "type": "Integer"
                }
              ],
              "offset": 0,
              "returntype": "Void",
              "safe": false
            },
            {
              "name": "getPrice",
              "parameters": [],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "isAvailable",
              "parameters": [
                {
                  "name": "name",
                  "type": "String"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": true
            },
            {
              "name": "register",
              "parameters": [
                {
                  "name": "name",
                  "type": "String"
                },
                {
                  "name": "owner",
                  "type": "Hash160"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            },
            {
              "name": "renew",
              "parameters": [
                {
                  "name": "name",
                  "type": "String"
                }
              ],
              "offset": 0,
              "returntype": "Integer",
              "safe": false
            },
            {
              "name": "setAdmin",
              "parameters": [
                {
                  "name": "name",
                  "type": "String"
                },
                {
                  "name": "admin",
                  "type": "Hash160"
                }
              ],
              "offset": 0,
              "returntype": "Void",
              "safe": false
            },
            {
              "name": "setRecord",
              "parameters": [
                {
                  "name": "name",
                  "type": "String"
                },
                {
                  "name": "type",
                  "type": "Integer"
                },
                {
                  "name": "data",
                  "type": "String"
                }
              ],
              "offset": 0,
              "returntype": "Void",
              "safe": false
            },
            {
              "name": "getRecord",
              "parameters": [
                {
                  "name": "name",
                  "type": "String"
                },
                {
                  "name": "type",
                  "type": "Integer"
                }
              ],
              "offset": 0,
              "returntype": "String",
              "safe": true
            },
            {
              "name": "deleteRecord",
              "parameters": [
                {
                  "name": "name",
                  "type": "String"
                },
                {
                  "name": "type",
                  "type": "Integer"
                }
              ],
              "offset": 0,
              "returntype": "Void",
              "safe": false
            },
            {
              "name": "resolve",
              "parameters": [
                {
                  "name": "name",
                  "type": "String"
                },
                {
                  "name": "type",
                  "type": "Integer"
                }
              ],
              "offset": 0,
              "returntype": "String",
              "safe": true
            },
            {
              "name": "totalSupply",
              "parameters": [],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "ownerOf",
              "parameters": [
                {
                  "name": "tokenId",
                  "type": "ByteArray"
                }
              ],
              "offset": 0,
              "returntype": "Hash160",
              "safe": true
            },
            {
              "name": "properties",
              "parameters": [
                {
                  "name": "tokenId",
                  "type": "ByteArray"
                }
              ],
              "offset": 0,
              "returntype": "Map",
              "safe": true
            },
            {
              "name": "balanceOf",
              "parameters": [
                {
                  "name": "owner",
                  "type": "Hash160"
                }
              ],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            },
            {
              "name": "tokensOf",
              "parameters": [
                {
                  "name": "owner",
                  "type": "Hash160"
                }
              ],
              "offset": 0,
              "returntype": "Any",
              "safe": true
            },
            {
              "name": "transfer",
              "parameters": [
                {
                  "name": "to",
                  "type": "Hash160"
                },
                {
                  "name": "tokenId",
                  "type": "ByteArray"
                }
              ],
              "offset": 0,
              "returntype": "Boolean",
              "safe": false
            },
            {
              "name": "symbol",
              "parameters": [],
              "offset": 0,
              "returntype": "String",
              "safe": true
            },
            {
              "name": "decimals",
              "parameters": [],
              "offset": 0,
              "returntype": "Integer",
              "safe": true
            }
          ],
          "events": [
            {
              "name": "Transfer",
              "parameters": [
                {
                  "name": "from",
                  "type": "Hash160"
                },
                {
                  "name": "to",
                  "type": "Hash160"
                },
                {
                  "name": "amount",
                  "type": "Integer"
                },
                {
                  "name": "tokenId",
                  "type": "ByteArray"
                }
              ]
            }
          ]
        },
        "permissions": [
          {
            "contract": "*",
            "methods": "*"
          }
        ],
        "trusts": [],
        "extra": null
      },
      "activeblockindex": 0
    }
  ]
}

@vncoelho vncoelho merged commit cb57b03 into neo-project:master Jan 14, 2021
joeqian10 pushed a commit to joeqian10/neo-modules that referenced this pull request Apr 7, 2021
* [RpcServer] Querying contracts by ID/name (neo-project#378)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* draft

* draft

* update

* fixed bug with decimal of GAS consumed in invokefunction/invokescript

* remove modify of invokescript

* Querying contracts by ID/name, server side

* update

* Enable using native.name for search

Enable using native.name for search

* Using keyword instead of addressOrScriptHash

* revert

* _initialize

* split

* update

* Update exception message in ApplicationLog

* Update src/ApplicationLogs/LogReader.cs

Co-authored-by: Luchuan <[email protected]>

* update

* a

* More fix

* fix

* Fixed UT

* Simplify Code

* Simplify Code 2

* Update RpcServer

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>

* MPT in StateService from core (neo-project#410)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal (neo-project#413)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal

* fix

* Fixed UT (Neo CI01089) (neo-project#416)

* [RpcServer] Querying contracts by ID/name (neo-project#378)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* draft

* draft

* update

* fixed bug with decimal of GAS consumed in invokefunction/invokescript

* remove modify of invokescript

* Querying contracts by ID/name, server side

* update

* Enable using native.name for search

Enable using native.name for search

* Using keyword instead of addressOrScriptHash

* revert

* _initialize

* split

* update

* Update exception message in ApplicationLog

* Update src/ApplicationLogs/LogReader.cs

Co-authored-by: Luchuan <[email protected]>

* update

* a

* More fix

* fix

* Fixed UT

* Simplify Code

* Simplify Code 2

* Update RpcServer

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>

* MPT in StateService from core (neo-project#410)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal (neo-project#413)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal

* fix

* Fixed UT (Neo CI01089)

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>
Co-authored-by: ZhangTao <[email protected]>

* Nep17 (neo-project#412)

* [RpcServer] Querying contracts by ID/name (neo-project#378)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* draft

* draft

* update

* fixed bug with decimal of GAS consumed in invokefunction/invokescript

* remove modify of invokescript

* Querying contracts by ID/name, server side

* update

* Enable using native.name for search

Enable using native.name for search

* Using keyword instead of addressOrScriptHash

* revert

* _initialize

* split

* update

* Update exception message in ApplicationLog

* Update src/ApplicationLogs/LogReader.cs

Co-authored-by: Luchuan <[email protected]>

* update

* a

* More fix

* fix

* Fixed UT

* Simplify Code

* Simplify Code 2

* Update RpcServer

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>

* String Substitution

* Modify filename and name methods

* update

* update

* Update src/RpcClient/Models/RpcNep5TokenInfo.cs

Co-authored-by: Vitor Nazário Coelho <[email protected]>

* Update src/RpcClient/Nep17API.cs

Co-authored-by: Vitor Nazário Coelho <[email protected]>

* MPT in StateService from core (neo-project#410)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal (neo-project#413)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal

* fix

* Fixed UT (Neo CI01089)

* Update Nep17API.cs

* Update README.md

Co-authored-by: Owen Zhang <[email protected]>

* update filename

* Fix UT

* Format

* fix

* update

* update UT

* Add Unit Tests

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>
Co-authored-by: ZhangTao <[email protected]>

* merge

* clear

* Transfer bug fix (neo-project#429)

* [RpcServer] Querying contracts by ID/name (neo-project#378)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* draft

* draft

* update

* fixed bug with decimal of GAS consumed in invokefunction/invokescript

* remove modify of invokescript

* Querying contracts by ID/name, server side

* update

* Enable using native.name for search

Enable using native.name for search

* Using keyword instead of addressOrScriptHash

* revert

* _initialize

* split

* update

* Update exception message in ApplicationLog

* Update src/ApplicationLogs/LogReader.cs

Co-authored-by: Luchuan <[email protected]>

* update

* a

* More fix

* fix

* Fixed UT

* Simplify Code

* Simplify Code 2

* Update RpcServer

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>

* MPT in StateService from core (neo-project#410)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal (neo-project#413)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal

* fix

* Fixed UT (Neo CI01089) (neo-project#416)

* [RpcServer] Querying contracts by ID/name (neo-project#378)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* draft

* draft

* update

* fixed bug with decimal of GAS consumed in invokefunction/invokescript

* remove modify of invokescript

* Querying contracts by ID/name, server side

* update

* Enable using native.name for search

Enable using native.name for search

* Using keyword instead of addressOrScriptHash

* revert

* _initialize

* split

* update

* Update exception message in ApplicationLog

* Update src/ApplicationLogs/LogReader.cs

Co-authored-by: Luchuan <[email protected]>

* update

* a

* More fix

* fix

* Fixed UT

* Simplify Code

* Simplify Code 2

* Update RpcServer

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>

* MPT in StateService from core (neo-project#410)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal (neo-project#413)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal

* fix

* Fixed UT (Neo CI01089)

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>
Co-authored-by: ZhangTao <[email protected]>

* Nep17 (neo-project#412)

* [RpcServer] Querying contracts by ID/name (neo-project#378)

* fixed-bug-1021

* Update src/RpcServer/RpcServer.SmartContract.cs

* 😂

* draft

* draft

* update

* fixed bug with decimal of GAS consumed in invokefunction/invokescript

* remove modify of invokescript

* Querying contracts by ID/name, server side

* update

* Enable using native.name for search

Enable using native.name for search

* Using keyword instead of addressOrScriptHash

* revert

* _initialize

* split

* update

* Update exception message in ApplicationLog

* Update src/ApplicationLogs/LogReader.cs

Co-authored-by: Luchuan <[email protected]>

* update

* a

* More fix

* fix

* Fixed UT

* Simplify Code

* Simplify Code 2

* Update RpcServer

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>

* String Substitution

* Modify filename and name methods

* update

* update

* Update src/RpcClient/Models/RpcNep5TokenInfo.cs

Co-authored-by: Vitor Nazário Coelho <[email protected]>

* Update src/RpcClient/Nep17API.cs

Co-authored-by: Vitor Nazário Coelho <[email protected]>

* MPT in StateService from core (neo-project#410)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal (neo-project#413)

* Unify GetUnclaimedGas and GetWalletUnclaimedGas with decimal

* fix

* Fixed UT (Neo CI01089)

* Update Nep17API.cs

* Update README.md

Co-authored-by: Owen Zhang <[email protected]>

* update filename

* Fix UT

* Format

* fix

* update

* update UT

* Add Unit Tests

* update

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>
Co-authored-by: ZhangTao <[email protected]>

* merge

* fixed bug

* clear

* UT

* Add a little code coverage

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>
Co-authored-by: ZhangTao <[email protected]>

* Preview4 (neo-project#430)

* Preview4

* Remove syslog in README.md

* dotnet 5.0 (neo-project#407)

* CI01123 (neo-project#435)

* Fix dotnet5 (neo-project#442)

* Add RPC method getnativecontracts

* Add UT

* Update src/RpcServer/Utility.cs

* Update src/RpcClient/Models/RpcNativeContract.cs

* ()

* Update RpcTestCases.json

* Remove extra properties

* Reorder

Co-authored-by: 陈志同 <[email protected]>
Co-authored-by: Shargon <[email protected]>
Co-authored-by: Owen Zhang <[email protected]>
Co-authored-by: superboyiii <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: Luchuan <[email protected]>
Co-authored-by: ZhangTao <[email protected]>
Co-authored-by: Erik Zhang <[email protected]>
Co-authored-by: Shine Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RPCServer call to list native contract
7 participants