uniswap-v2-loader 5.0.20 → 5.0.22
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/.github/workflows/test.yml +0 -1
- package/README.md +10 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
| **ShibaSwap** | `0x115934131916c8b277dd010ee02de363c09d037c` |
|
|
14
14
|
| **DefiSwap** | `0x9deb29c9a4c7a88a3c0257393b7f3335338d9a9d` |
|
|
15
15
|
| **EtherVista** | `0x9a27cb5ae0b2cee0bb71f9a85c0d60f3920757b4` |
|
|
16
|
-
| **
|
|
16
|
+
| **RadioShack** | `0x91fae1bc94a9793708fbc66adcb59087c46dee10` |
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
## CLI
|
|
@@ -37,7 +37,7 @@ High-performance parallel fetcher for liquidity pairs. Efficiently synchronizes
|
|
|
37
37
|
| `to` | `number` | End index (exclusive). Required for range loading. | `undefined` |
|
|
38
38
|
| `filename` | `string` | Local CSV cache path. Supports OS-standard locations. | *Auto-detected* |
|
|
39
39
|
| `factory` | `string` | Smart contract factory address. | `0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f` |
|
|
40
|
-
| `key` | `string` | Alchemy
|
|
40
|
+
| `key` | `string` | Alchemy API Key | `FZBvlPrOxtgaKBBkry3SH0W1IqH4Y5tu` |
|
|
41
41
|
| `multicall_size` | `number` | RPC batch size per multicall request. | `50` |
|
|
42
42
|
| `workers` | `number` | Number of parallel worker threads. | `CPU - 1` |
|
|
43
43
|
| `progress` | `function` | Progress callback: `(current, total) => {}`. | `undefined` |
|
|
@@ -97,19 +97,17 @@ Standardized liquidity pool object.
|
|
|
97
97
|
|
|
98
98
|
## Usage Example
|
|
99
99
|
```javascript
|
|
100
|
-
const { load
|
|
101
|
-
const rl = require('readline')
|
|
100
|
+
const { load } = require('uniswap-v2-loader')
|
|
102
101
|
|
|
102
|
+
console.time('SushiSwap')
|
|
103
103
|
|
|
104
104
|
load({
|
|
105
|
-
factory: '0xc0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac
|
|
106
|
-
to:
|
|
107
|
-
progress: (
|
|
108
|
-
|
|
109
|
-
rl.clearLine(process.stdout, 0)
|
|
110
|
-
process.stdout.write(`Loaded: ${c} / ${t} (${(c/t*100).toFixed(2)}%)`)
|
|
111
|
-
}
|
|
105
|
+
factory: '0xc0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac',
|
|
106
|
+
to: 100,
|
|
107
|
+
progress: (i, total, pair) =>
|
|
108
|
+
console.log(pair.token0, pair.token1)
|
|
112
109
|
}).then(pairs => {
|
|
113
|
-
console.
|
|
110
|
+
console.timeEnd('SushiSwap')
|
|
111
|
+
console.log(pairs.length, 'pairs')
|
|
114
112
|
})
|
|
115
113
|
```
|