mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-07 16:34:06 +00:00
Refactor graph-node database and move to util (#259)
* Move graph-database from graph-node to util * Refactor and remove graph-node dependency from cli package * Modify dependencies using depcheck * Implement CLI refactoring changes in other watchers * Review changes to remove eden comment and fix local import in util * Import GraphDatabase from util instead of graph-node * Move graph-node non assemblyscript code to util package * Implement CLI refactoring changes in codegen * Fix graph-node tests after refactoring * Move fromStateEntityValues to graph state utils
This commit is contained in:
@@ -3,12 +3,10 @@
|
||||
//
|
||||
|
||||
import { BaseProvider } from '@ethersproject/providers';
|
||||
import { getCustomProvider, Database as BaseDatabase, ServerConfig } from '@cerc-io/util';
|
||||
import { getCustomProvider, Database as BaseDatabase, ServerConfig, GraphDatabase, EventData } from '@cerc-io/util';
|
||||
import { EthClient } from '@cerc-io/ipld-eth-client';
|
||||
import { StorageLayout } from '@cerc-io/solidity-mapper';
|
||||
|
||||
import { EventData } from '../../src/utils';
|
||||
import { Database } from '../../src/database';
|
||||
import { Indexer } from './indexer';
|
||||
|
||||
const NETWORK_URL = 'http://127.0.0.1:8081';
|
||||
@@ -70,10 +68,10 @@ export const getDummyGraphData = (): any => {
|
||||
};
|
||||
};
|
||||
|
||||
export const getTestDatabase = (): Database => {
|
||||
export const getTestDatabase = (): GraphDatabase => {
|
||||
const baseDatabase = new BaseDatabase({ type: 'postgres' });
|
||||
const serverConfig = {} as ServerConfig;
|
||||
return new Database(serverConfig, baseDatabase);
|
||||
return new GraphDatabase(serverConfig, baseDatabase);
|
||||
};
|
||||
|
||||
export const getTestIndexer = (storageLayout?: Map<string, StorageLayout>): Indexer => {
|
||||
|
||||
Reference in New Issue
Block a user