Identify the Wasm deployed to a NEAR account in a specific block
A release report needs the bytes deployed at the time of the change. Reading the current contract later can return a different release.
Query code changes at the deployment block
Replace the account and block hash with the deployment target and the block where its receipt executed. Use historical RPC coverage if that block has aged out of the regular endpoint.
{
"jsonrpc": "2.0",
"id": 1,
"method": "changes",
"params": {
"changes_type": "contract_code_changes",
"account_ids": [
"shop.testnet"
],
"block_id": "BLOCK_HASH"
}
}
Compare executable bytes with the release artifact
For a contract-code update, decode the returned code_base64 and hash the resulting bytes using the same digest used for your local Wasm artifact. Hashing the printable base64 string produces a different digest. Preserve the change cause alongside the block hash to link the update with its execution.
An empty changes array at the transaction’s inclusion height can occur when the deployment action executed in a later receipt block. Inspect the receipt outcome’s block hash before expanding the search range.