Quickstart - Index
To get started with Goldsky Index:
-
Create an account at app.goldsky.com.
-
Choose a plan that best fits your needs.
-
Create an API key on the Settings page.
-
Install the Goldsky CLI:
npm install -g @goldskycom/cli
-
Log in with the API key created earlier:
goldsky login
-
Deploy your subgraph
cd <your-subgraph-directory>
graph build # Build your subgraph as normal.
goldsky subgraph deploy my-subgraph/1.0.0 -
Alternative, subgraphs can be deployed using Goldsky’s instant subgraph functionality
goldsky subgraph deploy <subgraphName>/<subgraphVersion> --from-abi <path-to-config-file>
Config files for instant subgraphs are written in JSON and outline key information such as the chain, contract address, and path to ABI file. Example of a basic configuration file below.
{
"version": "1",
"name": "TokenDeployed",
"abis": {
"TokenRegistry": {
"path": "./abis/token-registry.json"
}
},
"chains": ["mainnet"],
"instances": [
{
"abi": "TokenRegistry",
"address": "0x0A6f564C5c9BeBD66F1595f1B51D1F3de6Ef3b79",
"startBlock": 13983724,
"chain": "mainnet"
}
]
} -
Once deployed, you can access data using the GraphQL API link provided, and review all deployed subgraphs with
goldsky subgraph list
or at app.goldsky.com.
For more detail & context, and the full CLI reference, visit Goldsky’s docs.