Skip to content

Commit 92fe5ed

Browse files
authored
correct EVM log trigger requirements (#3413)
1 parent 106c20e commit 92fe5ed

2 files changed

Lines changed: 6 additions & 16 deletions

File tree

src/content/cre/llms-full-ts.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15186,7 +15186,7 @@ export async function main() {
1518615186

1518715187
# SDK Reference: EVM Log Trigger
1518815188
Source: https://docs.chain.link/cre/reference/sdk/triggers/evm-log-trigger-ts
15189-
Last Updated: 2026-01-26
15189+
Last Updated: 2026-01-28
1519015190

1519115191
The EVM Log Trigger fires when a specific log (event) is emitted by an onchain smart contract.
1519215192

@@ -15212,12 +15212,7 @@ const network = getNetwork({
1521215212

1521315213
const evmClient = new EVMClient(network.chainSelector.selector)
1521415214

15215-
// Basic log trigger for a contract address
15216-
const trigger = evmClient.logTrigger({
15217-
addresses: [hexToBase64("0x123...abc")],
15218-
})
15219-
15220-
// With topics for event filtering
15215+
// Create a log trigger with address and event signature
1522115216
const transferEventHash = keccak256(toBytes("Transfer(address,address,uint256)"))
1522215217

1522315218
const trigger = evmClient.logTrigger({
@@ -15237,7 +15232,7 @@ The `logTrigger()` method accepts a configuration object with the following fiel
1523715232
| Field | Type | Description |
1523815233
| ------------ | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1523915234
| `addresses` | `string[]` | **Required.** A list of contract addresses to monitor. **Must be base64 encoded** using `hexToBase64()`. At least one address is required. |
15240-
| `topics` | `TopicValues[]` | Optional. An array to filter event topics. The first element contains event signatures, and the next three elements contain indexed argument values. An empty array element acts as a wildcard. **All topic values must be base64 encoded** using `hexToBase64()`. |
15235+
| `topics` | `TopicValues[]` | **Required.** An array to filter event topics. The first element must contain at least one event signature. The next three elements can contain indexed argument values (optional). An empty array element acts as a wildcard for indexed arguments. **All topic values must be base64 encoded** using `hexToBase64()`. |
1524115236
| `confidence` | `string` | Optional. The block confirmation level to monitor. Can be: <ul><li>**`"CONFIDENCE_LEVEL_LATEST"`**: The most recent block (fastest but least secure).</li><li>**`"CONFIDENCE_LEVEL_SAFE"` (default)**: A block unlikely to be reorged but not yet irreversible.</li><li>**`"CONFIDENCE_LEVEL_FINALIZED"`**: A block considered irreversible (safest, but requires waiting longer for finality).</li></ul> |
1524215237

1524315238
<Aside type="note" title="Finality details">

src/content/cre/reference/sdk/triggers/evm-log-trigger-ts.mdx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pageId: "reference-sdk-evm-log-trigger"
77
metadata:
88
description: "Reference for TypeScript EVM Log Trigger: Config interface, Payload fields, and topic filtering for event-driven workflows."
99
datePublished: "2025-11-04"
10-
lastModified: "2026-01-26"
10+
lastModified: "2026-01-28"
1111
---
1212

1313
import { Aside } from "@components"
@@ -36,12 +36,7 @@ const network = getNetwork({
3636

3737
const evmClient = new EVMClient(network.chainSelector.selector)
3838

39-
// Basic log trigger for a contract address
40-
const trigger = evmClient.logTrigger({
41-
addresses: [hexToBase64("0x123...abc")],
42-
})
43-
44-
// With topics for event filtering
39+
// Create a log trigger with address and event signature
4540
const transferEventHash = keccak256(toBytes("Transfer(address,address,uint256)"))
4641

4742
const trigger = evmClient.logTrigger({
@@ -61,7 +56,7 @@ The `logTrigger()` method accepts a configuration object with the following fiel
6156
| <div style="width: 100px;">Field</div> | <div style="width: 140px;">Type</div> | Description |
6257
| -------------------------------------- | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
6358
| `addresses` | `string[]` | **Required.** A list of contract addresses to monitor. **Must be base64 encoded** using `hexToBase64()`. At least one address is required. |
64-
| `topics` | `TopicValues[]` | Optional. An array to filter event topics. The first element contains event signatures, and the next three elements contain indexed argument values. An empty array element acts as a wildcard. **All topic values must be base64 encoded** using `hexToBase64()`. |
59+
| `topics` | `TopicValues[]` | **Required.** An array to filter event topics. The first element must contain at least one event signature. The next three elements can contain indexed argument values (optional). An empty array element acts as a wildcard for indexed arguments. **All topic values must be base64 encoded** using `hexToBase64()`. |
6560
| `confidence` | `string` | Optional. The block confirmation level to monitor. Can be: <ul><li>**`"CONFIDENCE_LEVEL_LATEST"`**: The most recent block (fastest but least secure).</li><li>**`"CONFIDENCE_LEVEL_SAFE"` (default)**: A block unlikely to be reorged but not yet irreversible.</li><li>**`"CONFIDENCE_LEVEL_FINALIZED"`**: A block considered irreversible (safest, but requires waiting longer for finality).</li></ul> |
6661

6762
<Aside type="note" title="Finality details">

0 commit comments

Comments
 (0)