Skip to content

Commit 5a6798a

Browse files
committed
add updated WLUX and other related addresses, add token list
1 parent c20ed52 commit 5a6798a

File tree

5 files changed

+120
-17
lines changed

5 files changed

+120
-17
lines changed

src/constants/addresses.ts

+14-11
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,19 @@ export const UNI_ADDRESS: AddressMap = constructSameAddressMap('0x1f9840a85d5aF5
1111
export const UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS = '0x8B799381ac40b838BBA4131ffB26197C432AFe78'
1212

1313
export const V2_FACTORY_ADDRESSES: AddressMap = constructSameAddressMap(V2_FACTORY_ADDRESS)
14-
V2_FACTORY_ADDRESSES[SupportedChainId.LUX] = "0x80bBc7C4C7a59C899D1B37BC14539A22D5830a84";
14+
V2_FACTORY_ADDRESSES[SupportedChainId.LUX] = "0x42c426364d36C2b3aF20F1F498277e6b777132c5";
15+
V2_FACTORY_ADDRESSES[SupportedChainId.LUX_TESTNET] = "0x462e816749A08Adb0085E6257D37E2cab4574273";
1516
export const V2_ROUTER_ADDRESS: AddressMap = constructSameAddressMap('0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D')
17+
V2_ROUTER_ADDRESS[SupportedChainId.LUX] = "0x1e39bC4b55C93F5bf4cbbf6F94EF1d236c4765b6";
18+
V2_ROUTER_ADDRESS[SupportedChainId.LUX_TESTNET] = "0xB3a15983b9DB9bc3CcDFcfe76B091a3ea2d47171";
1619

1720
// celo v3 addresses
1821
const CELO_V3_CORE_FACTORY_ADDRESSES = '0xAfE208a311B21f13EF87E33A90049fC17A7acDEc'
1922
const CELO_ROUTER_ADDRESS = '0x5615CDAb10dc425a742d643d949a7F474C01abc4'
20-
const LUX_V3_FACTORY_ADDRESS = "0x0650683db720c793ff7e609A08b5fc2792c91f39";
21-
const LUX_TESTNET_V3_FACTORY_ADDRESS = "0x036A0AE1D760D7582254059BeBD9e5A34062dE23";
22-
const LUX_ROUTER_ADDRESS = '0x56bd288aeA22072b5b99Bf3b59C7787B8d5aE7ff';
23-
const LUX_TESTNET_ROUTER_ADDRESS = '0xc01A999dE87953AAA8025FF6B43FEBE643a12a19';
23+
const LUX_V3_FACTORY_ADDRESS = "0xD1A37eF464c6679A0989775E1fAC54E1598FeD18";
24+
const LUX_TESTNET_V3_FACTORY_ADDRESS = "0x373Ea8ad7C0259910033ED91b511336D091b5680";
25+
const LUX_ROUTER_ADDRESS = '0x9be8320117897eeB2Cd8Cee9A16BC2D1c1aB4F75';
26+
const LUX_TESTNET_ROUTER_ADDRESS = '0xC7053F9475c14B08803Efb94dCC2290C4570629D';
2427
const CELO_V3_MIGRATOR_ADDRESSES = '0x3cFd4d48EDfDCC53D3f173F596f621064614C582'
2528
const CELO_MULTICALL_ADDRESS = '0x633987602DE5C4F337e3DbF265303A1080324204'
2629
const CELO_QUOTER_ADDRESSES = '0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8'
@@ -124,8 +127,8 @@ export const QUOTER_ADDRESSES: AddressMap = {
124127
]),
125128
[SupportedChainId.CELO]: CELO_QUOTER_ADDRESSES,
126129
[SupportedChainId.CELO_ALFAJORES]: CELO_QUOTER_ADDRESSES,
127-
[SupportedChainId.LUX]: "0x036A0AE1D760D7582254059BeBD9e5A34062dE23",
128-
[SupportedChainId.LUX_TESTNET]: "0x90c6f8E0F23905506B34A35c8E284E3B4751141E",
130+
[SupportedChainId.LUX]: "0x1C516117370304A9057384082c66502be641053e",
131+
[SupportedChainId.LUX_TESTNET]: "0x73EF6BbD5830422ECbbC89998871417002903caF",
129132
}
130133

