@luxfi/exchange 1.0.5 → 1.0.6
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/LICENSE +122 -0
- package/dist/chains/lux.d.ts +6 -116
- 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/pool-manager.d.ts +1 -1
- package/dist/contracts/abis/pool-manager.js +1 -1
- package/dist/contracts/addresses.d.ts +62 -21
- package/dist/contracts/addresses.d.ts.map +1 -1
- package/dist/contracts/addresses.js +86 -35
- package/dist/hooks/use-pools.d.ts.map +1 -1
- package/dist/hooks/use-pools.js +8 -6
- package/dist/hooks/use-swap.js +1 -1
- package/dist/hooks/use-token-allowance.d.ts +1 -1
- package/dist/tokens/index.d.ts +6 -3
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +57 -38
- package/package.json +7 -8
- package/src/chains/index.ts +0 -6
- package/src/chains/lux.ts +0 -68
- package/src/hooks/use-pools.ts +1 -1
- package/dist/contracts/abis/lux-amm-v2-factory.d.ts +0 -148
- package/dist/contracts/abis/lux-amm-v2-factory.d.ts.map +0 -1
- package/dist/contracts/abis/lux-amm-v2-factory.js +0 -52
- package/dist/contracts/abis/lux-amm-v2-pair.d.ts +0 -236
- package/dist/contracts/abis/lux-amm-v2-pair.d.ts.map +0 -1
- package/dist/contracts/abis/lux-amm-v2-pair.js +0 -88
- package/dist/contracts/abis/lux-amm-v2-router.d.ts +0 -496
- package/dist/contracts/abis/lux-amm-v2-router.d.ts.map +0 -1
- package/dist/contracts/abis/lux-amm-v2-router.js +0 -149
- package/dist/contracts/abis/lux-amm-v3-factory.d.ts +0 -152
- package/dist/contracts/abis/lux-amm-v3-factory.d.ts.map +0 -1
- package/dist/contracts/abis/lux-amm-v3-factory.js +0 -48
- package/dist/contracts/abis/lux-amm-v3-pool.d.ts +0 -254
- package/dist/contracts/abis/lux-amm-v3-pool.d.ts.map +0 -1
- package/dist/contracts/abis/lux-amm-v3-pool.js +0 -84
- package/dist/contracts/abis/uniswap-v2-factory.d.ts +0 -75
- package/dist/contracts/abis/uniswap-v2-factory.d.ts.map +0 -1
- package/dist/contracts/abis/uniswap-v2-factory.js +0 -49
- package/dist/contracts/abis/uniswap-v2-pair.d.ts +0 -119
- package/dist/contracts/abis/uniswap-v2-pair.d.ts.map +0 -1
- package/dist/contracts/abis/uniswap-v2-pair.js +0 -85
- package/dist/contracts/abis/uniswap-v2-router.d.ts +0 -249
- package/dist/contracts/abis/uniswap-v2-router.d.ts.map +0 -1
- package/dist/contracts/abis/uniswap-v2-router.js +0 -146
- package/dist/contracts/abis/uniswap-v3-factory.d.ts +0 -77
- package/dist/contracts/abis/uniswap-v3-factory.d.ts.map +0 -1
- package/dist/contracts/abis/uniswap-v3-factory.js +0 -45
- package/dist/contracts/abis/uniswap-v3-pool.d.ts +0 -128
- package/dist/contracts/abis/uniswap-v3-pool.d.ts.map +0 -1
- package/dist/contracts/abis/uniswap-v3-pool.js +0 -81
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: '0x4888e4a2ee0f03051c72d2bd3acf755ed3498b3e',
|
|
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: '0xDe5310d0Eccc04C8987cB66Ff6b89Ee793442C91',
|
|
32
32
|
chainId: 96368,
|
|
33
33
|
decimals: 18,
|
|
34
34
|
symbol: 'WLUX',
|
|
@@ -46,53 +46,74 @@ export const WLUX_DEV = {
|
|
|
46
46
|
* Stablecoins
|
|
47
47
|
*/
|
|
48
48
|
export const LUSD = {
|
|
49
|
-
address: '
|
|
49
|
+
address: '0x848Cff46eb323f323b6Bbe1Df274E40793d7f2c2',
|
|
50
50
|
chainId: 96369,
|
|
51
|
-
decimals:
|
|
51
|
+
decimals: 18,
|
|
52
52
|
symbol: 'LUSD',
|
|
53
|
-
name: 'Lux
|
|
53
|
+
name: 'Lux USD',
|
|
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: '0x60E0a8167FC13dE89348978860466C9ceC24B9ba',
|
|
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: '0x1E48D32a4F5e9f08DB9aE4959163300FaF8A6C8e',
|
|
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
|
+
};
|
|
73
94
|
/**
|
|
74
95
|
* Testnet bridge tokens
|
|
75
96
|
*/
|
|
76
97
|
export const LETH_TESTNET = {
|
|
77
|
-
address: '
|
|
98
|
+
address: '0xA695a8A66fbe3E32d15a531db04185313595771A',
|
|
78
99
|
chainId: 96368,
|
|
79
100
|
decimals: 18,
|
|
80
101
|
symbol: 'LETH',
|
|
81
102
|
name: 'Lux ETH',
|
|
82
103
|
};
|
|
83
104
|
export const LBTC_TESTNET = {
|
|
84
|
-
address: '
|
|
105
|
+
address: '0x5a88986958ea76Dd043f834542724F081cA1443B',
|
|
85
106
|
chainId: 96368,
|
|
86
107
|
decimals: 8,
|
|
87
108
|
symbol: 'LBTC',
|
|
88
109
|
name: 'Lux BTC',
|
|
89
110
|
};
|
|
90
111
|
export const LUSD_TESTNET = {
|
|
91
|
-
address: '
|
|
112
|
+
address: '0x8a3fad1c7FB94461621351aa6A983B6f814F039c',
|
|
92
113
|
chainId: 96368,
|
|
93
|
-
decimals:
|
|
94
|
-
symbol: '
|
|
95
|
-
name: 'Lux
|
|
114
|
+
decimals: 6,
|
|
115
|
+
symbol: 'LUSDC',
|
|
116
|
+
name: 'Lux USDC',
|
|
96
117
|
};
|
|
97
118
|
/**
|
|
98
119
|
* Dev mode bridge tokens (deterministic CREATE addresses)
|
|
@@ -150,7 +171,7 @@ export const WBTC_LUX = {
|
|
|
150
171
|
name: 'Wrapped Bitcoin',
|
|
151
172
|
};
|
|
152
173
|
export const DAI_LUX = {
|
|
153
|
-
address: '
|
|
174
|
+
address: '0x6B175474E89094C44Da98b954EedeAC495271d0F',
|
|
154
175
|
chainId: 96369,
|
|
155
176
|
decimals: 18,
|
|
156
177
|
symbol: 'DAI',
|
|
@@ -160,32 +181,32 @@ export const DAI_LUX = {
|
|
|
160
181
|
* Zoo chain tokens
|
|
161
182
|
*/
|
|
162
183
|
export const WZOO = {
|
|
163
|
-
address: '
|
|
184
|
+
address: '0x5491216406daB99b7032b83765F36790E27F8A61',
|
|
164
185
|
chainId: 200200,
|
|
165
186
|
decimals: 18,
|
|
166
187
|
symbol: 'WZOO',
|
|
167
188
|
name: 'Wrapped ZOO',
|
|
168
189
|
};
|
|
169
|
-
export const
|
|
170
|
-
address: '
|
|
190
|
+
export const LETH_ZOO = {
|
|
191
|
+
address: '0x4870621EA8be7a383eFCfdA225249d35888bD9f2',
|
|
171
192
|
chainId: 200200,
|
|
172
|
-
decimals:
|
|
173
|
-
symbol: '
|
|
174
|
-
name: '
|
|
193
|
+
decimals: 18,
|
|
194
|
+
symbol: 'LETH',
|
|
195
|
+
name: 'Lux ETH',
|
|
175
196
|
};
|
|
176
|
-
export const
|
|
177
|
-
address: '
|
|
197
|
+
export const LBTC_ZOO = {
|
|
198
|
+
address: '0x6fc44509a32E513bE1aa00d27bb298e63830C6A8',
|
|
178
199
|
chainId: 200200,
|
|
179
|
-
decimals:
|
|
180
|
-
symbol: '
|
|
181
|
-
name: '
|
|
200
|
+
decimals: 8,
|
|
201
|
+
symbol: 'LBTC',
|
|
202
|
+
name: 'Lux BTC',
|
|
182
203
|
};
|
|
183
|
-
export const
|
|
184
|
-
address: '
|
|
204
|
+
export const LUSD_ZOO = {
|
|
205
|
+
address: '0xb2ee1CE7b84853b83AA08702aD0aD4D79711882D',
|
|
185
206
|
chainId: 200200,
|
|
186
207
|
decimals: 18,
|
|
187
|
-
symbol: '
|
|
188
|
-
name: '
|
|
208
|
+
symbol: 'LUSD',
|
|
209
|
+
name: 'Lux USD',
|
|
189
210
|
};
|
|
190
211
|
/**
|
|
191
212
|
* Default token list for Lux Mainnet
|
|
@@ -193,14 +214,12 @@ export const WETH_ZOO = {
|
|
|
193
214
|
export const LUX_MAINNET_TOKENS = [
|
|
194
215
|
NATIVE_LUX,
|
|
195
216
|
WLUX_MAINNET,
|
|
196
|
-
|
|
197
|
-
USDT_LUX,
|
|
198
|
-
WETH_LUX,
|
|
199
|
-
WBTC_LUX,
|
|
200
|
-
DAI_LUX,
|
|
217
|
+
LUSD,
|
|
201
218
|
LETH,
|
|
202
219
|
LBTC,
|
|
203
|
-
|
|
220
|
+
LSOL,
|
|
221
|
+
LTON,
|
|
222
|
+
LAVAX,
|
|
204
223
|
];
|
|
205
224
|
/**
|
|
206
225
|
* Default token list for Zoo Mainnet
|
|
@@ -208,9 +227,9 @@ export const LUX_MAINNET_TOKENS = [
|
|
|
208
227
|
export const ZOO_MAINNET_TOKENS = [
|
|
209
228
|
NATIVE_ZOO,
|
|
210
229
|
WZOO,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
230
|
+
LUSD_ZOO,
|
|
231
|
+
LETH_ZOO,
|
|
232
|
+
LBTC_ZOO,
|
|
214
233
|
];
|
|
215
234
|
/**
|
|
216
235
|
* Default token list for Lux Testnet
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxfi/exchange",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Lux Exchange SDK - React hooks and utilities for Lux DEX",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -44,12 +44,6 @@
|
|
|
44
44
|
"dist",
|
|
45
45
|
"src"
|
|
46
46
|
],
|
|
47
|
-
"scripts": {
|
|
48
|
-
"typecheck": "tsc --noEmit",
|
|
49
|
-
"build": "tsc",
|
|
50
|
-
"test": "vitest run",
|
|
51
|
-
"prepublishOnly": "npm run build"
|
|
52
|
-
},
|
|
53
47
|
"dependencies": {
|
|
54
48
|
"viem": "^2.43.3",
|
|
55
49
|
"wagmi": "^3.1.3",
|
|
@@ -79,5 +73,10 @@
|
|
|
79
73
|
"react",
|
|
80
74
|
"hooks"
|
|
81
75
|
],
|
|
82
|
-
"private": false
|
|
76
|
+
"private": false,
|
|
77
|
+
"scripts": {
|
|
78
|
+
"typecheck": "tsc --noEmit",
|
|
79
|
+
"build": "tsc",
|
|
80
|
+
"test": "vitest run"
|
|
81
|
+
}
|
|
83
82
|
}
|
package/src/chains/index.ts
CHANGED
|
@@ -8,18 +8,12 @@ export {
|
|
|
8
8
|
zooMainnet,
|
|
9
9
|
zooTestnet,
|
|
10
10
|
luxDev,
|
|
11
|
-
liquidityMainnet,
|
|
12
|
-
liquidityTestnet,
|
|
13
|
-
liquidityDevnet,
|
|
14
11
|
supportedChains,
|
|
15
12
|
LUX_MAINNET_ID,
|
|
16
13
|
LUX_TESTNET_ID,
|
|
17
14
|
ZOO_MAINNET_ID,
|
|
18
15
|
ZOO_TESTNET_ID,
|
|
19
16
|
LUX_DEV_ID,
|
|
20
|
-
LIQUIDITY_MAINNET_ID,
|
|
21
|
-
LIQUIDITY_TESTNET_ID,
|
|
22
|
-
LIQUIDITY_DEVNET_ID,
|
|
23
17
|
type SupportedChainId,
|
|
24
18
|
} from './lux'
|
|
25
19
|
|
package/src/chains/lux.ts
CHANGED
|
@@ -118,68 +118,6 @@ 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
|
-
|
|
183
121
|
/**
|
|
184
122
|
* Chain IDs
|
|
185
123
|
*/
|
|
@@ -188,9 +126,6 @@ export const LUX_TESTNET_ID = 96368
|
|
|
188
126
|
export const ZOO_MAINNET_ID = 200200
|
|
189
127
|
export const ZOO_TESTNET_ID = 200201
|
|
190
128
|
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
|
|
194
129
|
|
|
195
130
|
/**
|
|
196
131
|
* All supported chains
|
|
@@ -201,9 +136,6 @@ export const supportedChains = [
|
|
|
201
136
|
zooMainnet,
|
|
202
137
|
zooTestnet,
|
|
203
138
|
luxDev,
|
|
204
|
-
liquidityMainnet,
|
|
205
|
-
liquidityTestnet,
|
|
206
|
-
liquidityDevnet,
|
|
207
139
|
] as const
|
|
208
140
|
|
|
209
141
|
export type SupportedChainId = typeof supportedChains[number]['id']
|
package/src/hooks/use-pools.ts
CHANGED
|
@@ -29,7 +29,7 @@ export function usePool(
|
|
|
29
29
|
) {
|
|
30
30
|
const publicClient = usePublicClient({ chainId })
|
|
31
31
|
const contracts = getContracts(chainId)
|
|
32
|
-
const v3Factory = 'V3_FACTORY' in contracts ? contracts.V3_FACTORY : LUX_MAINNET_CONTRACTS.V3_FACTORY
|
|
32
|
+
const v3Factory = ('V3_FACTORY' in contracts ? contracts.V3_FACTORY : LUX_MAINNET_CONTRACTS.V3_FACTORY) as `0x${string}`
|
|
33
33
|
|
|
34
34
|
return useQuery({
|
|
35
35
|
queryKey: ['pool', token0, token1, fee, chainId],
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lux AMM V2 Factory ABI
|
|
3
|
-
* Compatible with Uniswap V2 Factory interface
|
|
4
|
-
*/
|
|
5
|
-
export declare const LUX_AMM_V2_FACTORY_ABI: readonly [{
|
|
6
|
-
readonly type: "function";
|
|
7
|
-
readonly name: "getPair";
|
|
8
|
-
readonly inputs: readonly [{
|
|
9
|
-
readonly name: "tokenA";
|
|
10
|
-
readonly type: "address";
|
|
11
|
-
}, {
|
|
12
|
-
readonly name: "tokenB";
|
|
13
|
-
readonly type: "address";
|
|
14
|
-
}];
|
|
15
|
-
readonly outputs: readonly [{
|
|
16
|
-
readonly name: "pair";
|
|
17
|
-
readonly type: "address";
|
|
18
|
-
}];
|
|
19
|
-
readonly stateMutability: "view";
|
|
20
|
-
}, {
|
|
21
|
-
readonly type: "function";
|
|
22
|
-
readonly name: "allPairs";
|
|
23
|
-
readonly inputs: readonly [{
|
|
24
|
-
readonly name: "index";
|
|
25
|
-
readonly type: "uint256";
|
|
26
|
-
}];
|
|
27
|
-
readonly outputs: readonly [{
|
|
28
|
-
readonly name: "pair";
|
|
29
|
-
readonly type: "address";
|
|
30
|
-
}];
|
|
31
|
-
readonly stateMutability: "view";
|
|
32
|
-
}, {
|
|
33
|
-
readonly type: "function";
|
|
34
|
-
readonly name: "allPairsLength";
|
|
35
|
-
readonly inputs: readonly [];
|
|
36
|
-
readonly outputs: readonly [{
|
|
37
|
-
readonly type: "uint256";
|
|
38
|
-
}];
|
|
39
|
-
readonly stateMutability: "view";
|
|
40
|
-
}, {
|
|
41
|
-
readonly type: "function";
|
|
42
|
-
readonly name: "createPair";
|
|
43
|
-
readonly inputs: readonly [{
|
|
44
|
-
readonly name: "tokenA";
|
|
45
|
-
readonly type: "address";
|
|
46
|
-
}, {
|
|
47
|
-
readonly name: "tokenB";
|
|
48
|
-
readonly type: "address";
|
|
49
|
-
}];
|
|
50
|
-
readonly outputs: readonly [{
|
|
51
|
-
readonly name: "pair";
|
|
52
|
-
readonly type: "address";
|
|
53
|
-
}];
|
|
54
|
-
readonly stateMutability: "nonpayable";
|
|
55
|
-
}, {
|
|
56
|
-
readonly type: "event";
|
|
57
|
-
readonly name: "PairCreated";
|
|
58
|
-
readonly inputs: readonly [{
|
|
59
|
-
readonly name: "token0";
|
|
60
|
-
readonly type: "address";
|
|
61
|
-
readonly indexed: true;
|
|
62
|
-
}, {
|
|
63
|
-
readonly name: "token1";
|
|
64
|
-
readonly type: "address";
|
|
65
|
-
readonly indexed: true;
|
|
66
|
-
}, {
|
|
67
|
-
readonly name: "pair";
|
|
68
|
-
readonly type: "address";
|
|
69
|
-
readonly indexed: false;
|
|
70
|
-
}, {
|
|
71
|
-
readonly name: "index";
|
|
72
|
-
readonly type: "uint256";
|
|
73
|
-
readonly indexed: false;
|
|
74
|
-
}];
|
|
75
|
-
}];
|
|
76
|
-
/** @deprecated Use LUX_AMM_V2_FACTORY_ABI instead */
|
|
77
|
-
export declare const UNISWAP_V2_FACTORY_ABI: readonly [{
|
|
78
|
-
readonly type: "function";
|
|
79
|
-
readonly name: "getPair";
|
|
80
|
-
readonly inputs: readonly [{
|
|
81
|
-
readonly name: "tokenA";
|
|
82
|
-
readonly type: "address";
|
|
83
|
-
}, {
|
|
84
|
-
readonly name: "tokenB";
|
|
85
|
-
readonly type: "address";
|
|
86
|
-
}];
|
|
87
|
-
readonly outputs: readonly [{
|
|
88
|
-
readonly name: "pair";
|
|
89
|
-
readonly type: "address";
|
|
90
|
-
}];
|
|
91
|
-
readonly stateMutability: "view";
|
|
92
|
-
}, {
|
|
93
|
-
readonly type: "function";
|
|
94
|
-
readonly name: "allPairs";
|
|
95
|
-
readonly inputs: readonly [{
|
|
96
|
-
readonly name: "index";
|
|
97
|
-
readonly type: "uint256";
|
|
98
|
-
}];
|
|
99
|
-
readonly outputs: readonly [{
|
|
100
|
-
readonly name: "pair";
|
|
101
|
-
readonly type: "address";
|
|
102
|
-
}];
|
|
103
|
-
readonly stateMutability: "view";
|
|
104
|
-
}, {
|
|
105
|
-
readonly type: "function";
|
|
106
|
-
readonly name: "allPairsLength";
|
|
107
|
-
readonly inputs: readonly [];
|
|
108
|
-
readonly outputs: readonly [{
|
|
109
|
-
readonly type: "uint256";
|
|
110
|
-
}];
|
|
111
|
-
readonly stateMutability: "view";
|
|
112
|
-
}, {
|
|
113
|
-
readonly type: "function";
|
|
114
|
-
readonly name: "createPair";
|
|
115
|
-
readonly inputs: readonly [{
|
|
116
|
-
readonly name: "tokenA";
|
|
117
|
-
readonly type: "address";
|
|
118
|
-
}, {
|
|
119
|
-
readonly name: "tokenB";
|
|
120
|
-
readonly type: "address";
|
|
121
|
-
}];
|
|
122
|
-
readonly outputs: readonly [{
|
|
123
|
-
readonly name: "pair";
|
|
124
|
-
readonly type: "address";
|
|
125
|
-
}];
|
|
126
|
-
readonly stateMutability: "nonpayable";
|
|
127
|
-
}, {
|
|
128
|
-
readonly type: "event";
|
|
129
|
-
readonly name: "PairCreated";
|
|
130
|
-
readonly inputs: readonly [{
|
|
131
|
-
readonly name: "token0";
|
|
132
|
-
readonly type: "address";
|
|
133
|
-
readonly indexed: true;
|
|
134
|
-
}, {
|
|
135
|
-
readonly name: "token1";
|
|
136
|
-
readonly type: "address";
|
|
137
|
-
readonly indexed: true;
|
|
138
|
-
}, {
|
|
139
|
-
readonly name: "pair";
|
|
140
|
-
readonly type: "address";
|
|
141
|
-
readonly indexed: false;
|
|
142
|
-
}, {
|
|
143
|
-
readonly name: "index";
|
|
144
|
-
readonly type: "uint256";
|
|
145
|
-
readonly indexed: false;
|
|
146
|
-
}];
|
|
147
|
-
}];
|
|
148
|
-
//# sourceMappingURL=lux-amm-v2-factory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lux-amm-v2-factory.d.ts","sourceRoot":"","sources":["../../../src/contracts/abis/lux-amm-v2-factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CzB,CAAA;AAEV,qDAAqD;AACrD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAyB,CAAA"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lux AMM V2 Factory ABI
|
|
3
|
-
* Compatible with Uniswap V2 Factory interface
|
|
4
|
-
*/
|
|
5
|
-
export const LUX_AMM_V2_FACTORY_ABI = [
|
|
6
|
-
{
|
|
7
|
-
type: 'function',
|
|
8
|
-
name: 'getPair',
|
|
9
|
-
inputs: [
|
|
10
|
-
{ name: 'tokenA', type: 'address' },
|
|
11
|
-
{ name: 'tokenB', type: 'address' },
|
|
12
|
-
],
|
|
13
|
-
outputs: [{ name: 'pair', type: 'address' }],
|
|
14
|
-
stateMutability: 'view',
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
type: 'function',
|
|
18
|
-
name: 'allPairs',
|
|
19
|
-
inputs: [{ name: 'index', type: 'uint256' }],
|
|
20
|
-
outputs: [{ name: 'pair', type: 'address' }],
|
|
21
|
-
stateMutability: 'view',
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
type: 'function',
|
|
25
|
-
name: 'allPairsLength',
|
|
26
|
-
inputs: [],
|
|
27
|
-
outputs: [{ type: 'uint256' }],
|
|
28
|
-
stateMutability: 'view',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
type: 'function',
|
|
32
|
-
name: 'createPair',
|
|
33
|
-
inputs: [
|
|
34
|
-
{ name: 'tokenA', type: 'address' },
|
|
35
|
-
{ name: 'tokenB', type: 'address' },
|
|
36
|
-
],
|
|
37
|
-
outputs: [{ name: 'pair', type: 'address' }],
|
|
38
|
-
stateMutability: 'nonpayable',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
type: 'event',
|
|
42
|
-
name: 'PairCreated',
|
|
43
|
-
inputs: [
|
|
44
|
-
{ name: 'token0', type: 'address', indexed: true },
|
|
45
|
-
{ name: 'token1', type: 'address', indexed: true },
|
|
46
|
-
{ name: 'pair', type: 'address', indexed: false },
|
|
47
|
-
{ name: 'index', type: 'uint256', indexed: false },
|
|
48
|
-
],
|
|
49
|
-
},
|
|
50
|
-
];
|
|
51
|
-
/** @deprecated Use LUX_AMM_V2_FACTORY_ABI instead */
|
|
52
|
-
export const UNISWAP_V2_FACTORY_ABI = LUX_AMM_V2_FACTORY_ABI;
|