Skip to main content

query-{view_code} RPC Method

Returns the base64 encoded contract code (Wasm binary) that was deployed to the account.

Updated on
Oct 04, 2023

query-{view_code} RPC Method

Parameters

request_type
string
The type of request i.e view_code
finality
string
The assurance that the transaction cannot be altered, reversed, or canceled after they are completed. For finality=final, it means that it has been validated on at least 66% of the nodes in the network and for finality=optimistic, it uses the latest block recorded on the node that responded to the query passed
block_id
integer/string
The block id, it could be either block number or block hash
account_id
string
The id of the account associcated with the transaction

Returns

hash
The hash of the block
block_height
The height of the block this transactions was associated with
block_hash
The hash of the block this transaction was associated with
code_base64
The code encoded in base64
Request
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free