Skip to content

Commit

Permalink
chore: update build_readme.py (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryQW authored May 29, 2024
1 parent 3af9e29 commit fd01039
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 28 deletions.
53 changes: 27 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,35 @@ The RSS3 Node, an RSS3 Data Sublayer (DSL) component, is responsible for indexin
## Supported Networks and Workers

<!-- network-worker table starts -->
| Network/Worker | arbitrum | arweave | avax | base | binance-smart-chain | crossbell | ethereum | farcaster | gnosis | linea | optimism | polygon | savm | vsl |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1inch | | | | | | || | | | | | | |
| aave || ||| | || | | ||| | |
| aavegotchi | | | | | | | | | | | || | |
| core || | ||| |||||||||
| crossbell | | | | | || | | | | | | | |
| curve || || | | || || ||| | |
| ens | | | | | | || | | | | | | |
| highlight || | | | | || | | ||| | |
| iqwiki | | | | | | | | | | | || | |
| kiwistand | | | | | | | | | | || | | |
| lens | | | | | | | | | | | || | |
| lido | | | | | | || | | | | | | |
| looksrare | | | | | | || | | | | | | |
| matters | | | | | | | | | | || | | |
| mirror | || | | | | | | | | | | | |
| momoka | || | | | | | | | | | | | |
| opensea | | | | | | || | | | | | | |
| optimism | | | | | | || | | | | | | |
| paragraph | || | | | | | | | | | | | |
| rss3 | | | | | | || | | | | | ||
| savm | | | | | | | | | | | | || |
| stargate || |||| || | |||| | |
| uniswap | | | | | | || | || | || |
| vsl | | | | | | | | | | | | | ||
| Network/Worker | arbitrum | arweave | avax | base | binance-smart-chain | crossbell | ethereum | farcaster | gnosis | linea | optimism | polygon | vsl |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| **core** [^1] || | ||| ||||||||
| 1inch | | | | | | || | | | | | |
| aave || ||| | || | | ||| |
| aavegotchi | | | | | | | | | | | || |
| crossbell | | | | | || | | | | | | |
| curve || || | | || || ||| |
| ens | | | | | | || | | | | | |
| highlight || | | | | || | | ||| |
| iqwiki | | | | | | | | | | | || |
| kiwistand | | | | | | | | | | || | |
| lens | | | | | | | | | | | || |
| lido | | | | | | || | | | | | |
| looksrare | | | | | | || | | | | | |
| matters | | | | | | | | | | || | |
| mirror | || | | | | | | | | | | |
| momoka | || | | | | | | | | | | |
| opensea | | | | | | || | | | | | |
| optimism | | | | | | || | | | | | |
| paragraph | || | | | | | | | | | | |
| rss3 | | | | | | || | | | | ||
| stargate || |||| || | |||| |
| uniswap | | | | | | || | || | | |
| vsl | | | | | | | | | | | | ||
<!-- network-worker table ends -->

[^1]: The core worker covers all the data on the network where it operates, except for the data already covered by other workers.

## License

<!-- We use MIT as it's almost unrestricted. -->
Expand Down
11 changes: 9 additions & 2 deletions build_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

# Iterate through each network and get the supported workers list
for network in networks:
WORKERS_API = f"{GLOBAL_INDEXER_ENDPOINT}/nta/networks/{network}/list-workers"
WORKERS_API = f"{GLOBAL_INDEXER_ENDPOINT}/nta/networks/{network}/list_workers"
network_workers_response = requests.get(WORKERS_API)
network_workers = network_workers_response.json().get("data", []) if network_workers_response.status_code == 200 else []

Expand All @@ -38,9 +38,16 @@
# Sort worker names
sorted_workers = sorted(workers_dict.keys())

# Move "core" worker to the top
if "core" in sorted_workers:
sorted_workers.remove("core")
sorted_workers.insert(0, "core")

# Generate table rows
for worker in sorted_workers:
row = f"| {worker} |"
# Add superscript to "core" worker
display_name = f"**{worker}** [^1]" if worker == "core" else worker
row = f"| {display_name} |"
for network in networks:
row += " ✓ |" if network in workers_dict[worker] else " |"
table += row + "\n"
Expand Down

0 comments on commit fd01039

Please sign in to comment.