defiswap-dump 1.0.3 → 1.0.5

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.
@@ -30,15 +30,15 @@ jobs:
30
30
  node-version: '24'
31
31
  registry-url: 'https://registry.npmjs.org'
32
32
 
33
- - name: Update npm
34
- run: npm install -g npm@latest
35
-
36
33
  - name: Install dependencies
37
34
  run: npm install
38
35
 
39
- - name: Run update
36
+ - name: Update
40
37
  run: npm start
41
38
 
39
+ - name: Test
40
+ run: npm test
41
+
42
42
  - name: Commit and push changes
43
43
  id: commit
44
44
  run: |
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <br>
4
4
 
5
5
  Static set of addresses (Crypto.com DeFi Swap Ethereum mainnet).<br>
6
- New pairs updates happen every hour at GitHub Action [update.yml](https://github.com/calp-pro/defiswap-dump/actions/workflows/update.yml)<br>
6
+ New pairs updates happen **every hour** at GitHub Action [update.yml](https://github.com/calp-pro/defiswap-dump/actions/workflows/update.yml)<br>
7
7
  via [uniswap-v2-loader](https://github.com/calp-pro/uniswap-v2-loader)
8
8
 
9
9
  Data:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "defiswap-dump",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Static set of addresses (Crypto.com DeFi Swap Ethereum mainnet)",
5
5
  "keywords": [
6
6
  "DeFiSwap",
@@ -20,10 +20,11 @@
20
20
  "type": "commonjs",
21
21
  "main": "index.js",
22
22
  "scripts": {
23
- "start": "node -e \"require('./index.js').load({workers: 0})\""
23
+ "start": "node -e \"require('./index.js').load({workers: 0})\"",
24
+ "test": "node --test test.js"
24
25
  },
25
26
  "dependencies": {
26
- "uniswap-v2-loader": "^6.1.3"
27
+ "uniswap-v2-loader": "6.1.*"
27
28
  },
28
29
  "publishConfig": {
29
30
  "provenance": true
package/test.js ADDED
@@ -0,0 +1,19 @@
1
+ const { describe, before, it } = require('node:test')
2
+ const assert = require('node:assert/strict')
3
+ const {load} = require('./index')
4
+
5
+ describe('defiswap-dump', () => {
6
+
7
+ it('Find pair addresses CRV/USDC', () =>
8
+ load().then(pairs => {
9
+ assert.ok(
10
+ pairs.some(_ =>
11
+ _.pair == '0x6ec87787e3ca30ec7e56d781e62444950c5e3c59' &&
12
+ _.token0 == '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' &&
13
+ _.token1 == '0xd533a949740bb3306d119cc777fa900ba034cd52'
14
+ )
15
+ )
16
+ })
17
+ )
18
+
19
+ })