Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions src/lib/config/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,91 @@ export const TOKENS: CategorizedToken[] = [
tradingViewSymbol: 'NASDAQ:TTWO',
tradingViewMarket: 'america',
limitOrders: []
},
{
chainId: base.id,
address: '0x6a2357Df4975C667B171bE53dA6FFe6deBf7030c',
unwrappedAddress: '0x15De944Cd020A18C8E5626fB0F81b36e73956199',
symbol: 'wtGOOGL',
decimals: 18,
name: 'Wrapped Alphabet Inc. Class A ST0x',
logoUrl: '/images/GOOGL.png',
priceFeedId: '0x5a48c03e9b9cb337801073ed9d166817473697efff0d138874e0f6a33d6d5aa6',
category: 'ST0x',
tradingViewSymbol: 'NASDAQ:GOOGL',
tradingViewMarket: 'america',
limitOrders: []
},
{
chainId: base.id,
address: '0xf567652fC2d7Db8D5469fD06AEbe8C9c4372d722',
unwrappedAddress: '0xBDC237Aa3B67cC3088adAf117913F30Bf08157a3',
symbol: 'wtINTC',
decimals: 18,
name: 'Wrapped Intel Corporation ST0x',
logoUrl: '/images/INTC.png',
priceFeedId: '0xc1751e085ee292b8b3b9dd122a135614485a201c35dfc653553f0e28c1baf3ff',
category: 'ST0x',
tradingViewSymbol: 'NASDAQ:INTC',
tradingViewMarket: 'america',
limitOrders: []
},
{
chainId: base.id,
address: '0x1020EC8Aa3f709a1f3D8705cdBa89b950451bd88',
unwrappedAddress: '0xD36056a4a03707D3743fCE4e9C08852820ADcfdC',
symbol: 'wtAAPL',
decimals: 18,
name: 'Wrapped Apple Inc. ST0x',
logoUrl: '/images/AAPL.png',
priceFeedId: '0x49f6b65cb1de6b10eaf75e7c03ca029c306d0357e91b5311b175084a5ad55688',
category: 'ST0x',
tradingViewSymbol: 'NASDAQ:AAPL',
tradingViewMarket: 'america',
limitOrders: []
},
{
chainId: base.id,
address: '0x515A3Ac2a6aB590bDFa970caFFFd7fAdC680886E',
unwrappedAddress: '0x6a071E25fa25653cF15d1ee320eA3df771926Aa0',
symbol: 'wtMSFT',
decimals: 18,
name: 'Wrapped Microsoft Corporation ST0x',
logoUrl: '/images/MSFT.png',
priceFeedId: '0xd0ca23c1cc005e004ccf1db5bf76aeb6a49218f43dac3d4b275e92de12ded4d1',
category: 'ST0x',
tradingViewSymbol: 'NASDAQ:MSFT',
tradingViewMarket: 'america',
limitOrders: []
},
{
chainId: base.id,
address: '0x892CcF5E75f4a7Ee6402971a1587F65BEE4d52bd',
unwrappedAddress: '0xA41Ce7B8255A01062ED1AF23ea5E8137B9300554',
symbol: 'wtLLY',
decimals: 18,
name: 'Wrapped Eli Lilly and Company ST0x',
logoUrl: '/images/LLY.png',
priceFeedId: '0x70dcf5fd56553d0023693e4b590336a8c9bcfd0d98dd9f093b1f697820d98325',
category: 'ST0x',
tradingViewSymbol: 'NYSE:LLY',
tradingViewMarket: 'america',
limitOrders: []
},
{
// Pyth does not currently publish a PTY feed.
chainId: base.id,
address: '0xb6D779A79E7493ed821a65D52bA419F0F6D5dD0a',
unwrappedAddress: '0xb6021810971714cD48572af527307Acc324ecF61',
symbol: 'wtPTY',
decimals: 18,
name: 'Wrapped PIMCO Corporate & Income Opportunity Fund ST0x',
logoUrl: '/images/PTY.png',
priceFeedId: '',
category: 'ST0x',
tradingViewSymbol: 'NYSE:PTY',
tradingViewMarket: 'america',
limitOrders: []
}
// {
// chainId: base.id,
Expand Down
Binary file added static/images/INTC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/LLY.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/PTY.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 14 additions & 9 deletions tests/lib/queries/priceFeeds.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,29 @@ function quote(symbol: string, close: number): TradingViewQuote {
}

describe('price feed sources', () => {
it('includes Pyth and fallback-backed Base tokens', () => {
it('includes Pyth-backed Base tokens', () => {
const base = networks.find((network) => network.chainId === 8453) ?? null;
const symbols = tokensWithPriceSource(base).map((token) => token.symbol);

expect(symbols).toEqual(
expect.arrayContaining(['wtCEG', 'wtTSM', 'wtASML', 'wtDRAM', 'wtSKHY', 'wtSPCX'])
expect.arrayContaining([
'wtCEG',
'wtTSM',
'wtASML',
'wtGOOGL',
'wtINTC',
'wtAAPL',
'wtMSFT',
'wtLLY'
])
);
});

it('uses the refreshed configured fallback prices', () => {
it('excludes Base tokens without a configured price source', () => {
const base = networks.find((network) => network.chainId === 8453) ?? null;
const fallbackPrices = Object.fromEntries(
tokensWithPriceSource(base)
.filter((token) => ['wtDRAM', 'wtSKHY', 'wtSPCX'].includes(token.symbol))
.map((token) => [token.symbol, token.fallbackPrice])
);
const symbols = tokensWithPriceSource(base).map((token) => token.symbol);

expect(fallbackPrices).toEqual({ wtDRAM: 63.04, wtSKHY: 149, wtSPCX: 145.3 });
expect(symbols).not.toEqual(expect.arrayContaining(['wtDRAM', 'wtSKHY', 'wtSPCX', 'wtPTY']));
});

it('replaces the SPYM fallback with the live monitor quote', () => {
Expand Down
Loading