131134
export const NONFUNGIBLE_POSITION_MANAGER_ADDRESSES: AddressMap = {
@@ -139,8 +142,8 @@ export const NONFUNGIBLE_POSITION_MANAGER_ADDRESSES: AddressMap = {
139142
]),
140143
[SupportedChainId.CELO]: CELO_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES,
141144
[SupportedChainId.CELO_ALFAJORES]: CELO_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES,
142-
[SupportedChainId.LUX]: "0xD736808D0cbcC3237b5d8caE10B30FcDcaFf0fEF",
143-
[SupportedChainId.LUX_TESTNET]: "0x99D5296C6dfADF96f4C51D2c7f93bBEEEe331ec1",
145+
[SupportedChainId.LUX]: "0xFb931FDd8bCef71b8101812c2e482C5A465D73DB",
146+
[SupportedChainId.LUX_TESTNET]: "0xB9983C194fd9731052BF6a7B1A0A2f9A48D6f036",
144147
}
145148

146149
export const ENS_REGISTRAR_ADDRESSES: AddressMap = {
@@ -159,6 +162,6 @@ export const TICK_LENS_ADDRESSES: AddressMap = {
159162
[SupportedChainId.ARBITRUM_RINKEBY]: '0xbfd8137f7d1516D3ea5cA83523914859ec47F573',
160163
[SupportedChainId.CELO]: CELO_TICK_LENS_ADDRESSES,
161164
[SupportedChainId.CELO_ALFAJORES]: CELO_TICK_LENS_ADDRESSES,
162-
[SupportedChainId.LUX]: "0xc3a0F0213CAA01635667B280ffFee18B9c702d6D",
163-
[SupportedChainId.LUX_TESTNET]: "0xD089eaaf82ec9e58b94785b3f7762E67F89bDFB4",
165+
[SupportedChainId.LUX]: "0x972F6eE96621FE70c321C346832CC1E4E30c6628",
166+
[SupportedChainId.LUX_TESTNET]: "0x0059c458E8f4d5a29421445A086096Ed908cB1f8",
164167
}

src/constants/lists.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const KLEROS_LIST = 't2crtokens.eth'
1111
const ROLL_LIST = 'https://app.tryroll.com/tokens.json'
1212
const SET_LIST = 'https://raw.githubusercontent.com/SetProtocol/uniswap-tokenlist/main/set.tokenlist.json'
1313
const WRAPPED_LIST = 'wrapped.tokensoft.eth'
14+
const LUX_LIST = "tokens-lux";
1415

1516
export const OPTIMISM_LIST = 'https://static.optimism.io/optimism.tokenlist.json'
1617
export const ARBITRUM_LIST = 'https://bridge.arbitrum.io/token-list-42161.json'
@@ -19,7 +20,7 @@ export const CELO_LIST = 'https://celo-org.github.io/celo-token-list/celo.tokenl
1920
export const UNSUPPORTED_LIST_URLS: string[] = [BA_LIST, UNI_UNSUPPORTED_LIST]
2021

2122
// default lists to be 'active' aka searched across
22-
export const DEFAULT_ACTIVE_LIST_URLS: string[] = [UNI_LIST]
23+
export const DEFAULT_ACTIVE_LIST_URLS: string[] = [UNI_LIST, LUX_LIST, CELO_LIST, ARBITRUM_LIST, OPTIMISM_LIST]
2324
export const DEFAULT_INACTIVE_LIST_URLS: string[] = [
2425
UNI_EXTENDED_LIST,
2526
COMPOUND_LIST,
@@ -31,9 +32,6 @@ export const DEFAULT_INACTIVE_LIST_URLS: string[] = [
3132
WRAPPED_LIST,
3233
SET_LIST,
3334
ROLL_LIST,
34-
ARBITRUM_LIST,
35-
OPTIMISM_LIST,
36-
CELO_LIST,
3735
...UNSUPPORTED_LIST_URLS,
3836
]
3937

src/constants/tokens.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,14 @@ export const WRAPPED_NATIVE_CURRENCY: { [chainId: number]: Token | undefined } =
416416
),
417417
[SupportedChainId.LUX]: new Token(
418418
SupportedChainId.LUX,
419-
'0x53B1aAA5b6DDFD4eD00D0A7b5Ef333dc74B605b5',
419+
'0xFbad1306A6b306b1b673ACa75a1CC78C4375e4Dc',
420420
18,
421421
'WLUX',
422422
'Wrapped LUX'
423423
),
424424
[SupportedChainId.LUX_TESTNET]: new Token(
425425
SupportedChainId.LUX_TESTNET,
426-
'0x0650683db720c793ff7e609A08b5fc2792c91f39',
426+
'0x1B3DBA2d66c18a15a6F88B0751366C01bC8CBdd3',
427427
18,
428428
'WLUX',
429429
'Wrapped LUX'

src/hooks/useFetchListCallback.ts

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import getTokenList from 'lib/hooks/useTokenList/fetchTokenList'
66
import resolveENSContentHash from 'lib/utils/resolveENSContentHash'
77
import { useCallback } from 'react'
88
import { useAppDispatch } from 'state/hooks'
9+
import { TOKENS_LUX_LIST } from 'tokens-lux/tokens'
910

1011
import { fetchTokenList } from '../state/lists/actions'
1112

@@ -21,6 +22,10 @@ export function useFetchListCallback(): (
2122
async (listUrl: string, sendDispatch = true, skipValidation?: boolean) => {
2223
const requestId = nanoid()
2324
sendDispatch && dispatch(fetchTokenList.pending({ requestId, url: listUrl }))
25+
if(listUrl === "tokens-lux") {
26+
dispatch(fetchTokenList.fulfilled({ url: listUrl, tokenList: TOKENS_LUX_LIST, requestId }));
27+
return TOKENS_LUX_LIST;
28+
}
2429
return getTokenList(
2530
listUrl,
2631
(ensName: string) => resolveENSContentHash(ensName, RPC_PROVIDERS[SupportedChainId.MAINNET]),

src/tokens-lux/tokens.ts

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
export const TOKENS_LUX_LIST = {
2+
name: "Lux extended list",
3+
timestamp: "2024-10-01T19:32:51.793Z",
4+
version: {
5+
major: 10,
6+
minor: 0,
7+
patch: 0
8+
},
9+
tags: {},
10+
logoURI: "ipfs://QmNa8mQkrNKp1WEEeGjFezDmDeodkWRevGFN8JCV7b4Xir",
11+
keywords: [
12+
"lux",
13+
"extended"
14+
],
15+
tokens: [
16+
{
17+
chainId: 8888,
18+
address: "0x0650683db720c793ff7e609A08b5fc2792c91f39",
19+
name: "WLUX",
20+
symbol: "WLUX",
21+
decimals: 18,
22+
logoURI: "https://assets.coingecko.com/coins/images/4454/large/0xbtc.png?1561603765",
23+
extensions: {
24+
}
25+
},
26+
{
27+
chainId: 8888,
28+
address: "0x5670756808b32c209a25c67481ba9c3c710126bb",
29+
name: "Lux ETH",
30+
symbol: "LETH",
31+
decimals: 18,
32+
logoURI: "https://assets.coingecko.com/coins/images/4454/large/0xbtc.png?1561603765",
33+
extensions: {
34+
}
35+
},
36+
{
37+
chainId: 8888,
38+
address: "0x5fc1f8394a0dfb43d21a03be5656559c45690357",
39+
name: "Lux XDAI",
40+
symbol: "LXDAI",
41+
decimals: 18,
42+
logoURI: "https://assets.coingecko.com/coins/images/4454/large/0xbtc.png?1561603765",
43+
extensions: {
44+
}
45+
},
46+
{
47+
chainId: 8888,
48+
address: "0xa1eeefb7693760e78501b29fcec9fb03ca981d3d",
49+
name: "Lux POL",
50+
symbol: "LPOL",
51+
decimals: 18,
52+
logoURI: "https://assets.coingecko.com/coins/images/4454/large/0xbtc.png?1561603765",
53+
extensions: {
54+
}
55+
},
56+
{
57+
chainId: 8888,
58+
address: "0xcec718c5b0c538cc6c15c151b9dc0f714499eab6",
59+
name: "Lux BNB",
60+
symbol: "LBNB",
61+
decimals: 18,
62+
logoURI: "https://assets.coingecko.com/coins/images/4454/large/0xbtc.png?1561603765",
63+
extensions: {
64+
}
65+
},
66+
{
67+
chainId: 8888,
68+
address: "0xe5c2a45ce63addf0f9581a439c85a214db657813",
69+
name: "Lux FTM",
70+
symbol: "LFTM",
71+
decimals: 18,
72+
logoURI: "https://assets.coingecko.com/coins/images/4454/large/0xbtc.png?1561603765",
73+
extensions: {
74+
}
75+
},
76+
{
77+
chainId: 8888,
78+
address: "0x7e1007b013dcf1d4d49b8ebfdf0c07b7683d4637",
79+
name: "Lux CELO",
80+
symbol: "LCELO",
81+
decimals: 18,
82+
logoURI: "https://assets.coingecko.com/coins/images/4454/large/0xbtc.png?1561603765",
83+
extensions: {
84+
}
85+
},
86+
{
87+
chainId: 8888,
88+
address: "0xb84112ac9318a0b2319aa11d4d10e9762b25f7f4",
89+
name: "Lux USD",
90+
symbol: "LUSD",
91+
decimals: 18,
92+
logoURI: "https://assets.coingecko.com/coins/images/4454/large/0xbtc.png?1561603765",
93+
extensions: {
94+
}
95+
},
96+
]
97+
}

0 commit comments

Comments
 (0)