0xEunum / 0xEunum/Chainlink-Fundamentals

Programmatic Log Trigger Upkeep registers as Custom Logic (Chainlink Automation)

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Solidity
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Description

While trying to register a **Log Trigger** Chainlink Automation upkeep programmatically using the `registerUpkeep` function from the `IAutomationRegistrar2_1` interface, the upkeep gets incorrectly registered as a **Custom Logic** type.

Even though:
- `triggerType` is set to `1` (Log Trigger)
- A valid `triggerConfig` is built using `LogTriggerConfig` and `abi.encode`

...the upkeep appears in the Chainlink Automation UI as **Custom Logic**, not Log Trigger.

The function returns an `upkeepId` does not match the one shown in the UI.

#### Behavior Observed
- `triggerType: 1` was used (for Log Trigger).
- Proper `triggerConfig` was encoded and passed.
- Upkeep was registered and funded successfully.
- In the UI, upkeep type = **Custom Logic**
- Returned `upkeepId` does not match the one shown in the UI.

#### Workaround
When the exact same parameters are used in manual registration via the Chainlink Automation UI, the upkeep is correctly registered as a Log Trigger.

#### Possibly Affected Files
- `scripts/Data Streams/DeployStreamsUpKeep.s.sol`
- `scripts/Data Streams/SUPInteractions.s.s.sol` (RegisterUpKeep)
- `src/Data Streams/StreamsUpkeep.sol`
- `src/Data Streams/LogEmitter.sol`

#### Conclusion
This seems like either:
- A bug in the Chainlink Automation backend not parsing the `triggerType` and `triggerConfig` properly from the programmatic registration
- Or undocumented behavior where only manual registration supports log triggers correctly

Contributor guide

No contributing guide indexed for this repository

Research direction

Examine the programmatic registration flow in scripts like `DeployStreamsUpKeep.s.sol` and `SUPInteractions.s.s.sol`. Compare the `triggerType` and encoded `triggerConfig` passed to `registerUpkeep` with the manual UI registration. Check the `StreamsUpkeep.sol` and `LogEmitter.sol` contracts for trigger configuration logic. The goal is to identify why the backend interprets the call as Custom Logic instead of Log Trigger.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
backend, blockchain
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.