@@ -65,20 +65,20 @@ subgraph:
65
65
@echo " Deploying the subgraph..."
66
66
@rm -Rf subgraph/subgraph.config.json
67
67
@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
77
76
@eval $$(curl -H "x-auth-token: $${BPT_SERVICE_TOKEN}" -s $${BTP_CLUSTER_MANAGER_URL}/ide/foundry/$${BTP_SCS_ID}/env | sed 's/^/export /' )
78
77
@if [ " $$ {BTP_MIDDLEWARE}" == " " ]; then \
79
78
echo " You have not launched a graph middleware for this smart contract set, aborting..." ; \
80
79
exit 1; \
81
80
else \
81
+ cd subgraph; \
82
82
pnpm graph create --node $$ {BTP_MIDDLEWARE} $$ {BTP_SCS_NAME}; \
83
83
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; \
84
84
fi
0 commit comments