Skip to content

Support logTrigger in fake chain#1589

Merged
silaslenihan merged 11 commits into
developfrom
fake-chain-logtrigger
Jul 22, 2026
Merged

Support logTrigger in fake chain#1589
silaslenihan merged 11 commits into
developfrom
fake-chain-logtrigger

Conversation

@silaslenihan

@silaslenihan silaslenihan commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

Requires Dependencies

Resolves Dependencies

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

✅ API Diff Results - github.com/smartcontractkit/chainlink-solana/contracts

✅ Compatible Changes (1)

capabilities/fakes.(*FakeSolanaChain) (1)
  • ManualTrigger — ➕ Added

📄 View full apidiff report

@silaslenihan silaslenihan changed the title Support fake chain on logtrigger Support logTrigger in fake chain Jul 16, 2026
@silaslenihan
silaslenihan force-pushed the fake-chain-logtrigger branch from caf429f to bc7b45c Compare July 16, 2026 19:28
@silaslenihan
silaslenihan marked this pull request as ready for review July 16, 2026 19:44
@silaslenihan
silaslenihan requested review from a team as code owners July 16, 2026 19:44
@silaslenihan
silaslenihan marked this pull request as draft July 16, 2026 19:51
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

⚠️ API Diff Results - github.com/smartcontractkit/chainlink-solana

⚠️ Breaking Changes (5)

pkg/solana/logpoller (1)
  • ExtractField — 🗑️ Removed
pkg/solana/logpoller.IndexedValueComparator (1)
  • Value — Type changed:
  - github.com/smartcontractkit/chainlink-solana/pkg/solana/logpoller/types.IndexedValue
  + github.com/smartcontractkit/chainlink-solana/pkg/solana/codec/common.IndexedValue
)
pkg/solana/logpoller/types (3)
  • IndexedValue — Type changed:
  - IndexedValue
  + github.com/smartcontractkit/chainlink-solana/pkg/solana/codec/common.IndexedValue
)
  • IndexedValues — Type changed:
  []IndexedValue
)
  • NewIndexedValue — Type changed:
func(
  any
)
(IndexedValue, error)

✅ Compatible Changes (6)

pkg/solana/codec/common (3)
  • ExtractField — ➕ Added

  • IndexedValue — ➕ Added

  • NewIndexedValue — ➕ Added

pkg/solana/logpoller (3)
  • ExtractAnchorCPIEventData — ➕ Added

  • ExtractVecCPIEventData — ➕ Added

  • GetAllAccountKeys — ➕ Added


📄 View full apidiff report

@silaslenihan
silaslenihan marked this pull request as ready for review July 16, 2026 20:57
@silaslenihan
silaslenihan force-pushed the fake-chain-logtrigger branch from 44627a8 to 90f8673 Compare July 17, 2026 13:07
yashnevatia
yashnevatia previously approved these changes Jul 20, 2026
ilija42
ilija42 previously approved these changes Jul 20, 2026
Comment thread contracts/capabilities/fakes/solana_chain.go Outdated
Comment thread contracts/capabilities/fakes/solana_chain.go Outdated
Comment thread contracts/capabilities/fakes/solana_subkey_filter.go Outdated
Comment thread contracts/capabilities/fakes/solana_subkey_filter.go Outdated
Comment thread contracts/capabilities/fakes/solana_subkey_filter.go Outdated
Comment thread contracts/capabilities/fakes/solana_chain_test.go Outdated
@silaslenihan
silaslenihan dismissed stale reviews from ilija42 and yashnevatia via 84aa7cb July 20, 2026 14:10
Comment thread contracts/capabilities/fakes/solana_chain_test.go Outdated
t.Run("malformed program addresses are rejected", func(t *testing.T) {
t.Parallel()
fc := newTestSolanaChain(t, true)
_, cerr := fc.RegisterLogTrigger(ctx, triggerID, md, &solcap.FilterLogTriggerRequest{Address: []byte{0x01}})

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: use t.Context to scope context to current t.Run instead of using parent contex

if len(sk.GetPath()) != 1 {
return fmt.Errorf("subkey path %v: only single-level (top-level scalar field) paths are supported in cre-cli simulate", sk.GetPath())
}
fieldName, ok := resolveTopLevelFieldName(decoded, sk.GetPath()[0])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? solcommoncodec.ExtractField supports nested fields and returns an error if one does not exist.
Also, is there normalization of the field name in logPoller? If not, the simulation will detect the event, but prod won't, which is a critical issue.

Unheilbar
Unheilbar previously approved these changes Jul 21, 2026
@silaslenihan
silaslenihan force-pushed the fake-chain-logtrigger branch from 46961a2 to a91d92b Compare July 21, 2026 13:35
@silaslenihan
silaslenihan force-pushed the fake-chain-logtrigger branch 2 times, most recently from 13e2f5f to 9abc1d4 Compare July 21, 2026 13:59
@silaslenihan
silaslenihan force-pushed the fake-chain-logtrigger branch from 9abc1d4 to 766d43a Compare July 21, 2026 14:00
@silaslenihan
silaslenihan merged commit 1fb87a8 into develop Jul 22, 2026
49 of 50 checks passed
@silaslenihan
silaslenihan deleted the fake-chain-logtrigger branch July 22, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants