Skip to main content

Parameters

chainId
string
default:"37111"
required
Unique identifier for a blockchain network.
id
number
default:1
required
Request identifier used to match responses.
jsonrpc
string
default:"2.0"
required
JSON-RPC version.
method
string
default:"zks_getBytecodeByHash"
required
JSON-RPC method name.
params
object
required
Positional parameters for zks_getBytecodeByHash:
  • params[]: The hash of the bytecode to retrieve.

Returns

result
array
The bytecode array representing the transaction’s bytecode.
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=37111 \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "zks_getBytecodeByHash",
    "params": [
      "0x0100067d861e2f5717a12c3e869cfb657793b86bbb0caa05cc1421f16c5217bc"
    ]
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    0,
    4,
    0,
    0,
    "..."
  ]
}