@graphprotocol/graph-cli
Version:
CLI for building for and deploying to The Graph
77 lines (76 loc) • 2.34 kB
TypeScript
import ABI from '../protocols/ethereum/abi.js';
import Protocol from '../protocols/index.js';
export interface ScaffoldOptions {
protocol: Protocol;
abi?: ABI;
indexEvents?: boolean;
contract?: string;
network: string;
contractName: string;
startBlock?: string;
subgraphName?: string;
node?: string;
spkgPath?: string;
entities?: string[];
}
export default class Scaffold {
protocol: Protocol;
abi?: ABI;
indexEvents?: boolean;
contract?: string;
network: string;
contractName: string;
subgraphName?: string;
node?: string;
startBlock?: string;
spkgPath?: string;
entities?: string[];
constructor({ protocol, abi, contract, network, contractName, startBlock, subgraphName, node, spkgPath, indexEvents, entities, }: ScaffoldOptions);
generatePackageJson(): Promise<string>;
generatePackageJsonForSubstreams(): Promise<string>;
generateManifest(): Promise<string>;
generateSchema(): Promise<string>;
generateSpkgContent(): Promise<Buffer<ArrayBufferLike> | undefined>;
generateTsConfig(): Promise<string>;
generateDockerFileConfig(): Promise<string>;
generateGitIgnoreFile(): string;
generateMappings(): Promise<{
[x: string]: string;
} | undefined>;
generateMapping(): Promise<string>;
generateABIs(): Promise<{
[x: string]: string;
} | undefined>;
generateTests(): Promise<{
[x: string]: string;
} | undefined>;
generate(): 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;
}>;
}