graph-indexer-cli
所属分类:区块链开发
开发工具:GO
文件大小:65KB
下载次数:0
上传日期:2023-02-28 02:59:07
上 传 者:
sh-1993
说明: 图形索引器cli,图形索引器cli
(graph-indexer-cli,The Graph Indexer CLI)
文件列表:
.golangci.yml (1183, 2022-06-27)
.goreleaser.yml (1767, 2022-06-27)
Dockerfile (477, 2022-06-27)
LICENSE (1070, 2022-06-27)
Makefile (379, 2022-06-27)
eth (0, 2022-06-27)
eth\abi (0, 2022-06-27)
eth\abi\staking (0, 2022-06-27)
eth\abi\staking\grt.staking.abi.json (52876, 2022-06-27)
eth\abi\staking\staking.go (229495, 2022-06-27)
eth\allocations.go (3323, 2022-06-27)
eth\types.go (176, 2022-06-27)
eth\wallet.go (625, 2022-06-27)
funcs.go (22371, 2022-06-27)
go.mod (1635, 2022-06-27)
go.sum (60436, 2022-06-27)
graphql (0, 2022-06-27)
graphql\graphql.go (6105, 2022-06-27)
graphql\types.go (2510, 2022-06-27)
main.go (8786, 2022-06-27)
utils (0, 2022-06-27)
utils\utils.go (1793, 2022-06-27)
utils\utils_test.go (1933, 2022-06-27)
# The Graph Indexer CLI
[![golangci-lint](https://github.com/stakemachine/graph-indexer-cli/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/stakemachine/graph-indexer-cli/actions/workflows/golangci-lint.yml)
[![CodeQL](https://github.com/stakemachine/graph-indexer-cli/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/stakemachine/graph-indexer-cli/actions/workflows/codeql-analysis.yml)
This repository is WIP rework of [indexer-cli](https://github.com/graphprotocol/indexer/tree/main/packages/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://: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
```
近期下载者:
相关文件:
收藏者: