LOG
Supported Network
Network | Supporting |
|---|---|
Ethereum Mainnet | ✅ |
Ethereum Testnet (sepolia) | ✅ |
Ethereum Testnet (holesky) | ✅ |
Base Mainnet | ✅ |
Base Testnet (sepolia) | ✅ |
Polygon Mainnet | ✅ |
Polygon Testnet (amoy) | ✅ |
Arbitrum Mainnet | ✅ |
Arbitrum Testnet (sepolia) | ✅ |
Optimism Mainnet | ✅ |
Optimism Testnet (sepolia) | ✅ |
Kaia Mainnet | ✅ |
Kaia Testnet (kairos) | ✅ |
Aptos Mainnet | ❌ |
Aptos Testnet | ❌ |
Webhook Creation Request Example
When setting the eventType value to LOG, the available condition object fields are as follows.
Key | Type | Description | Required | Example Value |
|---|---|---|---|---|
address | String | The contract address where the event you want to monitor is defined. | true | 0xdAC17F958D2ee523a2206206994597C13D831ec7 |
topics[4] | Array of String | The topic array object of the event log to monitor. Can contain up to 4 strings. | true | ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", |
When entering data that corresponds to an Address type in an Event Signature, the value must be entered in Hex Format, not in decoded format.
The Topic field for the event you want to monitor is used to filter data associated with smart contract events. Each Topic contains the event's Event Signature and indexed parameter information.
topics[0]: Event Signature
- topics[0] is always the Keccak256 hash of the event's Event Signature.
For example, the Event Signature of theTransfer(address indexed from, address indexed to, uint256 value)event can be verified by running the following:
Keccak256("Transfer(address,address,uint256)")
= 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
topics[1], topics[2], topics[3]: Indexed Parameters
- Starting from topics[1], the values correspond to the indexed parameters of the event. Only event parameters declared with the
indexedkeyword in the smart contract are included in the Topics. For the Transfer event above, thefromaddress maps to topics[1] and thetoaddress maps to topics[2]. To filter for only events where thefromaddress is a specific address, enter that address value in topics[1]. Non-indexed parameters can be found in thedatafield of the retrieved log.
How to find Topic values
- From smart contract code: Review the event definition in the Solidity code, identify the indexed parameters and Event Signature, then determine the Topic values by applying Keccak256 hashing.
- Using a block Explorer: Select an example transaction you want to track, navigate to the transaction details, and check the "Logs" section for Topic values. Below is an example screen from Etherscan (https://etherscan.io) showing the log for a USDC (ERC20) Transfer event.
Request Example
curl --location 'https://web3.nodit.io/v1/ethereum/mainnet/webhooks' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: ••••••' \
--data '{
"eventType": "LOG",
"description": "{WEBHOOK_DESCRIPTION}",
"notification": {
"webhookUrl": "{WEBHOOK_LISTENER_ENDPOINT}"
},
"isInstant": false,
"condition": {
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"topics":[
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000b7aa2d3c833a6827c4f39bef9622d7cddf66b7e7",
"0x0000000000000000000000003264039cfaa37a70a0e8ccfbf4b7e60bedce5c9f"
]
}
}'
Response Example
{
"subscriptionId": "4975",
"sequenceNumber": "2",
"description": "{WEBHOOK_DESCRIPTION}",
"protocol": "ethereum",
"network": "mainnet",
"subscriptionType": "WEBHOOK",
"notification": {
"webhookUrl": "{WEBHOOK_LISTENER_ENDPOINT}"
},
"eventType": "LOG",
"event": {
"targetAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000b7aa2d3c833a6827c4f39bef9622d7cddf66b7e7",
"0x0000000000000000000000003264039cfaa37a70a0e8ccfbf4b7e60bedce5c9f"
],
"messages": [
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000b7aa2d3c833a6827c4f39bef9622d7cddf66b7e7",
"0x0000000000000000000000003264039cfaa37a70a0e8ccfbf4b7e60bedce5c9f"
],
"data": "0x000000000000000000000000000000000000000000000000000000001dceeba0",
"block_number": 21492732,
"transaction_hash": "0x6a7be5762c3e6e7a0d40199612133c9b967dcee1c02c51c2c82db4bc6f47b652",
"transaction_index": 180,
"log_index": 390,
"block_hash": "0xee749b0f3ec7b1bfb44ea2424af1f45cadc05110dc7f7acc3b91dd60c9b77ece",
"block_timestamp": 1735289687,
"removed": false,
"type": "log"
}
]
},
"createdAt": "2024-12-27T08:56:48.396Z"
}