@sentio/api 1.0.2-rc.27 → 1.0.2-rc.29
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.
- package/dist/src/apis/DebugAndSimulationApi.d.ts +17 -96
- package/dist/src/apis/DebugAndSimulationApi.js +17 -228
- package/dist/src/apis/DebugAndSimulationApi.js.map +1 -1
- package/dist/src/apis/ForksApi.d.ts +88 -9
- package/dist/src/apis/ForksApi.js +220 -9
- package/dist/src/apis/ForksApi.js.map +1 -1
- package/package.json +1 -1
- package/src/apis/DebugAndSimulationApi.ts +16 -398
- package/src/apis/ForksApi.ts +399 -8
package/src/apis/ForksApi.ts
CHANGED
|
@@ -15,15 +15,22 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime.js';
|
|
17
17
|
import type {
|
|
18
|
+
GoogleApiHttpBody,
|
|
18
19
|
SolidityServiceCreateForkResponse,
|
|
19
20
|
SolidityServiceForkServiceCreateForkBody,
|
|
20
21
|
SolidityServiceForkServiceUpdateForkBody,
|
|
21
22
|
SolidityServiceGetForkInfoResponse,
|
|
22
23
|
SolidityServiceGetForkResponse,
|
|
23
24
|
SolidityServiceListForksResponse,
|
|
25
|
+
SolidityServiceSimulateTransactionBundleResponse,
|
|
26
|
+
SolidityServiceSimulateTransactionResponse,
|
|
27
|
+
SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody,
|
|
28
|
+
SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody,
|
|
24
29
|
SolidityServiceUpdateForkResponse,
|
|
25
30
|
} from '../models/index.js';
|
|
26
31
|
import {
|
|
32
|
+
GoogleApiHttpBodyFromJSON,
|
|
33
|
+
GoogleApiHttpBodyToJSON,
|
|
27
34
|
SolidityServiceCreateForkResponseFromJSON,
|
|
28
35
|
SolidityServiceCreateForkResponseToJSON,
|
|
29
36
|
SolidityServiceForkServiceCreateForkBodyFromJSON,
|
|
@@ -36,6 +43,14 @@ import {
|
|
|
36
43
|
SolidityServiceGetForkResponseToJSON,
|
|
37
44
|
SolidityServiceListForksResponseFromJSON,
|
|
38
45
|
SolidityServiceListForksResponseToJSON,
|
|
46
|
+
SolidityServiceSimulateTransactionBundleResponseFromJSON,
|
|
47
|
+
SolidityServiceSimulateTransactionBundleResponseToJSON,
|
|
48
|
+
SolidityServiceSimulateTransactionResponseFromJSON,
|
|
49
|
+
SolidityServiceSimulateTransactionResponseToJSON,
|
|
50
|
+
SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBodyFromJSON,
|
|
51
|
+
SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBodyToJSON,
|
|
52
|
+
SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBodyFromJSON,
|
|
53
|
+
SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBodyToJSON,
|
|
39
54
|
SolidityServiceUpdateForkResponseFromJSON,
|
|
40
55
|
SolidityServiceUpdateForkResponseToJSON,
|
|
41
56
|
} from '../models/index.js';
|
|
@@ -52,6 +67,36 @@ export interface DeleteForkRequest {
|
|
|
52
67
|
id: string;
|
|
53
68
|
}
|
|
54
69
|
|
|
70
|
+
export interface GetCallTraceOnForkBundleRequest {
|
|
71
|
+
owner: string;
|
|
72
|
+
slug: string;
|
|
73
|
+
forkId: string;
|
|
74
|
+
bundleId: string;
|
|
75
|
+
withInternalCalls?: boolean;
|
|
76
|
+
disableOptimizer?: boolean;
|
|
77
|
+
ignoreGasCost?: boolean;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface GetCallTraceOnForkSimulationRequest {
|
|
81
|
+
owner: string;
|
|
82
|
+
slug: string;
|
|
83
|
+
forkId: string;
|
|
84
|
+
simulationId: string;
|
|
85
|
+
withInternalCalls?: boolean;
|
|
86
|
+
disableOptimizer?: boolean;
|
|
87
|
+
ignoreGasCost?: boolean;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface GetCallTraceOnForkTransactionRequest {
|
|
91
|
+
owner: string;
|
|
92
|
+
slug: string;
|
|
93
|
+
forkId: string;
|
|
94
|
+
txHash: string;
|
|
95
|
+
withInternalCalls?: boolean;
|
|
96
|
+
disableOptimizer?: boolean;
|
|
97
|
+
ignoreGasCost?: boolean;
|
|
98
|
+
}
|
|
99
|
+
|
|
55
100
|
export interface GetForkRequest {
|
|
56
101
|
owner: string;
|
|
57
102
|
slug: string;
|
|
@@ -69,6 +114,20 @@ export interface ListForksRequest {
|
|
|
69
114
|
slug: string;
|
|
70
115
|
}
|
|
71
116
|
|
|
117
|
+
export interface SimulateTransactionBundleOnForkRequest {
|
|
118
|
+
owner: string;
|
|
119
|
+
slug: string;
|
|
120
|
+
forkId: string;
|
|
121
|
+
body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface SimulateTransactionOnForkRequest {
|
|
125
|
+
owner: string;
|
|
126
|
+
slug: string;
|
|
127
|
+
forkId: string;
|
|
128
|
+
body: SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody;
|
|
129
|
+
}
|
|
130
|
+
|
|
72
131
|
export interface UpdateForkRequest {
|
|
73
132
|
owner: string;
|
|
74
133
|
slug: string;
|
|
@@ -136,7 +195,7 @@ export class ForksApi extends runtime.BaseAPI {
|
|
|
136
195
|
}
|
|
137
196
|
|
|
138
197
|
/**
|
|
139
|
-
* Delete
|
|
198
|
+
* Delete fork by id
|
|
140
199
|
*/
|
|
141
200
|
async deleteForkRaw(requestParameters: DeleteForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
|
142
201
|
if (requestParameters['owner'] == null) {
|
|
@@ -179,7 +238,7 @@ export class ForksApi extends runtime.BaseAPI {
|
|
|
179
238
|
}
|
|
180
239
|
|
|
181
240
|
/**
|
|
182
|
-
* Delete
|
|
241
|
+
* Delete fork by id
|
|
183
242
|
*/
|
|
184
243
|
async deleteFork(requestParameters: DeleteForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
|
185
244
|
const response = await this.deleteForkRaw(requestParameters, initOverrides);
|
|
@@ -187,7 +246,217 @@ export class ForksApi extends runtime.BaseAPI {
|
|
|
187
246
|
}
|
|
188
247
|
|
|
189
248
|
/**
|
|
190
|
-
* Get
|
|
249
|
+
* Get trace by bundle simulation
|
|
250
|
+
*/
|
|
251
|
+
async getCallTraceOnForkBundleRaw(requestParameters: GetCallTraceOnForkBundleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
|
|
252
|
+
if (requestParameters['owner'] == null) {
|
|
253
|
+
throw new runtime.RequiredError(
|
|
254
|
+
'owner',
|
|
255
|
+
'Required parameter "owner" was null or undefined when calling getCallTraceOnForkBundle().'
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if (requestParameters['slug'] == null) {
|
|
260
|
+
throw new runtime.RequiredError(
|
|
261
|
+
'slug',
|
|
262
|
+
'Required parameter "slug" was null or undefined when calling getCallTraceOnForkBundle().'
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
if (requestParameters['forkId'] == null) {
|
|
267
|
+
throw new runtime.RequiredError(
|
|
268
|
+
'forkId',
|
|
269
|
+
'Required parameter "forkId" was null or undefined when calling getCallTraceOnForkBundle().'
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
if (requestParameters['bundleId'] == null) {
|
|
274
|
+
throw new runtime.RequiredError(
|
|
275
|
+
'bundleId',
|
|
276
|
+
'Required parameter "bundleId" was null or undefined when calling getCallTraceOnForkBundle().'
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const queryParameters: any = {};
|
|
281
|
+
|
|
282
|
+
if (requestParameters['withInternalCalls'] != null) {
|
|
283
|
+
queryParameters['withInternalCalls'] = requestParameters['withInternalCalls'];
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
if (requestParameters['disableOptimizer'] != null) {
|
|
287
|
+
queryParameters['disableOptimizer'] = requestParameters['disableOptimizer'];
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
if (requestParameters['ignoreGasCost'] != null) {
|
|
291
|
+
queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost'];
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
295
|
+
|
|
296
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
297
|
+
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
const response = await this.request({
|
|
301
|
+
path: `/api/v1/solidity/{owner}/{slug}/fork/{forkId}/bundle/{bundleId}/call_trace`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"forkId"}}`, encodeURIComponent(String(requestParameters['forkId']))).replace(`{${"bundleId"}}`, encodeURIComponent(String(requestParameters['bundleId']))),
|
|
302
|
+
method: 'GET',
|
|
303
|
+
headers: headerParameters,
|
|
304
|
+
query: queryParameters,
|
|
305
|
+
}, initOverrides);
|
|
306
|
+
|
|
307
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue));
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Get trace by bundle simulation
|
|
312
|
+
*/
|
|
313
|
+
async getCallTraceOnForkBundle(requestParameters: GetCallTraceOnForkBundleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
|
|
314
|
+
const response = await this.getCallTraceOnForkBundleRaw(requestParameters, initOverrides);
|
|
315
|
+
return await response.value();
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Get trace by simulation
|
|
320
|
+
*/
|
|
321
|
+
async getCallTraceOnForkSimulationRaw(requestParameters: GetCallTraceOnForkSimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
|
|
322
|
+
if (requestParameters['owner'] == null) {
|
|
323
|
+
throw new runtime.RequiredError(
|
|
324
|
+
'owner',
|
|
325
|
+
'Required parameter "owner" was null or undefined when calling getCallTraceOnForkSimulation().'
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
if (requestParameters['slug'] == null) {
|
|
330
|
+
throw new runtime.RequiredError(
|
|
331
|
+
'slug',
|
|
332
|
+
'Required parameter "slug" was null or undefined when calling getCallTraceOnForkSimulation().'
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (requestParameters['forkId'] == null) {
|
|
337
|
+
throw new runtime.RequiredError(
|
|
338
|
+
'forkId',
|
|
339
|
+
'Required parameter "forkId" was null or undefined when calling getCallTraceOnForkSimulation().'
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
if (requestParameters['simulationId'] == null) {
|
|
344
|
+
throw new runtime.RequiredError(
|
|
345
|
+
'simulationId',
|
|
346
|
+
'Required parameter "simulationId" was null or undefined when calling getCallTraceOnForkSimulation().'
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
const queryParameters: any = {};
|
|
351
|
+
|
|
352
|
+
if (requestParameters['withInternalCalls'] != null) {
|
|
353
|
+
queryParameters['withInternalCalls'] = requestParameters['withInternalCalls'];
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
if (requestParameters['disableOptimizer'] != null) {
|
|
357
|
+
queryParameters['disableOptimizer'] = requestParameters['disableOptimizer'];
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
if (requestParameters['ignoreGasCost'] != null) {
|
|
361
|
+
queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost'];
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
365
|
+
|
|
366
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
367
|
+
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
const response = await this.request({
|
|
371
|
+
path: `/api/v1/solidity/{owner}/{slug}/fork/{forkId}/simulation/{simulationId}/call_trace`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"forkId"}}`, encodeURIComponent(String(requestParameters['forkId']))).replace(`{${"simulationId"}}`, encodeURIComponent(String(requestParameters['simulationId']))),
|
|
372
|
+
method: 'GET',
|
|
373
|
+
headers: headerParameters,
|
|
374
|
+
query: queryParameters,
|
|
375
|
+
}, initOverrides);
|
|
376
|
+
|
|
377
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue));
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Get trace by simulation
|
|
382
|
+
*/
|
|
383
|
+
async getCallTraceOnForkSimulation(requestParameters: GetCallTraceOnForkSimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
|
|
384
|
+
const response = await this.getCallTraceOnForkSimulationRaw(requestParameters, initOverrides);
|
|
385
|
+
return await response.value();
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Get trace by transaction
|
|
390
|
+
*/
|
|
391
|
+
async getCallTraceOnForkTransactionRaw(requestParameters: GetCallTraceOnForkTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
|
|
392
|
+
if (requestParameters['owner'] == null) {
|
|
393
|
+
throw new runtime.RequiredError(
|
|
394
|
+
'owner',
|
|
395
|
+
'Required parameter "owner" was null or undefined when calling getCallTraceOnForkTransaction().'
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
if (requestParameters['slug'] == null) {
|
|
400
|
+
throw new runtime.RequiredError(
|
|
401
|
+
'slug',
|
|
402
|
+
'Required parameter "slug" was null or undefined when calling getCallTraceOnForkTransaction().'
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
if (requestParameters['forkId'] == null) {
|
|
407
|
+
throw new runtime.RequiredError(
|
|
408
|
+
'forkId',
|
|
409
|
+
'Required parameter "forkId" was null or undefined when calling getCallTraceOnForkTransaction().'
|
|
410
|
+
);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
if (requestParameters['txHash'] == null) {
|
|
414
|
+
throw new runtime.RequiredError(
|
|
415
|
+
'txHash',
|
|
416
|
+
'Required parameter "txHash" was null or undefined when calling getCallTraceOnForkTransaction().'
|
|
417
|
+
);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
const queryParameters: any = {};
|
|
421
|
+
|
|
422
|
+
if (requestParameters['withInternalCalls'] != null) {
|
|
423
|
+
queryParameters['withInternalCalls'] = requestParameters['withInternalCalls'];
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
if (requestParameters['disableOptimizer'] != null) {
|
|
427
|
+
queryParameters['disableOptimizer'] = requestParameters['disableOptimizer'];
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
if (requestParameters['ignoreGasCost'] != null) {
|
|
431
|
+
queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost'];
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
435
|
+
|
|
436
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
437
|
+
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
const response = await this.request({
|
|
441
|
+
path: `/api/v1/solidity/{owner}/{slug}/fork/{forkId}/transaction/{txHash}/call_trace`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"forkId"}}`, encodeURIComponent(String(requestParameters['forkId']))).replace(`{${"txHash"}}`, encodeURIComponent(String(requestParameters['txHash']))),
|
|
442
|
+
method: 'GET',
|
|
443
|
+
headers: headerParameters,
|
|
444
|
+
query: queryParameters,
|
|
445
|
+
}, initOverrides);
|
|
446
|
+
|
|
447
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue));
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Get trace by transaction
|
|
452
|
+
*/
|
|
453
|
+
async getCallTraceOnForkTransaction(requestParameters: GetCallTraceOnForkTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
|
|
454
|
+
const response = await this.getCallTraceOnForkTransactionRaw(requestParameters, initOverrides);
|
|
455
|
+
return await response.value();
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Get fork by id
|
|
191
460
|
*/
|
|
192
461
|
async getForkRaw(requestParameters: GetForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceGetForkResponse>> {
|
|
193
462
|
if (requestParameters['owner'] == null) {
|
|
@@ -230,7 +499,7 @@ export class ForksApi extends runtime.BaseAPI {
|
|
|
230
499
|
}
|
|
231
500
|
|
|
232
501
|
/**
|
|
233
|
-
* Get
|
|
502
|
+
* Get fork by id
|
|
234
503
|
*/
|
|
235
504
|
async getFork(requestParameters: GetForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceGetForkResponse> {
|
|
236
505
|
const response = await this.getForkRaw(requestParameters, initOverrides);
|
|
@@ -289,7 +558,7 @@ export class ForksApi extends runtime.BaseAPI {
|
|
|
289
558
|
}
|
|
290
559
|
|
|
291
560
|
/**
|
|
292
|
-
* List all forks
|
|
561
|
+
* List all forks
|
|
293
562
|
*/
|
|
294
563
|
async listForksRaw(requestParameters: ListForksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceListForksResponse>> {
|
|
295
564
|
if (requestParameters['owner'] == null) {
|
|
@@ -325,7 +594,7 @@ export class ForksApi extends runtime.BaseAPI {
|
|
|
325
594
|
}
|
|
326
595
|
|
|
327
596
|
/**
|
|
328
|
-
* List all forks
|
|
597
|
+
* List all forks
|
|
329
598
|
*/
|
|
330
599
|
async listForks(requestParameters: ListForksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceListForksResponse> {
|
|
331
600
|
const response = await this.listForksRaw(requestParameters, initOverrides);
|
|
@@ -333,7 +602,129 @@ export class ForksApi extends runtime.BaseAPI {
|
|
|
333
602
|
}
|
|
334
603
|
|
|
335
604
|
/**
|
|
336
|
-
*
|
|
605
|
+
* Run bundle simulation
|
|
606
|
+
*/
|
|
607
|
+
async simulateTransactionBundleOnForkRaw(requestParameters: SimulateTransactionBundleOnForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceSimulateTransactionBundleResponse>> {
|
|
608
|
+
if (requestParameters['owner'] == null) {
|
|
609
|
+
throw new runtime.RequiredError(
|
|
610
|
+
'owner',
|
|
611
|
+
'Required parameter "owner" was null or undefined when calling simulateTransactionBundleOnFork().'
|
|
612
|
+
);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
if (requestParameters['slug'] == null) {
|
|
616
|
+
throw new runtime.RequiredError(
|
|
617
|
+
'slug',
|
|
618
|
+
'Required parameter "slug" was null or undefined when calling simulateTransactionBundleOnFork().'
|
|
619
|
+
);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
if (requestParameters['forkId'] == null) {
|
|
623
|
+
throw new runtime.RequiredError(
|
|
624
|
+
'forkId',
|
|
625
|
+
'Required parameter "forkId" was null or undefined when calling simulateTransactionBundleOnFork().'
|
|
626
|
+
);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
if (requestParameters['body'] == null) {
|
|
630
|
+
throw new runtime.RequiredError(
|
|
631
|
+
'body',
|
|
632
|
+
'Required parameter "body" was null or undefined when calling simulateTransactionBundleOnFork().'
|
|
633
|
+
);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
const queryParameters: any = {};
|
|
637
|
+
|
|
638
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
639
|
+
|
|
640
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
641
|
+
|
|
642
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
643
|
+
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
const response = await this.request({
|
|
647
|
+
path: `/api/v1/solidity/{owner}/{slug}/fork/{forkId}/simulation_bundle`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"forkId"}}`, encodeURIComponent(String(requestParameters['forkId']))),
|
|
648
|
+
method: 'POST',
|
|
649
|
+
headers: headerParameters,
|
|
650
|
+
query: queryParameters,
|
|
651
|
+
body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBodyToJSON(requestParameters['body']),
|
|
652
|
+
}, initOverrides);
|
|
653
|
+
|
|
654
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceSimulateTransactionBundleResponseFromJSON(jsonValue));
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Run bundle simulation
|
|
659
|
+
*/
|
|
660
|
+
async simulateTransactionBundleOnFork(requestParameters: SimulateTransactionBundleOnForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceSimulateTransactionBundleResponse> {
|
|
661
|
+
const response = await this.simulateTransactionBundleOnForkRaw(requestParameters, initOverrides);
|
|
662
|
+
return await response.value();
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Run Simulation
|
|
667
|
+
*/
|
|
668
|
+
async simulateTransactionOnForkRaw(requestParameters: SimulateTransactionOnForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceSimulateTransactionResponse>> {
|
|
669
|
+
if (requestParameters['owner'] == null) {
|
|
670
|
+
throw new runtime.RequiredError(
|
|
671
|
+
'owner',
|
|
672
|
+
'Required parameter "owner" was null or undefined when calling simulateTransactionOnFork().'
|
|
673
|
+
);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
if (requestParameters['slug'] == null) {
|
|
677
|
+
throw new runtime.RequiredError(
|
|
678
|
+
'slug',
|
|
679
|
+
'Required parameter "slug" was null or undefined when calling simulateTransactionOnFork().'
|
|
680
|
+
);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
if (requestParameters['forkId'] == null) {
|
|
684
|
+
throw new runtime.RequiredError(
|
|
685
|
+
'forkId',
|
|
686
|
+
'Required parameter "forkId" was null or undefined when calling simulateTransactionOnFork().'
|
|
687
|
+
);
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
if (requestParameters['body'] == null) {
|
|
691
|
+
throw new runtime.RequiredError(
|
|
692
|
+
'body',
|
|
693
|
+
'Required parameter "body" was null or undefined when calling simulateTransactionOnFork().'
|
|
694
|
+
);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
const queryParameters: any = {};
|
|
698
|
+
|
|
699
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
700
|
+
|
|
701
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
702
|
+
|
|
703
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
704
|
+
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
const response = await this.request({
|
|
708
|
+
path: `/api/v1/solidity/{owner}/{slug}/fork/{forkId}/simulation`.replace(`{${"owner"}}`, encodeURIComponent(String(requestParameters['owner']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"forkId"}}`, encodeURIComponent(String(requestParameters['forkId']))),
|
|
709
|
+
method: 'POST',
|
|
710
|
+
headers: headerParameters,
|
|
711
|
+
query: queryParameters,
|
|
712
|
+
body: SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBodyToJSON(requestParameters['body']),
|
|
713
|
+
}, initOverrides);
|
|
714
|
+
|
|
715
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceSimulateTransactionResponseFromJSON(jsonValue));
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* Run Simulation
|
|
720
|
+
*/
|
|
721
|
+
async simulateTransactionOnFork(requestParameters: SimulateTransactionOnForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceSimulateTransactionResponse> {
|
|
722
|
+
const response = await this.simulateTransactionOnForkRaw(requestParameters, initOverrides);
|
|
723
|
+
return await response.value();
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Update fork by id
|
|
337
728
|
*/
|
|
338
729
|
async updateForkRaw(requestParameters: UpdateForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceUpdateForkResponse>> {
|
|
339
730
|
if (requestParameters['owner'] == null) {
|
|
@@ -386,7 +777,7 @@ export class ForksApi extends runtime.BaseAPI {
|
|
|
386
777
|
}
|
|
387
778
|
|
|
388
779
|
/**
|
|
389
|
-
* Update
|
|
780
|
+
* Update fork by id
|
|
390
781
|
*/
|
|
391
782
|
async updateFork(requestParameters: UpdateForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceUpdateForkResponse> {
|
|
392
783
|
const response = await this.updateForkRaw(requestParameters, initOverrides);
|