Subgraph
Usage: settlemint smart-contract-set subgraph|sg [options] [command]
Commands for managing TheGraph subgraphs for smart contract indexing
Options:
-h, --help display help for command
Commands:
add [options] Add a contract to the subgraph
build [options] Build the subgraph
codegen Codegen the subgraph types
deploy [options] [subgraph-name] Deploy the subgraph
remove [options] [subgraph-name] Remove a subgraph
help [command] display help for command
Add
Usage: settlemint smart-contract-set subgraph add
Examples:
# Add a contract to the subgraph
$ settlemint scs subgraph add --abi=./abis/bond.json --contract-name=bond
Add a contract to the subgraph
Options:
--abi <abi> Path to the contract ABI.
--contract-name <contract-name> Name of the contract.
--address <contract-address> Address of the contract (defaults to
0x0000000000000000000000000000000000000000).
--start-block <start-block> Start block of the contract (defaults to 0).
--network <network> Network name (defaults to settlemint).
-h, --help display help for command
Build
Usage: settlemint smart-contract-set subgraph build
Examples:
# Build the subgraph
$ settlemint scs subgraph build
Build the subgraph
Options:
--ipfs <ipfs-url> The IPFS URL to use for the subgraph deployment
-h, --help display help for command
Codegen
Usage: settlemint smart-contract-set subgraph codegen
Examples:
# Generate subgraph types
$ settlemint scs subgraph codegen
Codegen the subgraph types
Options:
-h, --help display help for command
Deploy
Usage: settlemint smart-contract-set subgraph deploy
Examples:
# Deploy the subgraph
$ settlemint scs subgraph deploy
# Deploy the subgraph with a specific name
$ settlemint scs subgraph deploy my-subgraph
Deploy the subgraph
Arguments:
subgraph-name The name of the subgraph to deploy (defaults to value
in .env if not provided)
Options:
--ipfs <ipfs-url> The IPFS URL to use for the subgraph deployment
(defaults to https://ipfs.console.settlemint.com)
-a, --accept-defaults Accept the default and previously set values
--prod Connect to your production environment
-h, --help display help for command
Remove
Usage: settlemint smart-contract-set subgraph remove
Examples:
# Remove a subgraph
$ settlemint scs subgraph remove my-subgraph
Remove a subgraph
Arguments:
subgraph-name The name of the subgraph to remove (defaults to value
in .env if not provided)
Options:
-a, --accept-defaults Accept the default and previously set values
--prod Connect to your production environment
-f, --force Force remove the subgraph without confirmation
-h, --help display help for command