Skip to content

Commit dca73a7

Browse files
dohakipxrl
andauthored
feat: add native USDC + distinction between bridged USDC (#28)
I am not 100% sure if this is the best approach. But on the FE/API, I now need to distinguish between native and bridged USDC. So far we have only had the entry `USDC` for both bridged and native ones. Eventually, it would make sense to replace the old `USDC` entry with the values of `_USDC`. But as this would probably break other parts of the stack, I opted to use the `_USDC` entry as a temporary workaround. Alternatively, I could locally override the `TOKEN_SYMBOLS_MAP` instead of publishing this change. Thoughts? Addresses are taken from here https://developers.circle.com/stablecoins/docs/usdc-on-main-networks --------- Co-authored-by: Paul <[email protected]>
1 parent e0d9024 commit dca73a7

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@across-protocol/constants-v2",
3-
"version": "1.0.17",
3+
"version": "1.0.18",
44
"description": "Export commonly re-used values for Across repositories",
55
"repository": "https://github.com/across-protocol/constants-v2.git",
66
"author": "[email protected]",

src/tokens.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,52 @@ export const TOKEN_SYMBOLS_MAP = {
157157
[CHAIN_IDs.LINEA_GOERLI]: "0xB4257F31750961C8e536f5cfCBb3079437700416",
158158
},
159159
},
160+
// NOTE: The entry `_USDC` should eventually replace the `USDC` entry because we now distinguish
161+
// between bridged and non-bridged USDC. Until all components of the system are able to handle this
162+
// distinction, we keep both entries for backwards compatibility.
163+
"_USDC": {
164+
name: "USD Coin",
165+
symbol: "USDC",
166+
decimals: 6,
167+
addresses: {
168+
[CHAIN_IDs.MAINNET]: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
169+
[CHAIN_IDs.OPTIMISM]: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
170+
[CHAIN_IDs.POLYGON]: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
171+
[CHAIN_IDs.ARBITRUM]: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
172+
[CHAIN_IDs.ZK_SYNC]: "0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4",
173+
[CHAIN_IDs.BASE]: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
174+
[CHAIN_IDs.SEPOLIA]: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
175+
[CHAIN_IDs.POLYGON_AMOY]: "0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582",
176+
[CHAIN_IDs.ZK_SYNC_SEPOLIA]: "0xAe045DE5638162fa134807Cb558E15A3F5A7F853",
177+
[CHAIN_IDs.BASE_SEPOLIA]: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
178+
[CHAIN_IDs.OPTIMISM_SEPOLIA]: "0x5fd84259d66Cd46123540766Be93DFE6D43130D7",
179+
[CHAIN_IDs.ARBITRUM_SEPOLIA]: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"
180+
},
181+
},
182+
"USDC.e": {
183+
name: "USD Coin (bridged)",
184+
symbol: "USDC.e",
185+
decimals: 6,
186+
addresses: {
187+
[CHAIN_IDs.OPTIMISM]: "0x7F5c764cBc14f9669B88837ca1490cCa17c31607",
188+
[CHAIN_IDs.POLYGON]: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
189+
[CHAIN_IDs.BOBA]: "0x66a2A913e447d6b4BF33EFbec43aAeF87890FBbc",
190+
[CHAIN_IDs.ARBITRUM]: "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",
191+
[CHAIN_IDs.ZK_SYNC]: "0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4",
192+
[CHAIN_IDs.LINEA]: "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
193+
[CHAIN_IDs.BASE]: "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
194+
[CHAIN_IDs.MUMBAI]: "0xe6b8a5CF854791412c1f6EFC7CAf629f5Df1c747",
195+
[CHAIN_IDs.LINEA_GOERLI]: "0xB4257F31750961C8e536f5cfCBb3079437700416",
196+
},
197+
},
198+
"USDbC": {
199+
name: "USD Coin (bridged)",
200+
symbol: "USDbC",
201+
decimals: 6,
202+
addresses: {
203+
[CHAIN_IDs.BASE]: "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
204+
},
205+
},
160206
USDT: {
161207
name: "USDT",
162208
symbol: "USDT",

0 commit comments

Comments
 (0)