uniswap-v2-loader 5.0.21 → 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.
Files changed (2) hide show
  1. package/README.md +9 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -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/RPC API Key (priority over ENV). | `FZBvlPrOxtgaKBBkry3SH0W1IqH4Y5tu` |
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, subscribe } = require('uniswap-v2-loader')
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 ', // SushiSwap
106
- to: 1000,
107
- progress: (c, t) => {
108
- rl.cursorTo(process.stdout, 0)
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.log(`\nSuccessfully loaded ${pairs.length} SushiSwap pairs`)
110
+ console.timeEnd('SushiSwap')
111
+ console.log(pairs.length, 'pairs')
114
112
  })
115
113
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniswap-v2-loader",
3
- "version": "5.0.21",
3
+ "version": "5.0.22",
4
4
  "description": "Uniswap v2 protocol loader",
5
5
  "keywords": [
6
6
  "uniswap-v2",