@graphprotocol/graph-cli
Version:
CLI for building for and deploying to The Graph
31 lines (30 loc) • 1.35 kB
TypeScript
import immutable from 'immutable';
import AbiCodeGenerator from './codegen/abi.js';
export default class ABI {
name: string;
file: string | undefined;
data: immutable.Collection<any, any>;
constructor(name: string, file: string | undefined, data: immutable.Collection<any, any>);
codeGenerator(): AbiCodeGenerator;
static oldEventSignature(event: immutable.Map<any, any>): string;
static eventSignature(event: immutable.Map<any, any>): string;
/**
* For the ABI of a function, returns a string function signature compatible
* with the Rust `ethabi` library. It is of the form
*
* <function>([<input-type-1>, ...])[:(<output-type-1,...)]
*
* A few examples for a function called `example`:
*
* - No inputs or outputs: `example()`
* - One input and output: `example(uint256):(bool)`
* - Multiple inputs and outputs: `example(uint256,(string,bytes32)):(bool,uint256)`
*/
functionSignature(fn: immutable.Map<any, any>): string;
oldEventSignatures(): immutable.Collection<any, string>;
eventSignatures(): immutable.Collection<any, string>;
callFunctions(): immutable.Collection<any, any>;
callFunctionSignatures(): immutable.Collection<any, string>;
static normalized(json: any): any;
static load(name: string, file: string): ABI;
}