UNPKG

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