Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add polygon components #88

Merged
merged 3 commits into from
Dec 10, 2024
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
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
Loading