@luxfi/exchange 1.0.0 → 1.0.3
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 +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 +31 -13
- package/dist/contracts/addresses.d.ts.map +1 -1
- package/dist/contracts/addresses.js +25 -34
- 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 +2 -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
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UniswapV3Factory ABI
|
|
3
|
-
*/
|
|
4
|
-
export const UNISWAP_V3_FACTORY_ABI = [
|
|
5
|
-
{
|
|
6
|
-
type: 'function',
|
|
7
|
-
name: 'getPool',
|
|
8
|
-
inputs: [
|
|
9
|
-
{ name: 'tokenA', type: 'address' },
|
|
10
|
-
{ name: 'tokenB', type: 'address' },
|
|
11
|
-
{ name: 'fee', type: 'uint24' },
|
|
12
|
-
],
|
|
13
|
-
outputs: [{ name: 'pool', type: 'address' }],
|
|
14
|
-
stateMutability: 'view',
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
type: 'function',
|
|
18
|
-
name: 'createPool',
|
|
19
|
-
inputs: [
|
|
20
|
-
{ name: 'tokenA', type: 'address' },
|
|
21
|
-
{ name: 'tokenB', type: 'address' },
|
|
22
|
-
{ name: 'fee', type: 'uint24' },
|
|
23
|
-
],
|
|
24
|
-
outputs: [{ name: 'pool', type: 'address' }],
|
|
25
|
-
stateMutability: 'nonpayable',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
type: 'function',
|
|
29
|
-
name: 'feeAmountTickSpacing',
|
|
30
|
-
inputs: [{ name: 'fee', type: 'uint24' }],
|
|
31
|
-
outputs: [{ name: 'tickSpacing', type: 'int24' }],
|
|
32
|
-
stateMutability: 'view',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
type: 'event',
|
|
36
|
-
name: 'PoolCreated',
|
|
37
|
-
inputs: [
|
|
38
|
-
{ name: 'token0', type: 'address', indexed: true },
|
|
39
|
-
{ name: 'token1', type: 'address', indexed: true },
|
|
40
|
-
{ name: 'fee', type: 'uint24', indexed: true },
|
|
41
|
-
{ name: 'tickSpacing', type: 'int24', indexed: false },
|
|
42
|
-
{ name: 'pool', type: 'address', indexed: false },
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
];
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UniswapV3Pool ABI (essential functions)
|
|
3
|
-
*/
|
|
4
|
-
export declare const UNISWAP_V3_POOL_ABI: readonly [{
|
|
5
|
-
readonly type: "function";
|
|
6
|
-
readonly name: "token0";
|
|
7
|
-
readonly inputs: readonly [];
|
|
8
|
-
readonly outputs: readonly [{
|
|
9
|
-
readonly type: "address";
|
|
10
|
-
}];
|
|
11
|
-
readonly stateMutability: "view";
|
|
12
|
-
}, {
|
|
13
|
-
readonly type: "function";
|
|
14
|
-
readonly name: "token1";
|
|
15
|
-
readonly inputs: readonly [];
|
|
16
|
-
readonly outputs: readonly [{
|
|
17
|
-
readonly type: "address";
|
|
18
|
-
}];
|
|
19
|
-
readonly stateMutability: "view";
|
|
20
|
-
}, {
|
|
21
|
-
readonly type: "function";
|
|
22
|
-
readonly name: "fee";
|
|
23
|
-
readonly inputs: readonly [];
|
|
24
|
-
readonly outputs: readonly [{
|
|
25
|
-
readonly type: "uint24";
|
|
26
|
-
}];
|
|
27
|
-
readonly stateMutability: "view";
|
|
28
|
-
}, {
|
|
29
|
-
readonly type: "function";
|
|
30
|
-
readonly name: "tickSpacing";
|
|
31
|
-
readonly inputs: readonly [];
|
|
32
|
-
readonly outputs: readonly [{
|
|
33
|
-
readonly type: "int24";
|
|
34
|
-
}];
|
|
35
|
-
readonly stateMutability: "view";
|
|
36
|
-
}, {
|
|
37
|
-
readonly type: "function";
|
|
38
|
-
readonly name: "liquidity";
|
|
39
|
-
readonly inputs: readonly [];
|
|
40
|
-
readonly outputs: readonly [{
|
|
41
|
-
readonly type: "uint128";
|
|
42
|
-
}];
|
|
43
|
-
readonly stateMutability: "view";
|
|
44
|
-
}, {
|
|
45
|
-
readonly type: "function";
|
|
46
|
-
readonly name: "slot0";
|
|
47
|
-
readonly inputs: readonly [];
|
|
48
|
-
readonly outputs: readonly [{
|
|
49
|
-
readonly name: "sqrtPriceX96";
|
|
50
|
-
readonly type: "uint160";
|
|
51
|
-
}, {
|
|
52
|
-
readonly name: "tick";
|
|
53
|
-
readonly type: "int24";
|
|
54
|
-
}, {
|
|
55
|
-
readonly name: "observationIndex";
|
|
56
|
-
readonly type: "uint16";
|
|
57
|
-
}, {
|
|
58
|
-
readonly name: "observationCardinality";
|
|
59
|
-
readonly type: "uint16";
|
|
60
|
-
}, {
|
|
61
|
-
readonly name: "observationCardinalityNext";
|
|
62
|
-
readonly type: "uint16";
|
|
63
|
-
}, {
|
|
64
|
-
readonly name: "feeProtocol";
|
|
65
|
-
readonly type: "uint8";
|
|
66
|
-
}, {
|
|
67
|
-
readonly name: "unlocked";
|
|
68
|
-
readonly type: "bool";
|
|
69
|
-
}];
|
|
70
|
-
readonly stateMutability: "view";
|
|
71
|
-
}, {
|
|
72
|
-
readonly type: "function";
|
|
73
|
-
readonly name: "positions";
|
|
74
|
-
readonly inputs: readonly [{
|
|
75
|
-
readonly name: "key";
|
|
76
|
-
readonly type: "bytes32";
|
|
77
|
-
}];
|
|
78
|
-
readonly outputs: readonly [{
|
|
79
|
-
readonly name: "liquidity";
|
|
80
|
-
readonly type: "uint128";
|
|
81
|
-
}, {
|
|
82
|
-
readonly name: "feeGrowthInside0LastX128";
|
|
83
|
-
readonly type: "uint256";
|
|
84
|
-
}, {
|
|
85
|
-
readonly name: "feeGrowthInside1LastX128";
|
|
86
|
-
readonly type: "uint256";
|
|
87
|
-
}, {
|
|
88
|
-
readonly name: "tokensOwed0";
|
|
89
|
-
readonly type: "uint128";
|
|
90
|
-
}, {
|
|
91
|
-
readonly name: "tokensOwed1";
|
|
92
|
-
readonly type: "uint128";
|
|
93
|
-
}];
|
|
94
|
-
readonly stateMutability: "view";
|
|
95
|
-
}, {
|
|
96
|
-
readonly type: "event";
|
|
97
|
-
readonly name: "Swap";
|
|
98
|
-
readonly inputs: readonly [{
|
|
99
|
-
readonly name: "sender";
|
|
100
|
-
readonly type: "address";
|
|
101
|
-
readonly indexed: true;
|
|
102
|
-
}, {
|
|
103
|
-
readonly name: "recipient";
|
|
104
|
-
readonly type: "address";
|
|
105
|
-
readonly indexed: true;
|
|
106
|
-
}, {
|
|
107
|
-
readonly name: "amount0";
|
|
108
|
-
readonly type: "int256";
|
|
109
|
-
readonly indexed: false;
|
|
110
|
-
}, {
|
|
111
|
-
readonly name: "amount1";
|
|
112
|
-
readonly type: "int256";
|
|
113
|
-
readonly indexed: false;
|
|
114
|
-
}, {
|
|
115
|
-
readonly name: "sqrtPriceX96";
|
|
116
|
-
readonly type: "uint160";
|
|
117
|
-
readonly indexed: false;
|
|
118
|
-
}, {
|
|
119
|
-
readonly name: "liquidity";
|
|
120
|
-
readonly type: "uint128";
|
|
121
|
-
readonly indexed: false;
|
|
122
|
-
}, {
|
|
123
|
-
readonly name: "tick";
|
|
124
|
-
readonly type: "int24";
|
|
125
|
-
readonly indexed: false;
|
|
126
|
-
}];
|
|
127
|
-
}];
|
|
128
|
-
//# sourceMappingURL=uniswap-v3-pool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uniswap-v3-pool.d.ts","sourceRoot":"","sources":["../../../src/contracts/abis/uniswap-v3-pool.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6EtB,CAAA"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UniswapV3Pool ABI (essential functions)
|
|
3
|
-
*/
|
|
4
|
-
export const UNISWAP_V3_POOL_ABI = [
|
|
5
|
-
{
|
|
6
|
-
type: 'function',
|
|
7
|
-
name: 'token0',
|
|
8
|
-
inputs: [],
|
|
9
|
-
outputs: [{ type: 'address' }],
|
|
10
|
-
stateMutability: 'view',
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
type: 'function',
|
|
14
|
-
name: 'token1',
|
|
15
|
-
inputs: [],
|
|
16
|
-
outputs: [{ type: 'address' }],
|
|
17
|
-
stateMutability: 'view',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
type: 'function',
|
|
21
|
-
name: 'fee',
|
|
22
|
-
inputs: [],
|
|
23
|
-
outputs: [{ type: 'uint24' }],
|
|
24
|
-
stateMutability: 'view',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
type: 'function',
|
|
28
|
-
name: 'tickSpacing',
|
|
29
|
-
inputs: [],
|
|
30
|
-
outputs: [{ type: 'int24' }],
|
|
31
|
-
stateMutability: 'view',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
type: 'function',
|
|
35
|
-
name: 'liquidity',
|
|
36
|
-
inputs: [],
|
|
37
|
-
outputs: [{ type: 'uint128' }],
|
|
38
|
-
stateMutability: 'view',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
type: 'function',
|
|
42
|
-
name: 'slot0',
|
|
43
|
-
inputs: [],
|
|
44
|
-
outputs: [
|
|
45
|
-
{ name: 'sqrtPriceX96', type: 'uint160' },
|
|
46
|
-
{ name: 'tick', type: 'int24' },
|
|
47
|
-
{ name: 'observationIndex', type: 'uint16' },
|
|
48
|
-
{ name: 'observationCardinality', type: 'uint16' },
|
|
49
|
-
{ name: 'observationCardinalityNext', type: 'uint16' },
|
|
50
|
-
{ name: 'feeProtocol', type: 'uint8' },
|
|
51
|
-
{ name: 'unlocked', type: 'bool' },
|
|
52
|
-
],
|
|
53
|
-
stateMutability: 'view',
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
type: 'function',
|
|
57
|
-
name: 'positions',
|
|
58
|
-
inputs: [{ name: 'key', type: 'bytes32' }],
|
|
59
|
-
outputs: [
|
|
60
|
-
{ name: 'liquidity', type: 'uint128' },
|
|
61
|
-
{ name: 'feeGrowthInside0LastX128', type: 'uint256' },
|
|
62
|
-
{ name: 'feeGrowthInside1LastX128', type: 'uint256' },
|
|
63
|
-
{ name: 'tokensOwed0', type: 'uint128' },
|
|
64
|
-
{ name: 'tokensOwed1', type: 'uint128' },
|
|
65
|
-
],
|
|
66
|
-
stateMutability: 'view',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
type: 'event',
|
|
70
|
-
name: 'Swap',
|
|
71
|
-
inputs: [
|
|
72
|
-
{ name: 'sender', type: 'address', indexed: true },
|
|
73
|
-
{ name: 'recipient', type: 'address', indexed: true },
|
|
74
|
-
{ name: 'amount0', type: 'int256', indexed: false },
|
|
75
|
-
{ name: 'amount1', type: 'int256', indexed: false },
|
|
76
|
-
{ name: 'sqrtPriceX96', type: 'uint160', indexed: false },
|
|
77
|
-
{ name: 'liquidity', type: 'uint128', indexed: false },
|
|
78
|
-
{ name: 'tick', type: 'int24', indexed: false },
|
|
79
|
-
],
|
|
80
|
-
},
|
|
81
|
-
];
|