Skip to content

Conversation

@Siddharth2207
Copy link
Contributor

@Siddharth2207 Siddharth2207 commented Dec 12, 2025

Motivation

MSTR,TSLA,NVDA,AMZN,COIN pre and post market

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

  • New Features

    • Added PRE/POST market-hour variants for multiple equity price feeds and added support for CRCL, PPLT, and BMNR.
  • Tests

    • Expanded assertions and coverage for PRE/POST variants and added tests exercising CRCL, PPLT, and BMNR scenarios with updated expected price data.
  • Chores

    • Updated fork base configuration to include new bases for CRCL, PPLT, and BMNR.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 12, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • src/generated/PythWords.pointers.sol is excluded by !**/generated/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Adds PRE/POST variants and new equity feeds (CRCL, PPLT, BMNR) to LibPyth, extends symbol→ID and contract resolution, updates fork base constants, and expands tests to cover PRE/POST variants and new fork scenarios.

Changes

Cohort / File(s) Summary
Core library — Pyth feed constants & mapping
src/lib/pyth/LibPyth.sol
Adds PRICE_FEED_ID_* and PRICE_FEED_SYMBOL_INTORASTRING_* constants for PRE/POST variants (AMZN, TSLA, NVDA, MSTR, COIN, CRCL, PPLT, BMNR); updates formatting; extends getPriceFeedId and getPriceFeedContract to map PRE/POST, CRCL, PPLT, BMNR variants.
Test config / forks
test/lib/LibFork.sol
Updates FORK_BLOCK_BASE value and adds FORK_BLOCK_BASE_CRCL, FORK_BLOCK_BASE_PPLT, and FORK_BLOCK_BASE_BMNR constants.
Tests — constants & ID resolution
test/src/lib/pyth/LibPyth.constants.t.sol, test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol
Expands assertions to include PRE/POST variants and new CRCL/PPLT/BMNR feed symbol mappings; adjusts imports.
Tests — price queries / expectations
test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol
Updates expected price/confidence values across many assets; adds tests testPriceNoOlderThanBaseCrcl(), testPriceNoOlderThanBasePplt(), testPriceNoOlderThanBaseBmnr() and includes PRE/POST variants using new fork bases.

Sequence Diagram(s)

(omitted — changes are constant/mapping additions and test updates; no new multi-component control-flow requiring a sequence diagram)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • wsteth #12 — Adds price-feed constants and extends getPriceFeedId mappings; overlaps with the new PRE/POST constant additions.
  • 2025 11 11 cbbtc #11 — Similar edits to LibPyth.sol for adding feed constants and mapping logic; strong code-level relation.
  • IAU Price Feed  #8 — Prior additions of price-feed constants and symbol→ID mapping updates that overlap on same code paths.

Suggested reviewers

  • thedavidmeister
  • hardyjosh

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'pre, post market' directly matches the main objective of adding pre- and post-market data for equity tickers, clearly summarizing the primary change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol (1)

167-208: Refactor vm.assume mega-predicate to a helper using the LibPyth symbol constants.
Current form is brittle and easy to desync when adding new feeds.

 contract LibPythGetPriceFeedIdTest is Test {
+    function _isKnownSymbol(uint256 u) internal pure returns (bool) {
+        return u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_CRYPTO_ARB_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_CRYPTO_BTC_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_CRYPTO_WBTC_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_CRYPTO_CBBTC_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_CRYPTO_DOT_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_CRYPTO_ENA_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_CRYPTO_ETH_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_CRYPTO_WETH_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_CRYPTO_WSTETH_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_CRYPTO_LINK_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_CRYPTO_PEPE_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_CRYPTO_PYTH_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_CRYPTO_UNI_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_CRYPTO_XAUT_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_CRYPTO_XRP_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_COIN_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_COIN_USD_PRE
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_COIN_USD_POST
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_GOOG_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_AMZN_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_AMZN_USD_PRE
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_AMZN_USD_POST
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_AAPL_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_MSFT_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_TSLA_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_TSLA_USD_PRE
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_TSLA_USD_POST
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_NVDA_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_NVDA_USD_PRE
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_NVDA_USD_POST
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_META_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_GME_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_MSTR_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_MSTR_USD_PRE
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_MSTR_USD_POST
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_BRK_B_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_SPLG_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_IAU_USD
+            || u == LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_SIVR_USD;
+    }
+
     function testPriceFeedIdUnknownMappings(IntOrAString symbol) external {
-        vm.assume(
-            IntOrAString.unwrap(symbol) != IntOrAString.unwrap(LibIntOrAString.fromString2("Crypto.ARB/USD"))
-                && IntOrAString.unwrap(symbol) != IntOrAString.unwrap(LibIntOrAString.fromString2("Crypto.BTC/USD"))
-                ...
-        );
+        uint256 u = IntOrAString.unwrap(symbol);
+        vm.assume(!_isKnownSymbol(u));
         vm.expectRevert(UnsupportedFeedSymbol.selector);
         this.getPriceFeedIdExternal(symbol);
     }
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e7a4506 and 4dd1914.

📒 Files selected for processing (5)
  • src/lib/pyth/LibPyth.sol (5 hunks)
  • test/lib/LibFork.sol (1 hunks)
  • test/src/lib/pyth/LibPyth.constants.t.sol (5 hunks)
  • test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol (5 hunks)
  • test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-03T13:50:23.519Z
Learnt from: Siddharth2207
Repo: rainlanguage/rain.pyth PR: 3
File: src/lib/pyth/LibPyth.sol:59-79
Timestamp: 2025-10-03T13:50:23.519Z
Learning: In the rain.pyth repository, the IntOrAString encoding scheme supports custom discriminator bytes. While most equity feed symbols use 0x92 as the discriminator byte, custom values like 0x91 are intentionally used for specific feeds such as EQUITY_US_GME_USD.

Applied to files:

  • src/lib/pyth/LibPyth.sol
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: deploy
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-test)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-static)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-legal)
  • GitHub Check: git-clean
