Skip to main content

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 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", "0x000000000000000000000000b7aa2d3c833a6827c4f39bef9622d7cddf66b7e7", "0x0000000000000000000000003264039cfaa37a70a0e8ccfbf4b7e60bedce5c9f"]

Important notes when using the Topics field

When entering data that corresponds to an Address type in the Event Signature, you must enter it in Hex Format rather than Decoded Format.

I have an event log I want to monitor. What value should I put in the Topic field?

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, for the Transfer(address indexed from, address indexed to, uint256 value) event, the Event signature can be confirmed by running the following code.
    Keccak256("Transfer(address,address,uint256)")
    = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef

topics[1], topics[2], topics[3]: Indexed Parameters

  • From topics[1] onward, these correspond to the indexed parameter values of the event. Only event parameters declared with the indexed keyword in the smart contract are included in the Topic. For the Transfer event in the example above, the from address corresponds to topics[1] and the to address to topics[2]. That is, if you want to filter only events that include a specific address in the from address, you can enter that address value in topics[1]. The remaining parameters excluding indexed parameters can be found in the data field of the retrieved log.

How to find Topic values

  • From the smart contract code: Check the event definition in the Solidity code, identify the indexed parameters and Event signature, and confirm the value to enter in the Topic through Keccak256 hashing.
  • Using a block Explorer: Select an example transaction you want to track and go to the transaction details, then check the Topic values through the "Logs" section or related sections. Below is an example screen for checking logs for a USDC(ERC20) Transfer event on Etherscan (https://etherscan.io).

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"
}