Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
f93cf37
Add ERC20 and migration mappings
Douglasacost May 28, 2024
ba99993
Merge branch 'main' into feat/add-erc20-bridge-contracts
Douglasacost May 28, 2024
916f217
chore: Rewrite contract addresses to lowercase
Douglasacost May 28, 2024
f0617b7
Merge branch 'feat/add-erc20-bridge-contracts' of github.com:NodleCod…
Douglasacost May 28, 2024
3f86587
chore: Refactor fetchProposal function to use more descriptive variab…
Douglasacost May 29, 2024
61d1d24
chore: Update fetchProposal function to use proposalId from event args
Douglasacost May 29, 2024
6dd1245
feat: Add ERC721A mapping for subquery project
Douglasacost Jul 16, 2024
a0ae5e2
chore: Add ERC721A mapping and update fetchProposal function
Douglasacost Aug 1, 2024
4e4b192
chore: Remove unused code for native transfers and constants
Douglasacost Aug 21, 2024
01165b7
added new ABIs
Douglasacost Aug 21, 2024
327fdb6
Added grants ABI
Douglasacost Aug 22, 2024
668d364
grants codebase
Douglasacost Aug 22, 2024
fddc25a
chore: Refactor VestingSchedule event handlers and add cancellation f…
Douglasacost Aug 22, 2024
167ca88
Refactor VestingSchedule event handlers and add cancellation function…
Douglasacost Aug 26, 2024
2396e4e
handle Stats and Rewards
Douglasacost Sep 24, 2024
ff1ef83
Refactor subquery docker-compose.yml and project.ts
Douglasacost Sep 24, 2024
8b45677
Add MD to explain new queries
Douglasacost Sep 25, 2024
e6d36d0
Refactor subquery to include additional endpoint for zKsync mainnet a…
Douglasacost Oct 1, 2024
506c729
Catch snapshots for stats
Douglasacost Oct 9, 2024
266ea31
Refactor subquery docker-compose.yml and project.ts
Douglasacost Oct 16, 2024
b1e9b02
Refactor subquery to include additional endpoint for zKsync sepolia t…
Douglasacost Oct 16, 2024
ba7b6fc
Refactor nodleContracts array to convert addresses to lowercase
Douglasacost Oct 16, 2024
c286670
Refactor subquery project.ts to update zKsync mainnet endpoint and co…
Douglasacost Oct 16, 2024
0899057
Refactor handleSafeMint function in erc721.ts to remove unnecessary c…
Douglasacost Oct 16, 2024
f4d342f
Refactor TokenSnapshot entity in schema.graphql and erc721.ts
Douglasacost Oct 16, 2024
cb6a350
Refactor TokenSnapshot entity and handleSafeMint function in erc721.ts
Douglasacost Oct 23, 2024
8aeb39e
Refactor TokenSnapshot entity and handleSafeMint function in erc721.ts
Douglasacost Oct 23, 2024
bd01830
Refactor subquery/project.ts to add ERC721-A, ERC20, migration, grant…
Douglasacost Oct 23, 2024
751f93f
feat(subquery): update and improve structure
Oct 24, 2024
d7b6d95
add testnet entry
Oct 24, 2024
fab07d7
add other yaml files
Oct 24, 2024
d3cdde2
fix build issues
Oct 24, 2024
1832cb9
restore .gitignore
Oct 24, 2024
208fd09
nothing
Oct 24, 2024
04310e1
delete
Oct 24, 2024
522e082
fix tsconfig
Oct 24, 2024
ee9cd3d
Refactor fixTokens.ts to handle missing fields in ERC721 tokens
Douglasacost Oct 24, 2024
3e3eb27
Refactor SEPOLIA_RPC_URL to use environment variable RPC_URL
Douglasacost Oct 24, 2024
22350f3
Refactor handleSafeMint to handle failed calls
Douglasacost Oct 24, 2024
5561d89
feat(subquery): update and improve structure (#64)
Oct 24, 2024
5b7b6cc
Merge branch 'main' into feat/missions-snapshots
Douglasacost Oct 28, 2024
9e65c9a
Merge branch 'fix-fields' into aliX/subquery-overhaul
Douglasacost Oct 28, 2024
6334a65
Refactor token URI handling to include only specific IPFS endpoints
Douglasacost Oct 28, 2024
5932a3a
Refactor handleSafeMint to include specific IPFS endpoints
Douglasacost Oct 28, 2024
7e0294b
Merge branch 'feat/missions-snapshots' of github.com:NodleCode/rollup…
Douglasacost Oct 28, 2024
fbf0b12
feat(suquery): major refactor plus update Grants abi
Oct 29, 2024
cfa3556
fix .gitignore
Oct 29, 2024
5ffac01
remove url
Oct 29, 2024
88c3aad
Remove unused dependency @polkadot/util from subquery package.json an…
Douglasacost Oct 30, 2024
7ab635d
Refactor subquery configuration and remove unused file, added .env
Douglasacost Oct 30, 2024
71022e7
Update subquery docker-compose image to latest version
Douglasacost Oct 30, 2024
e4e7192
Refactor enrich-dist.js to add support for URLSearchParams polyfill
Douglasacost Oct 30, 2024
6d4785c
Refactor subquery mainnet-click.ts to have valid ABI name
Douglasacost Oct 30, 2024
91e8f80
Refactor subquery mainnet-complete.ts and testnet-complete.ts to use …
Douglasacost Oct 30, 2024
9ac41eb
fetchAccount function to convert address to lowercase before querying…
Douglasacost Oct 30, 2024
8ec5daf
Refactor click-content-sign.ts to improve code readability and remove…
Douglasacost Oct 30, 2024
ef8b8a1
Remove unused file
Douglasacost Oct 30, 2024
dce60bd
Refactor ERC721Token and ERC20TransferV2 types to include additional …
Douglasacost Oct 30, 2024
5258ca5
Refactor .gitignore and subquery/src/utils/const.ts files
Douglasacost Oct 30, 2024
64bd5ca
Refactor subquery/mainnet-complete.ts to add ClickContentSign contrac…
Douglasacost Oct 30, 2024
f43672e
fix issue when fetching metadata caused by the node-fetch recent version
Douglasacost Oct 30, 2024
86cfd7e
Refactor fetchMetadata function to handle timeouts and improve error …
Douglasacost Oct 30, 2024
f90bfe6
Refactor package.json and package-lock.json to add abort-controller d…
Douglasacost Oct 30, 2024
86eaf0c
Refactor fetchMetadata function to handle timeouts and improve error …
Douglasacost Oct 30, 2024
bfde994
The abort controller is affecting the node-fetch functionality
Douglasacost Oct 30, 2024
aa99df4
Refactor fetchMetadata function to add timeout for fetch request
Douglasacost Oct 30, 2024
d75466d
Call to contract then get balance directly
Douglasacost Nov 4, 2024
6cf396c
Add mainnet-mission subquery configuration
Douglasacost Nov 4, 2024
da202dc
Refactor file and function names for consistency
Douglasacost Nov 4, 2024
4e963d7
delete unused file
Douglasacost Nov 4, 2024
a92b79b
Refactor fetchMetadata function to add timeout for fetch request
Douglasacost Nov 5, 2024
5194645
Restore nodl.ts mapping
Douglasacost Nov 5, 2024
6bae820
Add recovery guide for zkSync indexer service
Douglasacost Nov 5, 2024
aa6aba6
Merge branch 'main' into feat/missions-snapshots
Nov 13, 2024
9ea1448
Fix typo in longitude key mapping in click-content-sign.ts
Douglasacost Nov 13, 2024
7058519
Merge branch 'feat/missions-snapshots' of github.com:NodleCode/rollup…
Douglasacost Nov 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
"BOOTLOADER",
"devcontainer",
"gasleft",
"chainid"
"chainid",
"myfilebase",
"ethersproject",
"Numberish",
"Blockhash",
"Typechain",
"Soulbound",
"accesscontrolrole"
]
}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ subquery/dist/
subquery/.data/
subquery/**/types/
subquery/project.yaml
subquery/mainnet*.yaml
subquery/testnet*.yaml

