POSTview_global_contract_code_by_account_id
https://near-mainnet.nodit.io/Returns the WASM binary of the global contract deployed under an account ID, encoded in base64, together with its code hash. A global contract deployed under an account ID can be updated by the deploying account, and this method returns the code as of the queried block.
Call the query method with request_type: "view_global_contract_code_by_account_id", passing the account that deployed the global contract in account_id. If the node has never observed a global contract deployed under that account, it returns the NO_GLOBAL_CONTRACT_CODE error. To get contract code deployed directly to an account, use view_code instead of this method.
Request ID. Any string; it is returned unchanged in the response.
Query type. Fixed to view_global_contract_code_by_account_id for looking up global contract code by account ID.
Specifies the block finality. Cannot be used together with block_id.
optimistic: the latest block the node has received (may be reorganized)near-final: a Doomslug-final block (not reverted in most cases)final: a fully finalized block
Specifies the block to query by block height (integer) or block hash (base58 string).
Cannot be used together with finality.
NEAR account ID. A human-readable name (e.g. wrap.near) or a 64-character hex implicit account ID.
JSON-RPC version
Request ID
The entire global contract WASM binary encoded in base64. The WASM can be up to about 4 MiB, and the base64 string is about 1.33 times longer. The example shows only the beginning.
Hash of the global contract code (base58)
Block height.
Example: 220785385
Base58-encoded 32-byte hash (block hash, chunk hash, transaction hash, etc.).
Example: 8EjuQRnAJiWkRmqxfexQFJWXXonuSMbz5AZziJLCWnWS
Error class. REQUEST_VALIDATION_ERROR (invalid request), HANDLER_ERROR (processing error), INTERNAL_ERROR (node internal error)
The specific cause of the error.
Name of the error cause (e.g. UNKNOWN_BLOCK, UNKNOWN_ACCOUNT, PARSE_ERROR)
Additional information about the error (block hash, height, account ID, etc.)
Legacy JSON-RPC error code (e.g. -32000 server error, -32700 parse error, -32601 method not found)
Legacy error message
Legacy error details