Skip to main content
Returns code at a given address. This method will use 40 Compute Units.
Unichain Mainnet keeps historical state for roughly the last 10,000 blocks, about 2.8 hours at Unichain’s 1-second block time. Requests for an older block return JSON-RPC error -32603 with a message that contains state at block #<number> is pruned.

Reference: Here

Parameters

  1. DATA, 20 Bytes - address.
  2. QUANTITY|TAG - integer block number, or the string "latest", "earliest" or "pending", see the default block parameter

Returns

DATA - the code from the given address.