post https://api.infstones.com/neo/mainnet/
Returns information of the contract with the specified script hash.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
SCRIPT HASH | ✅ | String | The contract script hash or the native contract name. |
"params": ["neotoken"]
Result
The contract information with the contract script hash or native contract name.
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "getcontractstate", "params":["neotoken"],"id": 1}'
Return
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"id": -5,
"updatecounter": 0,
"hash": "0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5",
"nef": {
"magic": 860243278,
"compiler": "neo-core-v3.0",
"source": "",
"tokens": [],
"script": "EEEa93tnQBBBGvd7Z0AQQRr3e2dAEEEa93tnQBBBGvd7Z0AQQRr3e2dAEEEa93tnQBBBGvd7Z0AQQRr3e2dAEEEa93tnQBBBGvd7Z0AQQRr3e2dAEEEa93tnQBBBGvd7Z0AQQRr3e2dAEEEa93tnQBBBGvd7Z0A=",
"checksum": 588003825
},
"manifest": {
"name": "NeoToken",
"groups": [],
"features": {},
"supportedstandards": ["NEP-17"],
"abi": {
"methods": [{
"name": "balanceOf",
"parameters": [{
"name": "account",
"type": "Hash160"
}],
"returntype": "Integer",
"offset": 0,
"safe": true
}, {
"name": "decimals",
"parameters": [],
"returntype": "Integer",
"offset": 7,
"safe": true
}, {
"name": "getAccountState",
"parameters": [{
"name": "account",
"type": "Hash160"
}],
"returntype": "Array",
"offset": 14,
"safe": true
}, {
"name": "getCandidates",
"parameters": [],
"returntype": "Array",
"offset": 21,
"safe": true
}, {
"name": "getCommittee",
"parameters": [],
"returntype": "Array",
"offset": 28,
"safe": true
}, {
"name": "getGasPerBlock",
"parameters": [],
"returntype": "Integer",
"offset": 35,
"safe": true
}, {
"name": "getNextBlockValidators",
"parameters": [],
"returntype": "Array",
"offset": 42,
"safe": true
}, {
"name": "getRegisterPrice",
"parameters": [],
"returntype": "Integer",
"offset": 49,
"safe": true
}, {
"name": "registerCandidate",
"parameters": [{
"name": "pubkey",
"type": "PublicKey"
}],
"returntype": "Boolean",
"offset": 56,
"safe": false
}, {
"name": "setGasPerBlock",
"parameters": [{
"name": "gasPerBlock",
"type": "Integer"
}],
"returntype": "Void",
"offset": 63,
"safe": false
}, {
"name": "setRegisterPrice",
"parameters": [{
"name": "registerPrice",
"type": "Integer"
}],
"returntype": "Void",
"offset": 70,
"safe": false
}, {
"name": "symbol",
"parameters": [],
"returntype": "String",
"offset": 77,
"safe": true
}, {
"name": "totalSupply",
"parameters": [],
"returntype": "Integer",
"offset": 84,
"safe": true
}, {
"name": "transfer",
"parameters": [{
"name": "from",
"type": "Hash160"
}, {
"name": "to",
"type": "Hash160"
}, {
"name": "amount",
"type": "Integer"
}, {
"name": "data",
"type": "Any"
}],
"returntype": "Boolean",
"offset": 91,
"safe": false
}, {
"name": "unclaimedGas",
"parameters": [{
"name": "account",
"type": "Hash160"
}, {
"name": "end",
"type": "Integer"
}],
"returntype": "Integer",
"offset": 98,
"safe": true
}, {
"name": "unregisterCandidate",
"parameters": [{
"name": "pubkey",
"type": "PublicKey"
}],
"returntype": "Boolean",
"offset": 105,
"safe": false
}, {
"name": "vote",
"parameters": [{
"name": "account",
"type": "Hash160"
}, {
"name": "voteTo",
"type": "PublicKey"
}],
"returntype": "Boolean",
"offset": 112,
"safe": false
}],
"events": [{
"name": "Transfer",
"parameters": [{
"name": "from",
"type": "Hash160"
}, {
"name": "to",
"type": "Hash160"
}, {
"name": "amount",
"type": "Integer"
}]
}]
},
"permissions": [{
"contract": "*",
"methods": "*"
}],
"trusts": [],
"extra": null
}
}
}