# ZKSync files
artifacts-zk/
cache-zk/
deployments-zk/

artifacts-zk-1.4.1/
cache_hardhat-zk/
3 changes: 3 additions & 0 deletions subquery/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ZKSYNC_MAINNET_RPC=
ZKSYNC_TESTNET_RPC=
PROJECT_FILE=mainnet-complete.yaml
57 changes: 57 additions & 0 deletions subquery/ABOUT_THE_SERVICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# zkSync Indexer Recovery Guide

This document provides the steps required to restore the zkSync indexer service in case of a failure on one or more of the VMs running the indexers.

## General Information

- **Project**: zkSync indexer using SubQuery
- **Infrastructure**: 7 VMs in Google Cloud Platform (GCP)
- **Primary Dependencies**: Docker and Docker Compose

## Recovery Steps

### 1. Access the Affected VM

1. Identify the VM experiencing issues.
2. Connect to the affected VM via SSH using the GCP console or your local terminal:

```bash
gcloud compute ssh [vm-name] --zone=[vm-zone]
```

### 2. Restart Service with Docker Compose

1. Navigate to the project directory where docker-compose.yml is located.
2. Inspect the docker-compose.yml file to identify the three services and locate the affected one.
3. Restart the specific service or all services if necessary:

```bash
# Restart a specific service
docker-compose restart [service-name]

# Or restart all services
docker-compose down && docker-compose up -d
```

