Get Contract State
The Contract state from a contract on the network
This method will use 20
Compute Units.
Returns a list of all contract's slots. If no timestamp is provided, returns the current state.
Path parameters
contractIdOrAddressstringRequiredPattern:
The ID or hex encoded EVM address (with or without 0x prefix) associated with this contract.
^(\d{1,10}\.){0,2}(\d{1,10}|(0x)?[A-Fa-f0-9]{40})$
Query parameters
limitinteger · int32 · min: 1 · max: 100OptionalDefault:
The maximum number of items to return
25
Example: 2
orderundefined · enumOptionalDefault:
The order in which items are listed
asc
Example: desc
Possible values: slotstringOptionalExample:
The slot's number
{"summary":"--","value":""}
Pattern: ^((eq|gte?|lte?)\:)?(0x)?[0-9A-Fa-f]{1,64}$
timestampstringOptionalExample:
The timestamp at which the contract state is
1234567890.0000007
Pattern: ^\d{1,10}(.\d{1,9})?$
Responses
200
OK
application/json
400
Invalid parameter
application/json
404
Not Found
application/json
get
GET /v1/YOUR_API_KEY/api/v1/contracts/{contractIdOrAddress}/state HTTP/1.1
Host: mainnet.hedera.validationcloud.io
Accept: */*
{
"state": [
{
"address": "0000000000000000000000000000000000001f41",
"contract_id": "0.1.2",
"timestamp": "1586567700.453054000",
"slot": "0x00000000000000000000000000000000000000000000000000000000000000fa",
"value": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"
}
],
"links": {
"next": "/api/v1/transactions?timestamp=lt:1657598275.517984411"
}
}
Last updated
Was this helpful?