Skip to content

Commit

Permalink
Merge pull request #88 from IndexCoop/feat/add-polygon-components
Browse files Browse the repository at this point in the history
feat: add polygon components
  • Loading branch information
janndriessen authored Dec 10, 2024
2 parents 59e9131 + d08e18e commit d6bf4a6
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 2 deletions.
5 changes: 3 additions & 2 deletions config/networks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ChainId } from '@/src/types';
import { createClient, http, type Client } from 'viem';
import { mainnet, arbitrum, base } from 'viem/chains';
import { mainnet, arbitrum, base, polygon } from 'viem/chains';

const alchemyId =
typeof Bun !== 'undefined' && Bun.env
Expand All @@ -11,12 +11,13 @@ if (!alchemyId) {
throw new Error('ALCHEMY_ID is not set');
}

export const chains = [mainnet, arbitrum, base];
export const chains = [mainnet, arbitrum, base, polygon];

export const rpcUrls: Record<ChainId, string> = {
[mainnet.id]: `https://eth-mainnet.g.alchemy.com/v2/${alchemyId}`,
[arbitrum.id]: `https://arb-mainnet.g.alchemy.com/v2/${alchemyId}`,
[base.id]: `https://base-mainnet.g.alchemy.com/v2/${alchemyId}`,
[polygon.id]: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyId}`,
};

export const staticClients = Object.entries(rpcUrls).reduce(
Expand Down
56 changes: 56 additions & 0 deletions src/tokenlist.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,62 @@ export default {
tags: ['index', 'prt'],
},
// --------------- Component Tokens ---------------
{
chainId: 137,
address: '0x1a13F4Ca1d028320A707D99520AbFefca3998b7F',
name: 'Aave Matic Market USDC',
symbol: 'amUSDC',
decimals: 6,
logoURI:
'https://assets.coingecko.com/coins/images/17249/large/amUSDC_2x.png',
extensions: {
status: 'Active',
coingeckoId: 'aave-polygon-usdc',
},
tags: ['component'],
},
{
chainId: 137,
address: '0x5c2ed810328349100A66B82b78a1791B101C9D61',
name: 'Aave Matic Market WBTC',
symbol: 'amWBTC',
decimals: 8,
logoURI:
'https://assets.coingecko.com/coins/images/17265/large/amWBTC_2x.png',
extensions: {
status: 'Active',
coingeckoId: 'aave-polygon-wbtc',
},
tags: ['component'],
},
{
chainId: 137,
address: '0x28424507fefb6f7f8E9D3860F56504E4e5f5f390',
name: 'Aave Matic Market WETH',
symbol: 'amWETH',
decimals: 18,
logoURI:
'https://assets.coingecko.com/coins/images/17266/large/amWETH_2x.png',
extensions: {
status: 'Active',
coingeckoId: 'aave-polygon-weth',
},
tags: ['component'],
},
{
chainId: 137,
address: '0x8dF3aad3a84da6b69A4DA8aeC3eA40d9091B2Ac4',
name: 'Aave Matic Market WMATIC',
symbol: 'amWMATIC',
decimals: 18,
logoURI:
'https://assets.coingecko.com/coins/images/17267/large/amWMATIC_2x.png',
extensions: {
status: 'Active',
coingeckoId: 'aave-polygon-wmatic',
},
tags: ['component'],
},
{
chainId: 1,
address: '0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72',
Expand Down

0 comments on commit d6bf4a6

Please sign in to comment.