- APIs
- Stacks Blockchain API
- Get Smart Contract Logs
Get smart contract logs
Retrieves contract log events for a given smart contract.
GET
Parameters
Path Parameters
contract_id
REQUIRED
string Contract identifier formatted as `<contract_address>.<contract_name>`
Query Parameters
limit
integer Results per page
offset
integer Result offset
cursor
string Cursor for transaction event pagination (block_height:microblock_sequence:tx_index:event_index)
| Status code | Description |
|---|---|
| 200 | Default Response |
| 4XX | Default Response |
cURL
curl -L \"https://api.hiro.so/extended/v2/smart-contracts/{contract_id}/logs?limit={limit}&offset={offset}&cursor={cursor}" \-H 'Accept: application/json'
Response
{"limit": 20,"offset": 0,"total": 1,"next_cursor": "string","prev_cursor": "string","cursor": "string","results": [{"event_index": 0,"event_type": "smart_contract_log","tx_id": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","contract_log": {"contract_id": "SP000000000000000000002Q6VF78.pox-3","topic": "print","value": {"hex": "0x1234","repr": "value representation"}}}]}