Skip to content

Commit d7410ef

Browse files
committed
map (models) dequanto
1 parent 4c4ea4d commit d7410ef

2,232 files changed

Lines changed: 25142 additions & 87534 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/update.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: Daily Build and Push
5+
6+
# on:
7+
# schedule:
8+
# - cron: '15 3 * * 1' # every Monday at 03:15 UTC
9+
10+
jobs:
11+
build-publish:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
id-token: write
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
submodules: recursive
20+
- uses: actions/setup-node@v3
21+
with:
22+
node-version: 20
23+
registry-url: 'https://registry.npmjs.org'
24+
cache: npm
25+
26+
- run: npm ci
27+
- run: npm run build--skip-icons

actions/chains.act.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
import alot from 'alot';
22
import { File } from 'atma-io';
33
import { UAction } from 'atma-utest'
4+
import { l } from 'dequanto/utils/$logger';
5+
import { Config } from 'dequanto/config/Config';
46
import { EthereumListsSource } from '../src/chains/EthereumListsSource';
57
import { ChainListSource } from '../src/chains/ChainListSource';
68
import { $downloader } from '../src/utils/$downloader';
7-
import { l } from 'dequanto/utils/$logger';
89
import { $image } from '../src/utils/ImageHandler';
10+
import { EndpointsChecker } from '../src/chains/EndpointsChecker';
11+
import { Mapping } from '../src/chains/Mapping';
912

