@coset-dev/contracts 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,363 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers"
5
+ import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "./common.js"
6
+
7
+
8
+ export interface OracleFactoryInterface extends Interface {
9
+ getFunction(nameOrSignature: "activeOracleCount" | "config" | "deployOracle" | "getAllOracles()" | "getAllOracles(uint256,uint256)" | "getOracleInfo" | "getProviderOracles(address,uint256,uint256)" | "getProviderOracles(address)" | "oracleList" | "oracles" | "owner" | "providerOracles" | "renounceOwnership" | "setOracleDataUpdatePrice" | "setOracleStatus" | "transferOwnership" | "updateConfig"): FunctionFragment;
10
+
11
+ getEvent(nameOrSignatureOrTopic: "OracleDeployed" | "OracleStatusChanged" | "OwnershipTransferred"): EventFragment;
12
+
13
+ encodeFunctionData(functionFragment: 'activeOracleCount', values?: undefined): string;
14
+ encodeFunctionData(functionFragment: 'config', values?: undefined): string;
15
+ encodeFunctionData(functionFragment: 'deployOracle', values: [BigNumberish, BigNumberish, BytesLike]): string;
16
+ encodeFunctionData(functionFragment: 'getAllOracles()', values?: undefined): string;
17
+ encodeFunctionData(functionFragment: 'getAllOracles(uint256,uint256)', values: [BigNumberish, BigNumberish]): string;
18
+ encodeFunctionData(functionFragment: 'getOracleInfo', values: [AddressLike]): string;
19
+ encodeFunctionData(functionFragment: 'getProviderOracles(address,uint256,uint256)', values: [AddressLike, BigNumberish, BigNumberish]): string;
20
+ encodeFunctionData(functionFragment: 'getProviderOracles(address)', values: [AddressLike]): string;
21
+ encodeFunctionData(functionFragment: 'oracleList', values: [BigNumberish]): string;
22
+ encodeFunctionData(functionFragment: 'oracles', values: [AddressLike]): string;
23
+ encodeFunctionData(functionFragment: 'owner', values?: undefined): string;
24
+ encodeFunctionData(functionFragment: 'providerOracles', values: [AddressLike, BigNumberish]): string;
25
+ encodeFunctionData(functionFragment: 'renounceOwnership', values?: undefined): string;
26
+ encodeFunctionData(functionFragment: 'setOracleDataUpdatePrice', values: [AddressLike, BigNumberish]): string;
27
+ encodeFunctionData(functionFragment: 'setOracleStatus', values: [AddressLike, boolean]): string;
28
+ encodeFunctionData(functionFragment: 'transferOwnership', values: [AddressLike]): string;
29
+ encodeFunctionData(functionFragment: 'updateConfig', values: [BigNumberish, BigNumberish]): string;
30
+
31
+ decodeFunctionResult(functionFragment: 'activeOracleCount', data: BytesLike): Result;
32
+ decodeFunctionResult(functionFragment: 'config', data: BytesLike): Result;
33
+ decodeFunctionResult(functionFragment: 'deployOracle', data: BytesLike): Result;
34
+ decodeFunctionResult(functionFragment: 'getAllOracles()', data: BytesLike): Result;
35
+ decodeFunctionResult(functionFragment: 'getAllOracles(uint256,uint256)', data: BytesLike): Result;
36
+ decodeFunctionResult(functionFragment: 'getOracleInfo', data: BytesLike): Result;
37
+ decodeFunctionResult(functionFragment: 'getProviderOracles(address,uint256,uint256)', data: BytesLike): Result;
38
+ decodeFunctionResult(functionFragment: 'getProviderOracles(address)', data: BytesLike): Result;
39
+ decodeFunctionResult(functionFragment: 'oracleList', data: BytesLike): Result;
40
+ decodeFunctionResult(functionFragment: 'oracles', data: BytesLike): Result;
41
+ decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result;
42
+ decodeFunctionResult(functionFragment: 'providerOracles', data: BytesLike): Result;
43
+ decodeFunctionResult(functionFragment: 'renounceOwnership', data: BytesLike): Result;
44
+ decodeFunctionResult(functionFragment: 'setOracleDataUpdatePrice', data: BytesLike): Result;
45
+ decodeFunctionResult(functionFragment: 'setOracleStatus', data: BytesLike): Result;
46
+ decodeFunctionResult(functionFragment: 'transferOwnership', data: BytesLike): Result;
47
+ decodeFunctionResult(functionFragment: 'updateConfig', data: BytesLike): Result;
48
+ }
49
+
50
+
51
+ export namespace OracleDeployedEvent {
52
+ export type InputTuple = [oracleAddress: AddressLike, provider: AddressLike, timestamp: BigNumberish];
53
+ export type OutputTuple = [oracleAddress: string, provider: string, timestamp: bigint];
54
+ export interface OutputObject {oracleAddress: string, provider: string, timestamp: bigint };
55
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>
56
+ export type Filter = TypedDeferredTopicFilter<Event>
57
+ export type Log = TypedEventLog<Event>
58
+ export type LogDescription = TypedLogDescription<Event>
59
+ }
60
+
61
+
62
+
63
+ export namespace OracleStatusChangedEvent {
64
+ export type InputTuple = [oracleAddress: AddressLike, provider: AddressLike, newOracleStatus: boolean, timestamp: BigNumberish];
65
+ export type OutputTuple = [oracleAddress: string, provider: string, newOracleStatus: boolean, timestamp: bigint];
66
+ export interface OutputObject {oracleAddress: string, provider: string, newOracleStatus: boolean, timestamp: bigint };
67
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>
68
+ export type Filter = TypedDeferredTopicFilter<Event>
69
+ export type Log = TypedEventLog<Event>
70
+ export type LogDescription = TypedLogDescription<Event>
71
+ }
72
+
73
+
74
+
75
+ export namespace OwnershipTransferredEvent {
76
+ export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
77
+ export type OutputTuple = [previousOwner: string, newOwner: string];
78
+ export interface OutputObject {previousOwner: string, newOwner: string };
79
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>
80
+ export type Filter = TypedDeferredTopicFilter<Event>
81
+ export type Log = TypedEventLog<Event>
82
+ export type LogDescription = TypedLogDescription<Event>
83
+ }
84
+
85
+
86
+
87
+ export interface OracleFactory extends BaseContract {
88
+
89
+ connect(runner?: ContractRunner | null): OracleFactory;
90
+ waitForDeployment(): Promise<this>;
91
+
92
+ interface: OracleFactoryInterface;
93
+
94
+
95
+ queryFilter<TCEvent extends TypedContractEvent>(
96
+ event: TCEvent,
97
+ fromBlockOrBlockhash?: string | number | undefined,
98
+ toBlock?: string | number | undefined,
99
+ ): Promise<Array<TypedEventLog<TCEvent>>>
100
+ queryFilter<TCEvent extends TypedContractEvent>(
101
+ filter: TypedDeferredTopicFilter<TCEvent>,
102
+ fromBlockOrBlockhash?: string | number | undefined,
103
+ toBlock?: string | number | undefined
104
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
105
+
106
+ on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>
107
+ on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>
108
+
109
+ once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>
110
+ once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>
111
+
112
+ listeners<TCEvent extends TypedContractEvent>(
113
+ event: TCEvent
114
+ ): Promise<Array<TypedListener<TCEvent>>>;
115
+ listeners(eventName?: string): Promise<Array<Listener>>
116
+ removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>
117
+
118
+
119
+
120
+
121
+ activeOracleCount: TypedContractMethod<
122
+ [],
123
+ [bigint],
124
+ 'view'
125
+ >
126
+
127
+
128
+
129
+ config: TypedContractMethod<
130
+ [],
131
+ [[bigint, bigint] & {oracleDeployPrice: bigint, oracleFactoryShare: bigint }],
132
+ 'view'
133
+ >
134
+
135
+
136
+
137
+ deployOracle: TypedContractMethod<
138
+ [_recommendedUpdateDuration: BigNumberish, _dataUpdatePrice: BigNumberish, _initialData: BytesLike, ],
139
+ [void],
140
+ 'payable'
141
+ >
142
+
143
+
144
+
145
+ "getAllOracles()": TypedContractMethod<
146
+ [],
147
+ [string[]],
148
+ 'view'
149
+ >
150
+
151
+
152
+
153
+ "getAllOracles(uint256,uint256)": TypedContractMethod<
154
+ [offset: BigNumberish, limit: BigNumberish, ],
155
+ [[string[], bigint] & {total: bigint }],
156
+ 'view'
157
+ >
158
+
159
+
160
+
161
+ getOracleInfo: TypedContractMethod<
162
+ [oracleAddress: AddressLike, ],
163
+ [[string, bigint, boolean] & {provider: string, createdAt: bigint, isActive: boolean }],
164
+ 'view'
165
+ >
166
+
167
+
168
+
169
+ "getProviderOracles(address,uint256,uint256)": TypedContractMethod<
170
+ [provider: AddressLike, offset: BigNumberish, limit: BigNumberish, ],
171
+ [[string[], bigint] & {total: bigint }],
172
+ 'view'
173
+ >
174
+
175
+
176
+
177
+ "getProviderOracles(address)": TypedContractMethod<
178
+ [provider: AddressLike, ],
179
+ [string[]],
180
+ 'view'
181
+ >
182
+
183
+
184
+
185
+ oracleList: TypedContractMethod<
186
+ [arg0: BigNumberish, ],
187
+ [string],
188
+ 'view'
189
+ >
190
+
191
+
192
+
193
+ oracles: TypedContractMethod<
194
+ [arg0: AddressLike, ],
195
+ [[string, bigint, boolean] & {provider: string, createdAt: bigint, isActive: boolean }],
196
+ 'view'
197
+ >
198
+
199
+
200
+
201
+ owner: TypedContractMethod<
202
+ [],
203
+ [string],
204
+ 'view'
205
+ >
206
+
207
+
208
+
209
+ providerOracles: TypedContractMethod<
210
+ [arg0: AddressLike, arg1: BigNumberish, ],
211
+ [string],
212
+ 'view'
213
+ >
214
+
215
+
216
+
217
+ renounceOwnership: TypedContractMethod<
218
+ [],
219
+ [void],
220
+ 'nonpayable'
221
+ >
222
+
223
+
224
+
225
+ setOracleDataUpdatePrice: TypedContractMethod<
226
+ [oracleAddress: AddressLike, _dataUpdatePrice: BigNumberish, ],
227
+ [void],
228
+ 'nonpayable'
229
+ >
230
+
231
+
232
+
233
+ setOracleStatus: TypedContractMethod<
234
+ [oracleAddress: AddressLike, _isActive: boolean, ],
235
+ [void],
236
+ 'nonpayable'
237
+ >
238
+
239
+
240
+
241
+ transferOwnership: TypedContractMethod<
242
+ [newOwner: AddressLike, ],
243
+ [void],
244
+ 'nonpayable'
245
+ >
246
+
247
+
248
+
249
+ updateConfig: TypedContractMethod<
250
+ [_oracleDeployPrice: BigNumberish, _oracleFactoryShare: BigNumberish, ],
251
+ [void],
252
+ 'nonpayable'
253
+ >
254
+
255
+
256
+
257
+ getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
258
+
259
+ getFunction(nameOrSignature: 'activeOracleCount'): TypedContractMethod<
260
+ [],
261
+ [bigint],
262
+ 'view'
263
+ >;
264
+ getFunction(nameOrSignature: 'config'): TypedContractMethod<
265
+ [],
266
+ [[bigint, bigint] & {oracleDeployPrice: bigint, oracleFactoryShare: bigint }],
267
+ 'view'
268
+ >;
269
+ getFunction(nameOrSignature: 'deployOracle'): TypedContractMethod<
270
+ [_recommendedUpdateDuration: BigNumberish, _dataUpdatePrice: BigNumberish, _initialData: BytesLike, ],
271
+ [void],
272
+ 'payable'
273
+ >;
274
+ getFunction(nameOrSignature: 'getAllOracles()'): TypedContractMethod<
275
+ [],
276
+ [string[]],
277
+ 'view'
278
+ >;
279
+ getFunction(nameOrSignature: 'getAllOracles(uint256,uint256)'): TypedContractMethod<
280
+ [offset: BigNumberish, limit: BigNumberish, ],
281
+ [[string[], bigint] & {total: bigint }],
282
+ 'view'
283
+ >;
284
+ getFunction(nameOrSignature: 'getOracleInfo'): TypedContractMethod<
285
+ [oracleAddress: AddressLike, ],
286
+ [[string, bigint, boolean] & {provider: string, createdAt: bigint, isActive: boolean }],
287
+ 'view'
288
+ >;
289
+ getFunction(nameOrSignature: 'getProviderOracles(address,uint256,uint256)'): TypedContractMethod<
290
+ [provider: AddressLike, offset: BigNumberish, limit: BigNumberish, ],
291
+ [[string[], bigint] & {total: bigint }],
292
+ 'view'
293
+ >;
294
+ getFunction(nameOrSignature: 'getProviderOracles(address)'): TypedContractMethod<
295
+ [provider: AddressLike, ],
296
+ [string[]],
297
+ 'view'
298
+ >;
299
+ getFunction(nameOrSignature: 'oracleList'): TypedContractMethod<
300
+ [arg0: BigNumberish, ],
301
+ [string],
302
+ 'view'
303
+ >;
304
+ getFunction(nameOrSignature: 'oracles'): TypedContractMethod<
305
+ [arg0: AddressLike, ],
306
+ [[string, bigint, boolean] & {provider: string, createdAt: bigint, isActive: boolean }],
307
+ 'view'
308
+ >;
309
+ getFunction(nameOrSignature: 'owner'): TypedContractMethod<
310
+ [],
311
+ [string],
312
+ 'view'
313
+ >;
314
+ getFunction(nameOrSignature: 'providerOracles'): TypedContractMethod<
315
+ [arg0: AddressLike, arg1: BigNumberish, ],
316
+ [string],
317
+ 'view'
318
+ >;
319
+ getFunction(nameOrSignature: 'renounceOwnership'): TypedContractMethod<
320
+ [],
321
+ [void],
322
+ 'nonpayable'
323
+ >;
324
+ getFunction(nameOrSignature: 'setOracleDataUpdatePrice'): TypedContractMethod<
325
+ [oracleAddress: AddressLike, _dataUpdatePrice: BigNumberish, ],
326
+ [void],
327
+ 'nonpayable'
328
+ >;
329
+ getFunction(nameOrSignature: 'setOracleStatus'): TypedContractMethod<
330
+ [oracleAddress: AddressLike, _isActive: boolean, ],
331
+ [void],
332
+ 'nonpayable'
333
+ >;
334
+ getFunction(nameOrSignature: 'transferOwnership'): TypedContractMethod<
335
+ [newOwner: AddressLike, ],
336
+ [void],
337
+ 'nonpayable'
338
+ >;
339
+ getFunction(nameOrSignature: 'updateConfig'): TypedContractMethod<
340
+ [_oracleDeployPrice: BigNumberish, _oracleFactoryShare: BigNumberish, ],
341
+ [void],
342
+ 'nonpayable'
343
+ >;
344
+
345
+ getEvent(key: 'OracleDeployed'): TypedContractEvent<OracleDeployedEvent.InputTuple, OracleDeployedEvent.OutputTuple, OracleDeployedEvent.OutputObject>;
346
+ getEvent(key: 'OracleStatusChanged'): TypedContractEvent<OracleStatusChangedEvent.InputTuple, OracleStatusChangedEvent.OutputTuple, OracleStatusChangedEvent.OutputObject>;
347
+ getEvent(key: 'OwnershipTransferred'): TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
348
+
349
+ filters: {
350
+
351
+ 'OracleDeployed(address,address,uint256)': TypedContractEvent<OracleDeployedEvent.InputTuple, OracleDeployedEvent.OutputTuple, OracleDeployedEvent.OutputObject>;
352
+ OracleDeployed: TypedContractEvent<OracleDeployedEvent.InputTuple, OracleDeployedEvent.OutputTuple, OracleDeployedEvent.OutputObject>;
353
+
354
+
355
+ 'OracleStatusChanged(address,address,bool,uint256)': TypedContractEvent<OracleStatusChangedEvent.InputTuple, OracleStatusChangedEvent.OutputTuple, OracleStatusChangedEvent.OutputObject>;
356
+ OracleStatusChanged: TypedContractEvent<OracleStatusChangedEvent.InputTuple, OracleStatusChangedEvent.OutputTuple, OracleStatusChangedEvent.OutputObject>;
357
+
358
+
359
+ 'OwnershipTransferred(address,address)': TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
360
+ OwnershipTransferred: TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
361
+
362
+ };
363
+ }
@@ -0,0 +1,64 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import type { BaseContract, FunctionFragment, Interface, ContractRunner, ContractMethod, Listener } from "ethers"
5
+ import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener } from "./common.js"
6
+
7
+
8
+ export interface OracleUtilsInterface extends Interface {
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+ }
17
+
18
+
19
+
20
+ export interface OracleUtils extends BaseContract {
21
+
22
+ connect(runner?: ContractRunner | null): OracleUtils;
23
+ waitForDeployment(): Promise<this>;
24
+
25
+ interface: OracleUtilsInterface;
26
+
27
+
28
+ queryFilter<TCEvent extends TypedContractEvent>(
29
+ event: TCEvent,
30
+ fromBlockOrBlockhash?: string | number | undefined,
31
+ toBlock?: string | number | undefined,
32
+ ): Promise<Array<TypedEventLog<TCEvent>>>
33
+ queryFilter<TCEvent extends TypedContractEvent>(
34
+ filter: TypedDeferredTopicFilter<TCEvent>,
35
+ fromBlockOrBlockhash?: string | number | undefined,
36
+ toBlock?: string | number | undefined
37
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
38
+
39
+ on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>
40
+ on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>
41
+
42
+ once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>
43
+ once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>
44
+
45
+ listeners<TCEvent extends TypedContractEvent>(
46
+ event: TCEvent
47
+ ): Promise<Array<TypedListener<TCEvent>>>;
48
+ listeners(eventName?: string): Promise<Array<Listener>>
49
+ removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>
50
+
51
+
52
+
53
+
54
+
55
+ getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
56
+
57
+
58
+
59
+
60
+
61
+ filters: {
62
+
63
+ };
64
+ }
@@ -0,0 +1,92 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import type {
5
+ FunctionFragment,
6
+ Typed,
7
+ EventFragment,
8
+ ContractTransaction,
9
+ ContractTransactionResponse,
10
+ DeferredTopicFilter,
11
+ EventLog,
12
+ TransactionRequest,
13
+ LogDescription,
14
+ } from 'ethers'
15
+
16
+ export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> extends DeferredTopicFilter {}
17
+
18
+ export interface TypedContractEvent<
19
+ InputTuple extends Array<any> = any,
20
+ OutputTuple extends Array<any> = any,
21
+ OutputObject = any,
22
+ > {
23
+ (...args: Partial<InputTuple>): TypedDeferredTopicFilter<TypedContractEvent<InputTuple, OutputTuple, OutputObject>>
24
+ name: string
25
+ fragment: EventFragment
26
+ getFragment(...args: Partial<InputTuple>): EventFragment
27
+ }
28
+
29
+ type __TypechainAOutputTuple<T> = T extends TypedContractEvent<infer _U, infer W> ? W : never
30
+ type __TypechainOutputObject<T> = T extends TypedContractEvent<infer _U, infer _W, infer V> ? V : never
31
+
32
+ export interface TypedEventLog<TCEvent extends TypedContractEvent> extends Omit<EventLog, 'args'> {
33
+ args: __TypechainAOutputTuple<TCEvent> & __TypechainOutputObject<TCEvent>
34
+ }
35
+
36
+ export interface TypedLogDescription<TCEvent extends TypedContractEvent> extends Omit<LogDescription, 'args'> {
37
+ args: __TypechainAOutputTuple<TCEvent> & __TypechainOutputObject<TCEvent>
38
+ }
39
+
40
+ export type TypedListener<TCEvent extends TypedContractEvent> = (
41
+ ...listenerArg: [...__TypechainAOutputTuple<TCEvent>, TypedEventLog<TCEvent>, ...undefined[]]
42
+ ) => void
43
+
44
+ export type MinEthersFactory<C, ARGS> = {
45
+ deploy(...a: ARGS[]): Promise<C>
46
+ }
47
+
48
+ export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<infer C, any> ? C : never
49
+ export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any> ? Parameters<F['deploy']> : never
50
+
51
+ export type StateMutability = 'nonpayable' | 'payable' | 'view'
52
+
53
+ export type BaseOverrides = Omit<TransactionRequest, 'to' | 'data'>
54
+ export type NonPayableOverrides = Omit<BaseOverrides, 'value' | 'blockTag' | 'enableCcipRead'>
55
+ export type PayableOverrides = Omit<BaseOverrides, 'blockTag' | 'enableCcipRead'>
56
+ export type ViewOverrides = Omit<TransactionRequest, 'to' | 'data'>
57
+ export type Overrides<S extends StateMutability> = S extends 'nonpayable'
58
+ ? NonPayableOverrides
59
+ : S extends 'payable'
60
+ ? PayableOverrides
61
+ : ViewOverrides
62
+
63
+ export type PostfixOverrides<A extends Array<any>, S extends StateMutability> = A | [...A, Overrides<S>]
64
+ export type ContractMethodArgs<A extends Array<any>, S extends StateMutability> = PostfixOverrides<
65
+ { [I in keyof A]-?: A[I] | Typed },
66
+ S
67
+ >
68
+
69
+ export type DefaultReturnType<R> = R extends Array<any> ? R[0] : R
70
+
71
+ // export interface ContractMethod<A extends Array<any> = Array<any>, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> {
72
+ export interface TypedContractMethod<
73
+ A extends Array<any> = Array<any>,
74
+ R = any,
75
+ S extends StateMutability = 'payable',
76
+ > {
77
+ (...args: ContractMethodArgs<A, S>): S extends 'view'
78
+ ? Promise<DefaultReturnType<R>>
79
+ : Promise<ContractTransactionResponse>
80
+
81
+ name: string
82
+
83
+ fragment: FunctionFragment
84
+
85
+ getFragment(...args: ContractMethodArgs<A, S>): FunctionFragment
86
+
87
+ populateTransaction(...args: ContractMethodArgs<A, S>): Promise<ContractTransaction>
88
+ staticCall(...args: ContractMethodArgs<A, 'view'>): Promise<DefaultReturnType<R>>
89
+ send(...args: ContractMethodArgs<A, S>): Promise<ContractTransactionResponse>
90
+ estimateGas(...args: ContractMethodArgs<A, S>): Promise<bigint>
91
+ staticCallResult(...args: ContractMethodArgs<A, 'view'>): Promise<R>
92
+ }