View Global Contract Code
view_global_contract_code request type
This endpoint allows you to view a globally stored contract code by its hash.
Live Response
Responses from the selected endpoint appear here after you run a request.
Live response output will appear here after you run a request.
Request reference
application/jsonThis operation accepts a JSON-RPC body over POST to /.
Required request inputs: yes
{
"jsonrpc": "2.0",
"id": "fastnear",
"method": "query",
"params": {
"code_hash": "ExampleCodeHash",
"request_type": "view_global_contract_code",
"finality": "final"
}
}Request schema
object
requires jsonrpc, id, method, paramsjsonrpc *string2.0id *stringmethod *stringqueryparams *objectcode_hash *stringBase58-encoded hash
request_type *stringview_global_contract_codefinality *stringBlock finality
finalnear-finaloptimisticResponse reference
200 application/jsonSuccessful response
Response schema
objectJsonRpcResponse
requires jsonrpc, idjsonrpc *string2.0id *one ofstringnumber
resultobjectA view of the contract code.
code_base64 *stringhash *stringBase58-encoded hash
errorobjectcodeintegermessagestringdataobject