# Yarn
yarn global add truffle ganache-cli
ganache-cli -h 0.0.0.0
docker pull postgres
docker run --name postgres --restart=always \
-e POSTGRES_PASSWORD=123456 -d postgres
docker pull graphprotocol/graph-node
docker run -it --name graph-node-ropsten \
-p 8000:8000 -p 8001:8001 -p 8020:8020 -p 8030:8030 \
-e GRAPH_ALLOW_NON_DETERMINISTIC_FULLTEXT_SEARCH="true" \
-e postgres_host=host.docker.internal \
-e postgres_port=5432 \
-e postgres_user=postgres \
-e postgres_pass=123456 \
-e postgres_db=graph-node-ropsten \
-e ipfs=host.docker.internal:5001 \
-e ethereum=mainnet:ws://127.0.0.1:8545 \
graphprotocol/graph-node:latest
truffle compile
truffle migrate
# Yarn
yarn global add @graphprotocol/graph-cli
graph init \
--from-contract 0xB7999C5Cb77Ba2933693e902a6660DB63ee70537 \
--network mainnet \
--abi ./Tokens.json \
githubUser/Neu
yarn codegen
yarn create-local
yarn deploy-local
还是得多看看官方的文档与其他用户在github上提的issues,一些问题在文档里也是没有的,但是官方在issues中回答了。这一点操作也很迷惑。