Skip to content

Solana log trigger bindings support#284

Merged
ernest-nowacki merged 18 commits into
capabilities-developmentfrom
feat/solana-log-trigger
Jul 16, 2026
Merged

Solana log trigger bindings support#284
ernest-nowacki merged 18 commits into
capabilities-developmentfrom
feat/solana-log-trigger

Conversation

@ernest-nowacki

@ernest-nowacki ernest-nowacki commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Solana log trigger support

Adds LogTrigger support to the Solana capability client,.

Changes

  • Generated Solana client regenerated from updated chainlink-protos submodule. This added new logTrigger() method with FilterLogTriggerRequest config (CPI filters, subkey configs, value comparators).

  • adaptTrigger helper: wraps a trigger and overrides only adapt() — TS analog of Go bindings embedding cre.Trigger. Used by generated contract bindings to decode raw log outputs into typed events.

  • Solana helpers: log-trigger utilities — anchorCPILogTriggerConfig, subkey value encoding (prepareSubkeyValue, prepareSubkeyFloatValue) + unit test coverage.

  • Public exports (important for workflow authors):

    • SolanaLog,
    • SolanaFilterLogTriggerRequestJson,
    • SolanaCPIFilterConfigJson,
    • SolanaSubkeyConfigJson,
    • SolanaValueComparatorJson,
    • SolanaComparisonOperator
  • Networks: regenerated chain selectors (new testnets), bumped chain-selectors pin.

Testing

  • Unit tests for Solana helpers (solana-helpers.test.ts)
  • The feature was tested by deploying workflow triggered by LogTrigger.

Notes

Not related directly but was blocking me on CI so it's also handled with this PR:

  • E2E scripts: fail fast and surface simulator output on error instead of swallowing it.
  • Deps: add @noble/curves; .env.example gains dummy CRE_SOLANA_PRIVATE_KEY (both were missing and causing errors)

amit-momin and others added 9 commits June 23, 2026 13:36
* Solana progress

* Run formatting

* Prepare sdk for binding generator

* restore files

* Fix lint issue

* Lock the newer versions

* Rework structure of cre-examples so it support modern format (matching what cre cli delivers on init) and deploying solana workflow for testing

* Fix imports

* Fix test

* Update the baseline

* Update from local simulation to staging settings
@ernest-nowacki
ernest-nowacki marked this pull request as ready for review July 15, 2026 10:42
@ernest-nowacki
ernest-nowacki requested review from a team as code owners July 15, 2026 10:42
Comment on lines +16 to 21
if ! cre workflow simulate ./src/workflows/hello-world > "$OUTPUT_FILE" 2>&1; then
echo "❌ ERROR: cre workflow simulate failed. Output:"
cat "$OUTPUT_FILE"
exit 1
fi
cat "$OUTPUT_FILE"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We were seeing empty messages on failed simulations - this is not related to the Solana binding generation but unlocked debugging CI for me. Basically just showing up what went wrong if simulation fails.

@silaslenihan silaslenihan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

mainly LGTM just left one nit

Comment thread packages/cre-sdk/src/sdk/utils/capabilities/blockchain/solana/solana-helpers.ts Outdated
@ernest-nowacki
ernest-nowacki changed the base branch from main to capabilities-development July 15, 2026 14:21
@ernest-nowacki
ernest-nowacki enabled auto-merge (squash) July 16, 2026 14:44
@ernest-nowacki
ernest-nowacki merged commit c2f8bd2 into capabilities-development Jul 16, 2026
4 checks passed
@ernest-nowacki
ernest-nowacki deleted the feat/solana-log-trigger branch July 16, 2026 17:34
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.

4 participants