1013
UAction.create({
1114
async 'generate'() {
15+
let config = await Config.fetch();
16+
1217
let handlers = [
1318
new EthereumListsSource(),
1419
new ChainListSource(),
@@ -29,7 +34,7 @@ UAction.create({
2934
let output = `./chain/${chain.chainId}/logo.png`;
3035
if (await File.existsAsync(output)) {
3136
chain.icon = output;
32-
} else {
37+
} else if (!config.skipIcons) {
3338
chain.icon = await alot(group.values)
3439
.filter(x => x.icon != null)
3540
.mapAsync(async x => {
@@ -50,7 +55,6 @@ UAction.create({
5055
}
5156

5257
chain.tvl = alot(group.values).first(x => x.tvl != null)?.tvl;
53-
5458
return chain;
5559
})
5660
.toArrayAsync();
@@ -60,13 +64,15 @@ UAction.create({
6064
.thenBy(x => x.chainId)
6165
.toArray();
6266

63-
const chainList = sortedByTvl;
67+
await EndpointsChecker.handleLiveUrls(sortedByTvl);
68+
69+
const chainList = await Mapping.map(sortedByTvl);
6470
await File.writeAsync(`chainlist.json`, chainList);
6571

6672
const chainListTop50 = alot(chainList).take(50).toArray();
6773
await File.writeAsync(`chainlist-top50.json`, chainListTop50);
6874

69-
const chainIds = alot(chainList).toDictionary(x => x.shortName, x => x.chainId);
75+
const chainIds = alot(chainList).toDictionary(x => x.platform, x => x.chainId);
7076
await File.writeAsync(`chainids.json`, chainIds);
7177

7278
await alot(chainList).forEachAsync(async chain => {

chain/1/chain.json

Lines changed: 48 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,70 @@
11
{
2-
"name": "Ethereum Mainnet",
3-
"chain": "ETH",
2+
"chainId": 1,
43
"icon": "./chain/1/logo.png",
5-
"rpc": [
6-
"https://mainnet.infura.io/v3/${INFURA_API_KEY}",
7-
"wss://mainnet.infura.io/ws/v3/${INFURA_API_KEY}",
8-
"https://api.mycryptoapi.com/eth",
9-
"https://cloudflare-eth.com",
10-
"https://ethereum-rpc.publicnode.com",
11-
"wss://ethereum-rpc.publicnode.com",
12-
"https://mainnet.gateway.tenderly.co",
13-
"wss://mainnet.gateway.tenderly.co",
14-
"https://rpc.blocknative.com/boost",
15-
"https://rpc.flashbots.net",
16-
"https://rpc.flashbots.net/fast",
17-
"https://rpc.mevblocker.io",
18-
"https://rpc.mevblocker.io/fast",
19-
"https://rpc.mevblocker.io/noreverts",
20-
"https://rpc.mevblocker.io/fullprivacy",
21-
"https://eth.drpc.org",
22-
"wss://eth.drpc.org",
23-
"https://api.securerpc.com/v1"
24-
],
25-
"features": [
4+
"www": "https://ethereum.org",
5+
"name": "Ethereum Mainnet",
6+
"platform": "eth",
7+
"chainToken": "ETH",
8+
"endpoints": [
9+
{
10+
"url": "https://ethereum-rpc.publicnode.com"
11+
},
12+
{
13+
"url": "wss://ethereum-rpc.publicnode.com"
14+
},
15+
{
16+
"url": "https://mainnet.gateway.tenderly.co"
17+
},
18+
{
19+
"url": "wss://mainnet.gateway.tenderly.co"
20+
},
21+
{
22+
"url": "https://rpc.flashbots.net"
23+
},
24+
{
25+
"url": "https://rpc.flashbots.net/fast"
26+
},
2627
{
27-
"name": "EIP155"
28+
"url": "https://rpc.mevblocker.io"
2829
},
2930
{
30-
"name": "EIP1559"
31+
"url": "https://rpc.mevblocker.io/fast"
32+
},
33+
{
34+
"url": "https://rpc.mevblocker.io/noreverts"
35+
},
36+
{
37+
"url": "https://rpc.mevblocker.io/fullprivacy"
38+
},
39+
{
40+
"url": "https://eth.drpc.org"
41+
},
42+
{
43+
"url": "wss://eth.drpc.org"
44+
},
45+
{
46+
"url": "https://api.securerpc.com/v1"
3147
}
3248
],
33-
"faucets": [],
34-
"nativeCurrency": {
35-
"name": "Ether",
36-
"symbol": "ETH",
37-
"decimals": 18
38-
},
39-
"infoURL": "https://ethereum.org",
40-
"shortName": "eth",
41-
"chainId": 1,
42-
"networkId": 1,
43-
"slip44": 60,
44-
"ens": {
45-
"registry": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
46-
},
4749
"explorers": [
4850
{
4951
"name": "etherscan",
50-
"url": "https://etherscan.io",
51-
"standard": "EIP3091"
52+
"url": "https://etherscan.io"
5253
},
5354
{
5455
"name": "blockscout",
55-
"url": "https://eth.blockscout.com",
56-
"icon": "blockscout",
57-
"standard": "EIP3091"
56+
"url": "https://eth.blockscout.com"
5857
},
5958
{
6059
"name": "dexguru",
61-
"url": "https://ethereum.dex.guru",
62-
"icon": "dexguru",
63-
"standard": "EIP3091"
60+
"url": "https://ethereum.dex.guru"
6461
},
6562
{
6663
"name": "Routescan",
67-
"url": "https://ethereum.routescan.io",
68-
"standard": "EIP3091"
64+
"url": "https://ethereum.routescan.io"
6965
}
7066
],
71-
"tvl": 97949545361
67+
"ens": {
68+
"registry": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
69+
}
7270
}

chain/10/chain.json

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
{
2+
"chainId": 10,
3+
"icon": "./chain/10/logo.png",
4+
"www": "https://optimism.io",
25
"name": "OP Mainnet",
3-
"chain": "ETH",
4-
"rpc": [
5-
"https://mainnet.optimism.io",
6-
"https://optimism-rpc.publicnode.com",
7-
"wss://optimism-rpc.publicnode.com",
8-
"https://optimism.gateway.tenderly.co",
9-
"wss://optimism.gateway.tenderly.co",
10-
"https://optimism.drpc.org",
11-
"wss://optimism.drpc.org"
6+
"platform": "oeth",
7+
"chainToken": "ETH",
8+
"endpoints": [
9+
{
10+
"url": "https://mainnet.optimism.io"
11+
},
12+
{
13+
"url": "https://optimism-rpc.publicnode.com"
14+
},
15+
{
16+
"url": "wss://optimism-rpc.publicnode.com"
17+
},
18+
{
19+
"url": "https://optimism.gateway.tenderly.co"
20+
},
21+
{
22+
"url": "wss://optimism.gateway.tenderly.co"
23+
},
24+
{
25+
"url": "https://optimism.drpc.org"
26+
},
27+
{
28+
"url": "wss://optimism.drpc.org"
29+
}
1230
],
13-
"faucets": [],
14-
"nativeCurrency": {
15-
"name": "Ether",
16-
"symbol": "ETH",
17-
"decimals": 18
18-
},
19-
"infoURL": "https://optimism.io",
20-
"shortName": "oeth",
21-
"chainId": 10,
22-
"networkId": 10,
2331
"explorers": [
2432
{
2533
"name": "etherscan",
26-
"url": "https://optimistic.etherscan.io",
27-
"standard": "EIP3091"
34+
"url": "https://optimistic.etherscan.io"
2835
},
2936
{
3037
"name": "blockscout",
31-
"url": "https://optimism.blockscout.com",
32-
"icon": "blockscout",
33-
"standard": "EIP3091"
38+
"url": "https://optimism.blockscout.com"
3439
},
3540
{
3641
"name": "dexguru",
37-
"url": "https://optimism.dex.guru",
38-
"icon": "dexguru",
39-
"standard": "EIP3091"
42+
"url": "https://optimism.dex.guru"
4043
},
4144
{
4245
"name": "Routescan",
43-
"url": "https://mainnet.superscan.network",
44-
"standard": "EIP3091"
46+
"url": "https://mainnet.superscan.network"
4547
}
46-
],
47-
"icon": "./chain/10/logo.png",
48-
"tvl": 573222146
48+
]
4949
}

chain/100/chain.json

Lines changed: 22 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,36 @@
11
{
2-
"name": "Gnosis",
3-
"chain": "GNO",
2+
"chainId": 100,
43
"icon": "./chain/100/logo.png",
5-
"rpc": [
6-
"https://rpc.gnosischain.com",
7-
"https://rpc.gnosis.gateway.fm",
8-
"https://rpc.ankr.com/gnosis",
9-
"https://gnosischain-rpc.gateway.pokt.network",
10-
"https://gnosis-mainnet.public.blastapi.io",
11-
"https://gnosis.api.onfinality.io/public",
12-
"https://gnosis.blockpi.network/v1/rpc/public",
13-
"https://web3endpoints.com/gnosischain-mainnet",
14-
"https://gnosis.oat.farm",
15-
"wss://rpc.gnosischain.com/wss",
16-
"https://gnosis-rpc.publicnode.com",
17-
"wss://gnosis-rpc.publicnode.com"
18-
],
19-
"faucets": [
20-
"https://gnosisfaucet.com",
21-
"https://stakely.io/faucet/gnosis-chain-xdai",
22-
"https://faucet.prussia.dev/xdai"
4+
"www": "https://docs.gnosischain.com",
5+
"name": "Gnosis",
6+
"platform": "gno",
7+
"chainToken": "XDAI",
8+
"endpoints": [
9+
{
10+
"url": "https://gnosis-mainnet.public.blastapi.io"
11+
},
12+
{
13+
"url": "https://gnosis.oat.farm"
14+
},
15+
{
16+
"url": "wss://rpc.gnosischain.com/wss"
17+
},
18+
{
19+
"url": "wss://gnosis-rpc.publicnode.com"
20+
}
2321
],
24-
"nativeCurrency": {
25-
"name": "xDAI",
26-
"symbol": "XDAI",
27-
"decimals": 18
28-
},
29-
"infoURL": "https://docs.gnosischain.com",
30-
"shortName": "gno",
31-
"chainId": 100,
32-
"networkId": 100,
33-
"slip44": 700,
3422
"explorers": [
3523
{
3624
"name": "gnosisscan",
37-
"url": "https://gnosisscan.io",
38-
"standard": "EIP3091"
25+
"url": "https://gnosisscan.io"
3926
},
4027
{
4128
"name": "blockscout",
42-
"url": "https://gnosis.blockscout.com",
43-
"icon": "blockscout",
44-
"standard": "EIP3091"
29+
"url": "https://gnosis.blockscout.com"
4530
},
4631
{
4732
"name": "dexguru",
48-
"url": "https://gnosis.dex.guru",
49-
"icon": "dexguru",
50-
"standard": "EIP3091"
33+
"url": "https://gnosis.dex.guru"
5134
}
52-
],
53-
"tvl": 306540817
35+
]
5436
}

chain/1000/chain.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"name": "GTON Mainnet",
33
"chain": "GTON",
4-
"rpc": [
5-
"https://rpc.gton.network/"
6-
],
4+
"rpc": [],
75
"faucets": [],
86
"nativeCurrency": {
97
"name": "GCD",
@@ -25,6 +23,5 @@
2523
"type": "L2",
2624
"chain": "eip155-1"
2725
},
28-
"icon": null,
2926
"tvl": 0
3027
}

0 commit comments

Comments
 (0)