curl --request POST \
--url https://rpc.mainnet.near.org/EXPERIMENTAL_view_code \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"jsonrpc": "<string>",
"method": "EXPERIMENTAL_view_code",
"params": {
"block_id": 1,
"account_id": "<string>"
}
}
'{
"result": {
"block_hash": "<string>",
"block_height": 1,
"code_base64": "<string>",
"hash": "<string>"
},
"id": "<string>",
"jsonrpc": "<string>"
}Returns the contract code (Wasm binary) deployed to the account.
curl --request POST \
--url https://rpc.mainnet.near.org/EXPERIMENTAL_view_code \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"jsonrpc": "<string>",
"method": "EXPERIMENTAL_view_code",
"params": {
"block_id": 1,
"account_id": "<string>"
}
}
'{
"result": {
"block_hash": "<string>",
"block_height": 1,
"code_base64": "<string>",
"hash": "<string>"
},
"id": "<string>",
"jsonrpc": "<string>"
}