curl --request POST \
--url https://nd-995-911-243.p2pify.com/afb8312f3710a5bc469f4c87cad3a2e4 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getBytecodeByHash",
"params": [
"0x0100067d861e2f5717a12c3e869cfb657793b86bbb0caa05cc1421f16c5217bc"
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": "<string>"
}
curl --request POST \
--url https://nd-995-911-243.p2pify.com/afb8312f3710a5bc469f4c87cad3a2e4 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getBytecodeByHash",
"params": [
"0x0100067d861e2f5717a12c3e869cfb657793b86bbb0caa05cc1421f16c5217bc"
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": "<string>"
}
zks_getBytecodeByHash
API method provides the functionality to retrieve the bytecode of a transaction given its hash. This is particularly useful for developers and applications that require inspection or verification of the transaction’s bytecode for analysis, security audits, or integration purposes within the zkSync network.
hash
— a H256
string representing the hash of the transaction whose bytecode is being requested. This hash acts as a unique identifier for transactions within the zkSync network.result
— the bytecode is returned as an array, with each element representing a byte.zks_getBytecodeByHash
method enables such platforms to fetch transaction bytecode dynamically, providing a powerful tool for in-depth blockchain analysis.Successful response
The response is of type object
.