1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | export type ContractName = string;
|
8 | export 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 | })[];
|
63 | export type Metadata = string;
|
64 | export type Bytecode = string;
|
65 | export type SourceMap = string;
|
66 | export type Source = string;
|
67 | export type SourcePath = string;
|
68 | export type SchemaVersion = string;
|
69 |
|
70 |
|
71 |
|
72 |
|
73 | export interface ContractObject {
|
74 | |
75 |
|
76 |
|
77 | contractName?: ContractName;
|
78 | |
79 |
|
80 |
|
81 | abi: Abi;
|
82 | metadata?: Metadata;
|
83 | |
84 |
|
85 |
|
86 | bytecode?: Bytecode;
|
87 | |
88 |
|
89 |
|
90 | deployedBytecode?: Bytecode;
|
91 | |
92 |
|
93 |
|
94 | sourceMap?: SourceMap;
|
95 | |
96 |
|
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 |
|
117 |
|
118 |
|
119 | [k: string]:
|
120 | | string
|
121 | | boolean
|
122 | | number
|
123 | | {
|
124 | [k: string]: any;
|
125 | }
|
126 | | any[];
|
127 | }
|
128 | export interface Ast {
|
129 | [k: string]: any;
|
130 | }
|
131 | export interface LegacyAst {
|
132 | [k: string]: any;
|
133 | }
|
134 |
|
135 |
|
136 |
|
137 |
|
138 | export interface NetworkObject {
|
139 | |
140 |
|
141 |
|
142 |
|
143 | address?: string;
|
144 | transactionHash?: string;
|
145 | events?: {
|
146 | |
147 |
|
148 |
|
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 |
|
165 |
|
166 |
|
167 | [k: string]: string;
|
168 | };
|
169 | }
|
170 | export interface NatSpec {
|
171 | [k: string]: any;
|
172 | }
|