🔇 Additional comments (5)
test/src/lib/pyth/LibPyth.constants.t.sol (1)

80-87: Constant encoding assertions look solid for PRE/POST variants.
Good coverage to ensure the IntOrAString literals match fromString2(...).

Also applies to: 96-103, 116-123, 128-135, 148-155

test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol (1)

73-80: PRE/POST mapping tests: good additions.
These directly validate the new branches in LibPyth.getPriceFeedId.

Also applies to: 89-96, 109-116, 121-128, 141-148

test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol (1)

180-200: Forked price expectations: please verify determinism at FORK_BLOCK_BASE = 39366248, especially PRE/POST within 24h.
This is a good coverage expansion, but it will fail hard if any feed isn’t published within the 24h window at that exact block.

Also applies to: 216-248, 264-278, 301-315

src/lib/pyth/LibPyth.sol (1)

115-124: Verify PRE/POST feed IDs against Pyth official source and confirm chain deployment.

The new PRICE_FEED_ID_EQUITY_US_*_USD_PRE/POST constants require validation against the official Pyth Price Feed IDs page (via Pyth docs or Hermes API). Ensure all six symbols (AMZN, TSLA, NVDA, MSTR, COIN) are deployed on Base and Arbitrum chains—if any feed ID is incorrect or unavailable on a target chain, price reads will revert or return wrong data. Regarding the IntOrAString discriminator bytes (0x96/0x97): custom discriminator bytes are intentionally used in this repo (e.g., 0x91 for EQUITY_US_GME_USD per the codebase learnings), so confirm these values align with your encoding scheme.

Also applies to: 143-152, 159-168, 187-196, 222-231

test/lib/LibFork.sol (1)

8-9: Add documentation for fork block choice on Base.

The fork block (39366248, mined Dec 12, 2025) is very recent. Add a comment explaining why this specific block was selected—e.g., "first block where Equity.US.* feeds have fresh prices" or similar rationale—to help future maintainers understand the determinism requirement and when/why it may need updating.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol (1)

167-216: The growing vm.assume “known symbol exclusion” list is brittle and reduces fuzz usefulness.
As more symbols/variants are added, this becomes easy to forget to update and can significantly constrain fuzzing. Consider centralizing “known symbols” into a single list used by both the positive and negative tests (or generate exclusions from the same table used in testPriceFeedIdKnownMappings).

test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol (1)

175-322: PRE/POST coverage looks good, but these exact-value asserts are tightly coupled to FORK_BLOCK_BASE.
If FORK_BLOCK_BASE moves, this will likely require broad rewrites. Consider centralizing (symbol, expectedPrice, expectedConf) in a single table (including PRE/POST) to reduce churn and improve readability. Also worth double-checking that all newly-added PRE/POST expectations are derived from the same pinned fork block state you intend CI to use.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4dd1914 and bd458a0.

