The Contract state from a contract on the network
This method will use 15 Compute Units.
15
Last updated 2 months ago
Returns a list of all contract's slots. If no timestamp is provided, returns the current state.
The ID or hex encoded EVM address (with or without 0x prefix) associated with this contract.
OK
const response = await fetch('https://mainnet.hedera.validationcloud.io/v1/YOUR_API_KEY/api/v1/contracts/{contractIdOrAddress}/state', { method: 'GET', headers: {}, }); const data = await response.json();
{ "state": [ { "address": "0000000000000000000000000000000000001f41", "contract_id": "0.1.2", "timestamp": "1586567700.453054000", "slot": "0x00000000000000000000000000000000000000000000000000000000000000fa", "value": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" } ], "links": { "next": "/api/v1/transactions?timestamp=lt:1657598275.517984411" } }