Skip to content

Add CEG, TSM feeds#21

Open
Siddharth2207 wants to merge 3 commits into
2026-04-19-sgovfrom
2026-05-19-new-feeds
Open

Add CEG, TSM feeds#21
Siddharth2207 wants to merge 3 commits into
2026-04-19-sgovfrom
2026-05-19-new-feeds

Conversation

@Siddharth2207
Copy link
Copy Markdown
Contributor

@Siddharth2207 Siddharth2207 commented May 19, 2026

Motivation

Extend equity feed coverage in rain.pyth by adding CEG and TSM (including pre/post market) mappings so downstream consumers can resolve and read these symbols through the existing Pyth integration.

This PR stacks on #20 (2026-04-19-sgov).

What Changed

  • Added new equity feed constants and symbol mappings in src/lib/pyth/LibPyth.sol for:
    • EQUITY.US.CEG/USD
    • EQUITY.US.TSM/USD
    • EQUITY.US.TSM/USD.PRE
    • EQUITY.US.TSM/USD.POST
  • Extended getPriceFeedId() resolution for the new symbols.
  • Added fork baselines in test/lib/LibFork.sol for CEG and TSM price checks.
  • Extended unit tests to validate feed-id resolution, constants, and getPriceNoOlderThan behavior.
  • Regenerated pointers/formatting updates required by the parser/pointer workflow.

Validation

  • Updated tests in:
    • test/src/lib/pyth/LibPyth.constants.t.sol
    • test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol
    • test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for new equity price feeds: SGOV/USD, QQQM/USD, VWO/USD, ARKK/USD, CEG/USD, and TSM/USD (including pre and post variants).
  • Tests

    • Expanded test coverage for newly supported equity price feeds on Base network.
  • Chores

    • Updated deployment workflow configuration with supported network targets.
    • Minor code formatting and refactoring improvements.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Caution

Review failed

Failed to post review comments

Walkthrough

This PR adds support for six new equity price feeds (SGOV/USD, QQQM/USD, VWO/USD, ARKK/USD, CEG/USD, TSM/USD including TSM PRE/POST variants) to LibPyth, refactors deployment configuration by hardcoding MetaBoard address, updates CI workflow with network choices and cleaned environment variables, and applies formatting improvements to function-pointer declarations.

Changes

Equity feeds and deployment updates

Layer / File(s) Summary
Deployment configuration refactor
script/Deploy.sol, .github/workflows/manual-sol-artifacts.yaml, .gitignore
METABOARD_ADDRESS is hardcoded as a constant in Deploy.sol and initialization no longer reads from environment variables. Workflow dispatch input specifies supported networks; repository checkout uses recursive submodules with full history; Nix prelude steps are reordered with rain-pyth-prelude added; deploy environment removes DEPLOY_METABOARD_ADDRESS assignment. .pre-commit-config.yaml is added to .gitignore.
Code formatting cleanups
src/abstract/PythExtern.sol, src/abstract/PythSubParser.sol, src/lib/pyth/LibPyth.sol
Function-pointer array type declarations are reformatted for condensed single-line style in PythExtern and PythSubParser; CBBTC/USD constant reformatted to multi-line literal. No logic changes.
New equity price feed constants and routing
src/lib/pyth/LibPyth.sol
Constants added for SGOV, QQQM, VWO, ARKK, CEG, and TSM (with TSM PRE/POST variants) defining both Pyth feed IDs and IntOrAString symbol values. getPriceFeedId() extended with else-if branches routing new symbols to their feed IDs.
Test infrastructure and validation for new feeds
test/lib/LibFork.sol, test/src/lib/pyth/LibPyth.*.t.sol
Fork block constants for new symbols added to LibFork. Test suites extend coverage with new constant assertions, known-mapping checks, and updated unknown-mapping fuzzing predicates. New external test functions validate getPriceNoOlderThan returns expected price/confidence tuples for each new symbol on Base fork.

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title mentions only CEG and TSM feeds, but the changeset also adds SGOV, QQQM, VWO, and ARKK equity price feeds alongside other improvements. Consider revising the title to reflect all newly added feeds (e.g., 'Add equity price feeds: SGOV, QQQM, VWO, ARKK, CEG, TSM') or clarify why only CEG and TSM are highlighted.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-05-19-new-feeds

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Siddharth2207 Siddharth2207 changed the base branch from main to 2026-04-19-sgov May 19, 2026 07:11
@Siddharth2207 Siddharth2207 self-assigned this May 19, 2026
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.

1 participant