Skip to content

Instantly share code, notes, and snippets.

@GrandSchtroumpf
Created September 3, 2018 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GrandSchtroumpf/fc67526a00c2cb05c776013ce4278587 to your computer and use it in GitHub Desktop.
Save GrandSchtroumpf/fc67526a00c2cb05c776013ce4278587 to your computer and use it in GitHub Desktop.
Types for the ABI
export interface ABIDefinition {
constant?: boolean;
payable?: boolean;
anonymous?: boolean;
inputs?: Array<ABIInput>;
name?: string;
outputs?: Array<ABIOutput>;
type: 'function' | 'constructor' | 'event' | 'fallback';
}
export type ABIDataTypes = string; // TODO list all types
export type ABIParam = (ABIInput | ABIOutput);
export interface ABIInput {
name: string;
type: ABIDataTypes;
indexed?: boolean;
components: ABIInput[];
}
export interface ABIOutput {
name: string;
type: ABIDataTypes;
components: ABIOutput[];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment