Skip to content

Commit

Permalink
feat: add polygon network
Browse files Browse the repository at this point in the history
  • Loading branch information
0xMirim committed Sep 19, 2023
1 parent 3539314 commit ce79198
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,15 @@ Ensure your env are set. Here is the list of the stuff to set:
WEB_SOCKET_URL: {
1: process.env.WS_URL_MAINNET,
10: process.env.WS_URL_OPTIMISM,
137: process.env.WS_URL_POLYGON,
250: process.env.WS_URL_FANTOM,
8453: process.env.WS_URL_BASE,
42161: process.env.WS_URL_ARBITRUM
},
JSON_RPC_URL: {
1: process.env.RPC_URL_MAINNET,
10: process.env.RPC_URL_OPTIMISM,
137: process.env.RPC_URL_POLYGON,
250: process.env.RPC_URL_FANTOM,
8453: process.env.RPC_URL_BASE,
42161: process.env.RPC_URL_ARBITRUM
Expand Down
1 change: 1 addition & 0 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const YFI_ADDRESS = toAddress('0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e
export const ETH_TOKEN_ADDRESS = toAddress('0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee');
export const WETH_TOKEN_ADDRESS = toAddress('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2');
export const WFTM_TOKEN_ADDRESS = toAddress('0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83');
export const WMATIC_TOKEN_ADDRESS = toAddress('0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270');
export const OPT_WETH_TOKEN_ADDRESS = toAddress('0x4200000000000000000000000000000000000006');
export const BASE_WETH_TOKEN_ADDRESS = toAddress('0x4200000000000000000000000000000000000006');
export const ARB_WETH_TOKEN_ADDRESS = toAddress('0x82aF49447D8a07e3bd95BD0d56f35241523fBab1');
Expand Down
4 changes: 2 additions & 2 deletions src/utils/wagmi/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {createPublicClient, http} from 'viem';
import * as wagmiChains from '@wagmi/core/chains';

import {toAddress} from '../address.js';
import {ARB_WETH_TOKEN_ADDRESS, BASE_WETH_TOKEN_ADDRESS, OPT_WETH_TOKEN_ADDRESS, WETH_TOKEN_ADDRESS, WFTM_TOKEN_ADDRESS, ZAP_ETH_WETH_CONTRACT, ZAP_ETH_WETH_OPT_CONTRACT, ZAP_FTM_WFTM_CONTRACT, ZERO_ADDRESS} from '../constants.js';
import {ARB_WETH_TOKEN_ADDRESS, BASE_WETH_TOKEN_ADDRESS, OPT_WETH_TOKEN_ADDRESS, WETH_TOKEN_ADDRESS, WFTM_TOKEN_ADDRESS, WMATIC_TOKEN_ADDRESS, ZAP_ETH_WETH_CONTRACT, ZAP_ETH_WETH_OPT_CONTRACT, ZAP_FTM_WFTM_CONTRACT, ZERO_ADDRESS} from '../constants.js';
import {isEth} from '../isEth.js';
import {isTAddress} from '../isTAddress.js';
import {localhost} from './networks.js';
Expand Down Expand Up @@ -102,7 +102,7 @@ const wrappedChainTokens: {[key: number]: TWrappedChainToken} = {
coinSymbol: 'ETH'
},
137: {
address: toAddress('0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270'),
address: WMATIC_TOKEN_ADDRESS,
decimals: 18,
symbol: 'wMatic',
name: 'Wrapped Matic',
Expand Down

0 comments on commit ce79198

Please sign in to comment.