diff --git a/docs/sdk/examples.mdx b/docs/sdk/examples.mdx index 9946d075..0f4f0b2d 100644 --- a/docs/sdk/examples.mdx +++ b/docs/sdk/examples.mdx @@ -4,6 +4,257 @@ title: Examples description: Example squids --- -import TagsNavigation from '@site/src/components/TagsNavigation'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; - \ No newline at end of file + +```mdx-code-block + + +``` + +Browse a dedicated repository with [EVM squid examples](https://github.com/subsquid-labs/squid-evm-examples). It contains: + +- A [squid indexing ERC20 transfers](https://github.com/subsquid-labs/evm-logs-example) by extracting `Transfer(address,address,uint256)` logs emitted by the USDC contract. +- A [squid indexing DEX trades](https://github.com/subsquid-labs/evm-factory-example) while dynamically tracking Uniswap v3 pool contracts as they are deployed. Shows [factory contract](/sdk/resources/evm/factory-contracts) indexing in action. +- A [NFT indexing squid](https://github.com/subsquid-labs/evm-multicall-example) that additionally queries the NFT metadata from the contract state. Illustrates batching RPC calls using the [Multicall contract](/sdk/resources/tools/typegen/state-queries/?typegen=evm#batch-state-queries). +- A [multichain squid](https://github.com/subsquid-labs/squid-multichain-template) tracking USDC `Transfer` events on both Ethereum and BSC. + +and a few others. + +### Processor configs showcase {#evm-showcase} + +The snippets below show how to configure [`EvmBatchProcessor`](/sdk/reference/processors/evm-batch) and use Squid SDK to build a custom indexer for various use-cases. Each snippet comes with a link to a repository with full sources, and can be used [as a template](/squid-cli/init/#sqd-init-name). + +
+Bulk-index Binance Chain transactions for a large number of wallets + +[Full squid here](https://github.com/subsquid-labs/showcase00-analyzing-a-large-number-of-wallets). + +```ts title="src/processor.ts" +export const processor = new EvmBatchProcessor() + .setGateway('https://v2.archive.subsquid.io/network/binance-mainnet') + .addTransaction({}) +``` + +```ts title="src/main.ts" +const wallets: Set = loadWallets() +// wallets.size can be very large (tested at 1.4M) + +processor.run(new TypeormDatabase(), async (ctx) => { + for (let block of ctx.blocks) { + for (let txn of block.transactions) { + if (wallets.has(txn.from)) { + // process a txn initiated by the wallet + } + if (txn.to && wallets.has(txn.to)) { + // process a txn directed to the wallet + } + } + } +}) +``` + +
+ +
+Index all USDC Transfer events on Ethereum with real time updates + +Real time data is fetched from a chain node RPC; a Database object with hot blocks support is required to store it (see [this page](/sdk/resources/basics/unfinalized-blocks) for more details). [Full squid here](https://github.com/subsquid-labs/showcase01-all-usdc-transfers). + +```ts +export const USDC_CONTRACT_ADDRESS = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' + +export const processor = new EvmBatchProcessor() + .setGateway('https://v2.archive.subsquid.io/network/ethereum-mainnet') + .setRpcEndpoint('') + .setFinalityConfirmation(75) + .addLog({ + range: {from: 6_082_465}, + address: [USDC_CONTRACT_ADDRESS], + topic0: [usdcAbi.events.Transfer.topic], + }) + .setFields({ + log: { + transactionHash: true, + }, + }) +``` + +
+ +
+Index all Transfers to vitalik.eth + +All `Transfer(address,address,uint256)` will be captured, including ERC20 and ERC721 transfers and possibly events with the same signature made with other protocols. [Full squid here](https://github.com/subsquid-labs/showcase02-all-transfers-to-a-wallet). + +```ts +export const VITALIK_ETH_TOPIC = '0x000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045' + +export const processor = new EvmBatchProcessor() + .setGateway('https://v2.archive.subsquid.io/network/ethereum-mainnet') + .addLog({ + topic0: [erc20abi.events.Transfer.topic], + topic2: [VITALIK_ETH_TOPIC], + }) +``` + +
+ +
+Get all calls to AAVE lending pool and all events they caused + +Including events emitted by other contracts. Get ETH value involved in each call. + +[Full squid here](https://github.com/subsquid-labs/showcase03-all-events-caused-by-contract-calls/). + +```ts +export const AAVE_CONTRACT = '0x7d2768de32b0b80b7a3454c06bdac94a69ddc7a9' + +export const processor = new EvmBatchProcessor() + .setGateway('https://v2.archive.subsquid.io/network/ethereum-mainnet') + .setBlockRange({ from: 11_362_579 }) + .addTransaction({ + to: [AAVE_CONTRACT], + logs: true, + }) + .setFields({ + transaction: { + value: true, + sighash: true, + }, + log: { + transactionHash: true, + }, + }) +``` + +
+ +
+Index all Mint(address,address,uint256) event logs on Ethereum, extract the gas fees + +[Full squid here](https://github.com/subsquid-labs/showcase04-all-mint-events). + +```ts +export const processor = new EvmBatchProcessor() + .setGateway('https://v2.archive.subsquid.io/network/ethereum-mainnet') + .addLog({ + topic0: [usdcAbi.events.Mint.topic], + transaction: true, + }) + .setFields({ + transaction: { + gasUsed: true, + } + }) +``` + +
+ +
+Index all Pancakeswap trading pairs and Swap logs + +[Full squid here](https://github.com/subsquid-labs/showcase05-dex-pair-creation-and-swaps). + +```ts +export const FACTORY_ADDRESSES = [ + '0xbcfccbde45ce874adcb698cc183debcf17952812', + '0xca143ce32fe78f1f7019d7d551a6402fc5350c73', +] + +const PAIR_CREATED_TOPIC = '0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9' +const SWAP_TOPIC = '0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822' + +export const processor = new EvmBatchProcessor() + .setGateway('https://v2.archive.subsquid.io/network/binance-mainnet') + .setBlockRange({ from: 586_851 }) + .addLog({ + address: FACTORY_ADDRESSES, + topic0: [PAIR_CREATED_TOPIC], + }) + .addLog({ + topic0: [SWAP_TOPIC], + }) + .setFields({ + log: { + transactionHash: true, + }, + }) +``` + +
+ +
+Index all call traces and historical state changes of the BAYC NFT contract + +Call traces will expose any internal calls to BAYC by other contracts. [Full squid here](https://github.com/subsquid-labs/showcase06-all-bayc-call-traces). + +```ts +const BAYC_ADDRESS = '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d' + +export const processor = new EvmBatchProcessor() + .setGateway('https://v2.archive.subsquid.io/network/ethereum-mainnet') + .setBlockRange({ from: 12_287_507 }) + .addTrace({ + type: ['call'], + callTo: [BAYC_ADDRESS], + transaction: true, + }) + .addStateDiff({ + address: [BAYC_ADDRESS], + transaction: true, + }) + .setFields({ + trace: { + callTo: true, + callFrom: true, + callSighash: true, + }, + }) +``` + +
+ +
+Scrape all NFT contract deployments on Ethereum, index Transfers + +All contract creations are scraped; they will be checked for ERC721 compliance in the batch handler. All ERC721 `Transfer` events are scraped so that they can be filtered and binned by the contract in the batch handler. [Full squid here](https://github.com/subsquid-labs/showcase07-grab-all-nft-transfers). + +```ts +export const processor = new EvmBatchProcessor() + .setGateway('https://v2.archive.subsquid.io/network/ethereum-mainnet') + .addTrace({ + type: ['create'], + transaction: true, + }) + .addLog({ + topic0: [erc721.events.Transfer.topic], + }) + .setFields({ + trace: { + createResultCode: true, // for checking ERC721 compliance + createResultAddress: true, + }, + }) +``` + +
+ + +```mdx-code-block +
+ +``` + +- [A simple squid tracking Kusama transfers](https://github.com/subsquid-labs/squid-substrate-template). Illustrates basic usage of `SubstrateBatchProcessor`. +- [Simple ink!/WASM squid](https://github.com/subsquid-labs/squid-wasm-template). Illustrates how to use `SubstrateBatchProcessor` to index WASM smart contract data. See [WASM tutorial](/sdk/tutorials/ink) for details. +- [Simple Frontier EVM squid](https://github.com/subsquid-labs/squid-frontier-evm-template) indexing an NFT collection on Astar. Illustrates how to use `SubstrateBatchProcessor` to index EVM logs. See [Frontier EVM tutorial](/sdk/tutorials/frontier-evm) for details. + +[//]: # (!!!! Update Substrate examples in github.com/subsquid-labs/squid-substrate-examples and mention them here) + + +```mdx-code-block + +
+``` diff --git a/src/components/TagsNavigation/index.module.css b/src/components/TagsNavigation/index.module.css deleted file mode 100644 index bab01372..00000000 --- a/src/components/TagsNavigation/index.module.css +++ /dev/null @@ -1,274 +0,0 @@ -.tagsPage { - -} - -.tagsCategories { - display: grid; - grid-template-columns: 1fr; - grid-gap: 16px; - margin-bottom: 16px; -} - -.tagsButton { - margin-bottom: 40px; - display: flex; - align-items: center; - justify-content: flex-end; - gap: 16px; -} - -.tagsCategory { - display: grid; - grid-template-columns: 120px 1fr; - align-items: center; - grid-gap: 6px; - - @media (max-width: 833px) { - grid-template-columns: 1fr; - } -} - -.tagsCategory__title { - font-size: 16px; - font-weight: 700; - line-height: 20px; - font-family: inherit; -} - -.tagsCategory__wrapper { - border: 1px solid #D9D9D9; - padding: 10px; - border-radius: 8px; - display: grid; - grid-template-columns: 1fr auto; - grid-gap: 10px; - align-items: flex-start; - user-select: none; -} - -.tagsCategory__tags { - display: flex; - flex-wrap: wrap; - grid-gap: 10px; -} - -.tagsCategory__tag { - cursor: pointer; - transition: background-color .2s linear; - border-radius: 4px; - display: flex; - height: 25px; - position: relative; -} - -.tagsCategory__tooltip { - visibility: hidden; - width: 180px; /* Ширина подсказки */ - background-color: #fff; /* Цвет фона подсказки */ - color: #000; /* Цвет текста */ - text-align: center; - padding: 10px; - border-radius: 6px; - box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); /* Тень подсказки */ - position: absolute; - z-index: 1; - bottom: 160%; /* Позиционирование подсказки */ - left: 50%; - transform: translateX(-50%); - opacity: 0; /* Скрытие подсказки по умолчанию */ - transition: opacity 0.3s; - font-size: 12px; - font-weight: 400; - line-height: 14.52px; -} - -.tagsCategory__tooltip::after, .tagsCategory__tooltip::before { - content: ''; - position: absolute; - left: 50%; - margin-left: -12px; - border-width: 12px; - border-style: solid; -} - -.tagsCategory__tooltip::before { - top: 100%; /* Позиционирование стрелочки тени */ - border-color: rgba(0, 0, 0, 0.1) transparent transparent transparent; /* Цвет тени стрелочки */ - z-index: -1; -} - -.tagsCategory__tooltip::after { - top: calc(100% - 1px); /* Позиционирование стрелочки */ - border-color: #fff transparent transparent transparent; /* Цвет стрелочки */ -} - -.tagsCategory__tag:hover .tagsCategory__tooltip { - visibility: visible; - opacity: 1; /* Показ подсказки при наведении */ -} - -.tagsCategory__tag input { - display: none; -} - -.tagsCategory__tag > span { - - padding: 4px 12px 4px 12px; - border-radius: 4px; - height: 25px; - display: flex; - align-items: center; - justify-content: center; - border: 1px solid transparent; - transition: border-color .2s linear; -} - -.tagsCategory__tag > span span { - position: relative; - top: 1px; - font-size: 14px; - font-weight: 700; - line-height: 14px; - font-family: inherit; - white-space: nowrap; -} - -.tagsCategory__tag input:not(:checked) + span { - border-color: #D9D9D9; -} - -.tagsCategory__clear { - padding: 4px 12px 4px 12px; - gap: 10px; - border-radius: 120px; - background: #F2F2F2; - font-size: 14px; - font-weight: 700; - line-height: 14px; - font-family: inherit; - min-height: 25px; - display: flex; - align-items: center; - justify-content: center; -} - - -.tagsResult { - -} - -.tagsResult__title { - font-size: 16px; - font-weight: 700; - line-height: 20px; - margin-bottom: 20px; - display: block; -} - -.tagsResult__wrapper { - border-radius: 10px; - background: #F8F8F8; - padding: 10px 10px 10px 24px; -} - -.tagsResult__scroll { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(242px, 1fr)); - grid-gap: 16px; - max-height: 632px; - overflow-y: auto; - padding-top: 14px; - padding-bottom: 14px; - padding-right: 14px; -} - -/* Стилизация самой полосы прокрутки */ -.tagsResult__scroll::-webkit-scrollbar { - width: 5px; /* Ширина вертикальной полосы прокрутки */ - height: 5px; /* Высота горизонтальной полосы прокрутки */ -} - -/* Стилизация трека полосы прокрутки */ -.tagsResult__scroll::-webkit-scrollbar-track { - background: transparent; /* Цвет трека */ - border-radius: 10px; /* Радиус скругления трека */ -} - -/* Стилизация ползунка полосы прокрутки */ -.tagsResult__scroll::-webkit-scrollbar-thumb { - background: #888; /* Цвет ползунка */ - border-radius: 10px; /* Радиус скругления ползунка */ -} - -/* Стилизация ползунка при наведении */ -.tagsResult__scroll::-webkit-scrollbar-thumb:hover { - background: #555; /* Цвет ползунка при наведении */ -} - -.tagsResult__column { - display: flex; - flex-direction: column; - grid-gap: 16px; -} - -.tagsResultCard { - display: grid; - grid-template-columns: 1fr; - padding: 20px; - grid-gap: 20px; - border-radius: 10px; - background: #FFFFFF; - position: relative; -} - -.tagsResultCard__link { - position: absolute; - top: 0; - left: 0; - z-index: 1; - right: 0; - bottom: 0; -} - -.tagsResultCard__header { - display: grid; - grid-template-columns: 1fr; - grid-gap: 10px; -} - -.tagsResultCard__title { - font-size: 14px; - font-weight: 700; - line-height: 17px; -} - -.tagsResultCard__desc { - font-size: 12px; - font-weight: 400; - line-height: 14.52px; -} - -.tagsResultCard__tags { - display: flex; - flex-wrap: wrap; - grid-gap: 10px; -} - -.tagsResultCard__tag { - min-height: 25px; - padding: 4px 12px 4px 12px; - border-radius: 120px; - display: inline-flex; - align-items: center; - justify-content: center; -} - -.tagsResultCard__tag span { - position: relative; - top: 1px; - font-size: 14px; - font-weight: 700; - line-height: 17px; - white-space: nowrap; - min-width: max-content; -} \ No newline at end of file diff --git a/src/components/TagsNavigation/index.tsx b/src/components/TagsNavigation/index.tsx deleted file mode 100644 index 68f8090c..00000000 --- a/src/components/TagsNavigation/index.tsx +++ /dev/null @@ -1,341 +0,0 @@ -import React, {useEffect, useState, useRef} from 'react'; -import s from './index.module.css' -import axios from "axios"; -import {useHistory} from 'react-router-dom'; - -interface Data { - cards: DataCard[] - categories: DataCategory[] - tags: DataTags[] -} - -interface DataCard { - title: string - description: string - tags: string[] - url: string -} - -interface DataCategory { - title: string - tags: string[] -} - -interface DataTags { - id: string - description: string -} - -interface Tags { - id: string - description: string - color: string -} - -export default function TagsNavigation({tags}: { tags: string }): JSX.Element { - const [data, setData] = useState(undefined) - const [activeTags, setActiveTags] = useState([]) - const [checkedTags, setCheckedTags] = useState<{ [key: string]: boolean }>({}); - const [results, setResults] = useState([]) - const checkboxesRef = useRef<{ [key: string]: HTMLInputElement | null }>({}); - const [tagsData, setTagsData] = useState([]) - const history = useHistory(); - - const colors = [ - ['#d8eed6', '#dbf6da', '#a2e2ad', '#97d696', '#91e48f', '#a9d4b0', '#83b88c', '#66906D', '#79AC78', '#5c845b', '#75ba73', '#9dd598', '#7EAC7A', '#d9f2bf', '#B3C99C', '#8fa17c', '#dff9c8', '#b2d989', '#90B06E', '#6f8954', '#daf2bf', '#b4c99d', '#90A17D', '#e4f7d2', '#b9d49b', '#95ac7d', '#d2e1c1', '#ACB99E', '#e3f5e7', '#aedbb8', '#8db295', '#6D8B74', '#b7e6c3', '#96bda0', '#76957d'], - ['#dfeefe', '#e2f3ff', '#d8eaf7', '#dbf6fb', '#C4DFDF', '#c3fbfb', '#74D8D8', '#5caeae', '#adecec', '#8EC2C2', '#709a9a', '#cbecf2', '#92C7CF', '#749fa5', '#79d7e5', '#61AEB9', '#9ADCFF', '#bee1ff', '#c8e1f2', '#7bbee3', '#6096B4', '#8bc7eb', '#c3e1fe', '#8dcbfc', '#63befc', '#cbd2e6', '#9cabd0', '#d2d9ee', '#a1b1dd', '#6f8bcb', '#d5daf0', '#A6B1E1', '#768ad1', '#c9ceec', '#9ba5dd'], - ['#F3EEEA', '#F0EBE3', '#F1E5D1', '#eee1d4', '#EDDBC7', '#e2d6c6', '#dbcbb8', '#e5d1bb', '#d8c3b1', '#BDAE9A', '#d1b896', '#A79277', '#958979', '#c2a98b', '#d0b18a', '#a58c6c', '#D8B185', '#ac8c69', '#d2bc93', '#a89674', '#cec2ad', '#efd0c6', '#F3D7CA', '#e9a67e', '#bf8157', '#E3A081', '#f7efee', '#ede1e1', '#ead0cd', '#D5B4B4', '#DBA39A', '#e0abab', '#c28686', '#c67564', '#D59A9A'] - ] - - function findTag(id: string) { - return tagsData.find(t => t.id === id) - } - - const queryParams = new URLSearchParams(document.location.search) - - // Get data from JSON - useEffect(() => { - const rootEl = document.getElementById("__docusaurus") - rootEl && rootEl.classList.add('docs-example-page') - - const _tags = axios.get(tags) - _tags.then(response => { - setData(response.data) - }) - }, [tags]); - - // Check default checked tag - useEffect(() => { - if (data) { - initializeActiveTags(data) - - data.categories.forEach((category, categoryIndex) => { - const colorsSet = colors[categoryIndex % colors.length] - - category.tags.forEach((_tag, _tagIndex) => { - const tag = data.tags.find((t) => t.id === _tag) - if (tag) { - setTagsData((prevState) => ([{ - id: tag.id, - description: tag.description, - color: colorsSet[_tagIndex % colorsSet.length] - }, ...prevState])) - - } - }) - }) - } - - }, [data, checkboxesRef.current]); - - // Set result data from active tags - useEffect(() => { - if (data && data.cards) { - const _cards = [] - - for (let i = 0; i < data.cards.length; i++) { - const card = data.cards[i] - - for (let j = 0; j < activeTags.length; j++) { - const activeTag = activeTags[j] - - if (card.tags.find(c => c === activeTag)) { - if (!_cards.find(_c => _c.title === card.title)) { - _cards.push(card) - } - } - } - } - - setResults(_cards) - } - }, [activeTags]); - - // Select tag - function selectTag(e: React.ChangeEvent) { - const target = e.target; - - setCheckedTags((prevCheckedTags) => ({ - ...prevCheckedTags, - [target.name]: target.checked - })); - - setActiveTags((prevState) => { - let newTags; - if (target.checked) { - newTags = [target.name, ...prevState]; - } else { - newTags = prevState.filter(a => a !== target.name); - } - - // Обновление URL после изменения состояния - setTimeout(() => { - const queryParams = new URLSearchParams(window.location.search); - queryParams.set('tags', JSON.stringify(newTags)); - history.push({search: queryParams.toString()}); - }, 0); - - return newTags; - }); - } - - - function resetTags(tags: string[]) { - tags.forEach(tag => { - if (checkboxesRef.current[tag]) { - checkboxesRef.current[tag].checked = false; - } - }); - - setActiveTags((prevState) => { - const newTags = prevState.filter(a => !tags.find(s => s === a)); - - // Обновление URL после изменения состояния - setTimeout(() => { - const queryParams = new URLSearchParams(window.location.search); - queryParams.set('tags', JSON.stringify(newTags)); - history.push({search: queryParams.toString()}); - }, 0); - - return newTags; - }); - - setCheckedTags((prevCheckedTags) => { - const newCheckedTags = {...prevCheckedTags}; - tags.forEach(tag => { - newCheckedTags[tag] = false; - }); - return newCheckedTags; - }); - } - - // Initialize active tags based on defaultChecked checkboxes - const initializeActiveTags = (data: Data) => { - const tagsParam = queryParams.get('tags'); - const initialTags: string[] = []; - - if (tagsParam && tagsParam.length > 2) { - try { - const parsedTags = JSON.parse(tagsParam); - if (Array.isArray(parsedTags)) { - data.categories.forEach(category => { - category.tags.forEach(tag => { - if (checkboxesRef.current[tag]) { - const isTag = parsedTags.find(t => t === tag) - if (isTag) { - initialTags.push(tag); - checkboxesRef.current[tag].checked = true - - setCheckedTags((prevState) => { - return { - [tag]: true, - ...prevState - } - }); - } else { - checkboxesRef.current[tag].checked = false - } - } - }); - }); - } - } catch (e) { - initAll() - console.error('Error parsing tags:', e); - } - } else { - initAll() - } - - function initAll() { - data.categories.forEach(category => { - category.tags.forEach(tag => { - if (checkboxesRef.current[tag] && checkboxesRef.current[tag].checked) { - initialTags.push(tag); - - setCheckedTags((prevState) => { - return { - [tag]: true, - ...prevState - } - }); - } - }); - }); - } - - setActiveTags(initialTags); - }; - - function selectAllTags() { - if (data) { - const allTags = []; - data.categories.forEach(category => { - category.tags.forEach(tag => { - allTags.push(tag); - if (checkboxesRef.current[tag]) { - checkboxesRef.current[tag].checked = true; - } - }); - }); - - setActiveTags(allTags); - const checkedTags = {} - - allTags.forEach((t) => { - checkedTags[t] = true - }) - - setCheckedTags(checkedTags); - - // Обновление URL после изменения состояния - setTimeout(() => { - const queryParams = new URLSearchParams(window.location.search); - queryParams.set('tags', JSON.stringify(allTags)); - history.push({ search: queryParams.toString() }); - }, 0); - } - } - - const columns = [[], [], []]; - results.forEach((card, index) => { - columns[index % 3].push(card); - }); - - return ( -
-
- {(data && data.categories) && data.categories.map((category, categoryIndex) => { - const colorsSet = colors[categoryIndex % colors.length] - return
- {category.title} -
-
- {category.tags.map((tag, tagIndex) => { - const _tag = findTag(tag) - const isChecked = checkedTags[tag] || false; - return
-
- })} -
- -
- {activeTags.length < tagsData.length && } - {activeTags.length > 0 && } -
- -
- {results.length} search results - {results.length > 0 &&
-
- {columns.map((column, colIndex) => ( -
- {column.map(card => ( -
- -
- {card.title} - {card.description} -
-
- {card.tags.map((tag: string) => { - const _tag = findTag(tag) - return {tag} - })} -
-
- ))} -
- ))} -
-
} -
-
- ); -} diff --git a/src/css/custom.css b/src/css/custom.css index 381cf262..1820c2d9 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -7,18 +7,6 @@ @tailwind components; @tailwind utilities; -html[class*="docs-doc-id-sdk/examples"] .col{ - max-width: 100% !important; -} - -html[class*="docs-doc-id-sdk/examples"] .pagination-nav { - max-width: 75% !important; - - @media (max-width: 996px) { - max-width: 100% !important; - } -} - @font-face { font-family: 'Archia'; src: local('Archia'), diff --git a/static/json/tags.json b/static/json/tags.json deleted file mode 100644 index 046cdfd2..00000000 --- a/static/json/tags.json +++ /dev/null @@ -1,319 +0,0 @@ -{ - "tags": [ - { - "id": "EVM", - "description": "Ethereum-compatible networks such as Binance and Core" - }, - { - "id": "Substrate", - "description": "Networks running on Substrate such as Polkadot and Kusama" - }, - { - "id": "Solana", - "description": "Solana and compatible networks" - }, - { - "id": "Fuel", - "description": "Fuel Network" - }, - { - "id": "Postgres+GraphQL", - "description": "Writing to a PostgreSQL database and serving the data over GraphQL" - }, - { - "id": "CSV", - "description": "Writing to CSV files" - }, - { - "id": "Parquet", - "description": "Writing to Parquet files" - }, - { - "id": "S3", - "description": "Saving data files to Amazon S3-compatible cloud storage" - }, - { - "id": "BigQuery", - "description": "Writing to Google BigQuery" - }, - { - "id": "Multichain", - "description": "Indexers that use data from multiple chains" - }, - { - "id": "Hot blocks", - "description": "Real-time indexers that can process chain reorgs" - }, - { - "id": "ERC20", - "description": "Indexing fungible tokens on EVM" - }, - { - "id": "ERC721", - "description": "Indexing NFTs on EVM" - }, - { - "id": "IPFS", - "description": "Getting data from Interplanetary File System" - }, - { - "id": "DEX", - "description": "Indexing decentralized exchanges such as Uniswap" - }, - { - "id": "Two-pass", - "description": "Two-pass indexing is a pattern that increases data efficiency of squids indexing factory deployments" - }, - { - "id": "Traces", - "description": "Call traces for EVM" - }, - { - "id": "Direct RPC calls", - "description": "Getting data by directly calling a chain node RPC" - }, - { - "id": "ink!", - "description": "Indexing ink! smart contracts" - }, - { - "id": "Outdated", - "description": "Squids that use deprecated architecture and/or packages, but are still useful as illustrations of select features" - } - ], - "categories": [ - { - "title": "Tech stack", - "tags": [ - "EVM", - "Substrate", - "Solana", - "Fuel", - "Tron" - ] - }, - { - "title": "Target", - "tags": [ - "Postgres+GraphQL", - "CSV", - "Parquet", - "S3", - "BigQuery" - ] - }, - { - "title": "Misc", - "tags": [ - "ERC20", - "ERC721", - "ink!", - "Multichain", - "Hot blocks", - "IPFS", - "DEX", - "Two-pass", - "Traces", - "Direct RPC calls", - "Outdated" - ] - } - ], - "cards": [ - { - "title": "Uniswap v3 abridged", - "description": "Data on factory, pools and liquidity positions. No aggregates.", - "tags": [ - "EVM", - "Postgres+GraphQL", - "Hot blocks", - "DEX", - "ERC20", - "Two-pass" - ], - "url": "https://github.com/subsquid-labs/uniswapv3-abridged-squid" - }, - { - "title": "Uniswap v3 full", - "description": "Data on factory, pools and liquidity positions. Aggregates + RPC data. Outdated arch.", - "tags": [ - "EVM", - "Postgres+GraphQL", - "Hot blocks", - "DEX", - "ERC20", - "Two-pass", - "Direct RPC calls", - "Outdated" - ], - "url": "https://github.com/subsquid-labs/uniswapv3-squid" - }, - { - "title": "All txs for 1.4M wallets", - "description": "Fetching txs data in bulk, filtering the output.", - "tags": [ - "EVM", - "Postgres+GraphQL" - ], - "url": "https://github.com/subsquid-labs/showcase00-analyzing-a-large-number-of-wallets" - }, - { - "title": "USDC transfers in real time", - "description": "Real-time data on Transfer events from the Ethereum USDC contract.", - "tags": [ - "EVM", - "Postgres+GraphQL", - "ERC20", - "Hot blocks" - ], - "url": "https://github.com/subsquid-labs/showcase01-all-usdc-transfers" - }, - { - "title": "All ERC20 transfers to a single wallet", - "description": "Small squid that fetches ERC20 Transfers to vitalik.eth", - "tags": [ - "EVM", - "Postgres+GraphQL", - "ERC20" - ], - "url": "https://github.com/subsquid-labs/showcase02-all-transfers-to-a-wallet" - }, - { - "title": "All events caused by contract calls", - "description": "Fetches all transactions addressed to the AAVE contract plus all event logs emitted.", - "tags": [ - "EVM", - "Postgres+GraphQL" - ], - "url": "https://github.com/subsquid-labs/showcase03-all-events-caused-by-contract-calls" - }, - { - "title": "All Mint events", - "description": "Fetches all Mint(address,address,uint256) event logs plus parent txs.", - "tags": [ - "EVM", - "Postgres+GraphQL" - ], - "url": "https://github.com/subsquid-labs/showcase04-all-mint-events" - }, - { - "title": "Basic DEX pair creation and swaps", - "description": "Simple squid that fetches Swap events emitted by all Pancakeswap pairs.", - "tags": [ - "EVM", - "Postgres+GraphQL", - "DEX" - ], - "url": "https://github.com/subsquid-labs/showcase05-dex-pair-creation-and-swaps" - }, - { - "title": "Internal + external calls to a contract", - "description": "Fetches all calls to the BAYC contract, inc ones made by other contracts. Includes parent txs. Also gets all contract state changes.", - "tags": [ - "EVM", - "Postgres+GraphQL", - "ERC721", - "Traces" - ], - "url": "https://github.com/subsquid-labs/showcase06-all-bayc-call-traces" - }, - { - "title": "All NFT contract deployments + transfers", - "description": "Gets the data on all contract deployments, inc bytecode. Detects ERC721-compliant contracts. Gets all Transfer events, filters NFT transfers.", - "tags": [ - "EVM", - "Postgres+GraphQL", - "ERC721", - "Traces" - ], - "url": "https://github.com/subsquid-labs/showcase07-grab-all-nft-transfers/" - }, - { - "title": "EVM template", - "description": "Indexes Ethereum burns.", - "tags": [ - "EVM", - "Postgres+GraphQL" - ], - "url": "https://github.com/subsquid-labs/squid-evm-template" - }, - { - "title": "Substrate template", - "description": "Indexes Balances.Transfer events on Kusama, ties them to accs.", - "tags": [ - "Substrate", - "Postgres+GraphQL" - ], - "url": "https://github.com/subsquid-labs/squid-substrate-template" - }, - { - "title": "ink! template", - "description": "Indexes an ink! token contract on Shibuya.", - "tags": [ - "Substrate", - "Postgres+GraphQL", - "ink!" - ], - "url": "https://github.com/subsquid-labs/squid-ink-template" - }, - { - "title": "BigQuery template", - "description": "Saves USDC transfers data to a Google BigQuery dataset.", - "tags": [ - "EVM", - "ERC20", - "BigQuery" - ], - "url": "https://github.com/subsquid-labs/squid-bigquery-example" - }, - { - "title": "CSV template", - "description": "Saves USDC transafers data to local CSV files.", - "tags": [ - "EVM", - "ERC20", - "CSV" - ], - "url": "https://github.com/subsquid-labs/file-store-csv-example" - }, - { - "title": "S3 template", - "description": "Saves USDC transafers data to CSV files on S3.", - "tags": [ - "EVM", - "ERC20", - "CSV", - "S3" - ], - "url": "https://github.com/subsquid-labs/file-store-s3-example" - }, - { - "title": "Parquet template", - "description": "Saves USDC transafers data to local Apache Parquet files.", - "tags": [ - "EVM", - "ERC20", - "Parquet" - ], - "url": "https://github.com/subsquid-labs/file-store-parquet-example" - }, - { - "title": "Solana example", - "description": "An example Solana squid", - "tags": [ - "Solana", - "Postgres+GraphQL" - ], - "url": "https://github.com/subsquid-labs/solana-example" - }, - { - "title": "Fuel example", - "description": "An example Fuel squid", - "tags": [ - "Fuel", - "Postgres+GraphQL" - ], - "url": "https://github.com/subsquid-labs/fuel-example" - } - ] -}