mainnet
.
Video walkthrough
Launching the wizard CLI
goldsky login
first if you haven’t already authenticated
with Goldsky.Choose a subgraph name
nouns-demo
Define a subgraph version
1.0.0
, but you can change this to anything as long as it starts with a letter or number and contains only letters, numbers, underscores, hyphens, pluses, and periods.e.g., 1.0.0-demo+docs
Set your target path
~
(user home directory) and environment variables being replaced accordingly.~/my-subgraphs/nouns-demo/1.0.0-demo+docs
then this step will be followed
with a prompt to confirm overwriting existing files.~/my-subgraphs/nouns-demo/1.0.0-demo+docs
Setup ABI sources
~/my-subgraphs/abis
~/my-subgraphs/abis
yet.Add contract addresses
0x
and be exactly 42
characters long.e.g., 0x9C8fF314C9Bc7F6e59A9d9225Fb22946427eDC03
Choose which network to index contract on
mainnet
Choose which block to start indexing on
0
and you’ll be able to manually enter a start block. If you are unsure what the start block might be, using 0
is a safe bet but may result in a longer indexing time before any data is available.e.g., 12985438
mainnet
. If there is a networking issue and the start
block is not fetched automatically, please enter 12985438
manually.Add another network for this contract?
Yes
and add another network here to repeat the past 2
steps for another network. If you only want to index this contract on one network, you can choose No
and move on to the next step.mainnet
network,
so we’ll choose No
.Choose a contract name
NOUNS
Add another contract?
Yes
and add another contract here to repeat all past steps since previously entering a contract for a new contract. If you only want to index this one contract, you can choose No
and move on to the next step.No
.Add a description
Goldsky Instant Subgraph for NOUNS
Enable call handlers?
Yes
to include calls, otherwise if you only want to index contract events you can choose No
and move on to the next step.Yes
.Proceed with subgraph initialization?
Yes
to generate the no-code subgraph configuration file. If anything doesn’t look quite right you can choose No
to abort the wizard and start over.Yes
to
proceed.Proceed with subgraph build?
Yes
, the wizard will run the build stage. If you choose No
, the wizard will exit and all configuration files will remain in the target path.Yes
to proceed with the build stage.goldsky login
, the build step will abort
with guidance to login first.Proceed with subgraph deploy?
Yes
, the wizard will run the deploy stage. If you choose No
, the wizard will exit and all configuration files will remain in the target path.Yes
to proceed with the deploy stage.Subgraph initialization complete!
Cmd+click
or Ctrl+click
on the links to
open them in your default browser.Visit the subgraph dashboard
Query the subgraph data
5
) Nouns minted as the subgraph data is indexed.nameAndVersion
positional argumentname
/version
. It can be omitted completely, provided as only a name
, or provided as the full name
and version
pair. If only the name
is provided then the /
should be omitted. It is not possible to only provide a version
without a name
.
name
must start with a letter and contain only letters, numbers, underscores, and hyphens for the name portion.version
must start with a letter or number and contain only letters, numbers, underscores, hyphens, pluses, and periodsmy-subgraph_2024/1.0.0
my-subgraph_2024
--target-path
--force
argument must be provided to overwrite existing files.
someone
).
~/my-subgraphs
$HOME/my-subgraphs
/Users/someone/my-subgraphs
$(pwd)/my-subgraphs
--force
--force
or --force true
to overwrite--no-force
or --force false
avoid overwriting--from-config
~/my-subgraphs/my-subgraph_2024/1.0/subgraph_config.json
~/my-subgraphs/my-subgraph_2024/1.0/subgraph_config.yaml
--abi
~/my-subgraphs/abis
~/my-subgraphs/abis,~/my-abis
--contract
0x
and be exactly 42
characters long. When supplying multiple contract addresses, interactive mode will provide defaults for each supplied contract successively and default to adding more contracts until until all supplied contracts have been configured.
0x9C8fF314C9Bc7F6e59A9d9225Fb22946427eDC03
0x9C8fF314C9Bc7F6e59A9d9225Fb22946427eDC03,0xA178b166bea52449d56895231Bb1194f20c2f102
--contract-events
NounCreated
NounCreated,NounBurned
--contract-calls
approve
approve,burn
--network
mainnet
mainnet,xdai
(for a single contract, means 2 networks for the same contract are indexed)mainnet,xdai
(for two contracts, means 2 contracts for each network, 4 contracts total indexed, 2 per network)--start-block
12985438
12985438,20922867
12985438,,20922867
(for 2 contracts and 2 networks, where we know the start blocks for both contracts on the 1st network but not the 2nd network)--contract-name
My-Subgraph_Data
"My Subgraph Data"
"My Subgraph Data,My Other Subgraph Data"
subgraph1,subgraph2
--description
--call-handlers
--call-handlers
or --call-handlers true
to enable--no-call-handlers
or --call-handlers false
to disable--build
--no-build
is all that is required to stop after the write files stage.
--build
or --build true
to enable--no-build
or --build false
to disable--deploy
--deploy
is all that is required to run both build and deploy stages.
--deploy
or --deploy true
to enable--no-deploy
or --deploy false
to disable--force
and --build
or --deploy
flags when running the wizard in non-interactive mode. This will ensure that existing files are overwritten and that the subgraph is built and/or deployed after initialization.
mainnet
mainnet
with the interactive event and call selectorsmainnet