-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate IPLD blocks table and related GQL API (#260)
* Add ipld-blocks entity generation * Populate ipld-blocks table * Rename ipld-block entity and update after each event * Move ipld-hook to hooks.ts * Change IPLD block structure * Add cid field in blocks * Fetch prev. IPLDBlock for a contract * GQL API to query IPLDBlock by CID * Save cid in blocks in existing watchers * Update codegen docs * GQL API for getting last derived state (#3) * GQL API for getting last derived state * Rename query to getState * Change query names to getState and getStateByCid * Save BigInt as string * Move function to prepare IPLDBlock to indexer * Refactor IPLDBlock hook * Add genesis hook * Call post-block hook after a block is marked as complete * Add IPLDBlock checkpointing * Use queryRunner instead of a new repo for queries * Add a query to get block in ipld-eth-client * Get latest checkpoints for all contracts for checkpointing. * Call post-block hook in a queue * Pass server config to Indexer in watch-contract cli Co-authored-by: nikugogoi <[email protected]>
- Loading branch information
1 parent
f89a7a0
commit 0003250
Showing
44 changed files
with
857 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
className: IPLDBlock | ||
indexOn: | ||
- columns: | ||
- block | ||
- contractAddress | ||
columns: | ||
- name: block | ||
tsType: BlockProgress | ||
columnType: ManyToOne | ||
lhs: () | ||
rhs: BlockProgress | ||
- name: contractAddress | ||
pgType: varchar | ||
tsType: string | ||
columnType: Column | ||
columnOptions: | ||
- option: length | ||
value: 42 | ||
- name: cid | ||
pgType: varchar | ||
tsType: string | ||
columnType: Column | ||
- name: kind | ||
pgType: varchar | ||
tsType: string | ||
columnType: Column | ||
- name: data | ||
pgType: text | ||
tsType: string | ||
columnType: Column | ||
imports: | ||
- toImport: | ||
- Entity | ||
- PrimaryGeneratedColumn | ||
- Column | ||
- Index | ||
- ManyToOne | ||
from: typeorm | ||
- toImport: | ||
- BlockProgress | ||
from: ./BlockProgress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.