@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
|
@@ -23,8 +23,6 @@ import type {
|
|
|
23
23
|
SolidityServiceSimulateTransactionResponse,
|
|
24
24
|
SolidityServiceSolidityAPIServiceSimulateTransactionBody,
|
|
25
25
|
SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody,
|
|
26
|
-
SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody,
|
|
27
|
-
SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody,
|
|
28
26
|
TxindexEvmSearchTransactionsResponse,
|
|
29
27
|
} from '../models/index.js';
|
|
30
28
|
import {
|
|
@@ -44,10 +42,6 @@ import {
|
|
|
44
42
|
SolidityServiceSolidityAPIServiceSimulateTransactionBodyToJSON,
|
|
45
43
|
SolidityServiceSolidityAPIServiceSimulateTransactionBundleBodyFromJSON,
|
|
46
44
|
SolidityServiceSolidityAPIServiceSimulateTransactionBundleBodyToJSON,
|
|
47
|
-
SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBodyFromJSON,
|
|
48
|
-
SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBodyToJSON,
|
|
49
|
-
SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBodyFromJSON,
|
|
50
|
-
SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBodyToJSON,
|
|
51
45
|
TxindexEvmSearchTransactionsResponseFromJSON,
|
|
52
46
|
TxindexEvmSearchTransactionsResponseToJSON,
|
|
53
47
|
} from '../models/index.js';
|
|
@@ -82,36 +76,6 @@ export interface GetCallTraceByTransactionRequest {
|
|
|
82
76
|
ignoreGasCost?: boolean;
|
|
83
77
|
}
|
|
84
78
|
|
|
85
|
-
export interface GetCallTraceOnForkBundleRequest {
|
|
86
|
-
owner: string;
|
|
87
|
-
slug: string;
|
|
88
|
-
forkId: string;
|
|
89
|
-
bundleId: string;
|
|
90
|
-
withInternalCalls?: boolean;
|
|
91
|
-
disableOptimizer?: boolean;
|
|
92
|
-
ignoreGasCost?: boolean;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface GetCallTraceOnForkSimulationRequest {
|
|
96
|
-
owner: string;
|
|
97
|
-
slug: string;
|
|
98
|
-
forkId: string;
|
|
99
|
-
simulationId: string;
|
|
100
|
-
withInternalCalls?: boolean;
|
|
101
|
-
disableOptimizer?: boolean;
|
|
102
|
-
ignoreGasCost?: boolean;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export interface GetCallTraceOnForkTransactionRequest {
|
|
106
|
-
owner: string;
|
|
107
|
-
slug: string;
|
|
108
|
-
forkId: string;
|
|
109
|
-
txHash: string;
|
|
110
|
-
withInternalCalls?: boolean;
|
|
111
|
-
disableOptimizer?: boolean;
|
|
112
|
-
ignoreGasCost?: boolean;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
79
|
export interface GetSimulationRequest {
|
|
116
80
|
owner: string;
|
|
117
81
|
slug: string;
|
|
@@ -165,27 +129,13 @@ export interface SimulateTransactionBundleRequest {
|
|
|
165
129
|
body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody;
|
|
166
130
|
}
|
|
167
131
|
|
|
168
|
-
export interface SimulateTransactionBundleOnForkRequest {
|
|
169
|
-
owner: string;
|
|
170
|
-
slug: string;
|
|
171
|
-
forkId: string;
|
|
172
|
-
body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBody;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
export interface SimulateTransactionOnForkRequest {
|
|
176
|
-
owner: string;
|
|
177
|
-
slug: string;
|
|
178
|
-
forkId: string;
|
|
179
|
-
body: SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBody;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
132
|
/**
|
|
183
133
|
*
|
|
184
134
|
*/
|
|
185
135
|
export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
186
136
|
|
|
187
137
|
/**
|
|
188
|
-
* Get
|
|
138
|
+
* Get trace by bundle simulation
|
|
189
139
|
*/
|
|
190
140
|
async getCallTraceByBundleRaw(requestParameters: GetCallTraceByBundleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
|
|
191
141
|
if (requestParameters['owner'] == null) {
|
|
@@ -247,7 +197,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
247
197
|
}
|
|
248
198
|
|
|
249
199
|
/**
|
|
250
|
-
* Get
|
|
200
|
+
* Get trace by bundle simulation
|
|
251
201
|
*/
|
|
252
202
|
async getCallTraceByBundle(requestParameters: GetCallTraceByBundleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
|
|
253
203
|
const response = await this.getCallTraceByBundleRaw(requestParameters, initOverrides);
|
|
@@ -255,7 +205,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
255
205
|
}
|
|
256
206
|
|
|
257
207
|
/**
|
|
258
|
-
* Get
|
|
208
|
+
* Get trace by simulation
|
|
259
209
|
*/
|
|
260
210
|
async getCallTraceBySimulationRaw(requestParameters: GetCallTraceBySimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
|
|
261
211
|
if (requestParameters['owner'] == null) {
|
|
@@ -317,7 +267,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
317
267
|
}
|
|
318
268
|
|
|
319
269
|
/**
|
|
320
|
-
* Get
|
|
270
|
+
* Get trace by simulation
|
|
321
271
|
*/
|
|
322
272
|
async getCallTraceBySimulation(requestParameters: GetCallTraceBySimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
|
|
323
273
|
const response = await this.getCallTraceBySimulationRaw(requestParameters, initOverrides);
|
|
@@ -326,7 +276,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
326
276
|
|
|
327
277
|
/**
|
|
328
278
|
* API to get Sentio call trace. It takes `txId.txHash` and `chainSpec.chainId` arguments, where the first is transaction hash, and the second is the numeric ethereum chain ID. The results looks very similar to the normal [Ethereum call trace](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png). But we have an additional `startIndex` and `startIndex` on each trace entry even for the LOG, representing the execution order in the trace. This allows you to build chart that marks the order of fund flow. %20(1)%20(1)%20(1).png)
|
|
329
|
-
* Get
|
|
279
|
+
* Get trace by transaction
|
|
330
280
|
*/
|
|
331
281
|
async getCallTraceByTransactionRaw(requestParameters: GetCallTraceByTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
|
|
332
282
|
if (requestParameters['owner'] == null) {
|
|
@@ -389,7 +339,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
389
339
|
|
|
390
340
|
/**
|
|
391
341
|
* API to get Sentio call trace. It takes `txId.txHash` and `chainSpec.chainId` arguments, where the first is transaction hash, and the second is the numeric ethereum chain ID. The results looks very similar to the normal [Ethereum call trace](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png). But we have an additional `startIndex` and `startIndex` on each trace entry even for the LOG, representing the execution order in the trace. This allows you to build chart that marks the order of fund flow. %20(1)%20(1)%20(1).png)
|
|
392
|
-
* Get
|
|
342
|
+
* Get trace by transaction
|
|
393
343
|
*/
|
|
394
344
|
async getCallTraceByTransaction(requestParameters: GetCallTraceByTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
|
|
395
345
|
const response = await this.getCallTraceByTransactionRaw(requestParameters, initOverrides);
|
|
@@ -397,217 +347,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
397
347
|
}
|
|
398
348
|
|
|
399
349
|
/**
|
|
400
|
-
* Get
|
|
401
|
-
*/
|
|
402
|
-
async getCallTraceOnForkBundleRaw(requestParameters: GetCallTraceOnForkBundleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
|
|
403
|
-
if (requestParameters['owner'] == null) {
|
|
404
|
-
throw new runtime.RequiredError(
|
|
405
|
-
'owner',
|
|
406
|
-
'Required parameter "owner" was null or undefined when calling getCallTraceOnForkBundle().'
|
|
407
|
-
);
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
if (requestParameters['slug'] == null) {
|
|
411
|
-
throw new runtime.RequiredError(
|
|
412
|
-
'slug',
|
|
413
|
-
'Required parameter "slug" was null or undefined when calling getCallTraceOnForkBundle().'
|
|
414
|
-
);
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
if (requestParameters['forkId'] == null) {
|
|
418
|
-
throw new runtime.RequiredError(
|
|
419
|
-
'forkId',
|
|
420
|
-
'Required parameter "forkId" was null or undefined when calling getCallTraceOnForkBundle().'
|
|
421
|
-
);
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
if (requestParameters['bundleId'] == null) {
|
|
425
|
-
throw new runtime.RequiredError(
|
|
426
|
-
'bundleId',
|
|
427
|
-
'Required parameter "bundleId" was null or undefined when calling getCallTraceOnForkBundle().'
|
|
428
|
-
);
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
const queryParameters: any = {};
|
|
432
|
-
|
|
433
|
-
if (requestParameters['withInternalCalls'] != null) {
|
|
434
|
-
queryParameters['withInternalCalls'] = requestParameters['withInternalCalls'];
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
if (requestParameters['disableOptimizer'] != null) {
|
|
438
|
-
queryParameters['disableOptimizer'] = requestParameters['disableOptimizer'];
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
if (requestParameters['ignoreGasCost'] != null) {
|
|
442
|
-
queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost'];
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
446
|
-
|
|
447
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
448
|
-
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
const response = await this.request({
|
|
452
|
-
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']))),
|
|
453
|
-
method: 'GET',
|
|
454
|
-
headers: headerParameters,
|
|
455
|
-
query: queryParameters,
|
|
456
|
-
}, initOverrides);
|
|
457
|
-
|
|
458
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue));
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
* Get Call Trace by Bundle Simulation on Fork
|
|
463
|
-
*/
|
|
464
|
-
async getCallTraceOnForkBundle(requestParameters: GetCallTraceOnForkBundleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
|
|
465
|
-
const response = await this.getCallTraceOnForkBundleRaw(requestParameters, initOverrides);
|
|
466
|
-
return await response.value();
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* Get Call Trace by Simulation on Fork
|
|
471
|
-
*/
|
|
472
|
-
async getCallTraceOnForkSimulationRaw(requestParameters: GetCallTraceOnForkSimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
|
|
473
|
-
if (requestParameters['owner'] == null) {
|
|
474
|
-
throw new runtime.RequiredError(
|
|
475
|
-
'owner',
|
|
476
|
-
'Required parameter "owner" was null or undefined when calling getCallTraceOnForkSimulation().'
|
|
477
|
-
);
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
if (requestParameters['slug'] == null) {
|
|
481
|
-
throw new runtime.RequiredError(
|
|
482
|
-
'slug',
|
|
483
|
-
'Required parameter "slug" was null or undefined when calling getCallTraceOnForkSimulation().'
|
|
484
|
-
);
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
if (requestParameters['forkId'] == null) {
|
|
488
|
-
throw new runtime.RequiredError(
|
|
489
|
-
'forkId',
|
|
490
|
-
'Required parameter "forkId" was null or undefined when calling getCallTraceOnForkSimulation().'
|
|
491
|
-
);
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
if (requestParameters['simulationId'] == null) {
|
|
495
|
-
throw new runtime.RequiredError(
|
|
496
|
-
'simulationId',
|
|
497
|
-
'Required parameter "simulationId" was null or undefined when calling getCallTraceOnForkSimulation().'
|
|
498
|
-
);
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
const queryParameters: any = {};
|
|
502
|
-
|
|
503
|
-
if (requestParameters['withInternalCalls'] != null) {
|
|
504
|
-
queryParameters['withInternalCalls'] = requestParameters['withInternalCalls'];
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
if (requestParameters['disableOptimizer'] != null) {
|
|
508
|
-
queryParameters['disableOptimizer'] = requestParameters['disableOptimizer'];
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
if (requestParameters['ignoreGasCost'] != null) {
|
|
512
|
-
queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost'];
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
516
|
-
|
|
517
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
518
|
-
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
const response = await this.request({
|
|
522
|
-
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']))),
|
|
523
|
-
method: 'GET',
|
|
524
|
-
headers: headerParameters,
|
|
525
|
-
query: queryParameters,
|
|
526
|
-
}, initOverrides);
|
|
527
|
-
|
|
528
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue));
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
/**
|
|
532
|
-
* Get Call Trace by Simulation on Fork
|
|
533
|
-
*/
|
|
534
|
-
async getCallTraceOnForkSimulation(requestParameters: GetCallTraceOnForkSimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
|
|
535
|
-
const response = await this.getCallTraceOnForkSimulationRaw(requestParameters, initOverrides);
|
|
536
|
-
return await response.value();
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
* Get Call Trace by Transaction on Fork
|
|
541
|
-
*/
|
|
542
|
-
async getCallTraceOnForkTransactionRaw(requestParameters: GetCallTraceOnForkTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
|
|
543
|
-
if (requestParameters['owner'] == null) {
|
|
544
|
-
throw new runtime.RequiredError(
|
|
545
|
-
'owner',
|
|
546
|
-
'Required parameter "owner" was null or undefined when calling getCallTraceOnForkTransaction().'
|
|
547
|
-
);
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
if (requestParameters['slug'] == null) {
|
|
551
|
-
throw new runtime.RequiredError(
|
|
552
|
-
'slug',
|
|
553
|
-
'Required parameter "slug" was null or undefined when calling getCallTraceOnForkTransaction().'
|
|
554
|
-
);
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
if (requestParameters['forkId'] == null) {
|
|
558
|
-
throw new runtime.RequiredError(
|
|
559
|
-
'forkId',
|
|
560
|
-
'Required parameter "forkId" was null or undefined when calling getCallTraceOnForkTransaction().'
|
|
561
|
-
);
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
if (requestParameters['txHash'] == null) {
|
|
565
|
-
throw new runtime.RequiredError(
|
|
566
|
-
'txHash',
|
|
567
|
-
'Required parameter "txHash" was null or undefined when calling getCallTraceOnForkTransaction().'
|
|
568
|
-
);
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
const queryParameters: any = {};
|
|
572
|
-
|
|
573
|
-
if (requestParameters['withInternalCalls'] != null) {
|
|
574
|
-
queryParameters['withInternalCalls'] = requestParameters['withInternalCalls'];
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
if (requestParameters['disableOptimizer'] != null) {
|
|
578
|
-
queryParameters['disableOptimizer'] = requestParameters['disableOptimizer'];
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
if (requestParameters['ignoreGasCost'] != null) {
|
|
582
|
-
queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost'];
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
586
|
-
|
|
587
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
588
|
-
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
const response = await this.request({
|
|
592
|
-
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']))),
|
|
593
|
-
method: 'GET',
|
|
594
|
-
headers: headerParameters,
|
|
595
|
-
query: queryParameters,
|
|
596
|
-
}, initOverrides);
|
|
597
|
-
|
|
598
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue));
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* Get Call Trace by Transaction on Fork
|
|
603
|
-
*/
|
|
604
|
-
async getCallTraceOnForkTransaction(requestParameters: GetCallTraceOnForkTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
|
|
605
|
-
const response = await this.getCallTraceOnForkTransactionRaw(requestParameters, initOverrides);
|
|
606
|
-
return await response.value();
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
/**
|
|
610
|
-
* Get Simulation by ID
|
|
350
|
+
* Get simulation by ID
|
|
611
351
|
*/
|
|
612
352
|
async getSimulationRaw(requestParameters: GetSimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceGetSimulationResponse>> {
|
|
613
353
|
if (requestParameters['owner'] == null) {
|
|
@@ -650,7 +390,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
650
390
|
}
|
|
651
391
|
|
|
652
392
|
/**
|
|
653
|
-
* Get
|
|
393
|
+
* Get simulation by ID
|
|
654
394
|
*/
|
|
655
395
|
async getSimulation(requestParameters: GetSimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceGetSimulationResponse> {
|
|
656
396
|
const response = await this.getSimulationRaw(requestParameters, initOverrides);
|
|
@@ -658,7 +398,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
658
398
|
}
|
|
659
399
|
|
|
660
400
|
/**
|
|
661
|
-
* Get
|
|
401
|
+
* Get bundle simulation by ID
|
|
662
402
|
*/
|
|
663
403
|
async getSimulationBundleInProjectRaw(requestParameters: GetSimulationBundleInProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceGetSimulationBundleResponse>> {
|
|
664
404
|
if (requestParameters['owner'] == null) {
|
|
@@ -701,7 +441,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
701
441
|
}
|
|
702
442
|
|
|
703
443
|
/**
|
|
704
|
-
* Get
|
|
444
|
+
* Get bundle simulation by ID
|
|
705
445
|
*/
|
|
706
446
|
async getSimulationBundleInProject(requestParameters: GetSimulationBundleInProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceGetSimulationBundleResponse> {
|
|
707
447
|
const response = await this.getSimulationBundleInProjectRaw(requestParameters, initOverrides);
|
|
@@ -709,7 +449,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
709
449
|
}
|
|
710
450
|
|
|
711
451
|
/**
|
|
712
|
-
* Get
|
|
452
|
+
* Get list of simulations
|
|
713
453
|
*/
|
|
714
454
|
async getSimulationsRaw(requestParameters: GetSimulationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceGetSimulationsResponse>> {
|
|
715
455
|
if (requestParameters['owner'] == null) {
|
|
@@ -757,7 +497,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
757
497
|
}
|
|
758
498
|
|
|
759
499
|
/**
|
|
760
|
-
* Get
|
|
500
|
+
* Get list of simulations
|
|
761
501
|
*/
|
|
762
502
|
async getSimulations(requestParameters: GetSimulationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceGetSimulationsResponse> {
|
|
763
503
|
const response = await this.getSimulationsRaw(requestParameters, initOverrides);
|
|
@@ -866,7 +606,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
866
606
|
|
|
867
607
|
/**
|
|
868
608
|
* Create a new transaction simulation. The simulation body should be included in the request body. Your simulations will be saved, and a unique ID for each simulation is included in the response. It will be useful for fetching simulation details.
|
|
869
|
-
* Run
|
|
609
|
+
* Run simulation
|
|
870
610
|
*/
|
|
871
611
|
async simulateTransactionRaw(requestParameters: SimulateTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceSimulateTransactionResponse>> {
|
|
872
612
|
if (requestParameters['owner'] == null) {
|
|
@@ -920,7 +660,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
920
660
|
|
|
921
661
|
/**
|
|
922
662
|
* Create a new transaction simulation. The simulation body should be included in the request body. Your simulations will be saved, and a unique ID for each simulation is included in the response. It will be useful for fetching simulation details.
|
|
923
|
-
* Run
|
|
663
|
+
* Run simulation
|
|
924
664
|
*/
|
|
925
665
|
async simulateTransaction(requestParameters: SimulateTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceSimulateTransactionResponse> {
|
|
926
666
|
const response = await this.simulateTransactionRaw(requestParameters, initOverrides);
|
|
@@ -929,7 +669,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
929
669
|
|
|
930
670
|
/**
|
|
931
671
|
* You could also create bundle simulations so that one transaction could be executed one after another. For `blockNumber` `transactionIndex` `networkId` `stateOverrides` and `blockOverrides` fields, only the first simulation takes effect.
|
|
932
|
-
* Run
|
|
672
|
+
* Run bundle simulation
|
|
933
673
|
*/
|
|
934
674
|
async simulateTransactionBundleRaw(requestParameters: SimulateTransactionBundleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceSimulateTransactionBundleResponse>> {
|
|
935
675
|
if (requestParameters['owner'] == null) {
|
|
@@ -983,133 +723,11 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
983
723
|
|
|
984
724
|
/**
|
|
985
725
|
* You could also create bundle simulations so that one transaction could be executed one after another. For `blockNumber` `transactionIndex` `networkId` `stateOverrides` and `blockOverrides` fields, only the first simulation takes effect.
|
|
986
|
-
* Run
|
|
726
|
+
* Run bundle simulation
|
|
987
727
|
*/
|
|
988
728
|
async simulateTransactionBundle(requestParameters: SimulateTransactionBundleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceSimulateTransactionBundleResponse> {
|
|
989
729
|
const response = await this.simulateTransactionBundleRaw(requestParameters, initOverrides);
|
|
990
730
|
return await response.value();
|
|
991
731
|
}
|
|
992
732
|
|
|
993
|
-
/**
|
|
994
|
-
* Run Bundle simulation on Fork
|
|
995
|
-
*/
|
|
996
|
-
async simulateTransactionBundleOnForkRaw(requestParameters: SimulateTransactionBundleOnForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceSimulateTransactionBundleResponse>> {
|
|
997
|
-
if (requestParameters['owner'] == null) {
|
|
998
|
-
throw new runtime.RequiredError(
|
|
999
|
-
'owner',
|
|
1000
|
-
'Required parameter "owner" was null or undefined when calling simulateTransactionBundleOnFork().'
|
|
1001
|
-
);
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
if (requestParameters['slug'] == null) {
|
|
1005
|
-
throw new runtime.RequiredError(
|
|
1006
|
-
'slug',
|
|
1007
|
-
'Required parameter "slug" was null or undefined when calling simulateTransactionBundleOnFork().'
|
|
1008
|
-
);
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
if (requestParameters['forkId'] == null) {
|
|
1012
|
-
throw new runtime.RequiredError(
|
|
1013
|
-
'forkId',
|
|
1014
|
-
'Required parameter "forkId" was null or undefined when calling simulateTransactionBundleOnFork().'
|
|
1015
|
-
);
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
if (requestParameters['body'] == null) {
|
|
1019
|
-
throw new runtime.RequiredError(
|
|
1020
|
-
'body',
|
|
1021
|
-
'Required parameter "body" was null or undefined when calling simulateTransactionBundleOnFork().'
|
|
1022
|
-
);
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
const queryParameters: any = {};
|
|
1026
|
-
|
|
1027
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
1028
|
-
|
|
1029
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
1030
|
-
|
|
1031
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
1032
|
-
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
const response = await this.request({
|
|
1036
|
-
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']))),
|
|
1037
|
-
method: 'POST',
|
|
1038
|
-
headers: headerParameters,
|
|
1039
|
-
query: queryParameters,
|
|
1040
|
-
body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleOnForkBodyToJSON(requestParameters['body']),
|
|
1041
|
-
}, initOverrides);
|
|
1042
|
-
|
|
1043
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceSimulateTransactionBundleResponseFromJSON(jsonValue));
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
/**
|
|
1047
|
-
* Run Bundle simulation on Fork
|
|
1048
|
-
*/
|
|
1049
|
-
async simulateTransactionBundleOnFork(requestParameters: SimulateTransactionBundleOnForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceSimulateTransactionBundleResponse> {
|
|
1050
|
-
const response = await this.simulateTransactionBundleOnForkRaw(requestParameters, initOverrides);
|
|
1051
|
-
return await response.value();
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
/**
|
|
1055
|
-
* Run Simulation on Fork
|
|
1056
|
-
*/
|
|
1057
|
-
async simulateTransactionOnForkRaw(requestParameters: SimulateTransactionOnForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceSimulateTransactionResponse>> {
|
|
1058
|
-
if (requestParameters['owner'] == null) {
|
|
1059
|
-
throw new runtime.RequiredError(
|
|
1060
|
-
'owner',
|
|
1061
|
-
'Required parameter "owner" was null or undefined when calling simulateTransactionOnFork().'
|
|
1062
|
-
);
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
if (requestParameters['slug'] == null) {
|
|
1066
|
-
throw new runtime.RequiredError(
|
|
1067
|
-
'slug',
|
|
1068
|
-
'Required parameter "slug" was null or undefined when calling simulateTransactionOnFork().'
|
|
1069
|
-
);
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
if (requestParameters['forkId'] == null) {
|
|
1073
|
-
throw new runtime.RequiredError(
|
|
1074
|
-
'forkId',
|
|
1075
|
-
'Required parameter "forkId" was null or undefined when calling simulateTransactionOnFork().'
|
|
1076
|
-
);
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
if (requestParameters['body'] == null) {
|
|
1080
|
-
throw new runtime.RequiredError(
|
|
1081
|
-
'body',
|
|
1082
|
-
'Required parameter "body" was null or undefined when calling simulateTransactionOnFork().'
|
|
1083
|
-
);
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
const queryParameters: any = {};
|
|
1087
|
-
|
|
1088
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
1089
|
-
|
|
1090
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
1091
|
-
|
|
1092
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
1093
|
-
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
const response = await this.request({
|
|
1097
|
-
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']))),
|
|
1098
|
-
method: 'POST',
|
|
1099
|
-
headers: headerParameters,
|
|
1100
|
-
query: queryParameters,
|
|
1101
|
-
body: SolidityServiceSolidityAPIServiceSimulateTransactionOnForkBodyToJSON(requestParameters['body']),
|
|
1102
|
-
}, initOverrides);
|
|
1103
|
-
|
|
1104
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceSimulateTransactionResponseFromJSON(jsonValue));
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
/**
|
|
1108
|
-
* Run Simulation on Fork
|
|
1109
|
-
*/
|
|
1110
|
-
async simulateTransactionOnFork(requestParameters: SimulateTransactionOnForkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceSimulateTransactionResponse> {
|
|
1111
|
-
const response = await this.simulateTransactionOnForkRaw(requestParameters, initOverrides);
|
|
1112
|
-
return await response.value();
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
733
|
}
|