https://github.com/subsquid/sqd-portal
https://github.com/subsquid/sqd-portal
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/subsquid/sqd-portal
- Owner: subsquid
- License: agpl-3.0
- Created: 2024-10-04T12:53:02.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-19T06:38:20.000Z (over 1 year ago)
- Last Synced: 2025-02-23T11:36:03.829Z (over 1 year ago)
- Language: Rust
- Size: 742 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# SQD Portal
This is an application that connects to the worker network and executes queries submitted via HTTP.
## Running
```
Usage: subsquid-query-gateway [OPTIONS] --network --logs-collector-id --config
Options:
-k, --key
Path to libp2p key file [env: KEY_PATH=]
--config
Path to config file [env: CONFIG=]
--p2p-listen-addrs ...
Addresses on which the p2p node will listen [env: P2P_LISTEN_ADDRS=] [default: /ip4/0.0.0.0/udp/0/quic-v1]
--p2p-public-addrs ...
Public address(es) on which the p2p node can be reached [env: P2P_PUBLIC_ADDRS=]
--boot-nodes ...
Connect to boot node '
'. [env: BOOT_NODES=]
--rpc-url
Blockchain RPC URL [env: RPC_URL=] [default: http://127.0.0.1:8545/]
--l1-rpc-url
Layer 1 blockchain RPC URL. If not provided, rpc_url is assumed to be L1 [env: L1_RPC_URL=]
--gateway-registry-contract-addr
[env: GATEWAY_REGISTRY_CONTRACT_ADDR=]
--worker-registration-contract-addr
[env: WORKER_REGISTRATION_CONTRACT_ADDR=]
--network-controller-contract-addr
[env: NETWORK_CONTROLLER_CONTRACT_ADDR=]
--allocations-viewer-contract-addr
[env: ALLOCATIONS_VIEWER_CONTRACT_ADDR=]
--multicall-contract-addr
[env: MULTICALL_CONTRACT_ADDR=]
--network
Network to connect to (mainnet or testnet) [env: NETWORK=] [possible values: tethys, mainnet]
--http-listen
HTTP server listen addr [env: HTTP_LISTEN_ADDR=] [default: 0.0.0.0:8000]
--logs-collector-id
Logs collector peer id [env: LOGS_COLLECTOR_ID=]
-h, --help
Print help
-V, --version
Print version
```
When the process is running, you can submit a query and get the results streamed to your terminal:
```
$ curl "127.0.0.1:8000/stream/ethereum-mainnet" -d '{"fromBlock": 1000, "includeAllBlocks": true}' | zcat | less
```