### 3. Check Docker Logs
Review Docker logs for more details on the error and confirm the service has restarted correctly:

```bash
docker logs [service-name]
```

### 4. Verify VM Resources
Check if the VM requires additional resources, such as disk space. To increase disk space:

1. **Stop the VM** in the GCP console.
2. Access the VM settings to increase the storage.
3. **Restart the VM** after the resource changes.

Note: Changing disk size may update the public IP of the VM.

### 5. Update IP in Cloudflare
If the VM IP changes, update the corresponding proxy in Cloudflare:

1. Log in to your Cloudflare account.
2. Go to the domain associated with this VM.
3. Update the IP in the proxy settings to restore connectivity to the service.
59 changes: 59 additions & 0 deletions subquery/STATS_QUERIES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Stats Queries

### 1. Get Wallets by Time (e.g., Monthly New Wallets)

Use this query to retrieve new wallets created within a specific time range.

```graphql
{
wallets (filter: {
timestamp: {
greaterThanOrEqualTo: START, // Replace START with the beginning timestamp
lessThanOrEqualTo: END // Replace END with the ending timestamp
}
}) {
nodes {
id // Unique identifier of the wallet
timestamp // Timestamp when the wallet was created
}
totalCount // Total number of wallets within the time period
}
}
```

### 2. Get Transfers by Time (e.g., Monthly Transfers)

Use this query to count ERC-20 transfers within a specified time range.

```graphql
{
eRC20Transfers(filter: {
timestamp: {
greaterThanOrEqualTo: START, // Replace START with the beginning timestamp
lessThanOrEqualTo: END // Replace END with the ending timestamp
}
}) {
totalCount // Total number of ERC-20 transfers within the time period
}
}
```

### 3. Get Accounts by Time (e.g., Holders)

Use this query to count the number of accounts holding a balance greater than 0 within a specific time range.

```graphql
{
accounts (filter: {
timestamp: {
greaterThanOrEqualTo: START, // Replace START with the beginning timestamp
lessThanOrEqualTo: END // Replace END with the ending timestamp
}
balance: {
greaterThan: 0 // Filters only accounts with a balance greater than 0
}
}) {
totalCount // Total number of accounts (holders) within the time period
}
}
```
File renamed without changes.
Loading