@graphprotocol/graph-cli
Version:
CLI for building for and deploying to The Graph
52 lines (51 loc) • 2.08 kB
TypeScript
import { Map } from 'immutable';
import ABI from '../protocols/ethereum/abi.js';
import Protocol from '../protocols/index.js';
import { Spinner } from './spinner.js';
export declare const generateDataSource: (protocol: Protocol, contractName: string, network: string, contractAddress: string, abi: ABI, startBlock?: string) => Promise<Map<string, any>>;
export declare const generateScaffold: ({ protocolInstance, abi, source, network, subgraphName, indexEvents, contractName, startBlock, node, spkgPath, entities, }: {
protocolInstance: Protocol;
abi: ABI;
source: string;
network: string;
subgraphName: string;
indexEvents: boolean;
contractName?: string;
startBlock?: string;
node?: string;
spkgPath?: string;
entities?: string[];
}, spinner: Spinner) => Promise<{
'subgraph.yaml': string;
'schema.graphql': string;
'package.json': string;
'.gitignore': string;
'substreams.spkg': Buffer<ArrayBufferLike> | undefined;
'tsconfig.json'?: undefined;
'docker-compose.yml'?: undefined;
src?: undefined;
abis?: undefined;
tests?: undefined;
} | {
'package.json': string;
'subgraph.yaml': string;
'schema.graphql': string;
'tsconfig.json': string;
'docker-compose.yml': string;
'.gitignore': string;
src: {
[x: string]: string;
} | undefined;
abis: {
[x: string]: string;
} | undefined;
tests: {
[x: string]: string;
} | undefined;
'substreams.spkg'?: undefined;
}>;
export declare const writeScaffold: (scaffold: any, directory: string, spinner: Spinner) => Promise<void>;
export declare const writeABI: (abi: ABI, contractName: string) => Promise<void>;
export declare const writeSchema: (abi: ABI, protocol: Protocol, schemaPath: string, entities: any, contractName: string) => Promise<void>;
export declare const writeMapping: (abi: ABI, protocol: Protocol, contractName: string, entities: any) => Promise<void>;
export declare const writeTestsFiles: (abi: ABI, protocol: Protocol, contractName: string) => Promise<void>;