Skip to content

Commit

Permalink
docs: replace hosted service endpoints with decentralized network req…
Browse files Browse the repository at this point in the history
…uiring api-key from users
  • Loading branch information
hopeyen committed Jun 17, 2024
1 parent 683e608 commit f1674f2
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 31 deletions.
4 changes: 2 additions & 2 deletions docs/graphcast/radios/graphcast-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ The Graphcast CLI is configured using config variables. You will need to prepare
| `PRIVATE_KEY` | Private key to the Graphcast ID wallet (precendence over mnemonics).<br/>Example: `PRIVATE_KEY=YOUR_PRIVATE_KEY` |
| `MNEMONIC` | Mnemonic to the Graphcast ID wallet (first address of the wallet is used; Only one of private key or mnemonic is needed).<br/>Example: `MNEMONIC=YOUR_MNEMONIC` |
| `GRAPH_ACCOUNT` | Graph account corresponding to Graphcast operator.<br/>Example: `GRAPH_ACCOUNT=YOUR_GRAPH_ACCOUNT` |
| `REGISTRY_SUBGRAPH` | Subgraph endpoint to the Graphcast Registry.<br/>Default: `https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-goerli` |
| `NETWORK_SUBGRAPH` | Subgraph endpoint to The Graph network subgraph.<br/>Default: `https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-goerli` |
| `REGISTRY_SUBGRAPH` | Subgraph endpoint to the Graphcast Registry.<br/>Default: `https://gateway-arbitrum.network.thegraph.com/api/{api-key}/subgraphs/id/9bnkkKmSqX3FpoxnBVNFcQfmdSJt2Zc8PrsY1ek64jPr` |
| `NETWORK_SUBGRAPH` | Subgraph endpoint to The Graph network subgraph.<br/>Default: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/3xQHhMudr1oh69ut36G2mbzpYmYxwqCeU6wwqyCDCnqV` |
| `GRAPHCAST_NETWORK` | Supported Graphcast networks: mainnet, testnet.<br/>Default: `testnet` |
| `LOG_LEVEL` | Logging configuration to set as RUST_LOG.<br/>Default: `info` |
| `LOG_FORMAT` | Support logging formats: pretty, json, full, compact.<br/>Default: `pretty` |
Expand Down
16 changes: 8 additions & 8 deletions docs/graphcast/radios/subgraph-radio/advanced-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ Example .env file:
```bash
PRIVATE_KEY="a2b3c1d4e5f6890e7f6g5h4i3j2k1l0m"
GRAPH_NODE_STATUS_ENDPOINT="http://127.0.0.42:8030/graphql"
REGISTRY_SUBGRAPH="https://api.thegraph.com/subgraphs/name/randomuser/graphcast-registry-mainnet"
NETWORK_SUBGRAPH="https://api.thegraph.com/subgraphs/name/graphprotocol/graph-mainnet"
REGISTRY_SUBGRAPH="https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6"
NETWORK_SUBGRAPH="https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp"
GRAPHCAST_NETWORK=mainnet
INDEXER_ADDRESS="0xa1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
```
Expand All @@ -127,8 +127,8 @@ Pass the configuration options directly as command-line arguments.
docker run ghcr.io/graphops/subgraph-radio \
--private-key "a2b3c1d4e5f6890e7f6g5h4i3j2k1l0m" \
--graph-node-status-endpoint "http://127.0.0.42:8030/graphql" \
--registry-subgraph "https://api.thegraph.com/subgraphs/name/randomuser/graphcast-registry-mainnet" \
--network-subgraph "https://api.thegraph.com/subgraphs/name/graphprotocol/graph-mainnet" \
--registry-subgraph "https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6" \
--network-subgraph "https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp" \
--graphcast-network mainnet \
--indexer-address "0xa1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
```
Expand All @@ -141,8 +141,8 @@ Example TOML configuration file (`config.toml`):
[graph_stack]
graph_node_status_endpoint = 'http://127.0.0.42:8030/graphql'
indexer_address = '0xa1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6'
registry_subgraph = 'https://api.thegraph.com/subgraphs/name/randomuser/graphcast-registry-mainnet'
network_subgraph = 'https://api.thegraph.com/subgraphs/name/graphprotocol/graph-mainnet'
registry_subgraph = 'https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6'
network_subgraph = 'https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp'
private_key = 'a2b3c1d4e5f6890e7f6g5h4i3j2k1l0m'
```

Expand All @@ -154,8 +154,8 @@ Example YAML configuration file (`config.yaml`):
graph_stack:
graph_node_status_endpoint: "http://127.0.0.42:8030/graphql"
indexer_address: "0xa1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
registry_subgraph: "https://api.thegraph.com/subgraphs/name/randomuser/graphcast-registry-mainnet"
network_subgraph: "https://api.thegraph.com/subgraphs/name/graphprotocol/graph-mainnet"
registry_subgraph: "https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6"
network_subgraph: "https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp"
private_key: "a2b3c1d4e5f6890e7f6g5h4i3j2k1l0m"
```
Expand Down
8 changes: 4 additions & 4 deletions docs/graphcast/radios/subgraph-radio/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ docker pull ghcr.io/graphops/subgraph-radio:latest
```bash
docker run \
-e GRAPHCAST_NETWORK="mainnet" \
-e REGISTRY_SUBGRAPH="https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-mainnet" \
-e NETWORK_SUBGRAPH="https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-mainnet" \
-e REGISTRY_SUBGRAPH="https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6" \
-e NETWORK_SUBGRAPH="https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp" \
-e PRIVATE_KEY="PRIVATE_KEY" \
-e GRAPH_NODE_STATUS_ENDPOINT="http://graph-node:8030/graphql" \
-e RUST_LOG="warn,hyper=warn,graphcast_sdk=info,subgraph_radio=info" \
Expand All @@ -59,8 +59,8 @@ services:
restart: unless-stopped
environment:
GRAPHCAST_NETWORK: "mainnet"
REGISTRY_SUBGRAPH: "https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-mainnet"
NETWORK_SUBGRAPH: "https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-mainnet"
REGISTRY_SUBGRAPH: "https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6"
NETWORK_SUBGRAPH: "https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp"
PRIVATE_KEY: "PRIVATE_KEY"
GRAPH_NODE_STATUS_ENDPOINT: "http://graph-node:8030/graphql"
RUST_LOG: "warn,hyper=warn,graphcast_sdk=info,subgraph_radio=info"
Expand Down
2 changes: 0 additions & 2 deletions docs/graphcast/sdk/radio-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ pub struct Config {
value_name = "SUBGRAPH",
env = "REGISTRY_SUBGRAPH",
help = "Subgraph endpoint to the Graphcast Registry",
default_value = "https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-goerli"
)]
pub registry_subgraph: String,
#[clap(
Expand All @@ -242,7 +241,6 @@ pub struct Config {
value_name = "SUBGRAPH",
env = "NETWORK_SUBGRAPH",
help = "Subgraph endpoint to The Graph network subgraph",
default_value = "https://gateway.testnet.thegraph.com/network"
)]
pub network_subgraph: String,
#[clap(
Expand Down
20 changes: 9 additions & 11 deletions docs/graphcast/sdk/registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ You can register multiple Operators for your Indexer in parallel. If you would p

#### Registry endpoints

| Network | Registry Contract | Subgraph API |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Ethereum-mainnet | [0x89f97698d6006f25570cd2e31737d3d22aedcbcf](https://etherscan.io/address/0x89f97698d6006f25570cd2e31737d3d22aedcbcf#writeProxyContract) | [https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-mainnet](https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-mainnet) |
| Ethereum-goerli | [0x26ebbA649FAa7b56FDB8DE9Ea17aF3504B76BFA0](https://goerli.etherscan.io/address/0x26ebbA649FAa7b56FDB8DE9Ea17aF3504B76BFA0#writeProxyContract) | [https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-goerli](https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-goerli) |
| Arbitrum-one | [0xfae79e8cb8fbac2408e5baf89262bd92b6ca464a](https://arbiscan.io/address/0xfae79e8cb8fbac2408e5baf89262bd92b6ca464a#writeProxyContract) | [https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-arb-one](https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-arb-one) |
| Arbitrum-goerli | [0x50c2d70a41ecefe4cc54a331457ea204ecf97292](https://goerli.arbiscan.io/address/0x50c2d70a41ecefe4cc54a331457ea204ecf97292#writeProxyContract) | [https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-arbitrum-go](https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-arbitrum-go) |
| Network | Registry Contract |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Arbitrum-one | [0xfae79e8cb8fbac2408e5baf89262bd92b6ca464a](https://arbiscan.io/address/0xfae79e8cb8fbac2408e5baf89262bd92b6ca464a#writeProxyContract) |
| Arbitrum-sepolia | [0x17c3a072E5b1B2c260C29D289ee2E7372b8f7C69](https://sepolia.arbiscan.io/address/0x17c3a072E5b1B2c260C29D289ee2E7372b8f7C69#writeProxyContract) |
| Ethereum-mainnet | [0x89f97698d6006f25570cd2e31737d3d22aedcbcf](https://etherscan.io/address/0x89f97698d6006f25570cd2e31737d3d22aedcbcf#writeProxyContract) |

:::info
Each Graphcast ID can be associated with a single Indexer. To revoke a Graphcast ID for your Indexer, call `setGraphcastIDFor(indexer_address, graphcast_id)` with a Graphcast ID of `0x0` using a registered Indexer Operator Account.
Expand All @@ -57,11 +56,10 @@ Each Graphcast ID can be associated with a single Indexer. To revoke a Graphcast

Here we list out the APIs the team supports actively. For network subgraph endpoint, We recommend you to expose your indexer-service's endpoint at `/network` queries with authentication. You can also index and serve registry subgraph but they are not currently deployed on the decentralized network.

Here are the endpoints available on the hosted service.
Here are the endpoints available on the decentralized network, please replace `[api-key]` with a valid api key for service.

| Protocol Network | Graphcast Network | Registry Subgraph Endpoint | Network Subgraph Endpoint |
| ---------------- | ----------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| Ethereum Mainnet | `mainnet` | `https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-mainnet` | `https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-mainnet` |
| Goerli | `testnet` | `https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-goerli` | `https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-goerli` |
| Arbitrum-One | `mainnet` | `https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-arb-one` | `https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum` |
| Arbitrum-Goerli | `testnet` | `https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-arbitrum-go` | `https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum-goerli` |
| Arbitrum-One | `mainnet` | `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6` | `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp` |
| Arbitrum-Sepolia | `testnet` | `https://gateway-arbitrum.network.thegraph.com/api/{api-key}/subgraphs/id/9bnkkKmSqX3FpoxnBVNFcQfmdSJt2Zc8PrsY1ek64jPr` | `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/3xQHhMudr1oh69ut36G2mbzpYmYxwqCeU6wwqyCDCnqV` |
| Ethereum Mainnet | `mainnet` | `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/rcKzonu5NGbKcxCDZoQWmcckRKJw8rnmMNJDV8UeDzJ` | `https://gateway-arbitrum.network.thegraph.com/api/{api-key}/subgraphs/id/GgwLf9BTFBJi6Z5iYHssMAGEE4w5dR3Jox2dMLrBxnCT` |
13 changes: 9 additions & 4 deletions docs/launchpad/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,17 +537,20 @@ releases:
config:
ethereum: "http://proxyd-proxyd.arbitrum-sepolia:8545"
ethereum-network: "arbitrum-sepolia"
network-subgraph-endpoint: "https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum-sepolia"
network-subgraph-endpoint: "https://gateway-arbitrum.network.thegraph.com/api/{{ .Values.secretEnv.api_key }}/subgraphs/id/3xQHhMudr1oh69ut36G2mbzpYmYxwqCeU6wwqyCDCnqV"
graph-node-query-endpoint: "http://graph-node-query:8000"
graph-node-status-endpoint: "http://graph-node-block-ingestor:8030/graphql"
postgres-host: "<your-indexer-metadata-postgresql-host>" ## change me
postgres-database: "<your-indexer-metadata-postgresql-db>" ## change me
secretEnv:
api_key: <your-secret-graph-network-api-key>
indexerAgent:
config:
collect-receipts-endpoint: "https://gateway-testnet-arbitrum.network.thegraph.com/collect-receipts"
network-subgraph-deployment: "QmT8UDGK7zKd2u2NQZwhLYHdA4KM55QsivkE3ouCuX6fEj" # find at https://github.com/graphprotocol/indexer/blob/main/docs/networks.md
epoch-subgraph-endpoint: "https://api.thegraph.com/subgraphs/name/graphprotocol/arbitrum-sepolia-ebo" # find at https://github.com/graphprotocol/indexer/blob/main/docs/networks.md
epoch-subgraph-endpoint: "https://gateway-arbitrum.network.thegraph.com/api/{{ .Values.secretEnv.api_key }}/subgraphs/id/BhnsdeZihU4SuokxZMLF4FQBVJ3jgtZf6v51gHvz3bSS" # find at https://github.com/graphprotocol/indexer/blob/main/docs/networks.md
epoch-subgraph-deployment: "QmTpu2mVquoMpr4SWSM77nGkU3tcUS1Bhk1sVHpjDrAUAx"
graph-node-admin-endpoint: "http://graph-node-block-ingestor:8020"
public-indexer-url: "<your-public-indexer-url>" ## change me
Expand All @@ -563,6 +566,7 @@ releases:
INDEXER_AGENT_POSTGRES_PASSWORD:
secretName: <your-secret-containing-indexer-metadata-postgresql-password>
key: password
api_key: <your-secret-graph-network-api-key>
indexerService:
Expand Down Expand Up @@ -599,12 +603,13 @@ releases:
GRAPH_NODE_STATUS_ENDPOINT: http://graph-node-block-ingestor:8030/graphql
INDEXER_MANAGEMENT_SERVER_ENDPOINT: http://graph-network-indexer-agent:8000
GRAPHCAST_NETWORK: "testnet"
REGISTRY_SUBGRAPH: https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-arb-se
NETWORK_SUBGRAPH: https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum-sepolia
REGISTRY_SUBGRAPH: "https://gateway-arbitrum.network.thegraph.com/api/{{ .Values.secretEnv.api_key }}/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6"
NETWORK_SUBGRAPH: "https://gateway-arbitrum.network.thegraph.com/api/{{ .Values.secretEnv.api_key }}/subgraphs/id/3xQHhMudr1oh69ut36G2mbzpYmYxwqCeU6wwqyCDCnqV"
secretEnv:
MNEMONIC:
secretName: <your-secret-containing-your-graph-operator-mnemonic>
key: mnemonic
api_key: <your-secret-graph-network-api-key>
- name: graph-toolbox
namespace: arbitrum-sepolia
Expand Down

0 comments on commit f1674f2

Please sign in to comment.