mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-11-10 16:44:08 +00:00
* Add subgraph schema types to the generated schema * Add queries for subgraph entities * Add entity generation for subgraph entities * Call subgraph event handler in indexer * Refactor subgraph schema and entity generation * Add resolvers generation for subgraph entities * Get event signature in the event * Add NonNullType check for field type in entity generation * Auto-diff based on store set * Use contract address from data source in loader * Change subgraph-schema arg to subgraph-path arg |
||
|---|---|---|
| .. | ||
| assembly | ||
| src | ||
| test | ||
| .env.example | ||
| .eslintignore | ||
| .eslintrc.json | ||
| .gitignore | ||
| .mocharc.yml | ||
| .npmrc | ||
| asconfig.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
graph-node
Test
-
Run
yarnto install all dependencies. -
Create .env file
$ cp .env.example .env -
To deploy contract for example subgraph use https://github.com/deep-stack/eth-contract-tests
# In eth-contract-test repo. $ yarn $ yarn example:deployUse the address the contract got deployed to and set it to
EXAMPLE_CONTRACT_ADDRESSin .env file. -
To deploy contracts for eden subgraph use https://github.com/vulcanize/governance
-
Follow the steps in https://github.com/vulcanize/governance/tree/watcher-ts#instructions
-
Set the contract addresses for eden contracts in .env file from
deployments/localhostdirectory in the governance repository.Following are the contracts whose address needs to be set in .env file:
- EdenNetwork - EDEN_NETWORK_CONTRACT_ADDRESS
- MerkleDistributor - EDEN_NETWORK_DISTRIBUTION_CONTRACT_ADDRESS
- DistributorGovernance - EDEN_NETWORK_GOVERNANCE_CONTRACT_ADDRESS
-
Run
yarn build:exampleto build the wasm files. -
Run
yarn test.