@luxfi/exchange 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chains/lux.d.ts +116 -6
- package/dist/chains/lux.d.ts.map +1 -1
- package/dist/contracts/abis/amm-v2-factory.d.ts +2 -2
- package/dist/contracts/abis/amm-v2-factory.d.ts.map +1 -1
- package/dist/contracts/abis/amm-v2-factory.js +2 -2
- package/dist/contracts/abis/amm-v2-pair.d.ts +2 -2
- package/dist/contracts/abis/amm-v2-pair.d.ts.map +1 -1
- package/dist/contracts/abis/amm-v2-pair.js +2 -2
- package/dist/contracts/abis/amm-v2-router.d.ts +2 -2
- package/dist/contracts/abis/amm-v2-router.d.ts.map +1 -1
- package/dist/contracts/abis/amm-v2-router.js +2 -2
- package/dist/contracts/abis/amm-v3-factory.d.ts +2 -2
- package/dist/contracts/abis/amm-v3-factory.d.ts.map +1 -1
- package/dist/contracts/abis/amm-v3-factory.js +2 -2
- package/dist/contracts/abis/amm-v3-pool.d.ts +2 -2
- package/dist/contracts/abis/amm-v3-pool.d.ts.map +1 -1
- package/dist/contracts/abis/amm-v3-pool.js +2 -2
- package/dist/contracts/abis/index.d.ts +7 -7
- package/dist/contracts/abis/index.d.ts.map +1 -1
- package/dist/contracts/abis/index.js +7 -7
- package/dist/contracts/abis/lux-amm-v2-factory.d.ts +148 -0
- package/dist/contracts/abis/lux-amm-v2-factory.d.ts.map +1 -0
- package/dist/contracts/abis/lux-amm-v2-factory.js +52 -0
- package/dist/contracts/abis/lux-amm-v2-pair.d.ts +236 -0
- package/dist/contracts/abis/lux-amm-v2-pair.d.ts.map +1 -0
- package/dist/contracts/abis/lux-amm-v2-pair.js +88 -0
- package/dist/contracts/abis/lux-amm-v2-router.d.ts +496 -0
- package/dist/contracts/abis/lux-amm-v2-router.d.ts.map +1 -0
- package/dist/contracts/abis/lux-amm-v2-router.js +149 -0
- package/dist/contracts/abis/lux-amm-v3-factory.d.ts +152 -0
- package/dist/contracts/abis/lux-amm-v3-factory.d.ts.map +1 -0
- package/dist/contracts/abis/lux-amm-v3-factory.js +48 -0
- package/dist/contracts/abis/lux-amm-v3-pool.d.ts +254 -0
- package/dist/contracts/abis/lux-amm-v3-pool.d.ts.map +1 -0
- package/dist/contracts/abis/lux-amm-v3-pool.js +84 -0
- package/dist/contracts/abis/pool-manager.d.ts +1 -1
- package/dist/contracts/abis/pool-manager.js +1 -1
- package/dist/contracts/abis/uniswap-v2-factory.d.ts +75 -0
- package/dist/contracts/abis/uniswap-v2-factory.d.ts.map +1 -0
- package/dist/contracts/abis/uniswap-v2-factory.js +49 -0
- package/dist/contracts/abis/uniswap-v2-pair.d.ts +119 -0
- package/dist/contracts/abis/uniswap-v2-pair.d.ts.map +1 -0
- package/dist/contracts/abis/uniswap-v2-pair.js +85 -0
- package/dist/contracts/abis/uniswap-v2-router.d.ts +249 -0
- package/dist/contracts/abis/uniswap-v2-router.d.ts.map +1 -0
- package/dist/contracts/abis/uniswap-v2-router.js +146 -0
- package/dist/contracts/abis/uniswap-v3-factory.d.ts +77 -0
- package/dist/contracts/abis/uniswap-v3-factory.d.ts.map +1 -0
- package/dist/contracts/abis/uniswap-v3-factory.js +45 -0
- package/dist/contracts/abis/uniswap-v3-pool.d.ts +128 -0
- package/dist/contracts/abis/uniswap-v3-pool.d.ts.map +1 -0
- package/dist/contracts/abis/uniswap-v3-pool.js +81 -0
- package/dist/contracts/addresses.d.ts +13 -31
- package/dist/contracts/addresses.d.ts.map +1 -1
- package/dist/contracts/addresses.js +34 -25
- package/dist/hooks/use-pools.d.ts.map +1 -1
- package/dist/hooks/use-pools.js +6 -8
- package/dist/hooks/use-swap.js +1 -1
- package/dist/hooks/use-token-allowance.d.ts +1 -1
- package/dist/tokens/index.d.ts +3 -6
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +38 -57
- package/package.json +3 -3
- package/src/chains/index.ts +6 -0
- package/src/chains/lux.ts +68 -0
package/dist/tokens/index.js
CHANGED
|
@@ -21,14 +21,14 @@ export const NATIVE_ZOO = {
|
|
|
21
21
|
* Wrapped native tokens
|
|
22
22
|
*/
|
|
23
23
|
export const WLUX_MAINNET = {
|
|
24
|
-
address: '
|
|
24
|
+
address: '0x55750d6CA62a041c06a8E28626b10Be6c688f471',
|
|
25
25
|
chainId: 96369,
|
|
26
26
|
decimals: 18,
|
|
27
27
|
symbol: 'WLUX',
|
|
28
28
|
name: 'Wrapped LUX',
|
|
29
29
|
};
|
|
30
30
|
export const WLUX_TESTNET = {
|
|
31
|
-
address: '
|
|
31
|
+
address: '0x732740c5c895C9FCF619930ed4293fc858eb44c7',
|
|
32
32
|
chainId: 96368,
|
|
33
33
|
decimals: 18,
|
|
34
34
|
symbol: 'WLUX',
|
|
@@ -46,74 +46,53 @@ export const WLUX_DEV = {
|
|
|
46
46
|
* Stablecoins
|
|
47
47
|
*/
|
|
48
48
|
export const LUSD = {
|
|
49
|
-
address: '
|
|
49
|
+
address: '0x4B1BfA76eD63F1A0aD2E4f40b3F46C45E8F7A4E2',
|
|
50
50
|
chainId: 96369,
|
|
51
|
-
decimals:
|
|
51
|
+
decimals: 6, // USDC-compatible decimals
|
|
52
52
|
symbol: 'LUSD',
|
|
53
|
-
name: 'Lux
|
|
53
|
+
name: 'Lux Dollar',
|
|
54
54
|
};
|
|
55
55
|
/**
|
|
56
56
|
* Bridge tokens (L-prefix for assets bridged to Lux)
|
|
57
57
|
* These are the canonical mainnet addresses from @luxfi/config
|
|
58
58
|
*/
|
|
59
59
|
export const LETH = {
|
|
60
|
-
address: '
|
|
60
|
+
address: '0xAA3AE95816a4A6FbC6b8Ed5a6C06f22A96A80C8C',
|
|
61
61
|
chainId: 96369,
|
|
62
62
|
decimals: 18,
|
|
63
63
|
symbol: 'LETH',
|
|
64
64
|
name: 'Lux ETH',
|
|
65
65
|
};
|
|
66
66
|
export const LBTC = {
|
|
67
|
-
address: '
|
|
67
|
+
address: '0x526903E35E7106D62ED3B5d77E14e51d024Aa1D3',
|
|
68
68
|
chainId: 96369,
|
|
69
69
|
decimals: 8,
|
|
70
70
|
symbol: 'LBTC',
|
|
71
71
|
name: 'Lux BTC',
|
|
72
72
|
};
|
|
73
|
-
export const LSOL = {
|
|
74
|
-
address: '0x26B40f650156C7EbF9e087Dd0dca181Fe87625B7',
|
|
75
|
-
chainId: 96369,
|
|
76
|
-
decimals: 18,
|
|
77
|
-
symbol: 'LSOL',
|
|
78
|
-
name: 'Lux SOL',
|
|
79
|
-
};
|
|
80
|
-
export const LTON = {
|
|
81
|
-
address: '0x3141b94b89691009b950c96e97Bff48e0C543E3C',
|
|
82
|
-
chainId: 96369,
|
|
83
|
-
decimals: 9,
|
|
84
|
-
symbol: 'LTON',
|
|
85
|
-
name: 'Lux TON',
|
|
86
|
-
};
|
|
87
|
-
export const LAVAX = {
|
|
88
|
-
address: '0x0e4bD0DD67c15dECfBBBdbbE07FC9d51D737693D',
|
|
89
|
-
chainId: 96369,
|
|
90
|
-
decimals: 18,
|
|
91
|
-
symbol: 'LAVAX',
|
|
92
|
-
name: 'Lux AVAX',
|
|
93
|
-
};
|
|
94
73
|
/**
|
|
95
74
|
* Testnet bridge tokens
|
|
96
75
|
*/
|
|
97
76
|
export const LETH_TESTNET = {
|
|
98
|
-
address: '
|
|
77
|
+
address: '0x60E0a8167FC13dE89348978860466C9ceC24B9ba',
|
|
99
78
|
chainId: 96368,
|
|
100
79
|
decimals: 18,
|
|
101
80
|
symbol: 'LETH',
|
|
102
81
|
name: 'Lux ETH',
|
|
103
82
|
};
|
|
104
83
|
export const LBTC_TESTNET = {
|
|
105
|
-
address: '
|
|
84
|
+
address: '0x1E48D32a4F5e9f08DB9aE4959163300FaF8A6C8e',
|
|
106
85
|
chainId: 96368,
|
|
107
86
|
decimals: 8,
|
|
108
87
|
symbol: 'LBTC',
|
|
109
88
|
name: 'Lux BTC',
|
|
110
89
|
};
|
|
111
90
|
export const LUSD_TESTNET = {
|
|
112
|
-
address: '
|
|
91
|
+
address: '0xb84112ac9318a0b2319aa11d4d10e9762b25f7f4',
|
|
113
92
|
chainId: 96368,
|
|
114
|
-
decimals:
|
|
115
|
-
symbol: '
|
|
116
|
-
name: 'Lux
|
|
93
|
+
decimals: 18,
|
|
94
|
+
symbol: 'LUSD',
|
|
95
|
+
name: 'Lux Dollar',
|
|
117
96
|
};
|
|
118
97
|
/**
|
|
119
98
|
* Dev mode bridge tokens (deterministic CREATE addresses)
|
|
@@ -171,7 +150,7 @@ export const WBTC_LUX = {
|
|
|
171
150
|
name: 'Wrapped Bitcoin',
|
|
172
151
|
};
|
|
173
152
|
export const DAI_LUX = {
|
|
174
|
-
address: '
|
|
153
|
+
address: '0x6B175474E89094C44Da98b954EesdscdKD34eL55',
|
|
175
154
|
chainId: 96369,
|
|
176
155
|
decimals: 18,
|
|
177
156
|
symbol: 'DAI',
|
|
@@ -181,32 +160,32 @@ export const DAI_LUX = {
|
|
|
181
160
|
* Zoo chain tokens
|
|
182
161
|
*/
|
|
183
162
|
export const WZOO = {
|
|
184
|
-
address: '
|
|
163
|
+
address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
|
|
185
164
|
chainId: 200200,
|
|
186
165
|
decimals: 18,
|
|
187
166
|
symbol: 'WZOO',
|
|
188
167
|
name: 'Wrapped ZOO',
|
|
189
168
|
};
|
|
190
|
-
export const
|
|
191
|
-
address: '
|
|
169
|
+
export const USDC_ZOO = {
|
|
170
|
+
address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
192
171
|
chainId: 200200,
|
|
193
|
-
decimals:
|
|
194
|
-
symbol: '
|
|
195
|
-
name: '
|
|
172
|
+
decimals: 6,
|
|
173
|
+
symbol: 'USDC',
|
|
174
|
+
name: 'USD Coin',
|
|
196
175
|
};
|
|
197
|
-
export const
|
|
198
|
-
address: '
|
|
176
|
+
export const USDT_ZOO = {
|
|
177
|
+
address: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
|
199
178
|
chainId: 200200,
|
|
200
|
-
decimals:
|
|
201
|
-
symbol: '
|
|
202
|
-
name: '
|
|
179
|
+
decimals: 6,
|
|
180
|
+
symbol: 'USDT',
|
|
181
|
+
name: 'Tether USD',
|
|
203
182
|
};
|
|
204
|
-
export const
|
|
205
|
-
address: '
|
|
183
|
+
export const WETH_ZOO = {
|
|
184
|
+
address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
|
206
185
|
chainId: 200200,
|
|
207
186
|
decimals: 18,
|
|
208
|
-
symbol: '
|
|
209
|
-
name: '
|
|
187
|
+
symbol: 'WETH',
|
|
188
|
+
name: 'Wrapped Ether',
|
|
210
189
|
};
|
|
211
190
|
/**
|
|
212
191
|
* Default token list for Lux Mainnet
|
|
@@ -214,12 +193,14 @@ export const LUSD_ZOO = {
|
|
|
214
193
|
export const LUX_MAINNET_TOKENS = [
|
|
215
194
|
NATIVE_LUX,
|
|
216
195
|
WLUX_MAINNET,
|
|
217
|
-
|
|
196
|
+
USDC_LUX,
|
|
197
|
+
USDT_LUX,
|
|
198
|
+
WETH_LUX,
|
|
199
|
+
WBTC_LUX,
|
|
200
|
+
DAI_LUX,
|
|
218
201
|
LETH,
|
|
219
202
|
LBTC,
|
|
220
|
-
|
|
221
|
-
LTON,
|
|
222
|
-
LAVAX,
|
|
203
|
+
LUSD,
|
|
223
204
|
];
|
|
224
205
|
/**
|
|
225
206
|
* Default token list for Zoo Mainnet
|
|
@@ -227,9 +208,9 @@ export const LUX_MAINNET_TOKENS = [
|
|
|
227
208
|
export const ZOO_MAINNET_TOKENS = [
|
|
228
209
|
NATIVE_ZOO,
|
|
229
210
|
WZOO,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
211
|
+
USDC_ZOO,
|
|
212
|
+
USDT_ZOO,
|
|
213
|
+
WETH_ZOO,
|
|
233
214
|
];
|
|
234
215
|
/**
|
|
235
216
|
* Default token list for Lux Testnet
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxfi/exchange",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"private": false,
|
|
3
|
+
"version": "1.0.4",
|
|
5
4
|
"description": "Lux Exchange SDK - React hooks and utilities for Lux DEX",
|
|
6
5
|
"license": "MIT",
|
|
7
6
|
"main": "./dist/index.js",
|
|
@@ -79,5 +78,6 @@
|
|
|
79
78
|
"blockchain",
|
|
80
79
|
"react",
|
|
81
80
|
"hooks"
|
|
82
|
-
]
|
|
81
|
+
],
|
|
82
|
+
"private": false
|
|
83
83
|
}
|
package/src/chains/index.ts
CHANGED
|
@@ -8,12 +8,18 @@ export {
|
|
|
8
8
|
zooMainnet,
|
|
9
9
|
zooTestnet,
|
|
10
10
|
luxDev,
|
|
11
|
+
liquidityMainnet,
|
|
12
|
+
liquidityTestnet,
|
|
13
|
+
liquidityDevnet,
|
|
11
14
|
supportedChains,
|
|
12
15
|
LUX_MAINNET_ID,
|
|
13
16
|
LUX_TESTNET_ID,
|
|
14
17
|
ZOO_MAINNET_ID,
|
|
15
18
|
ZOO_TESTNET_ID,
|
|
16
19
|
LUX_DEV_ID,
|
|
20
|
+
LIQUIDITY_MAINNET_ID,
|
|
21
|
+
LIQUIDITY_TESTNET_ID,
|
|
22
|
+
LIQUIDITY_DEVNET_ID,
|
|
17
23
|
type SupportedChainId,
|
|
18
24
|
} from './lux'
|
|
19
25
|
|
package/src/chains/lux.ts
CHANGED
|
@@ -118,6 +118,68 @@ export const luxDev = defineChain({
|
|
|
118
118
|
testnet: false,
|
|
119
119
|
})
|
|
120
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Liquidity Mainnet Chain Definition (Lux L2 subnet, chain ID 8675309)
|
|
123
|
+
*/
|
|
124
|
+
export const liquidityMainnet = defineChain({
|
|
125
|
+
id: 8675309,
|
|
126
|
+
name: 'Liquidity',
|
|
127
|
+
nativeCurrency: {
|
|
128
|
+
name: 'LQDTY',
|
|
129
|
+
symbol: 'LQDTY',
|
|
130
|
+
decimals: 18,
|
|
131
|
+
},
|
|
132
|
+
rpcUrls: {
|
|
133
|
+
default: { http: ['https://rpc.main.satschel.com/rpc'] },
|
|
134
|
+
public: { http: ['https://rpc.main.satschel.com/rpc'] },
|
|
135
|
+
},
|
|
136
|
+
blockExplorers: {
|
|
137
|
+
default: { name: 'Liquidity Explorer', url: 'https://explore.main.satschel.com' },
|
|
138
|
+
},
|
|
139
|
+
})
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Liquidity Testnet Chain Definition
|
|
143
|
+
*/
|
|
144
|
+
export const liquidityTestnet = defineChain({
|
|
145
|
+
id: 8675310,
|
|
146
|
+
name: 'Liquidity Testnet',
|
|
147
|
+
nativeCurrency: {
|
|
148
|
+
name: 'LQDTY',
|
|
149
|
+
symbol: 'LQDTY',
|
|
150
|
+
decimals: 18,
|
|
151
|
+
},
|
|
152
|
+
rpcUrls: {
|
|
153
|
+
default: { http: ['https://rpc.test.satschel.com/rpc'] },
|
|
154
|
+
public: { http: ['https://rpc.test.satschel.com/rpc'] },
|
|
155
|
+
},
|
|
156
|
+
blockExplorers: {
|
|
157
|
+
default: { name: 'Liquidity Testnet Explorer', url: 'https://explore.test.satschel.com' },
|
|
158
|
+
},
|
|
159
|
+
testnet: true,
|
|
160
|
+
})
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Liquidity Devnet Chain Definition
|
|
164
|
+
*/
|
|
165
|
+
export const liquidityDevnet = defineChain({
|
|
166
|
+
id: 8675311,
|
|
167
|
+
name: 'Liquidity Devnet',
|
|
168
|
+
nativeCurrency: {
|
|
169
|
+
name: 'LQDTY',
|
|
170
|
+
symbol: 'LQDTY',
|
|
171
|
+
decimals: 18,
|
|
172
|
+
},
|
|
173
|
+
rpcUrls: {
|
|
174
|
+
default: { http: ['https://rpc.dev.satschel.com/rpc'] },
|
|
175
|
+
public: { http: ['https://rpc.dev.satschel.com/rpc'] },
|
|
176
|
+
},
|
|
177
|
+
blockExplorers: {
|
|
178
|
+
default: { name: 'Liquidity Devnet Explorer', url: 'https://explore.dev.satschel.com' },
|
|
179
|
+
},
|
|
180
|
+
testnet: true,
|
|
181
|
+
})
|
|
182
|
+
|
|
121
183
|
/**
|
|
122
184
|
* Chain IDs
|
|
123
185
|
*/
|
|
@@ -126,6 +188,9 @@ export const LUX_TESTNET_ID = 96368
|
|
|
126
188
|
export const ZOO_MAINNET_ID = 200200
|
|
127
189
|
export const ZOO_TESTNET_ID = 200201
|
|
128
190
|
export const LUX_DEV_ID = 1337
|
|
191
|
+
export const LIQUIDITY_MAINNET_ID = 8675309
|
|
192
|
+
export const LIQUIDITY_TESTNET_ID = 8675310
|
|
193
|
+
export const LIQUIDITY_DEVNET_ID = 8675311
|
|
129
194
|
|
|
130
195
|
/**
|
|
131
196
|
* All supported chains
|
|
@@ -136,6 +201,9 @@ export const supportedChains = [
|
|
|
136
201
|
zooMainnet,
|
|
137
202
|
zooTestnet,
|
|
138
203
|
luxDev,
|
|
204
|
+
liquidityMainnet,
|
|
205
|
+
liquidityTestnet,
|
|
206
|
+
liquidityDevnet,
|
|
139
207
|
] as const
|
|
140
208
|
|
|
141
209
|
export type SupportedChainId = typeof supportedChains[number]['id']
|