Commit Graph

26 Commits

Author SHA1 Message Date
f3230e3822
Change package name prefixes to cerc-io (#177) 2022-09-09 17:13:01 +05:30
7238f614c0
Update CLI to compare only updated entities and verify IPLD state (#161)
* Change compare CLI to verify only updated entities

* Implement IPLD state verification in compare CLI

* Changes to IPLD state to match with GQL result entity
2022-08-17 19:11:40 +05:30
1a903fccc6
CLI to compare eden-watcher entities and fix mapping code (#149)
* Make sumStaked variable local in eden network mapping

* Implement compare CLI to fetch and query by ids

* Set filterLogs to true for eden-watcher

* Use varchar for bigint array type in eden-watcher

* Store subgraph entities by id in IPLD state

* Store bigint vales as string in IPLD state

* Update eden watcher hook to store single Block entity in IPLD checkpoint

* Fix entity enum type property

* Fix parsing big numbers in event params

* Fix event bigint params parsing in all watchers

* Set default limit to query result and process block after events
2022-08-08 15:58:13 +05:30
3cee10607e
Parse batched transactions for mobymask-watcher events (#141)
* Remove using graph-node from mobymask-watcher

* Parse batched transactions for MobyMask events

* Update to use same ethers package version

* Add CLI for processing block out of order

* Fix job-runner for already processed blocks out of order
2022-07-11 11:29:33 +05:30
ce6568aad2 Add demo for graph-watcher IPLD statediff and checkpointing 2022-05-06 15:43:45 +05:30
ba6b996e65
Deploy example contract in graph-node (#113)
* Deploy example contract in graph-node

* Add auth token in docker build for github packages

* Add steps for running tests in CI
2022-04-29 15:11:40 +05:30
654edf4008
Update README and graph-node tests (#110)
* Update README with proper steps for installing github packages

* Update graph-node readme to run tests
2022-04-27 15:37:13 +05:30
aabf9f8e15
Implement data source templates (#106)
* Implement data source templates

* Remove optional param from wasm instantiate

* Add all types for solidity to typescript mapping

* Set contract address in context for data source templates

* Implement block handlers for data source templates
2022-01-06 18:32:08 +05:30
4867530da7
Implement subgraph JSON host APIs fromBytes and try_fromBytes (#105)
* Implement JSON fromBytes host API

* Implement json.try_fromBytes host API

* Fill host API code for json number methods
2022-01-03 18:15:20 +05:30
198e49e5a0 Implement WASM instance restart to handle out of memory error (#81)
* Test case for wasm out of memory error

* Restart wasm instance after N blocks

* Handle out of memory error and re instantiate WASM

* Remove old instance from map before reinstantiating WASM
2021-12-28 16:08:05 +05:30
prathamesh0
5f03ad5029 Use pg-type numeric for bigint in entities and use custom decimal in graph-node (#71)
* Use pg-type numeric for bigint columns in typeorm entities

* Use custom decimal implementation from util in graph-node
2021-12-28 16:08:05 +05:30
prathamesh0
475c34b3fa Add an executable for compare-entity CLI (#69) 2021-12-28 16:08:05 +05:30
faf046d181 Implement graph-ts numbers, typeConversion and log host APIs (#64)
* Implement host api for bigint operations

* Implement type conversion APIs

* Avoid use of exports as variable name for conflict

* Implement log API with debug and levels

* Fix job-runnner hook error after stopping and starting chain
2021-12-28 16:08:05 +05:30
prathamesh0
b04f6f2fba Implement bigDecimal host API (#62)
* Handle negative bigInt in store host API

* Increase size of bigInt in fromString API to support UInt256

* Implement bigDecimal divideBy host API

* Implement bigDecimal plus, minus and times host API

* Implement bigInt dividedByDecimal and mod host API

* Change BN js version to that used by ethers js
2021-12-28 16:08:05 +05:30
prathamesh0
d979e51723 Add a CLI to compare entity query results from two GQL endpoints (#57)
* Add CLI to compare entities from two GQL endpoints

* Print out result diffs in compare-entity CLI

* Get the colorized result diff in compare-entity CLI

* Read query dir from config file or as an arg

* Make config file arg required

* Make queries in Example schema similar to that in graph-node

* Get non-colorized output on choosing raw-json diff option

* Make queries in eden-watcher similar to that in graph-node
2021-12-28 16:08:05 +05:30
nikugogoi
47cef8d5d7 Add support for subgraph schema data types (#46)
* Fix packages build

* Add support for boolean type in subgraph schema

* Add BigDecimal fromString and toString implementation

* Add implementation for subgraph Bytes type

* Implement enum type for subgraph schema

* Add implementation for subgraph schema BigDecimal type

* JSON stringify and parse entity data for auto-diff
2021-12-28 16:08:05 +05:30
83775608ec Implement subgraph store host API (#35)
* 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>
2021-12-28 16:08:05 +05:30
6cca55a1ab Integrate generated watcher to invoke handlers in graph-node (#33)
* Invoke handlers based on watcher-ts events

* Read subgraph yaml and listen to events from watcher-ts

* Create GraphWatcher class to use in generated example contract watcher

* Call graph-node event handler from generated watcher
2021-12-28 16:08:05 +05:30
1c15c1eedb Test case for EdenNetwork event handler (#31)
* Test case for calling EdenNetwork event handler

* Test cases for calling EdenNetwork event handlers

* Test cases for calling event handlers in EdenNetworkDistribution

* Test cases for calling event handlers in EdenNetworkGovernance

* Perform eth-calls according to contract name in param

* Pass function params in eth-call host API

* Return value from eth-call to wasm

* Add instructions for running tests

* Install assemblyscript from github packages

* Add instrcutions for installing private github packages

* Use vulcanize assemblyscript package
2021-12-28 16:08:05 +05:30
1ce07bbb6e Implement BigInt times and dividedBy APIs (#30)
* Add script for building example subgraph

* Implement BigInt times and dividedBy API
2021-12-28 16:08:05 +05:30
f34d83c04b Use async functions in wasm imports (#28)
* Use async functions in wasm imports

* Complete implementing asyncify with assemblyscript loader
2021-12-28 16:08:05 +05:30
e10f61ba61 Implement typeConversion APIs bytesToHex, bigIntToString and stringToH160 (#19)
* Implement host api typeConversion.bytesToHex

* Complete host api bigIntToString.

* Create TypeId for assemblyscript loader.

* Implement host apis bigInt fromString, plus and minus
2021-12-28 16:08:04 +05:30
Ashwin Phatak
9e6f6b4519 AssemblyScript loader experiments (#13) 2021-12-28 16:08:04 +05:30
Ashwin Phatak
889e96572d Host API stubs (#12) 2021-12-28 16:08:04 +05:30
Ashwin Phatak
1421ba5a9b WASM instance setup (#11)
* Code for running wasm file.

* Add test for wasm exported function.

* Use target names for build files.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-12-28 16:08:04 +05:30
Ashwin Phatak
987457992a Create graph-node package. (#10)
Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-12-28 16:08:04 +05:30