getstorage Method
Returns the stored value according to the contract script hash and the stored key. Both key and value are Base64-encoded.
note
You must install the plugin RpcServer before you can invoke the method.
#
Parameter Descriptionscript_hash: Contract script hash or contract ID
key: The key to look up in storage (Base64-encoded)
#
Exception- -102, Unknown contract.
- -104, Unknown storage item.
#
ExampleRequest body:
hello
is converted into the Base64 string aGVsbG8=
.
{ "jsonrpc": "2.0", "method": "getstorage", "params": ["0x99042d380f2b754175717bb932a911bc0bb0ad7d", "aGVsbG8="], "id": 1}
Response body:
{ "jsonrpc": "2.0", "id": 1, "result": "d29ybGQ="}
d29ybGQ=
is converted into the string world
.