@luxfi/exchange 0.1.0
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/bridge/__tests__/use-private-teleport.test.d.ts +2 -0
- package/dist/bridge/__tests__/use-private-teleport.test.d.ts.map +1 -0
- package/dist/bridge/__tests__/use-private-teleport.test.js +272 -0
- package/dist/bridge/cross-chain-store.d.ts +57 -0
- package/dist/bridge/cross-chain-store.d.ts.map +1 -0
- package/dist/bridge/cross-chain-store.js +158 -0
- package/dist/bridge/index.d.ts +78 -0
- package/dist/bridge/index.d.ts.map +1 -0
- package/dist/bridge/index.js +79 -0
- package/dist/bridge/private-teleport-types.d.ts +634 -0
- package/dist/bridge/private-teleport-types.d.ts.map +1 -0
- package/dist/bridge/private-teleport-types.js +308 -0
- package/dist/bridge/types.d.ts +84 -0
- package/dist/bridge/types.d.ts.map +1 -0
- package/dist/bridge/types.js +37 -0
- package/dist/bridge/use-cross-chain-mint.d.ts +34 -0
- package/dist/bridge/use-cross-chain-mint.d.ts.map +1 -0
- package/dist/bridge/use-cross-chain-mint.js +228 -0
- package/dist/bridge/use-private-teleport.d.ts +69 -0
- package/dist/bridge/use-private-teleport.d.ts.map +1 -0
- package/dist/bridge/use-private-teleport.js +666 -0
- package/dist/chains/index.d.ts +6 -0
- package/dist/chains/index.d.ts.map +1 -0
- package/dist/chains/index.js +6 -0
- package/dist/chains/lux.d.ts +508 -0
- package/dist/chains/lux.d.ts.map +1 -0
- package/dist/chains/lux.js +131 -0
- package/dist/contracts/abis/dex-swap-router.d.ts +137 -0
- package/dist/contracts/abis/dex-swap-router.d.ts.map +1 -0
- package/dist/contracts/abis/dex-swap-router.js +95 -0
- package/dist/contracts/abis/erc20.d.ts +136 -0
- package/dist/contracts/abis/erc20.d.ts.map +1 -0
- package/dist/contracts/abis/erc20.js +96 -0
- package/dist/contracts/abis/index.d.ts +15 -0
- package/dist/contracts/abis/index.d.ts.map +1 -0
- package/dist/contracts/abis/index.js +15 -0
- package/dist/contracts/abis/nft-position-manager.d.ts +235 -0
- package/dist/contracts/abis/nft-position-manager.d.ts.map +1 -0
- package/dist/contracts/abis/nft-position-manager.js +146 -0
- package/dist/contracts/abis/pool-manager.d.ts +315 -0
- package/dist/contracts/abis/pool-manager.d.ts.map +1 -0
- package/dist/contracts/abis/pool-manager.js +191 -0
- package/dist/contracts/abis/quoter-v2.d.ts +103 -0
- package/dist/contracts/abis/quoter-v2.d.ts.map +1 -0
- package/dist/contracts/abis/quoter-v2.js +68 -0
- package/dist/contracts/abis/swap-router.d.ts +119 -0
- package/dist/contracts/abis/swap-router.d.ts.map +1 -0
- package/dist/contracts/abis/swap-router.js +75 -0
- 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 +141 -0
- package/dist/contracts/addresses.d.ts.map +1 -0
- package/dist/contracts/addresses.js +108 -0
- package/dist/contracts/index.d.ts +6 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +5 -0
- package/dist/dex/balance-delta.d.ts +27 -0
- package/dist/dex/balance-delta.d.ts.map +1 -0
- package/dist/dex/balance-delta.js +45 -0
- package/dist/dex/index.d.ts +7 -0
- package/dist/dex/index.d.ts.map +1 -0
- package/dist/dex/index.js +6 -0
- package/dist/dex/pool-key.d.ts +19 -0
- package/dist/dex/pool-key.d.ts.map +1 -0
- package/dist/dex/pool-key.js +44 -0
- package/dist/dex/types.d.ts +71 -0
- package/dist/dex/types.d.ts.map +1 -0
- package/dist/dex/types.js +28 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +9 -0
- package/dist/hooks/use-pools.d.ts +24 -0
- package/dist/hooks/use-pools.d.ts.map +1 -0
- package/dist/hooks/use-pools.js +85 -0
- package/dist/hooks/use-positions.d.ts +17 -0
- package/dist/hooks/use-positions.d.ts.map +1 -0
- package/dist/hooks/use-positions.js +65 -0
- package/dist/hooks/use-swap-quote.d.ts +19 -0
- package/dist/hooks/use-swap-quote.d.ts.map +1 -0
- package/dist/hooks/use-swap-quote.js +54 -0
- package/dist/hooks/use-swap.d.ts +22 -0
- package/dist/hooks/use-swap.d.ts.map +1 -0
- package/dist/hooks/use-swap.js +46 -0
- package/dist/hooks/use-token-allowance.d.ts +27 -0
- package/dist/hooks/use-token-allowance.d.ts.map +1 -0
- package/dist/hooks/use-token-allowance.js +59 -0
- package/dist/hooks/use-token-balance.d.ts +17 -0
- package/dist/hooks/use-token-balance.d.ts.map +1 -0
- package/dist/hooks/use-token-balance.js +58 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/stores/index.d.ts +7 -0
- package/dist/stores/index.d.ts.map +1 -0
- package/dist/stores/index.js +6 -0
- package/dist/stores/settings-store.d.ts +25 -0
- package/dist/stores/settings-store.d.ts.map +1 -0
- package/dist/stores/settings-store.js +16 -0
- package/dist/stores/swap-store.d.ts +38 -0
- package/dist/stores/swap-store.d.ts.map +1 -0
- package/dist/stores/swap-store.js +58 -0
- package/dist/stores/token-store.d.ts +21 -0
- package/dist/stores/token-store.d.ts.map +1 -0
- package/dist/stores/token-store.js +32 -0
- package/dist/tokens/index.d.ts +65 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +185 -0
- package/package.json +78 -0
- package/src/chains/index.ts +21 -0
- package/src/chains/lux.ts +141 -0
- package/src/contracts/abis/dex-swap-router.ts +98 -0
- package/src/contracts/abis/erc20.ts +96 -0
- package/src/contracts/abis/index.ts +17 -0
- package/src/contracts/abis/nft-position-manager.ts +146 -0
- package/src/contracts/abis/pool-manager.ts +198 -0
- package/src/contracts/abis/quoter-v2.ts +68 -0
- package/src/contracts/abis/swap-router.ts +75 -0
- package/src/contracts/abis/uniswap-v2-factory.ts +49 -0
- package/src/contracts/abis/uniswap-v2-pair.ts +85 -0
- package/src/contracts/abis/uniswap-v2-router.ts +146 -0
- package/src/contracts/abis/uniswap-v3-factory.ts +45 -0
- package/src/contracts/abis/uniswap-v3-pool.ts +81 -0
- package/src/contracts/addresses.ts +128 -0
- package/src/contracts/index.ts +14 -0
- package/src/dex/balance-delta.ts +52 -0
- package/src/dex/index.ts +7 -0
- package/src/dex/pool-key.ts +62 -0
- package/src/dex/types.ts +87 -0
- package/src/hooks/index.ts +10 -0
- package/src/hooks/use-pools.ts +116 -0
- package/src/hooks/use-positions.ts +90 -0
- package/src/hooks/use-swap-quote.ts +81 -0
- package/src/hooks/use-swap.ts +64 -0
- package/src/hooks/use-token-allowance.ts +74 -0
- package/src/hooks/use-token-balance.ts +71 -0
- package/src/index.ts +31 -0
- package/src/stores/index.ts +7 -0
- package/src/stores/settings-store.ts +54 -0
- package/src/stores/swap-store.ts +112 -0
- package/src/stores/token-store.ts +62 -0
- package/src/tokens/index.ts +220 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NonfungiblePositionManager ABI
|
|
3
|
+
*/
|
|
4
|
+
export declare const NFT_POSITION_MANAGER_ABI: readonly [{
|
|
5
|
+
readonly type: "function";
|
|
6
|
+
readonly name: "positions";
|
|
7
|
+
readonly inputs: readonly [{
|
|
8
|
+
readonly name: "tokenId";
|
|
9
|
+
readonly type: "uint256";
|
|
10
|
+
}];
|
|
11
|
+
readonly outputs: readonly [{
|
|
12
|
+
readonly name: "nonce";
|
|
13
|
+
readonly type: "uint96";
|
|
14
|
+
}, {
|
|
15
|
+
readonly name: "operator";
|
|
16
|
+
readonly type: "address";
|
|
17
|
+
}, {
|
|
18
|
+
readonly name: "token0";
|
|
19
|
+
readonly type: "address";
|
|
20
|
+
}, {
|
|
21
|
+
readonly name: "token1";
|
|
22
|
+
readonly type: "address";
|
|
23
|
+
}, {
|
|
24
|
+
readonly name: "fee";
|
|
25
|
+
readonly type: "uint24";
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "tickLower";
|
|
28
|
+
readonly type: "int24";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "tickUpper";
|
|
31
|
+
readonly type: "int24";
|
|
32
|
+
}, {
|
|
33
|
+
readonly name: "liquidity";
|
|
34
|
+
readonly type: "uint128";
|
|
35
|
+
}, {
|
|
36
|
+
readonly name: "feeGrowthInside0LastX128";
|
|
37
|
+
readonly type: "uint256";
|
|
38
|
+
}, {
|
|
39
|
+
readonly name: "feeGrowthInside1LastX128";
|
|
40
|
+
readonly type: "uint256";
|
|
41
|
+
}, {
|
|
42
|
+
readonly name: "tokensOwed0";
|
|
43
|
+
readonly type: "uint128";
|
|
44
|
+
}, {
|
|
45
|
+
readonly name: "tokensOwed1";
|
|
46
|
+
readonly type: "uint128";
|
|
47
|
+
}];
|
|
48
|
+
readonly stateMutability: "view";
|
|
49
|
+
}, {
|
|
50
|
+
readonly type: "function";
|
|
51
|
+
readonly name: "mint";
|
|
52
|
+
readonly inputs: readonly [{
|
|
53
|
+
readonly name: "params";
|
|
54
|
+
readonly type: "tuple";
|
|
55
|
+
readonly components: readonly [{
|
|
56
|
+
readonly name: "token0";
|
|
57
|
+
readonly type: "address";
|
|
58
|
+
}, {
|
|
59
|
+
readonly name: "token1";
|
|
60
|
+
readonly type: "address";
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "fee";
|
|
63
|
+
readonly type: "uint24";
|
|
64
|
+
}, {
|
|
65
|
+
readonly name: "tickLower";
|
|
66
|
+
readonly type: "int24";
|
|
67
|
+
}, {
|
|
68
|
+
readonly name: "tickUpper";
|
|
69
|
+
readonly type: "int24";
|
|
70
|
+
}, {
|
|
71
|
+
readonly name: "amount0Desired";
|
|
72
|
+
readonly type: "uint256";
|
|
73
|
+
}, {
|
|
74
|
+
readonly name: "amount1Desired";
|
|
75
|
+
readonly type: "uint256";
|
|
76
|
+
}, {
|
|
77
|
+
readonly name: "amount0Min";
|
|
78
|
+
readonly type: "uint256";
|
|
79
|
+
}, {
|
|
80
|
+
readonly name: "amount1Min";
|
|
81
|
+
readonly type: "uint256";
|
|
82
|
+
}, {
|
|
83
|
+
readonly name: "recipient";
|
|
84
|
+
readonly type: "address";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "deadline";
|
|
87
|
+
readonly type: "uint256";
|
|
88
|
+
}];
|
|
89
|
+
}];
|
|
90
|
+
readonly outputs: readonly [{
|
|
91
|
+
readonly name: "tokenId";
|
|
92
|
+
readonly type: "uint256";
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "liquidity";
|
|
95
|
+
readonly type: "uint128";
|
|
96
|
+
}, {
|
|
97
|
+
readonly name: "amount0";
|
|
98
|
+
readonly type: "uint256";
|
|
99
|
+
}, {
|
|
100
|
+
readonly name: "amount1";
|
|
101
|
+
readonly type: "uint256";
|
|
102
|
+
}];
|
|
103
|
+
readonly stateMutability: "payable";
|
|
104
|
+
}, {
|
|
105
|
+
readonly type: "function";
|
|
106
|
+
readonly name: "increaseLiquidity";
|
|
107
|
+
readonly inputs: readonly [{
|
|
108
|
+
readonly name: "params";
|
|
109
|
+
readonly type: "tuple";
|
|
110
|
+
readonly components: readonly [{
|
|
111
|
+
readonly name: "tokenId";
|
|
112
|
+
readonly type: "uint256";
|
|
113
|
+
}, {
|
|
114
|
+
readonly name: "amount0Desired";
|
|
115
|
+
readonly type: "uint256";
|
|
116
|
+
}, {
|
|
117
|
+
readonly name: "amount1Desired";
|
|
118
|
+
readonly type: "uint256";
|
|
119
|
+
}, {
|
|
120
|
+
readonly name: "amount0Min";
|
|
121
|
+
readonly type: "uint256";
|
|
122
|
+
}, {
|
|
123
|
+
readonly name: "amount1Min";
|
|
124
|
+
readonly type: "uint256";
|
|
125
|
+
}, {
|
|
126
|
+
readonly name: "deadline";
|
|
127
|
+
readonly type: "uint256";
|
|
128
|
+
}];
|
|
129
|
+
}];
|
|
130
|
+
readonly outputs: readonly [{
|
|
131
|
+
readonly name: "liquidity";
|
|
132
|
+
readonly type: "uint128";
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "amount0";
|
|
135
|
+
readonly type: "uint256";
|
|
136
|
+
}, {
|
|
137
|
+
readonly name: "amount1";
|
|
138
|
+
readonly type: "uint256";
|
|
139
|
+
}];
|
|
140
|
+
readonly stateMutability: "payable";
|
|
141
|
+
}, {
|
|
142
|
+
readonly type: "function";
|
|
143
|
+
readonly name: "decreaseLiquidity";
|
|
144
|
+
readonly inputs: readonly [{
|
|
145
|
+
readonly name: "params";
|
|
146
|
+
readonly type: "tuple";
|
|
147
|
+
readonly components: readonly [{
|
|
148
|
+
readonly name: "tokenId";
|
|
149
|
+
readonly type: "uint256";
|
|
150
|
+
}, {
|
|
151
|
+
readonly name: "liquidity";
|
|
152
|
+
readonly type: "uint128";
|
|
153
|
+
}, {
|
|
154
|
+
readonly name: "amount0Min";
|
|
155
|
+
readonly type: "uint256";
|
|
156
|
+
}, {
|
|
157
|
+
readonly name: "amount1Min";
|
|
158
|
+
readonly type: "uint256";
|
|
159
|
+
}, {
|
|
160
|
+
readonly name: "deadline";
|
|
161
|
+
readonly type: "uint256";
|
|
162
|
+
}];
|
|
163
|
+
}];
|
|
164
|
+
readonly outputs: readonly [{
|
|
165
|
+
readonly name: "amount0";
|
|
166
|
+
readonly type: "uint256";
|
|
167
|
+
}, {
|
|
168
|
+
readonly name: "amount1";
|
|
169
|
+
readonly type: "uint256";
|
|
170
|
+
}];
|
|
171
|
+
readonly stateMutability: "payable";
|
|
172
|
+
}, {
|
|
173
|
+
readonly type: "function";
|
|
174
|
+
readonly name: "collect";
|
|
175
|
+
readonly inputs: readonly [{
|
|
176
|
+
readonly name: "params";
|
|
177
|
+
readonly type: "tuple";
|
|
178
|
+
readonly components: readonly [{
|
|
179
|
+
readonly name: "tokenId";
|
|
180
|
+
readonly type: "uint256";
|
|
181
|
+
}, {
|
|
182
|
+
readonly name: "recipient";
|
|
183
|
+
readonly type: "address";
|
|
184
|
+
}, {
|
|
185
|
+
readonly name: "amount0Max";
|
|
186
|
+
readonly type: "uint128";
|
|
187
|
+
}, {
|
|
188
|
+
readonly name: "amount1Max";
|
|
189
|
+
readonly type: "uint128";
|
|
190
|
+
}];
|
|
191
|
+
}];
|
|
192
|
+
readonly outputs: readonly [{
|
|
193
|
+
readonly name: "amount0";
|
|
194
|
+
readonly type: "uint256";
|
|
195
|
+
}, {
|
|
196
|
+
readonly name: "amount1";
|
|
197
|
+
readonly type: "uint256";
|
|
198
|
+
}];
|
|
199
|
+
readonly stateMutability: "payable";
|
|
200
|
+
}, {
|
|
201
|
+
readonly type: "function";
|
|
202
|
+
readonly name: "burn";
|
|
203
|
+
readonly inputs: readonly [{
|
|
204
|
+
readonly name: "tokenId";
|
|
205
|
+
readonly type: "uint256";
|
|
206
|
+
}];
|
|
207
|
+
readonly outputs: readonly [];
|
|
208
|
+
readonly stateMutability: "payable";
|
|
209
|
+
}, {
|
|
210
|
+
readonly type: "function";
|
|
211
|
+
readonly name: "balanceOf";
|
|
212
|
+
readonly inputs: readonly [{
|
|
213
|
+
readonly name: "owner";
|
|
214
|
+
readonly type: "address";
|
|
215
|
+
}];
|
|
216
|
+
readonly outputs: readonly [{
|
|
217
|
+
readonly type: "uint256";
|
|
218
|
+
}];
|
|
219
|
+
readonly stateMutability: "view";
|
|
220
|
+
}, {
|
|
221
|
+
readonly type: "function";
|
|
222
|
+
readonly name: "tokenOfOwnerByIndex";
|
|
223
|
+
readonly inputs: readonly [{
|
|
224
|
+
readonly name: "owner";
|
|
225
|
+
readonly type: "address";
|
|
226
|
+
}, {
|
|
227
|
+
readonly name: "index";
|
|
228
|
+
readonly type: "uint256";
|
|
229
|
+
}];
|
|
230
|
+
readonly outputs: readonly [{
|
|
231
|
+
readonly type: "uint256";
|
|
232
|
+
}];
|
|
233
|
+
readonly stateMutability: "view";
|
|
234
|
+
}];
|
|
235
|
+
//# sourceMappingURL=nft-position-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nft-position-manager.d.ts","sourceRoot":"","sources":["../../../src/contracts/abis/nft-position-manager.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8I3B,CAAA"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NonfungiblePositionManager ABI
|
|
3
|
+
*/
|
|
4
|
+
export const NFT_POSITION_MANAGER_ABI = [
|
|
5
|
+
{
|
|
6
|
+
type: 'function',
|
|
7
|
+
name: 'positions',
|
|
8
|
+
inputs: [{ name: 'tokenId', type: 'uint256' }],
|
|
9
|
+
outputs: [
|
|
10
|
+
{ name: 'nonce', type: 'uint96' },
|
|
11
|
+
{ name: 'operator', type: 'address' },
|
|
12
|
+
{ name: 'token0', type: 'address' },
|
|
13
|
+
{ name: 'token1', type: 'address' },
|
|
14
|
+
{ name: 'fee', type: 'uint24' },
|
|
15
|
+
{ name: 'tickLower', type: 'int24' },
|
|
16
|
+
{ name: 'tickUpper', type: 'int24' },
|
|
17
|
+
{ name: 'liquidity', type: 'uint128' },
|
|
18
|
+
{ name: 'feeGrowthInside0LastX128', type: 'uint256' },
|
|
19
|
+
{ name: 'feeGrowthInside1LastX128', type: 'uint256' },
|
|
20
|
+
{ name: 'tokensOwed0', type: 'uint128' },
|
|
21
|
+
{ name: 'tokensOwed1', type: 'uint128' },
|
|
22
|
+
],
|
|
23
|
+
stateMutability: 'view',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
type: 'function',
|
|
27
|
+
name: 'mint',
|
|
28
|
+
inputs: [
|
|
29
|
+
{
|
|
30
|
+
name: 'params',
|
|
31
|
+
type: 'tuple',
|
|
32
|
+
components: [
|
|
33
|
+
{ name: 'token0', type: 'address' },
|
|
34
|
+
{ name: 'token1', type: 'address' },
|
|
35
|
+
{ name: 'fee', type: 'uint24' },
|
|
36
|
+
{ name: 'tickLower', type: 'int24' },
|
|
37
|
+
{ name: 'tickUpper', type: 'int24' },
|
|
38
|
+
{ name: 'amount0Desired', type: 'uint256' },
|
|
39
|
+
{ name: 'amount1Desired', type: 'uint256' },
|
|
40
|
+
{ name: 'amount0Min', type: 'uint256' },
|
|
41
|
+
{ name: 'amount1Min', type: 'uint256' },
|
|
42
|
+
{ name: 'recipient', type: 'address' },
|
|
43
|
+
{ name: 'deadline', type: 'uint256' },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
outputs: [
|
|
48
|
+
{ name: 'tokenId', type: 'uint256' },
|
|
49
|
+
{ name: 'liquidity', type: 'uint128' },
|
|
50
|
+
{ name: 'amount0', type: 'uint256' },
|
|
51
|
+
{ name: 'amount1', type: 'uint256' },
|
|
52
|
+
],
|
|
53
|
+
stateMutability: 'payable',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
type: 'function',
|
|
57
|
+
name: 'increaseLiquidity',
|
|
58
|
+
inputs: [
|
|
59
|
+
{
|
|
60
|
+
name: 'params',
|
|
61
|
+
type: 'tuple',
|
|
62
|
+
components: [
|
|
63
|
+
{ name: 'tokenId', type: 'uint256' },
|
|
64
|
+
{ name: 'amount0Desired', type: 'uint256' },
|
|
65
|
+
{ name: 'amount1Desired', type: 'uint256' },
|
|
66
|
+
{ name: 'amount0Min', type: 'uint256' },
|
|
67
|
+
{ name: 'amount1Min', type: 'uint256' },
|
|
68
|
+
{ name: 'deadline', type: 'uint256' },
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
outputs: [
|
|
73
|
+
{ name: 'liquidity', type: 'uint128' },
|
|
74
|
+
{ name: 'amount0', type: 'uint256' },
|
|
75
|
+
{ name: 'amount1', type: 'uint256' },
|
|
76
|
+
],
|
|
77
|
+
stateMutability: 'payable',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: 'function',
|
|
81
|
+
name: 'decreaseLiquidity',
|
|
82
|
+
inputs: [
|
|
83
|
+
{
|
|
84
|
+
name: 'params',
|
|
85
|
+
type: 'tuple',
|
|
86
|
+
components: [
|
|
87
|
+
{ name: 'tokenId', type: 'uint256' },
|
|
88
|
+
{ name: 'liquidity', type: 'uint128' },
|
|
89
|
+
{ name: 'amount0Min', type: 'uint256' },
|
|
90
|
+
{ name: 'amount1Min', type: 'uint256' },
|
|
91
|
+
{ name: 'deadline', type: 'uint256' },
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
outputs: [
|
|
96
|
+
{ name: 'amount0', type: 'uint256' },
|
|
97
|
+
{ name: 'amount1', type: 'uint256' },
|
|
98
|
+
],
|
|
99
|
+
stateMutability: 'payable',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
type: 'function',
|
|
103
|
+
name: 'collect',
|
|
104
|
+
inputs: [
|
|
105
|
+
{
|
|
106
|
+
name: 'params',
|
|
107
|
+
type: 'tuple',
|
|
108
|
+
components: [
|
|
109
|
+
{ name: 'tokenId', type: 'uint256' },
|
|
110
|
+
{ name: 'recipient', type: 'address' },
|
|
111
|
+
{ name: 'amount0Max', type: 'uint128' },
|
|
112
|
+
{ name: 'amount1Max', type: 'uint128' },
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
outputs: [
|
|
117
|
+
{ name: 'amount0', type: 'uint256' },
|
|
118
|
+
{ name: 'amount1', type: 'uint256' },
|
|
119
|
+
],
|
|
120
|
+
stateMutability: 'payable',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: 'function',
|
|
124
|
+
name: 'burn',
|
|
125
|
+
inputs: [{ name: 'tokenId', type: 'uint256' }],
|
|
126
|
+
outputs: [],
|
|
127
|
+
stateMutability: 'payable',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
type: 'function',
|
|
131
|
+
name: 'balanceOf',
|
|
132
|
+
inputs: [{ name: 'owner', type: 'address' }],
|
|
133
|
+
outputs: [{ type: 'uint256' }],
|
|
134
|
+
stateMutability: 'view',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
type: 'function',
|
|
138
|
+
name: 'tokenOfOwnerByIndex',
|
|
139
|
+
inputs: [
|
|
140
|
+
{ name: 'owner', type: 'address' },
|
|
141
|
+
{ name: 'index', type: 'uint256' },
|
|
142
|
+
],
|
|
143
|
+
outputs: [{ type: 'uint256' }],
|
|
144
|
+
stateMutability: 'view',
|
|
145
|
+
},
|
|
146
|
+
];
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PoolManager Precompile ABI (0x0400)
|
|
3
|
+
* Native Uniswap v4-style AMM implementation
|
|
4
|
+
*/
|
|
5
|
+
export declare const POOL_MANAGER_ABI: readonly [{
|
|
6
|
+
readonly type: "function";
|
|
7
|
+
readonly name: "initialize";
|
|
8
|
+
readonly inputs: readonly [{
|
|
9
|
+
readonly name: "key";
|
|
10
|
+
readonly type: "tuple";
|
|
11
|
+
readonly components: readonly [{
|
|
12
|
+
readonly name: "currency0";
|
|
13
|
+
readonly type: "address";
|
|
14
|
+
}, {
|
|
15
|
+
readonly name: "currency1";
|
|
16
|
+
readonly type: "address";
|
|
17
|
+
}, {
|
|
18
|
+
readonly name: "fee";
|
|
19
|
+
readonly type: "uint24";
|
|
20
|
+
}, {
|
|
21
|
+
readonly name: "tickSpacing";
|
|
22
|
+
readonly type: "int24";
|
|
23
|
+
}, {
|
|
24
|
+
readonly name: "hooks";
|
|
25
|
+
readonly type: "address";
|
|
26
|
+
}];
|
|
27
|
+
}, {
|
|
28
|
+
readonly name: "sqrtPriceX96";
|
|
29
|
+
readonly type: "uint160";
|
|
30
|
+
}, {
|
|
31
|
+
readonly name: "hookData";
|
|
32
|
+
readonly type: "bytes";
|
|
33
|
+
}];
|
|
34
|
+
readonly outputs: readonly [{
|
|
35
|
+
readonly name: "tick";
|
|
36
|
+
readonly type: "int24";
|
|
37
|
+
}];
|
|
38
|
+
readonly stateMutability: "nonpayable";
|
|
39
|
+
}, {
|
|
40
|
+
readonly type: "function";
|
|
41
|
+
readonly name: "lock";
|
|
42
|
+
readonly inputs: readonly [{
|
|
43
|
+
readonly name: "data";
|
|
44
|
+
readonly type: "bytes";
|
|
45
|
+
}];
|
|
46
|
+
readonly outputs: readonly [{
|
|
47
|
+
readonly name: "result";
|
|
48
|
+
readonly type: "bytes";
|
|
49
|
+
}];
|
|
50
|
+
readonly stateMutability: "nonpayable";
|
|
51
|
+
}, {
|
|
52
|
+
readonly type: "function";
|
|
53
|
+
readonly name: "swap";
|
|
54
|
+
readonly inputs: readonly [{
|
|
55
|
+
readonly name: "key";
|
|
56
|
+
readonly type: "tuple";
|
|
57
|
+
readonly components: readonly [{
|
|
58
|
+
readonly name: "currency0";
|
|
59
|
+
readonly type: "address";
|
|
60
|
+
}, {
|
|
61
|
+
readonly name: "currency1";
|
|
62
|
+
readonly type: "address";
|
|
63
|
+
}, {
|
|
64
|
+
readonly name: "fee";
|
|
65
|
+
readonly type: "uint24";
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "tickSpacing";
|
|
68
|
+
readonly type: "int24";
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "hooks";
|
|
71
|
+
readonly type: "address";
|
|
72
|
+
}];
|
|
73
|
+
}, {
|
|
74
|
+
readonly name: "params";
|
|
75
|
+
readonly type: "tuple";
|
|
76
|
+
readonly components: readonly [{
|
|
77
|
+
readonly name: "zeroForOne";
|
|
78
|
+
readonly type: "bool";
|
|
79
|
+
}, {
|
|
80
|
+
readonly name: "amountSpecified";
|
|
81
|
+
readonly type: "int256";
|
|
82
|
+
}, {
|
|
83
|
+
readonly name: "sqrtPriceLimitX96";
|
|
84
|
+
readonly type: "uint160";
|
|
85
|
+
}];
|
|
86
|
+
}, {
|
|
87
|
+
readonly name: "hookData";
|
|
88
|
+
readonly type: "bytes";
|
|
89
|
+
}];
|
|
90
|
+
readonly outputs: readonly [{
|
|
91
|
+
readonly name: "delta";
|
|
92
|
+
readonly type: "int256";
|
|
93
|
+
}];
|
|
94
|
+
readonly stateMutability: "nonpayable";
|
|
95
|
+
}, {
|
|
96
|
+
readonly type: "function";
|
|
97
|
+
readonly name: "modifyLiquidity";
|
|
98
|
+
readonly inputs: readonly [{
|
|
99
|
+
readonly name: "key";
|
|
100
|
+
readonly type: "tuple";
|
|
101
|
+
readonly components: readonly [{
|
|
102
|
+
readonly name: "currency0";
|
|
103
|
+
readonly type: "address";
|
|
104
|
+
}, {
|
|
105
|
+
readonly name: "currency1";
|
|
106
|
+
readonly type: "address";
|
|
107
|
+
}, {
|
|
108
|
+
readonly name: "fee";
|
|
109
|
+
readonly type: "uint24";
|
|
110
|
+
}, {
|
|
111
|
+
readonly name: "tickSpacing";
|
|
112
|
+
readonly type: "int24";
|
|
113
|
+
}, {
|
|
114
|
+
readonly name: "hooks";
|
|
115
|
+
readonly type: "address";
|
|
116
|
+
}];
|
|
117
|
+
}, {
|
|
118
|
+
readonly name: "params";
|
|
119
|
+
readonly type: "tuple";
|
|
120
|
+
readonly components: readonly [{
|
|
121
|
+
readonly name: "tickLower";
|
|
122
|
+
readonly type: "int24";
|
|
123
|
+
}, {
|
|
124
|
+
readonly name: "tickUpper";
|
|
125
|
+
readonly type: "int24";
|
|
126
|
+
}, {
|
|
127
|
+
readonly name: "liquidityDelta";
|
|
128
|
+
readonly type: "int256";
|
|
129
|
+
}, {
|
|
130
|
+
readonly name: "salt";
|
|
131
|
+
readonly type: "bytes32";
|
|
132
|
+
}];
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "hookData";
|
|
135
|
+
readonly type: "bytes";
|
|
136
|
+
}];
|
|
137
|
+
readonly outputs: readonly [{
|
|
138
|
+
readonly name: "delta";
|
|
139
|
+
readonly type: "int256";
|
|
140
|
+
}, {
|
|
141
|
+
readonly name: "feeDelta";
|
|
142
|
+
readonly type: "int256";
|
|
143
|
+
}];
|
|
144
|
+
readonly stateMutability: "nonpayable";
|
|
145
|
+
}, {
|
|
146
|
+
readonly type: "function";
|
|
147
|
+
readonly name: "donate";
|
|
148
|
+
readonly inputs: readonly [{
|
|
149
|
+
readonly name: "key";
|
|
150
|
+
readonly type: "tuple";
|
|
151
|
+
readonly components: readonly [{
|
|
152
|
+
readonly name: "currency0";
|
|
153
|
+
readonly type: "address";
|
|
154
|
+
}, {
|
|
155
|
+
readonly name: "currency1";
|
|
156
|
+
readonly type: "address";
|
|
157
|
+
}, {
|
|
158
|
+
readonly name: "fee";
|
|
159
|
+
readonly type: "uint24";
|
|
160
|
+
}, {
|
|
161
|
+
readonly name: "tickSpacing";
|
|
162
|
+
readonly type: "int24";
|
|
163
|
+
}, {
|
|
164
|
+
readonly name: "hooks";
|
|
165
|
+
readonly type: "address";
|
|
166
|
+
}];
|
|
167
|
+
}, {
|
|
168
|
+
readonly name: "amount0";
|
|
169
|
+
readonly type: "uint256";
|
|
170
|
+
}, {
|
|
171
|
+
readonly name: "amount1";
|
|
172
|
+
readonly type: "uint256";
|
|
173
|
+
}, {
|
|
174
|
+
readonly name: "hookData";
|
|
175
|
+
readonly type: "bytes";
|
|
176
|
+
}];
|
|
177
|
+
readonly outputs: readonly [{
|
|
178
|
+
readonly name: "delta";
|
|
179
|
+
readonly type: "int256";
|
|
180
|
+
}];
|
|
181
|
+
readonly stateMutability: "nonpayable";
|
|
182
|
+
}, {
|
|
183
|
+
readonly type: "function";
|
|
184
|
+
readonly name: "settle";
|
|
185
|
+
readonly inputs: readonly [{
|
|
186
|
+
readonly name: "currency";
|
|
187
|
+
readonly type: "address";
|
|
188
|
+
}];
|
|
189
|
+
readonly outputs: readonly [{
|
|
190
|
+
readonly name: "paid";
|
|
191
|
+
readonly type: "uint256";
|
|
192
|
+
}];
|
|
193
|
+
readonly stateMutability: "payable";
|
|
194
|
+
}, {
|
|
195
|
+
readonly type: "function";
|
|
196
|
+
readonly name: "take";
|
|
197
|
+
readonly inputs: readonly [{
|
|
198
|
+
readonly name: "currency";
|
|
199
|
+
readonly type: "address";
|
|
200
|
+
}, {
|
|
201
|
+
readonly name: "to";
|
|
202
|
+
readonly type: "address";
|
|
203
|
+
}, {
|
|
204
|
+
readonly name: "amount";
|
|
205
|
+
readonly type: "uint256";
|
|
206
|
+
}];
|
|
207
|
+
readonly outputs: readonly [];
|
|
208
|
+
readonly stateMutability: "nonpayable";
|
|
209
|
+
}, {
|
|
210
|
+
readonly type: "function";
|
|
211
|
+
readonly name: "getSlot0";
|
|
212
|
+
readonly inputs: readonly [{
|
|
213
|
+
readonly name: "poolId";
|
|
214
|
+
readonly type: "bytes32";
|
|
215
|
+
}];
|
|
216
|
+
readonly outputs: readonly [{
|
|
217
|
+
readonly name: "sqrtPriceX96";
|
|
218
|
+
readonly type: "uint160";
|
|
219
|
+
}, {
|
|
220
|
+
readonly name: "tick";
|
|
221
|
+
readonly type: "int24";
|
|
222
|
+
}, {
|
|
223
|
+
readonly name: "protocolFee";
|
|
224
|
+
readonly type: "uint24";
|
|
225
|
+
}, {
|
|
226
|
+
readonly name: "lpFee";
|
|
227
|
+
readonly type: "uint24";
|
|
228
|
+
}];
|
|
229
|
+
readonly stateMutability: "view";
|
|
230
|
+
}, {
|
|
231
|
+
readonly type: "function";
|
|
232
|
+
readonly name: "getLiquidity";
|
|
233
|
+
readonly inputs: readonly [{
|
|
234
|
+
readonly name: "poolId";
|
|
235
|
+
readonly type: "bytes32";
|
|
236
|
+
}];
|
|
237
|
+
readonly outputs: readonly [{
|
|
238
|
+
readonly name: "liquidity";
|
|
239
|
+
readonly type: "uint128";
|
|
240
|
+
}];
|
|
241
|
+
readonly stateMutability: "view";
|
|
242
|
+
}, {
|
|
243
|
+
readonly type: "event";
|
|
244
|
+
readonly name: "Initialize";
|
|
245
|
+
readonly inputs: readonly [{
|
|
246
|
+
readonly name: "id";
|
|
247
|
+
readonly type: "bytes32";
|
|
248
|
+
readonly indexed: true;
|
|
249
|
+
}, {
|
|
250
|
+
readonly name: "currency0";
|
|
251
|
+
readonly type: "address";
|
|
252
|
+
readonly indexed: true;
|
|
253
|
+
}, {
|
|
254
|
+
readonly name: "currency1";
|
|
255
|
+
readonly type: "address";
|
|
256
|
+
readonly indexed: true;
|
|
257
|
+
}, {
|
|
258
|
+
readonly name: "fee";
|
|
259
|
+
readonly type: "uint24";
|
|
260
|
+
readonly indexed: false;
|
|
261
|
+
}, {
|
|
262
|
+
readonly name: "tickSpacing";
|
|
263
|
+
readonly type: "int24";
|
|
264
|
+
readonly indexed: false;
|
|
265
|
+
}, {
|
|
266
|
+
readonly name: "hooks";
|
|
267
|
+
readonly type: "address";
|
|
268
|
+
readonly indexed: false;
|
|
269
|
+
}, {
|
|
270
|
+
readonly name: "sqrtPriceX96";
|
|
271
|
+
readonly type: "uint160";
|
|
272
|
+
readonly indexed: false;
|
|
273
|
+
}, {
|
|
274
|
+
readonly name: "tick";
|
|
275
|
+
readonly type: "int24";
|
|
276
|
+
readonly indexed: false;
|
|
277
|
+
}];
|
|
278
|
+
}, {
|
|
279
|
+
readonly type: "event";
|
|
280
|
+
readonly name: "Swap";
|
|
281
|
+
readonly inputs: readonly [{
|
|
282
|
+
readonly name: "id";
|
|
283
|
+
readonly type: "bytes32";
|
|
284
|
+
readonly indexed: true;
|
|
285
|
+
}, {
|
|
286
|
+
readonly name: "sender";
|
|
287
|
+
readonly type: "address";
|
|
288
|
+
readonly indexed: true;
|
|
289
|
+
}, {
|
|
290
|
+
readonly name: "amount0";
|
|
291
|
+
readonly type: "int128";
|
|
292
|
+
readonly indexed: false;
|
|
293
|
+
}, {
|
|
294
|
+
readonly name: "amount1";
|
|
295
|
+
readonly type: "int128";
|
|
296
|
+
readonly indexed: false;
|
|
297
|
+
}, {
|
|
298
|
+
readonly name: "sqrtPriceX96";
|
|
299
|
+
readonly type: "uint160";
|
|
300
|
+
readonly indexed: false;
|
|
301
|
+
}, {
|
|
302
|
+
readonly name: "liquidity";
|
|
303
|
+
readonly type: "uint128";
|
|
304
|
+
readonly indexed: false;
|
|
305
|
+
}, {
|
|
306
|
+
readonly name: "tick";
|
|
307
|
+
readonly type: "int24";
|
|
308
|
+
readonly indexed: false;
|
|
309
|
+
}, {
|
|
310
|
+
readonly name: "fee";
|
|
311
|
+
readonly type: "uint24";
|
|
312
|
+
readonly indexed: false;
|
|
313
|
+
}];
|
|
314
|
+
}];
|
|
315
|
+
//# sourceMappingURL=pool-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pool-manager.d.ts","sourceRoot":"","sources":["../../../src/contracts/abis/pool-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiMnB,CAAA"}
|