UNPKG

4.41 kBTypeScriptView Raw
1/**
2 * This file was automatically generated by json-schema-to-typescript.
3 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
4 * and run json-schema-to-typescript to regenerate this file.
5 */
6
7export type ContractName = string;
8export type Abi = (
9 | {
10 type: "event";
11 name: string;
12 inputs: {
13 name: string;
14 type: string | string | string | string | string | string | string | string | string;
15 indexed: boolean;
16 [k: string]: any;
17 }[];
18 anonymous: boolean;
19 }
20 | {
21 type: "constructor";
22 inputs: {
23 name?: string;
24 type?: string | string | string | string | string | string | string | string | string;
25 components?: {
26 [k: string]: any;
27 }[];
28 [k: string]: any;
29 }[];
30 stateMutability: "pure" | "view" | "nonpayable" | "payable";
31 constant?: boolean;
32 payable?: boolean;
33 }
34 | {
35 type: "fallback";
36 stateMutability: "pure" | "view" | "nonpayable" | "payable";
37 constant?: boolean;
38 payable?: boolean;
39 }
40 | {
41 type?: "function";
42 name: string;
43 inputs: {
44 name?: string;
45 type?: string | string | string | string | string | string | string | string | string;
46 components?: {
47 [k: string]: any;
48 }[];
49 [k: string]: any;
50 }[];
51 outputs?: {
52 name?: string;
53 type?: string | string | string | string | string | string | string | string | string;
54 components?: {
55 [k: string]: any;
56 }[];
57 [k: string]: any;
58 }[];
59 stateMutability: "pure" | "view" | "nonpayable" | "payable";
60 constant?: boolean;
61 payable?: boolean;
62 })[];
63export type Metadata = string;
64export type Bytecode = string;
65export type SourceMap = string;
66export type Source = string;
67export type SourcePath = string;
68export type SchemaVersion = string;
69
70/**
71 * Describes a contract consumable by Truffle, possibly including deployed instances on networks
72 */
73export interface ContractObject {
74 /**
75 * Name used to identify the contract
76 */
77 contractName?: ContractName;
78 /**
79 * Interface description returned by compiler for source
80 */
81 abi: Abi;
82 metadata?: Metadata;
83 /**
84 * Bytecode sent as contract-creation transaction data, with unresolved link references
85 */
86 bytecode?: Bytecode;
87 /**
88 * On-chain deployed contract bytecode, with unresolved link references
89 */
90 deployedBytecode?: Bytecode;
91 /**
92 * Source mapping for contract-creation transaction data bytecode
93 */
94 sourceMap?: SourceMap;
95 /**
96 * Source mapping for contract bytecode
97 */
98 deployedSourceMap?: SourceMap;
99 source?: Source;
100 sourcePath?: SourcePath;
101 ast?: Ast;
102 legacyAST?: LegacyAst;
103 compiler?: {
104 name?: string;
105 version?: string;
106 [k: string]: any;
107 };
108 networks?: {
109 [k: string]: NetworkObject;
110 };
111 schemaVersion?: SchemaVersion;
112 updatedAt?: string;
113 devdoc?: NatSpec;
114 userdoc?: NatSpec;
115 /**
116 * This interface was referenced by `ContractObject`'s JSON-Schema definition
117 * via the `patternProperty` "^x-".
118 */
119 [k: string]:
120 | string
121 | boolean
122 | number
123 | {
124 [k: string]: any;
125 }
126 | any[];
127}
128export interface Ast {
129 [k: string]: any;
130}
131export interface LegacyAst {
132 [k: string]: any;
133}
134/**
135 * This interface was referenced by `undefined`'s JSON-Schema definition
136 * via the `patternProperty` "^[a-zA-Z0-9]+$".
137 */
138export interface NetworkObject {
139 /**
140 * This interface was referenced by `undefined`'s JSON-Schema definition
141 * via the `patternProperty` "^[a-zA-Z_][a-zA-Z0-9_]*$".
142 */
143 address?: string;
144 transactionHash?: string;
145 events?: {
146 /**
147 * This interface was referenced by `undefined`'s JSON-Schema definition
148 * via the `patternProperty` "^0x[a-fA-F0-9]{64}$".
149 */
150 [k: string]: {
151 type: "event";
152 name: string;
153 inputs: {
154 name: string;
155 type: string | string | string | string | string | string | string | string | string;
156 indexed: boolean;
157 [k: string]: any;
158 }[];
159 anonymous: boolean;
160 };
161 };
162 links?: {
163 /**
164 * This interface was referenced by `undefined`'s JSON-Schema definition
165 * via the `patternProperty` "^[a-zA-Z_][a-zA-Z0-9_]*$".
166 */
167 [k: string]: string;
168 };
169}
170export interface NatSpec {
171 [k: string]: any;
172}