From ba514e6d300abfa236eb80581f61fc8adaad9c4d Mon Sep 17 00:00:00 2001 From: Siddharth2207 Date: Thu, 28 Aug 2025 16:22:15 +0530 Subject: [PATCH 01/10] gme feed --- src/lib/pyth/LibPyth.sol | 7 +++++++ test/src/lib/pyth/LibPyth.constants.t.sol | 4 ++++ test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol | 5 +++++ test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol | 2 ++ 4 files changed, 18 insertions(+) diff --git a/src/lib/pyth/LibPyth.sol b/src/lib/pyth/LibPyth.sol index b9ebbc9..85996ef 100644 --- a/src/lib/pyth/LibPyth.sol +++ b/src/lib/pyth/LibPyth.sol @@ -56,6 +56,11 @@ library LibPyth { 0x78a3e3b8e676a8f73c439f5d749737034b139bbbe899ba5775216fba596607fe; uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_META_USD = 0x924571756974792e55532e4d4554412f55534400000000000000000000000000; + /// Gamestop + bytes32 constant PRICE_FEED_ID_EQUITY_US_GME_USD = + 0x6f9cd89ef1b7fd39f667101a91ad578b6c6ace4579d5f7f285a4b06aa4504be6; + uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_GME_USD = + 0x914571756974792e55532e474d452f5553440000000000000000000000000000; /// TODO replace with O(1) lookup table. function getPriceFeedContract(uint256 chainId) internal pure returns (IPyth) { @@ -85,6 +90,8 @@ library LibPyth { return PRICE_FEED_ID_EQUITY_US_NVDA_USD; } else if (feedSymbol == PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_META_USD) { return PRICE_FEED_ID_EQUITY_US_META_USD; + } else if (feedSymbol == PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_GME_USD) { + return PRICE_FEED_ID_EQUITY_US_GME_USD; } else { revert UnsupportedFeedSymbol(); } diff --git a/test/src/lib/pyth/LibPyth.constants.t.sol b/test/src/lib/pyth/LibPyth.constants.t.sol index 6612613..ec27581 100644 --- a/test/src/lib/pyth/LibPyth.constants.t.sol +++ b/test/src/lib/pyth/LibPyth.constants.t.sol @@ -41,5 +41,9 @@ contract LibPythConstantsTest is Test { LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_META_USD, IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.META/USD")) ); + assertEq( + LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_GME_USD, + IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.GME/USD")) + ); } } diff --git a/test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol b/test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol index 7a8cb1e..f7c7579 100644 --- a/test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol +++ b/test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol @@ -41,6 +41,10 @@ contract LibPythGetPriceFeedIdTest is Test { LibPyth.PRICE_FEED_ID_EQUITY_US_META_USD, LibPyth.getPriceFeedId(LibIntOrAString.fromString2("Equity.US.META/USD")) ); + assertEq( + LibPyth.PRICE_FEED_ID_EQUITY_US_GME_USD, + LibPyth.getPriceFeedId(LibIntOrAString.fromString2("Equity.US.GME/USD")) + ); } function testPriceFeedIdUnknownMappings(IntOrAString symbol) external { @@ -52,6 +56,7 @@ contract LibPythGetPriceFeedIdTest is Test { && IntOrAString.unwrap(symbol) != IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.TSLA/USD")) && IntOrAString.unwrap(symbol) != IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.NVDA/USD")) && IntOrAString.unwrap(symbol) != IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.META/USD")) + && IntOrAString.unwrap(symbol) != IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.GME/USD")) ); vm.expectRevert(UnsupportedFeedSymbol.selector); this.getPriceFeedIdExternal(symbol); diff --git a/test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol b/test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol index 7a97c16..c509037 100644 --- a/test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol +++ b/test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol @@ -27,6 +27,7 @@ contract LibPythGetPriceNoOlderThanTest is Test { checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.TSLA/USD"), 300 hours, 360.02978e18); checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.NVDA/USD"), 1000 hours, 104.5623e18); checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.META/USD"), 8000 hours, 448.73e18); + checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.GME/USD"), 8000 hours, 29.3177e18); vm.createSelectFork(FORK_RPC_URL_BASE, FORK_BLOCK_BASE); checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.GOOG/USD"), 72 hours, 174.93179e18); checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.AMZN/USD"), 500 hours, 207.372e18); @@ -35,5 +36,6 @@ contract LibPythGetPriceNoOlderThanTest is Test { checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.TSLA/USD"), 72 hours, 301.47341e18); checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.NVDA/USD"), 72 hours, 141.66994e18); checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.META/USD"), 72 hours, 693.349e18); + checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.GME/USD"), 300 hours, 29.58047e18); } } From 9b26960424a2c6fac9df4e8fa0efdfe297f95777 Mon Sep 17 00:00:00 2001 From: Siddharth2207 Date: Fri, 3 Oct 2025 18:53:41 +0530 Subject: [PATCH 02/10] MSTR, BRKB, SPLG --- src/lib/pyth/LibPyth.sol | 21 +++++++++++++++++ test/lib/LibFork.sol | 2 +- test/src/lib/pyth/LibPyth.constants.t.sol | 12 ++++++++++ .../src/lib/pyth/LibPyth.getPriceFeedId.t.sol | 15 ++++++++++++ .../pyth/LibPyth.getPriceNoOlderThan.t.sol | 23 ++++++++++++------- 5 files changed, 64 insertions(+), 9 deletions(-) diff --git a/src/lib/pyth/LibPyth.sol b/src/lib/pyth/LibPyth.sol index 85996ef..cad6656 100644 --- a/src/lib/pyth/LibPyth.sol +++ b/src/lib/pyth/LibPyth.sol @@ -61,6 +61,21 @@ library LibPyth { 0x6f9cd89ef1b7fd39f667101a91ad578b6c6ace4579d5f7f285a4b06aa4504be6; uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_GME_USD = 0x914571756974792e55532e474d452f5553440000000000000000000000000000; + /// MSTR + bytes32 constant PRICE_FEED_ID_EQUITY_US_MSTR_USD = + 0xe1e80251e5f5184f2195008382538e847fafc36f751896889dd3d1b1f6111f09; + uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_MSTR_USD = + 0x924571756974792e55532e4d5354522f55534400000000000000000000000000; + /// BRK_B + bytes32 constant PRICE_FEED_ID_EQUITY_US_BRK_B_USD = + 0xe21c688b7fc65b4606a50f3635f466f6986db129bf16979875d160f9c508e8c7; + uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_BRK_B_USD = + 0x934571756974792e55532e42524b2d422f555344000000000000000000000000; + /// SPLG + bytes32 constant PRICE_FEED_ID_EQUITY_US_SPLG_USD = + 0x4dfbf28d72ab41a878afcd4c6d5e9593dca7cf65a0da739cbad9b7414004f82d; + uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_SPLG_USD = + 0x924571756974792e55532e53504c472f55534400000000000000000000000000; /// TODO replace with O(1) lookup table. function getPriceFeedContract(uint256 chainId) internal pure returns (IPyth) { @@ -92,6 +107,12 @@ library LibPyth { return PRICE_FEED_ID_EQUITY_US_META_USD; } else if (feedSymbol == PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_GME_USD) { return PRICE_FEED_ID_EQUITY_US_GME_USD; + } else if (feedSymbol == PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_MSTR_USD) { + return PRICE_FEED_ID_EQUITY_US_MSTR_USD; + } else if (feedSymbol == PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_BRK_B_USD) { + return PRICE_FEED_ID_EQUITY_US_BRK_B_USD; + } else if (feedSymbol == PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_SPLG_USD) { + return PRICE_FEED_ID_EQUITY_US_SPLG_USD; } else { revert UnsupportedFeedSymbol(); } diff --git a/test/lib/LibFork.sol b/test/lib/LibFork.sol index 12f6aed..c335873 100644 --- a/test/lib/LibFork.sol +++ b/test/lib/LibFork.sol @@ -6,4 +6,4 @@ string constant FORK_RPC_URL_ARBITRUM = "https://arbitrum.gateway.tenderly.co"; string constant FORK_RPC_URL_BASE = "https://base.gateway.tenderly.co"; uint256 constant FORK_BLOCK_ARBITRUM = 345270769; -uint256 constant FORK_BLOCK_BASE = 31309429; +uint256 constant FORK_BLOCK_BASE = 36353737; diff --git a/test/src/lib/pyth/LibPyth.constants.t.sol b/test/src/lib/pyth/LibPyth.constants.t.sol index ec27581..88f98ef 100644 --- a/test/src/lib/pyth/LibPyth.constants.t.sol +++ b/test/src/lib/pyth/LibPyth.constants.t.sol @@ -45,5 +45,17 @@ contract LibPythConstantsTest is Test { LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_GME_USD, IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.GME/USD")) ); + assertEq( + LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_MSTR_USD, + IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.MSTR/USD")) + ); + assertEq( + LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_BRK_B_USD, + IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.BRK-B/USD")) + ); + assertEq( + LibPyth.PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_SPLG_USD, + IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.SPLG/USD")) + ); } } diff --git a/test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol b/test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol index f7c7579..7022e91 100644 --- a/test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol +++ b/test/src/lib/pyth/LibPyth.getPriceFeedId.t.sol @@ -45,6 +45,18 @@ contract LibPythGetPriceFeedIdTest is Test { LibPyth.PRICE_FEED_ID_EQUITY_US_GME_USD, LibPyth.getPriceFeedId(LibIntOrAString.fromString2("Equity.US.GME/USD")) ); + assertEq( + LibPyth.PRICE_FEED_ID_EQUITY_US_MSTR_USD, + LibPyth.getPriceFeedId(LibIntOrAString.fromString2("Equity.US.MSTR/USD")) + ); + assertEq( + LibPyth.PRICE_FEED_ID_EQUITY_US_BRK_B_USD, + LibPyth.getPriceFeedId(LibIntOrAString.fromString2("Equity.US.BRK-B/USD")) + ); + assertEq( + LibPyth.PRICE_FEED_ID_EQUITY_US_SPLG_USD, + LibPyth.getPriceFeedId(LibIntOrAString.fromString2("Equity.US.SPLG/USD")) + ); } function testPriceFeedIdUnknownMappings(IntOrAString symbol) external { @@ -57,6 +69,9 @@ contract LibPythGetPriceFeedIdTest is Test { && IntOrAString.unwrap(symbol) != IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.NVDA/USD")) && IntOrAString.unwrap(symbol) != IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.META/USD")) && IntOrAString.unwrap(symbol) != IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.GME/USD")) + && IntOrAString.unwrap(symbol) != IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.MSTR/USD")) + && IntOrAString.unwrap(symbol) != IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.BRK-B/USD")) + && IntOrAString.unwrap(symbol) != IntOrAString.unwrap(LibIntOrAString.fromString2("Equity.US.SPLG/USD")) ); vm.expectRevert(UnsupportedFeedSymbol.selector); this.getPriceFeedIdExternal(symbol); diff --git a/test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol b/test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol index c509037..9a93915 100644 --- a/test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol +++ b/test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol @@ -28,14 +28,21 @@ contract LibPythGetPriceNoOlderThanTest is Test { checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.NVDA/USD"), 1000 hours, 104.5623e18); checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.META/USD"), 8000 hours, 448.73e18); checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.GME/USD"), 8000 hours, 29.3177e18); + } + + function testPriceNoOlderThanBase() external { vm.createSelectFork(FORK_RPC_URL_BASE, FORK_BLOCK_BASE); - checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.GOOG/USD"), 72 hours, 174.93179e18); - checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.AMZN/USD"), 500 hours, 207.372e18); - checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.AAPL/USD"), 72 hours, 205.12e18); - checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.MSFT/USD"), 300 hours, 458.35309e18); - checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.TSLA/USD"), 72 hours, 301.47341e18); - checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.NVDA/USD"), 72 hours, 141.66994e18); - checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.META/USD"), 72 hours, 693.349e18); - checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.GME/USD"), 300 hours, 29.58047e18); + checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.GOOG/USD"), 24 hours, 246.29352e18); + checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.AMZN/USD"), 24 hours, 222.43512e18); + checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.AAPL/USD"), 24 hours, 257.33026e18); + checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.MSFT/USD"), 24 hours, 515.64431e18); + checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.TSLA/USD"), 24 hours, 436.03414e18); + checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.NVDA/USD"), 24 hours, 188.92e18); + checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.META/USD"), 24 hours, 727.0145e18); + checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.GME/USD"), 24 hours, 27.24202e18); + checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.MSTR/USD"), 24 hours, 352.34642e18); + checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.BRK-B/USD"), 24 hours, 496.12003e18); + checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.SPLG/USD"), 24 hours, 78.71367e18); + } } From 7f63c85e2c6ae151a397b55daecda0dffb826a0a Mon Sep 17 00:00:00 2001 From: Siddharth2207 Date: Fri, 3 Oct 2025 19:43:35 +0530 Subject: [PATCH 03/10] pointers --- src/generated/PythWords.pointers.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generated/PythWords.pointers.sol b/src/generated/PythWords.pointers.sol index 62ea9cd..908bf27 100644 --- a/src/generated/PythWords.pointers.sol +++ b/src/generated/PythWords.pointers.sol @@ -10,7 +10,7 @@ pragma solidity =0.8.25; /// @dev Hash of the known bytecode. -bytes32 constant BYTECODE_HASH = bytes32(0x76761320ccc49a4455512ee152bb242a0b5f5832c6756524129e42ce6d521388); +bytes32 constant BYTECODE_HASH = bytes32(0xc2563d7f113f4586c661be35de1861e2a415f818178ecc8d568dd03a46eb9d92); /// @dev The hash of the meta that describes the contract. bytes32 constant DESCRIBED_BY_META_HASH = bytes32(0xe7bb5842b2cf1d25681a9885109fbf8943495bcebb9ec049bc3790e5db57fa80); From 703386b4a0aaabd1dffe61cac454f3c00bcbfab1 Mon Sep 17 00:00:00 2001 From: Siddharth2207 Date: Fri, 3 Oct 2025 20:14:14 +0530 Subject: [PATCH 04/10] fmt --- test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol b/test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol index 9a93915..34c5535 100644 --- a/test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol +++ b/test/src/lib/pyth/LibPyth.getPriceNoOlderThan.t.sol @@ -43,6 +43,5 @@ contract LibPythGetPriceNoOlderThanTest is Test { checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.MSTR/USD"), 24 hours, 352.34642e18); checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.BRK-B/USD"), 24 hours, 496.12003e18); checkPriceNoOlderThan(LibIntOrAString.fromString2("Equity.US.SPLG/USD"), 24 hours, 78.71367e18); - } } From cb152119eea70a519e824b3b535c1c354533323f Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 3 Oct 2025 19:33:46 +0400 Subject: [PATCH 05/10] lint --- src/lib/pyth/LibPyth.sol | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib/pyth/LibPyth.sol b/src/lib/pyth/LibPyth.sol index cad6656..e28982b 100644 --- a/src/lib/pyth/LibPyth.sol +++ b/src/lib/pyth/LibPyth.sol @@ -24,56 +24,67 @@ library LibPyth { /// Google. bytes32 constant PRICE_FEED_ID_EQUITY_US_GOOG_USD = 0xe65ff435be42630439c96396653a342829e877e2aafaeaf1a10d0ee5fd2cf3f2; + // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_GOOG_USD = 0x924571756974792e55532e474f4f472f55534400000000000000000000000000; /// Amazon. bytes32 constant PRICE_FEED_ID_EQUITY_US_AMZN_USD = 0xb5d0e0fa58a1f8b81498ae670ce93c872d14434b72c364885d4fa1b257cbb07a; + // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_AMZN_USD = 0x924571756974792e55532e414d5a4e2f55534400000000000000000000000000; /// Apple. bytes32 constant PRICE_FEED_ID_EQUITY_US_AAPL_USD = 0x49f6b65cb1de6b10eaf75e7c03ca029c306d0357e91b5311b175084a5ad55688; + // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_AAPL_USD = 0x924571756974792e55532e4141504c2f55534400000000000000000000000000; /// Microsoft. bytes32 constant PRICE_FEED_ID_EQUITY_US_MSFT_USD = 0xd0ca23c1cc005e004ccf1db5bf76aeb6a49218f43dac3d4b275e92de12ded4d1; + // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_MSFT_USD = 0x924571756974792e55532e4d5346542f55534400000000000000000000000000; /// Tesla. bytes32 constant PRICE_FEED_ID_EQUITY_US_TSLA_USD = 0x16dad506d7db8da01c87581c87ca897a012a153557d4d578c3b9c9e1bc0632f1; + // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_TSLA_USD = 0x924571756974792e55532e54534c412f55534400000000000000000000000000; /// Nvidia. bytes32 constant PRICE_FEED_ID_EQUITY_US_NVDA_USD = 0xb1073854ed24cbc755dc527418f52b7d271f6cc967bbf8d8129112b18860a593; + // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_NVDA_USD = 0x924571756974792e55532e4e5644412f55534400000000000000000000000000; /// Meta Platforms (Facebook). bytes32 constant PRICE_FEED_ID_EQUITY_US_META_USD = 0x78a3e3b8e676a8f73c439f5d749737034b139bbbe899ba5775216fba596607fe; + // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_META_USD = 0x924571756974792e55532e4d4554412f55534400000000000000000000000000; /// Gamestop bytes32 constant PRICE_FEED_ID_EQUITY_US_GME_USD = 0x6f9cd89ef1b7fd39f667101a91ad578b6c6ace4579d5f7f285a4b06aa4504be6; + // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_GME_USD = 0x914571756974792e55532e474d452f5553440000000000000000000000000000; /// MSTR bytes32 constant PRICE_FEED_ID_EQUITY_US_MSTR_USD = 0xe1e80251e5f5184f2195008382538e847fafc36f751896889dd3d1b1f6111f09; + // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_MSTR_USD = 0x924571756974792e55532e4d5354522f55534400000000000000000000000000; /// BRK_B bytes32 constant PRICE_FEED_ID_EQUITY_US_BRK_B_USD = 0xe21c688b7fc65b4606a50f3635f466f6986db129bf16979875d160f9c508e8c7; + // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_BRK_B_USD = 0x934571756974792e55532e42524b2d422f555344000000000000000000000000; /// SPLG bytes32 constant PRICE_FEED_ID_EQUITY_US_SPLG_USD = 0x4dfbf28d72ab41a878afcd4c6d5e9593dca7cf65a0da739cbad9b7414004f82d; + // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_SPLG_USD = 0x924571756974792e55532e53504c472f55534400000000000000000000000000; From 9094c750a6d7c3c51e6e5523953ed1e8f6a10c7d Mon Sep 17 00:00:00 2001 From: David Meister Date: Fri, 3 Oct 2025 19:54:30 +0400 Subject: [PATCH 06/10] Update src/lib/pyth/LibPyth.sol Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- src/lib/pyth/LibPyth.sol | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/pyth/LibPyth.sol b/src/lib/pyth/LibPyth.sol index e28982b..1708041 100644 --- a/src/lib/pyth/LibPyth.sol +++ b/src/lib/pyth/LibPyth.sol @@ -75,7 +75,11 @@ library LibPyth { // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_MSTR_USD = 0x924571756974792e55532e4d5354522f55534400000000000000000000000000; - /// BRK_B + /// Berkshire Hathaway Class B (BRK-B) + bytes32 constant PRICE_FEED_ID_EQUITY_US_BRK_B_USD = + 0xe21c688b7fc65b4606a50f3635f466f6986db129bf16979875d160f9c508e8c7; + uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_BRK_B_USD = + 0x934571756974792e55532e42524b2d422f555344000000000000000000000000; bytes32 constant PRICE_FEED_ID_EQUITY_US_BRK_B_USD = 0xe21c688b7fc65b4606a50f3635f466f6986db129bf16979875d160f9c508e8c7; // slither-disable-next-line too-many-digits From 3285c709f4f463bcb15e262ccec3c643dfe7e36d Mon Sep 17 00:00:00 2001 From: David Meister Date: Fri, 3 Oct 2025 19:54:39 +0400 Subject: [PATCH 07/10] Update src/lib/pyth/LibPyth.sol Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- src/lib/pyth/LibPyth.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/pyth/LibPyth.sol b/src/lib/pyth/LibPyth.sol index 1708041..b9a079e 100644 --- a/src/lib/pyth/LibPyth.sol +++ b/src/lib/pyth/LibPyth.sol @@ -85,7 +85,7 @@ library LibPyth { // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_BRK_B_USD = 0x934571756974792e55532e42524b2d422f555344000000000000000000000000; - /// SPLG + /// SPDR Portfolio S&P 500 ETF (SPLG) bytes32 constant PRICE_FEED_ID_EQUITY_US_SPLG_USD = 0x4dfbf28d72ab41a878afcd4c6d5e9593dca7cf65a0da739cbad9b7414004f82d; // slither-disable-next-line too-many-digits From 7ebbecc917a0b1d752270764c82911443357d9b5 Mon Sep 17 00:00:00 2001 From: David Meister Date: Fri, 3 Oct 2025 19:56:00 +0400 Subject: [PATCH 08/10] Update src/lib/pyth/LibPyth.sol Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- src/lib/pyth/LibPyth.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/pyth/LibPyth.sol b/src/lib/pyth/LibPyth.sol index b9a079e..7d6fb4a 100644 --- a/src/lib/pyth/LibPyth.sol +++ b/src/lib/pyth/LibPyth.sol @@ -69,7 +69,7 @@ library LibPyth { // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_GME_USD = 0x914571756974792e55532e474d452f5553440000000000000000000000000000; - /// MSTR + /// MicroStrategy (MSTR) bytes32 constant PRICE_FEED_ID_EQUITY_US_MSTR_USD = 0xe1e80251e5f5184f2195008382538e847fafc36f751896889dd3d1b1f6111f09; // slither-disable-next-line too-many-digits From 38c98bcf4f58cf52295c536a53e66e515ec11b33 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 3 Oct 2025 21:31:04 +0400 Subject: [PATCH 09/10] fix build --- src/lib/pyth/LibPyth.sol | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/lib/pyth/LibPyth.sol b/src/lib/pyth/LibPyth.sol index 7d6fb4a..2fbb424 100644 --- a/src/lib/pyth/LibPyth.sol +++ b/src/lib/pyth/LibPyth.sol @@ -78,11 +78,6 @@ library LibPyth { /// Berkshire Hathaway Class B (BRK-B) bytes32 constant PRICE_FEED_ID_EQUITY_US_BRK_B_USD = 0xe21c688b7fc65b4606a50f3635f466f6986db129bf16979875d160f9c508e8c7; - uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_BRK_B_USD = - 0x934571756974792e55532e42524b2d422f555344000000000000000000000000; - bytes32 constant PRICE_FEED_ID_EQUITY_US_BRK_B_USD = - 0xe21c688b7fc65b4606a50f3635f466f6986db129bf16979875d160f9c508e8c7; - // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_BRK_B_USD = 0x934571756974792e55532e42524b2d422f555344000000000000000000000000; /// SPDR Portfolio S&P 500 ETF (SPLG) From 0306d054771dcc17a542cb9427c5afc406ab02d2 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 3 Oct 2025 21:49:26 +0400 Subject: [PATCH 10/10] fix static --- src/lib/pyth/LibPyth.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/pyth/LibPyth.sol b/src/lib/pyth/LibPyth.sol index 2fbb424..e2988df 100644 --- a/src/lib/pyth/LibPyth.sol +++ b/src/lib/pyth/LibPyth.sol @@ -78,6 +78,7 @@ library LibPyth { /// Berkshire Hathaway Class B (BRK-B) bytes32 constant PRICE_FEED_ID_EQUITY_US_BRK_B_USD = 0xe21c688b7fc65b4606a50f3635f466f6986db129bf16979875d160f9c508e8c7; + // slither-disable-next-line too-many-digits uint256 constant PRICE_FEED_SYMBOL_INTORASTRING_EQUITY_US_BRK_B_USD = 0x934571756974792e55532e42524b2d422f555344000000000000000000000000; /// SPDR Portfolio S&P 500 ETF (SPLG)