graph-indexer-cli

command module
v0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2021 License: MIT Imports: 24 Imported by: 0

README

The Graph Indexer CLI

golangci-lint CodeQL
This repository is WIP rework of indexer-cli.
Not all commands are implemented. Alpha software, use at your own risk.

Install

go get -u github.com/stakemachine/graph-indexer-cli

How to use

First of all you need to set ENV variable for your indexer-agent.

export GRAPH_INDEXER_AGENT="http://<indexer-agent>:port"
Status
graph-indexer-cli status

By default we use testnet subgraph, to see active allocations in mainnet:

export GRAPH_NETWORK_SUBGRAPH="https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-mainnet"
Rules
Set
graph-indexer-cli rules set QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF allocationAmount 100000 decisionBasis always
Get
graph-indexer-cli rules get QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF
Delete
graph-indexer-cli rules delete QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF
Cost Models
Set
graph-indexer-cli cost set model QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF costModel 'default => 0.1;'

also you can set variables for model

graph-indexer-cli cost set model QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF variables '{"DAI":"0.5"}'
Get
graph-indexer-cli cost get all # or Deployment ID

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
eth

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL