mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-01-08 20:38:05 +00:00
nikugogoi
83775608ec
* Implement store get api without blockHash and blockNumber * Pass database instance to GraphWatcher * Implement store set without block data * Store blockHash and blockNumber in database entity table * Implement getting entity in subgraph from store.get * Add block data present in postgraphile * Pass db and context to instantiate method in tests * GQL API in graph-test-watcher to test store.set * Remove contract address from subgraph file * Fix block in dummy event data * Pass just blockHash to get an entity from the database * Review changes and add TODOs Co-authored-by: prathamesh <prathamesh.musale0@gmail.com> |
||
---|---|---|
.. | ||
assembly | ||
src | ||
test | ||
.env.example | ||
.eslintignore | ||
.eslintrc.json | ||
.gitignore | ||
.mocharc.yml | ||
.npmrc | ||
asconfig.json | ||
package.json | ||
README.md | ||
tsconfig.json |
graph-node
Test
-
Run
yarn
to 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:deploy
Use the address the contract got deployed to and set it to
EXAMPLE_CONTRACT_ADDRESS
in .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/localhost
directory 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:example
to build the wasm files. -
Run
yarn test
.