⛔ Files ignored due to path filters (1)
  • src/generated/PythWords.pointers.sol is excluded by !**/generated/**
📒 Files selected for processing (3)
  • test/src/concrete/PythFork.t.sol (1 hunks)
  • test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol (5 hunks)
  • test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: git-clean
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-test)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-legal)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-static)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
src/lib/pyth/LibPyth.sol (1)

283-322: Mappings for PRE/POST variants look consistent; getPriceFeedId chain growth note (duplicate).

The new branches map each newly-added PRICE_FEED_SYMBOL_INTORASTRING_*_{PRE,POST} to the matching PRICE_FEED_ID_*_{PRE,POST} and are placed adjacent to their base ticker mappings, which reduces mismatch risk.

The function is still trending toward an error-prone mega-chain; this was already called out in prior review comments.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd458a0 and 4794da1.

📒 Files selected for processing (1)
  • src/lib/pyth/LibPyth.sol (5 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-03T13:50:23.519Z
Learnt from: Siddharth2207
Repo: rainlanguage/rain.pyth PR: 3
File: src/lib/pyth/LibPyth.sol:59-79
Timestamp: 2025-10-03T13:50:23.519Z
Learning: In the rain.pyth repository, the IntOrAString encoding scheme supports custom discriminator bytes. While most equity feed symbols use 0x92 as the discriminator byte, custom values like 0x91 are intentionally used for specific feeds such as EQUITY_US_GME_USD.

Applied to files:

  • src/lib/pyth/LibPyth.sol
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-test)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-static)
  • GitHub Check: git-clean
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-legal)
🔇 Additional comments (4)
src/lib/pyth/LibPyth.sol (4)

115-124: The AMZN PRE/POST constants are correct. The IntOrAString encodings properly decode to Equity.US.AMZN/USD.PRE and Equity.US.AMZN/USD.POST with discriminators 0x96 and 0x97 respectively. The feed IDs are validated by test usage in test/src/concrete/PythFork.t.sol, and the discriminator pattern is consistent across all new PRE/POST feeds (TSLA, NVDA, MSTR, COIN), aligning with the design that custom discriminator bytes are intentional.


159-168: Symbol encodings are correct; feed ID values cannot be verified without Pyth API access.

The IntOrAString encodings for both NVDA PRE and POST are correct:

  • PRE: 0x964571756974792e55532e4e5644412f5553442e505245... decodes to discriminator 0x96 + "Equity.US.NVDA/USD.PRE"
  • POST: 0x974571756974792e55532e4e5644412f5553442e504f53540000... decodes to discriminator 0x97 + "Equity.US.NVDA/USD.POST"

Both constants are validated in test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol (lines 121–127), confirming the symbol-to-ID mappings work correctly.

However, the actual feed ID hex values themselves cannot be verified against official Pyth documentation without access to the Pyth Hermes API or official feed list. Pyth publishes only the mechanism for feed IDs (https://docs.pyth.network/price-feeds/core/price-feeds/price-feed-ids) but not a static reference of all IDs. To verify the hex values, cross-reference against Pyth's Hermes API or the official price feed registry.


187-196: Symbol encodings are correctly formatted and verified through tests. Feed ID hex values match the library's internal symbol-to-ID mapping and pass all validation tests, but their absolute correctness against Pyth's official data cannot be independently confirmed due to unavailable API access and unpublished feed documentation.


143-152: No changes needed. Both feed IDs and IntOrAString encodings are correct per official Pyth documentation:

  • Feed IDs match: TSLA/USD PRE 0x42676a595d...854ebe20a and POST 0x2a797e19...bcd256cdb9b9
  • IntOrAString PRE decodes to Equity.US.TSLA/USD.PRE with discriminator 0x96
  • IntOrAString POST decodes to Equity.US.TSLA/USD.POST with discriminator 0x97

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
src/lib/pyth/LibPyth.sol (1)

291-338: getPriceFeedId branch growth continues; consider structural refactor.

The new PRE/POST mappings are correctly added and follow the established pattern. However, this if-else chain continues to grow (now ~50 branches). As noted in a previous review, consider splitting by domain (crypto vs equity) or using a lookup table to reduce maintenance burden and error risk.

test/src/lib/pyth/LibPyth.constants.t.sol (1)

5-5: Drop console2 import if unused.

console2 is imported but not used in this test file.

-import {Test, console2} from "forge-std/Test.sol";
+import {Test} from "forge-std/Test.sol";
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 02013e0 and a8446e7.

📒 Files selected for processing (4)
  • src/lib/pyth/LibPyth.sol (6 hunks)
  • test/src/lib/pyth/LibPyth.constants.t.sol (6 hunks)
  • test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol (6 hunks)
  • test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-03T13:50:23.519Z
Learnt from: Siddharth2207
Repo: rainlanguage/rain.pyth PR: 3
File: src/lib/pyth/LibPyth.sol:59-79
Timestamp: 2025-10-03T13:50:23.519Z
Learning: In the rain.pyth repository, the IntOrAString encoding scheme supports custom discriminator bytes. While most equity feed symbols use 0x92 as the discriminator byte, custom values like 0x91 are intentionally used for specific feeds such as EQUITY_US_GME_USD.

Applied to files:

  • src/lib/pyth/LibPyth.sol
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-static)
  • GitHub Check: git-clean
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-legal)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-test)
🔇 Additional comments (24)
src/lib/pyth/LibPyth.sol (6)

115-124: LGTM: AMZN PRE/POST constants added correctly.

The feed IDs and INTORASTRING symbols follow the established pattern. The discriminator bytes (0x96 for PRE, 0x97 for POST) are consistent with other PRE/POST variants.

Please verify that these Pyth feed IDs (0x82c59e... for PRE, 0x62731d... for POST) are correct against your Pyth feed configuration, as these cannot be independently verified from public documentation.


143-152: LGTM: TSLA PRE/POST constants added correctly.

Pattern is consistent with other equity PRE/POST feeds.

Please verify the TSLA PRE/POST feed IDs against your Pyth feed configuration.


159-168: LGTM: NVDA PRE/POST constants added correctly.

Pattern is consistent with other equity PRE/POST feeds.

Please verify the NVDA PRE/POST feed IDs against your Pyth feed configuration.


187-197: LGTM: MSTR PRE/POST constants added correctly.

Pattern is consistent with other equity PRE/POST feeds.

Please verify the MSTR PRE/POST feed IDs against your Pyth feed configuration.


221-231: LGTM: COIN PRE/POST constants added, formatting updated.

The uint256() wrapper was removed from the base COIN_USD symbol (line 221) for consistency with other equity symbols. PRE/POST variants added correctly.

Please verify the COIN PRE/POST feed IDs against your Pyth feed configuration.


238-243: LGTM: New CRCL/USD feed added.

New equity feed for Circle (CRCL) follows the established pattern with discriminator byte 0x92.

Please verify the CRCL/USD feed ID (0x92b8527a...) against your Pyth feed configuration.

test/src/lib/pyth/LibPyth.constants.t.sol (6)

80-87: LGTM: COIN PRE/POST symbol constant tests added.

Tests correctly validate the INTORASTRING encoding for COIN PRE/POST variants.


96-103: LGTM: AMZN PRE/POST symbol constant tests added.

Tests correctly validate the INTORASTRING encoding.


116-123: LGTM: TSLA PRE/POST symbol constant tests added.

Tests correctly validate the INTORASTRING encoding.


128-135: LGTM: NVDA PRE/POST symbol constant tests added.

Tests correctly validate the INTORASTRING encoding.


148-155: LGTM: MSTR PRE/POST symbol constant tests added.

Tests correctly validate the INTORASTRING encoding.


172-175: LGTM: CRCL/USD symbol constant test added.

Test correctly validates the INTORASTRING encoding for the new CRCL feed.

test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol (7)

73-80: LGTM: COIN PRE/POST feed ID mapping tests added.

Tests correctly validate the getPriceFeedId mappings for COIN PRE/POST variants.


89-96: LGTM: AMZN PRE/POST feed ID mapping tests added.


109-116: LGTM: TSLA PRE/POST feed ID mapping tests added.


121-128: LGTM: NVDA PRE/POST feed ID mapping tests added.


141-148: LGTM: MSTR PRE/POST feed ID mapping tests added.


165-168: LGTM: CRCL/USD feed ID mapping test added.


189-217: LGTM: Unknown mappings exclusion list updated.

All new PRE/POST variants and CRCL/USD are correctly added to the vm.assume exclusion list, ensuring the fuzz test properly excludes known symbols.

test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol (5)

189-199: LGTM: AMZN PRE/POST price retrieval tests added.

Tests validate that getPriceNoOlderThan correctly returns price and confidence values for AMZN PRE/POST feeds at the fork block.


219-229: LGTM: TSLA PRE/POST price retrieval tests added.


237-247: LGTM: NVDA PRE/POST price retrieval tests added.


267-277: LGTM: MSTR PRE/POST price retrieval tests added.


304-314: LGTM: COIN PRE/POST price retrieval tests added.

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.

2 participants