@@ -65,20 +65,20 @@ subgraph:
6565 @echo " Deploying the subgraph..."
6666 @rm -Rf subgraph/subgraph.config.json
6767 @DEPLOYED_ADDRESS=$$(grep "Deployed to:" deployment.txt | awk '{print $$3}' ) yq e -p=json -o=json ' .datasources[0].address = env(DEPLOYED_ADDRESS) | .chain = env(BTP_NETWORK_NAME)' subgraph/subgraph.config.template.json > subgraph/subgraph.config.json
68- @cd subgraph
69- @pnpm graph-compiler --config subgraph.config.json --include node_modules/@openzeppelin/subgraphs/src/datasources subgraph/datasources --export-schema --export-subgraph
70- @yq e ' .specVersion = "0.0.4"' -i generated/solidity-token-erc20.subgraph.yaml
71- @yq e ' .description = "Solidity Token ERC20"' -i generated/solidity-token-erc20.subgraph.yaml
72- @yq e ' .repository = "https://github.com/settlemint/solidity-token-erc20"' -i generated/solidity-token-erc20.subgraph.yaml
73- @yq e ' .indexerHints.prune = "auto"' -i generated/solidity-token-erc20.subgraph.yaml
74- @yq e ' .features = ["nonFatalErrors", "fullTextSearch", "ipfsOnEthereumContracts"]' -i generated/solidity-token-erc20.subgraph.yaml
75- @pnpm graph codegen generated/solidity-token-erc20.subgraph.yaml
76- @pnpm graph build generated/solidity-token-erc20.subgraph.yaml
68+ @cd subgraph && pnpm graph-compiler --config subgraph.config.json --include node_modules/@openzeppelin/subgraphs/src/datasources subgraph/datasources --export-schema --export-subgraph
69+ @cd subgraph && yq e ' .specVersion = "0.0.4"' -i generated/solidity-token-erc20.subgraph.yaml
70+ @cd subgraph && yq e ' .description = "Solidity Token ERC20"' -i generated/solidity-token-erc20.subgraph.yaml
71+ @cd subgraph && yq e ' .repository = "https://github.com/settlemint/solidity-token-erc20"' -i generated/solidity-token-erc20.subgraph.yaml
72+ @cd subgraph && yq e ' .indexerHints.prune = "auto"' -i generated/solidity-token-erc20.subgraph.yaml
73+ @cd subgraph && yq e ' .features = ["nonFatalErrors", "fullTextSearch", "ipfsOnEthereumContracts"]' -i generated/solidity-token-erc20.subgraph.yaml
74+ @cd subgraph && pnpm graph codegen generated/solidity-token-erc20.subgraph.yaml
75+ @cd subgraph && pnpm graph build generated/solidity-token-erc20.subgraph.yaml
7776 @eval $$(curl -H "x-auth-token: $${BPT_SERVICE_TOKEN}" -s $${BTP_CLUSTER_MANAGER_URL}/ide/foundry/$${BTP_SCS_ID}/env | sed 's/^/export /' )
7877 @if [ " $$ {BTP_MIDDLEWARE}" == " " ]; then \
7978 echo " You have not launched a graph middleware for this smart contract set, aborting..." ; \
8079 exit 1; \
8180 else \
81+ cd subgraph; \
8282 pnpm graph create --node $$ {BTP_MIDDLEWARE} $$ {BTP_SCS_NAME}; \
8383 pnpm graph deploy --version-label v1.0.$$(date +%s ) --node $$ {BTP_MIDDLEWARE} --ipfs $$ {BTP_IPFS}/api/v0 $$ {BTP_SCS_NAME} generated/solidity-token-erc20.subgraph.yaml; \
8484 fi
0 commit comments