@sentio/api 1.0.2-rc.17 → 1.0.2-rc.19
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 +168 -19
- package/dist/src/apis/DebugAndSimulationApi.js +424 -43
- package/dist/src/apis/DebugAndSimulationApi.js.map +1 -1
- package/dist/src/apis/DefaultApi.d.ts +31 -0
- package/dist/src/apis/DefaultApi.js +54 -0
- package/dist/src/apis/DefaultApi.js.map +1 -0
- package/dist/src/apis/ForksApi.d.ts +84 -0
- package/dist/src/apis/ForksApi.js +211 -0
- package/dist/src/apis/ForksApi.js.map +1 -0
- package/dist/src/apis/index.d.ts +2 -0
- package/dist/src/apis/index.js +2 -0
- package/dist/src/apis/index.js.map +1 -1
- package/dist/src/models/SolidityServiceBaseChainConfig.d.ts +3 -2
- package/dist/src/models/SolidityServiceBaseChainConfig.js +3 -2
- package/dist/src/models/SolidityServiceBaseChainConfig.js.map +1 -1
- package/dist/src/models/SolidityServiceCreateForkResponse.d.ts +33 -0
- package/dist/src/models/SolidityServiceCreateForkResponse.js +43 -0
- package/dist/src/models/SolidityServiceCreateForkResponse.js.map +1 -0
- package/dist/src/models/SolidityServiceExternalFork.d.ts +39 -0
- package/dist/src/models/SolidityServiceExternalFork.js +45 -0
- package/dist/src/models/SolidityServiceExternalFork.js.map +1 -0
- package/dist/src/models/SolidityServiceFork.d.ts +77 -0
- package/dist/src/models/SolidityServiceFork.js +59 -0
- package/dist/src/models/SolidityServiceFork.js.map +1 -0
- package/dist/src/models/SolidityServiceForkServiceCreateForkBody.d.ts +33 -0
- package/dist/src/models/SolidityServiceForkServiceCreateForkBody.js +45 -0
- package/dist/src/models/SolidityServiceForkServiceCreateForkBody.js.map +1 -0
- package/dist/src/models/SolidityServiceForkServiceUpdateForkBody.d.ts +33 -0
- package/dist/src/models/SolidityServiceForkServiceUpdateForkBody.js +45 -0
- package/dist/src/models/SolidityServiceForkServiceUpdateForkBody.js.map +1 -0
- package/dist/src/models/SolidityServiceForkType.d.ts +25 -0
- package/dist/src/models/SolidityServiceForkType.js +44 -0
- package/dist/src/models/SolidityServiceForkType.js.map +1 -0
- package/dist/src/models/SolidityServiceGetForkInfoResponse.d.ts +70 -0
- package/dist/src/models/SolidityServiceGetForkInfoResponse.js +56 -0
- package/dist/src/models/SolidityServiceGetForkInfoResponse.js.map +1 -0
- package/dist/src/models/SolidityServiceGetForkResponse.d.ts +33 -0
- package/dist/src/models/SolidityServiceGetForkResponse.js +43 -0
- package/dist/src/models/SolidityServiceGetForkResponse.js.map +1 -0
- package/dist/src/models/SolidityServiceListForksResponse.d.ts +33 -0
- package/dist/src/models/SolidityServiceListForksResponse.js +43 -0
- package/dist/src/models/SolidityServiceListForksResponse.js.map +1 -0
- package/dist/src/models/SolidityServiceManagedFork.d.ts +45 -0
- package/dist/src/models/SolidityServiceManagedFork.js +47 -0
- package/dist/src/models/SolidityServiceManagedFork.js.map +1 -0
- package/dist/src/models/SolidityServiceNodeEnvironment.d.ts +50 -0
- package/dist/src/models/SolidityServiceNodeEnvironment.js +48 -0
- package/dist/src/models/SolidityServiceNodeEnvironment.js.map +1 -0
- package/dist/src/models/SolidityServiceNodeForkConfig.d.ts +44 -0
- package/dist/src/models/SolidityServiceNodeForkConfig.js +46 -0
- package/dist/src/models/SolidityServiceNodeForkConfig.js.map +1 -0
- package/dist/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBody.d.ts +40 -0
- package/dist/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBody.js +48 -0
- package/dist/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBody.js.map +1 -0
- package/dist/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBodyChainSpec.d.ts +32 -0
- package/dist/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBodyChainSpec.js +42 -0
- package/dist/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBodyChainSpec.js.map +1 -0
- package/dist/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.d.ts +40 -0
- package/dist/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.js +48 -0
- package/dist/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.js.map +1 -0
- package/dist/src/models/SolidityServiceSourceFetcherType.d.ts +26 -0
- package/dist/src/models/SolidityServiceSourceFetcherType.js +45 -0
- package/dist/src/models/SolidityServiceSourceFetcherType.js.map +1 -0
- package/dist/src/models/SolidityServiceUpdateForkResponse.d.ts +33 -0
- package/dist/src/models/SolidityServiceUpdateForkResponse.js +43 -0
- package/dist/src/models/SolidityServiceUpdateForkResponse.js.map +1 -0
- package/dist/src/models/index.d.ts +17 -2
- package/dist/src/models/index.js +17 -2
- package/dist/src/models/index.js.map +1 -1
- package/package.json +1 -1
- package/src/apis/DebugAndSimulationApi.ts +824 -110
- package/src/apis/DefaultApi.ts +87 -0
- package/src/apis/ForksApi.ts +384 -0
- package/src/apis/index.ts +2 -0
- package/src/models/SolidityServiceBaseChainConfig.ts +14 -4
- package/src/models/SolidityServiceCreateForkResponse.ts +73 -0
- package/src/models/SolidityServiceExternalFork.ts +81 -0
- package/src/models/SolidityServiceFork.ts +145 -0
- package/src/models/SolidityServiceForkServiceCreateForkBody.ts +74 -0
- package/src/models/SolidityServiceForkServiceUpdateForkBody.ts +74 -0
- package/src/models/SolidityServiceForkType.ts +53 -0
- package/src/models/SolidityServiceGetForkInfoResponse.ts +128 -0
- package/src/models/SolidityServiceGetForkResponse.ts +73 -0
- package/src/models/SolidityServiceListForksResponse.ts +73 -0
- package/src/models/SolidityServiceManagedFork.ts +89 -0
- package/src/models/SolidityServiceNodeEnvironment.ts +89 -0
- package/src/models/SolidityServiceNodeForkConfig.ts +81 -0
- package/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBody.ts +89 -0
- package/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBodyChainSpec.ts +65 -0
- package/src/models/SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody.ts +89 -0
- package/src/models/SolidityServiceSourceFetcherType.ts +54 -0
- package/src/models/SolidityServiceUpdateForkResponse.ts +73 -0
- package/src/models/index.ts +17 -2
- package/dist/src/models/SolidityServiceSimulateTransactionBundleRequest.d.ts +0 -45
- package/dist/src/models/SolidityServiceSimulateTransactionBundleRequest.js +0 -53
- package/dist/src/models/SolidityServiceSimulateTransactionBundleRequest.js.map +0 -1
- package/dist/src/models/SolidityServiceSimulateTransactionRequest.d.ts +0 -45
- package/dist/src/models/SolidityServiceSimulateTransactionRequest.js +0 -53
- package/dist/src/models/SolidityServiceSimulateTransactionRequest.js.map +0 -1
- package/src/models/SolidityServiceSimulateTransactionBundleRequest.ts +0 -92
- package/src/models/SolidityServiceSimulateTransactionRequest.ts +0 -92
|
@@ -19,10 +19,10 @@ import type {
|
|
|
19
19
|
SolidityServiceGetSimulationBundleResponse,
|
|
20
20
|
SolidityServiceGetSimulationResponse,
|
|
21
21
|
SolidityServiceGetSimulationsResponse,
|
|
22
|
-
SolidityServiceSimulateTransactionBundleRequest,
|
|
23
22
|
SolidityServiceSimulateTransactionBundleResponse,
|
|
24
|
-
SolidityServiceSimulateTransactionRequest,
|
|
25
23
|
SolidityServiceSimulateTransactionResponse,
|
|
24
|
+
SolidityServiceSolidityAPIServiceSimulateTransactionBody,
|
|
25
|
+
SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody,
|
|
26
26
|
TxindexEvmSearchTransactionsResponse,
|
|
27
27
|
} from '../models/index.js';
|
|
28
28
|
import {
|
|
@@ -34,107 +34,625 @@ import {
|
|
|
34
34
|
SolidityServiceGetSimulationResponseToJSON,
|
|
35
35
|
SolidityServiceGetSimulationsResponseFromJSON,
|
|
36
36
|
SolidityServiceGetSimulationsResponseToJSON,
|
|
37
|
-
SolidityServiceSimulateTransactionBundleRequestFromJSON,
|
|
38
|
-
SolidityServiceSimulateTransactionBundleRequestToJSON,
|
|
39
37
|
SolidityServiceSimulateTransactionBundleResponseFromJSON,
|
|
40
38
|
SolidityServiceSimulateTransactionBundleResponseToJSON,
|
|
41
|
-
SolidityServiceSimulateTransactionRequestFromJSON,
|
|
42
|
-
SolidityServiceSimulateTransactionRequestToJSON,
|
|
43
39
|
SolidityServiceSimulateTransactionResponseFromJSON,
|
|
44
40
|
SolidityServiceSimulateTransactionResponseToJSON,
|
|
41
|
+
SolidityServiceSolidityAPIServiceSimulateTransactionBodyFromJSON,
|
|
42
|
+
SolidityServiceSolidityAPIServiceSimulateTransactionBodyToJSON,
|
|
43
|
+
SolidityServiceSolidityAPIServiceSimulateTransactionBundleBodyFromJSON,
|
|
44
|
+
SolidityServiceSolidityAPIServiceSimulateTransactionBundleBodyToJSON,
|
|
45
45
|
TxindexEvmSearchTransactionsResponseFromJSON,
|
|
46
46
|
TxindexEvmSearchTransactionsResponseToJSON,
|
|
47
47
|
} from '../models/index.js';
|
|
48
48
|
|
|
49
49
|
export interface GetCallTraceRequest {
|
|
50
|
-
projectOwner
|
|
51
|
-
projectSlug
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
projectOwner: string;
|
|
51
|
+
projectSlug: string;
|
|
52
|
+
chainSpecChainId: string;
|
|
53
|
+
txIdTxHash: string;
|
|
54
|
+
chainSpecForkId?: string;
|
|
55
|
+
txIdSimulationId?: string;
|
|
56
|
+
txIdBundleId?: string;
|
|
57
|
+
withInternalCalls?: boolean;
|
|
58
|
+
disableOptimizer?: boolean;
|
|
59
|
+
ignoreGasCost?: boolean;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface GetCallTrace2Request {
|
|
63
|
+
projectOwner: string;
|
|
64
|
+
projectSlug: string;
|
|
65
|
+
chainSpecChainId: string;
|
|
66
|
+
txIdSimulationId: string;
|
|
67
|
+
chainSpecForkId?: string;
|
|
68
|
+
txIdTxHash?: string;
|
|
69
|
+
txIdBundleId?: string;
|
|
70
|
+
withInternalCalls?: boolean;
|
|
71
|
+
disableOptimizer?: boolean;
|
|
72
|
+
ignoreGasCost?: boolean;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface GetCallTrace3Request {
|
|
76
|
+
projectOwner: string;
|
|
77
|
+
projectSlug: string;
|
|
78
|
+
chainSpecChainId: string;
|
|
79
|
+
txIdBundleId: string;
|
|
54
80
|
chainSpecForkId?: string;
|
|
55
81
|
txIdTxHash?: string;
|
|
56
82
|
txIdSimulationId?: string;
|
|
83
|
+
withInternalCalls?: boolean;
|
|
84
|
+
disableOptimizer?: boolean;
|
|
85
|
+
ignoreGasCost?: boolean;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface GetCallTrace4Request {
|
|
89
|
+
projectOwner: string;
|
|
90
|
+
projectSlug: string;
|
|
91
|
+
chainSpecForkId: string;
|
|
92
|
+
txIdTxHash: string;
|
|
93
|
+
chainSpecChainId?: string;
|
|
94
|
+
txIdSimulationId?: string;
|
|
57
95
|
txIdBundleId?: string;
|
|
96
|
+
withInternalCalls?: boolean;
|
|
97
|
+
disableOptimizer?: boolean;
|
|
98
|
+
ignoreGasCost?: boolean;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface GetCallTrace5Request {
|
|
102
|
+
projectOwner: string;
|
|
103
|
+
projectSlug: string;
|
|
104
|
+
chainSpecForkId: string;
|
|
105
|
+
txIdSimulationId: string;
|
|
106
|
+
chainSpecChainId?: string;
|
|
107
|
+
txIdTxHash?: string;
|
|
108
|
+
txIdBundleId?: string;
|
|
109
|
+
withInternalCalls?: boolean;
|
|
58
110
|
disableOptimizer?: boolean;
|
|
111
|
+
ignoreGasCost?: boolean;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface GetCallTrace6Request {
|
|
115
|
+
projectOwner: string;
|
|
116
|
+
projectSlug: string;
|
|
117
|
+
chainSpecForkId: string;
|
|
118
|
+
txIdBundleId: string;
|
|
119
|
+
chainSpecChainId?: string;
|
|
120
|
+
txIdTxHash?: string;
|
|
121
|
+
txIdSimulationId?: string;
|
|
59
122
|
withInternalCalls?: boolean;
|
|
123
|
+
disableOptimizer?: boolean;
|
|
60
124
|
ignoreGasCost?: boolean;
|
|
61
125
|
}
|
|
62
126
|
|
|
63
|
-
export interface GetSimulationRequest {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
127
|
+
export interface GetSimulationRequest {
|
|
128
|
+
projectOwner: string;
|
|
129
|
+
projectSlug: string;
|
|
130
|
+
simulationId: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface GetSimulationBundleInProjectRequest {
|
|
134
|
+
projectOwner: string;
|
|
135
|
+
projectSlug: string;
|
|
136
|
+
bundleId: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface GetSimulationsRequest {
|
|
140
|
+
projectOwner: string;
|
|
141
|
+
projectSlug: string;
|
|
142
|
+
labelContains?: string;
|
|
143
|
+
page?: number;
|
|
144
|
+
pageSize?: number;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface SearchTransactionsRequest {
|
|
148
|
+
projectOwner: string;
|
|
149
|
+
projectSlug: string;
|
|
150
|
+
chainId?: Array<string>;
|
|
151
|
+
address?: Array<string>;
|
|
152
|
+
includeDirect?: boolean;
|
|
153
|
+
includeTrace?: boolean;
|
|
154
|
+
includeIn?: boolean;
|
|
155
|
+
includeOut?: boolean;
|
|
156
|
+
startBlock?: string;
|
|
157
|
+
endBlock?: string;
|
|
158
|
+
startTimestamp?: string;
|
|
159
|
+
endTimestamp?: string;
|
|
160
|
+
transactionStatus?: Array<number>;
|
|
161
|
+
methodSignature?: string;
|
|
162
|
+
limit?: number;
|
|
163
|
+
pageToken?: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface SimulateTransactionRequest {
|
|
167
|
+
projectOwner: string;
|
|
168
|
+
projectSlug: string;
|
|
169
|
+
chainSpecChainId: string;
|
|
170
|
+
body: SolidityServiceSolidityAPIServiceSimulateTransactionBody;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface SimulateTransaction2Request {
|
|
174
|
+
projectOwner: string;
|
|
175
|
+
projectSlug: string;
|
|
176
|
+
chainSpecForkId: string;
|
|
177
|
+
body: SolidityServiceSolidityAPIServiceSimulateTransactionBody;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface SimulateTransactionBundleRequest {
|
|
181
|
+
projectOwner: string;
|
|
182
|
+
projectSlug: string;
|
|
183
|
+
chainSpecChainId: string;
|
|
184
|
+
body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export interface SimulateTransactionBundle2Request {
|
|
188
|
+
projectOwner: string;
|
|
189
|
+
projectSlug: string;
|
|
190
|
+
chainSpecForkId: string;
|
|
191
|
+
body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleBody;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
*
|
|
196
|
+
*/
|
|
197
|
+
export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* API to get Sentio call trace. It takes `txId.txHash` and `networkId` 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)
|
|
201
|
+
* Get indexed call trace
|
|
202
|
+
*/
|
|
203
|
+
async getCallTraceRaw(requestParameters: GetCallTraceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
|
|
204
|
+
if (requestParameters['projectOwner'] == null) {
|
|
205
|
+
throw new runtime.RequiredError(
|
|
206
|
+
'projectOwner',
|
|
207
|
+
'Required parameter "projectOwner" was null or undefined when calling getCallTrace().'
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (requestParameters['projectSlug'] == null) {
|
|
212
|
+
throw new runtime.RequiredError(
|
|
213
|
+
'projectSlug',
|
|
214
|
+
'Required parameter "projectSlug" was null or undefined when calling getCallTrace().'
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
if (requestParameters['chainSpecChainId'] == null) {
|
|
219
|
+
throw new runtime.RequiredError(
|
|
220
|
+
'chainSpecChainId',
|
|
221
|
+
'Required parameter "chainSpecChainId" was null or undefined when calling getCallTrace().'
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
if (requestParameters['txIdTxHash'] == null) {
|
|
226
|
+
throw new runtime.RequiredError(
|
|
227
|
+
'txIdTxHash',
|
|
228
|
+
'Required parameter "txIdTxHash" was null or undefined when calling getCallTrace().'
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const queryParameters: any = {};
|
|
233
|
+
|
|
234
|
+
if (requestParameters['chainSpecForkId'] != null) {
|
|
235
|
+
queryParameters['chainSpec.forkId'] = requestParameters['chainSpecForkId'];
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (requestParameters['txIdSimulationId'] != null) {
|
|
239
|
+
queryParameters['txId.simulationId'] = requestParameters['txIdSimulationId'];
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (requestParameters['txIdBundleId'] != null) {
|
|
243
|
+
queryParameters['txId.bundleId'] = requestParameters['txIdBundleId'];
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (requestParameters['withInternalCalls'] != null) {
|
|
247
|
+
queryParameters['withInternalCalls'] = requestParameters['withInternalCalls'];
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if (requestParameters['disableOptimizer'] != null) {
|
|
251
|
+
queryParameters['disableOptimizer'] = requestParameters['disableOptimizer'];
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if (requestParameters['ignoreGasCost'] != null) {
|
|
255
|
+
queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost'];
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
259
|
+
|
|
260
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
261
|
+
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
const response = await this.request({
|
|
265
|
+
path: `/api/v1/solidity/{projectOwner}/{projectSlug}/{chainSpec.chainId}/transaction/{txId.txHash}/call_trace`.replace(`{${"projectOwner"}}`, encodeURIComponent(String(requestParameters['projectOwner']))).replace(`{${"projectSlug"}}`, encodeURIComponent(String(requestParameters['projectSlug']))).replace(`{${"chainSpec.chainId"}}`, encodeURIComponent(String(requestParameters['chainSpecChainId']))).replace(`{${"txId.txHash"}}`, encodeURIComponent(String(requestParameters['txIdTxHash']))),
|
|
266
|
+
method: 'GET',
|
|
267
|
+
headers: headerParameters,
|
|
268
|
+
query: queryParameters,
|
|
269
|
+
}, initOverrides);
|
|
270
|
+
|
|
271
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue));
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* API to get Sentio call trace. It takes `txId.txHash` and `networkId` 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)
|
|
276
|
+
* Get indexed call trace
|
|
277
|
+
*/
|
|
278
|
+
async getCallTrace(requestParameters: GetCallTraceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
|
|
279
|
+
const response = await this.getCallTraceRaw(requestParameters, initOverrides);
|
|
280
|
+
return await response.value();
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* API to get Sentio call trace. It takes `txId.txHash` and `networkId` 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)
|
|
285
|
+
* Get indexed call trace
|
|
286
|
+
*/
|
|
287
|
+
async getCallTrace2Raw(requestParameters: GetCallTrace2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
|
|
288
|
+
if (requestParameters['projectOwner'] == null) {
|
|
289
|
+
throw new runtime.RequiredError(
|
|
290
|
+
'projectOwner',
|
|
291
|
+
'Required parameter "projectOwner" was null or undefined when calling getCallTrace2().'
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if (requestParameters['projectSlug'] == null) {
|
|
296
|
+
throw new runtime.RequiredError(
|
|
297
|
+
'projectSlug',
|
|
298
|
+
'Required parameter "projectSlug" was null or undefined when calling getCallTrace2().'
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
if (requestParameters['chainSpecChainId'] == null) {
|
|
303
|
+
throw new runtime.RequiredError(
|
|
304
|
+
'chainSpecChainId',
|
|
305
|
+
'Required parameter "chainSpecChainId" was null or undefined when calling getCallTrace2().'
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if (requestParameters['txIdSimulationId'] == null) {
|
|
310
|
+
throw new runtime.RequiredError(
|
|
311
|
+
'txIdSimulationId',
|
|
312
|
+
'Required parameter "txIdSimulationId" was null or undefined when calling getCallTrace2().'
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
const queryParameters: any = {};
|
|
317
|
+
|
|
318
|
+
if (requestParameters['chainSpecForkId'] != null) {
|
|
319
|
+
queryParameters['chainSpec.forkId'] = requestParameters['chainSpecForkId'];
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
if (requestParameters['txIdTxHash'] != null) {
|
|
323
|
+
queryParameters['txId.txHash'] = requestParameters['txIdTxHash'];
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
if (requestParameters['txIdBundleId'] != null) {
|
|
327
|
+
queryParameters['txId.bundleId'] = requestParameters['txIdBundleId'];
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
if (requestParameters['withInternalCalls'] != null) {
|
|
331
|
+
queryParameters['withInternalCalls'] = requestParameters['withInternalCalls'];
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
if (requestParameters['disableOptimizer'] != null) {
|
|
335
|
+
queryParameters['disableOptimizer'] = requestParameters['disableOptimizer'];
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
if (requestParameters['ignoreGasCost'] != null) {
|
|
339
|
+
queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost'];
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
343
|
+
|
|
344
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
345
|
+
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
const response = await this.request({
|
|
349
|
+
path: `/api/v1/solidity/{projectOwner}/{projectSlug}/{chainSpec.chainId}/simulation/{txId.simulationId}/call_trace`.replace(`{${"projectOwner"}}`, encodeURIComponent(String(requestParameters['projectOwner']))).replace(`{${"projectSlug"}}`, encodeURIComponent(String(requestParameters['projectSlug']))).replace(`{${"chainSpec.chainId"}}`, encodeURIComponent(String(requestParameters['chainSpecChainId']))).replace(`{${"txId.simulationId"}}`, encodeURIComponent(String(requestParameters['txIdSimulationId']))),
|
|
350
|
+
method: 'GET',
|
|
351
|
+
headers: headerParameters,
|
|
352
|
+
query: queryParameters,
|
|
353
|
+
}, initOverrides);
|
|
354
|
+
|
|
355
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue));
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* API to get Sentio call trace. It takes `txId.txHash` and `networkId` 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)
|
|
360
|
+
* Get indexed call trace
|
|
361
|
+
*/
|
|
362
|
+
async getCallTrace2(requestParameters: GetCallTrace2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
|
|
363
|
+
const response = await this.getCallTrace2Raw(requestParameters, initOverrides);
|
|
364
|
+
return await response.value();
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* API to get Sentio call trace. It takes `txId.txHash` and `networkId` 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)
|
|
369
|
+
* Get indexed call trace
|
|
370
|
+
*/
|
|
371
|
+
async getCallTrace3Raw(requestParameters: GetCallTrace3Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
|
|
372
|
+
if (requestParameters['projectOwner'] == null) {
|
|
373
|
+
throw new runtime.RequiredError(
|
|
374
|
+
'projectOwner',
|
|
375
|
+
'Required parameter "projectOwner" was null or undefined when calling getCallTrace3().'
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
if (requestParameters['projectSlug'] == null) {
|
|
380
|
+
throw new runtime.RequiredError(
|
|
381
|
+
'projectSlug',
|
|
382
|
+
'Required parameter "projectSlug" was null or undefined when calling getCallTrace3().'
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
if (requestParameters['chainSpecChainId'] == null) {
|
|
387
|
+
throw new runtime.RequiredError(
|
|
388
|
+
'chainSpecChainId',
|
|
389
|
+
'Required parameter "chainSpecChainId" was null or undefined when calling getCallTrace3().'
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
if (requestParameters['txIdBundleId'] == null) {
|
|
394
|
+
throw new runtime.RequiredError(
|
|
395
|
+
'txIdBundleId',
|
|
396
|
+
'Required parameter "txIdBundleId" was null or undefined when calling getCallTrace3().'
|
|
397
|
+
);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
const queryParameters: any = {};
|
|
401
|
+
|
|
402
|
+
if (requestParameters['chainSpecForkId'] != null) {
|
|
403
|
+
queryParameters['chainSpec.forkId'] = requestParameters['chainSpecForkId'];
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
if (requestParameters['txIdTxHash'] != null) {
|
|
407
|
+
queryParameters['txId.txHash'] = requestParameters['txIdTxHash'];
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
if (requestParameters['txIdSimulationId'] != null) {
|
|
411
|
+
queryParameters['txId.simulationId'] = requestParameters['txIdSimulationId'];
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
if (requestParameters['withInternalCalls'] != null) {
|
|
415
|
+
queryParameters['withInternalCalls'] = requestParameters['withInternalCalls'];
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
if (requestParameters['disableOptimizer'] != null) {
|
|
419
|
+
queryParameters['disableOptimizer'] = requestParameters['disableOptimizer'];
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
if (requestParameters['ignoreGasCost'] != null) {
|
|
423
|
+
queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost'];
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
427
|
+
|
|
428
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
429
|
+
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
const response = await this.request({
|
|
433
|
+
path: `/api/v1/solidity/{projectOwner}/{projectSlug}/{chainSpec.chainId}/simulation_bundle/{txId.bundleId}/call_trace`.replace(`{${"projectOwner"}}`, encodeURIComponent(String(requestParameters['projectOwner']))).replace(`{${"projectSlug"}}`, encodeURIComponent(String(requestParameters['projectSlug']))).replace(`{${"chainSpec.chainId"}}`, encodeURIComponent(String(requestParameters['chainSpecChainId']))).replace(`{${"txId.bundleId"}}`, encodeURIComponent(String(requestParameters['txIdBundleId']))),
|
|
434
|
+
method: 'GET',
|
|
435
|
+
headers: headerParameters,
|
|
436
|
+
query: queryParameters,
|
|
437
|
+
}, initOverrides);
|
|
438
|
+
|
|
439
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue));
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* API to get Sentio call trace. It takes `txId.txHash` and `networkId` 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)
|
|
444
|
+
* Get indexed call trace
|
|
445
|
+
*/
|
|
446
|
+
async getCallTrace3(requestParameters: GetCallTrace3Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
|
|
447
|
+
const response = await this.getCallTrace3Raw(requestParameters, initOverrides);
|
|
448
|
+
return await response.value();
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* API to get Sentio call trace. It takes `txId.txHash` and `networkId` 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)
|
|
453
|
+
* Get indexed call trace
|
|
454
|
+
*/
|
|
455
|
+
async getCallTrace4Raw(requestParameters: GetCallTrace4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
|
|
456
|
+
if (requestParameters['projectOwner'] == null) {
|
|
457
|
+
throw new runtime.RequiredError(
|
|
458
|
+
'projectOwner',
|
|
459
|
+
'Required parameter "projectOwner" was null or undefined when calling getCallTrace4().'
|
|
460
|
+
);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
if (requestParameters['projectSlug'] == null) {
|
|
464
|
+
throw new runtime.RequiredError(
|
|
465
|
+
'projectSlug',
|
|
466
|
+
'Required parameter "projectSlug" was null or undefined when calling getCallTrace4().'
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
if (requestParameters['chainSpecForkId'] == null) {
|
|
471
|
+
throw new runtime.RequiredError(
|
|
472
|
+
'chainSpecForkId',
|
|
473
|
+
'Required parameter "chainSpecForkId" was null or undefined when calling getCallTrace4().'
|
|
474
|
+
);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
if (requestParameters['txIdTxHash'] == null) {
|
|
478
|
+
throw new runtime.RequiredError(
|
|
479
|
+
'txIdTxHash',
|
|
480
|
+
'Required parameter "txIdTxHash" was null or undefined when calling getCallTrace4().'
|
|
481
|
+
);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
const queryParameters: any = {};
|
|
485
|
+
|
|
486
|
+
if (requestParameters['chainSpecChainId'] != null) {
|
|
487
|
+
queryParameters['chainSpec.chainId'] = requestParameters['chainSpecChainId'];
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
if (requestParameters['txIdSimulationId'] != null) {
|
|
491
|
+
queryParameters['txId.simulationId'] = requestParameters['txIdSimulationId'];
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
if (requestParameters['txIdBundleId'] != null) {
|
|
495
|
+
queryParameters['txId.bundleId'] = requestParameters['txIdBundleId'];
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
if (requestParameters['withInternalCalls'] != null) {
|
|
499
|
+
queryParameters['withInternalCalls'] = requestParameters['withInternalCalls'];
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
if (requestParameters['disableOptimizer'] != null) {
|
|
503
|
+
queryParameters['disableOptimizer'] = requestParameters['disableOptimizer'];
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
if (requestParameters['ignoreGasCost'] != null) {
|
|
507
|
+
queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost'];
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
511
|
+
|
|
512
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
513
|
+
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
const response = await this.request({
|
|
517
|
+
path: `/api/v1/solidity/{projectOwner}/{projectSlug}/fork/{chainSpec.forkId}/transaction/{txId.txHash}/call_trace`.replace(`{${"projectOwner"}}`, encodeURIComponent(String(requestParameters['projectOwner']))).replace(`{${"projectSlug"}}`, encodeURIComponent(String(requestParameters['projectSlug']))).replace(`{${"chainSpec.forkId"}}`, encodeURIComponent(String(requestParameters['chainSpecForkId']))).replace(`{${"txId.txHash"}}`, encodeURIComponent(String(requestParameters['txIdTxHash']))),
|
|
518
|
+
method: 'GET',
|
|
519
|
+
headers: headerParameters,
|
|
520
|
+
query: queryParameters,
|
|
521
|
+
}, initOverrides);
|
|
522
|
+
|
|
523
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue));
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* API to get Sentio call trace. It takes `txId.txHash` and `networkId` 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)
|
|
528
|
+
* Get indexed call trace
|
|
529
|
+
*/
|
|
530
|
+
async getCallTrace4(requestParameters: GetCallTrace4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
|
|
531
|
+
const response = await this.getCallTrace4Raw(requestParameters, initOverrides);
|
|
532
|
+
return await response.value();
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* API to get Sentio call trace. It takes `txId.txHash` and `networkId` 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)
|
|
537
|
+
* Get indexed call trace
|
|
538
|
+
*/
|
|
539
|
+
async getCallTrace5Raw(requestParameters: GetCallTrace5Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
|
|
540
|
+
if (requestParameters['projectOwner'] == null) {
|
|
541
|
+
throw new runtime.RequiredError(
|
|
542
|
+
'projectOwner',
|
|
543
|
+
'Required parameter "projectOwner" was null or undefined when calling getCallTrace5().'
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
if (requestParameters['projectSlug'] == null) {
|
|
548
|
+
throw new runtime.RequiredError(
|
|
549
|
+
'projectSlug',
|
|
550
|
+
'Required parameter "projectSlug" was null or undefined when calling getCallTrace5().'
|
|
551
|
+
);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
if (requestParameters['chainSpecForkId'] == null) {
|
|
555
|
+
throw new runtime.RequiredError(
|
|
556
|
+
'chainSpecForkId',
|
|
557
|
+
'Required parameter "chainSpecForkId" was null or undefined when calling getCallTrace5().'
|
|
558
|
+
);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
if (requestParameters['txIdSimulationId'] == null) {
|
|
562
|
+
throw new runtime.RequiredError(
|
|
563
|
+
'txIdSimulationId',
|
|
564
|
+
'Required parameter "txIdSimulationId" was null or undefined when calling getCallTrace5().'
|
|
565
|
+
);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
const queryParameters: any = {};
|
|
569
|
+
|
|
570
|
+
if (requestParameters['chainSpecChainId'] != null) {
|
|
571
|
+
queryParameters['chainSpec.chainId'] = requestParameters['chainSpecChainId'];
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
if (requestParameters['txIdTxHash'] != null) {
|
|
575
|
+
queryParameters['txId.txHash'] = requestParameters['txIdTxHash'];
|
|
576
|
+
}
|
|
68
577
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
projectSlug?: string;
|
|
73
|
-
}
|
|
578
|
+
if (requestParameters['txIdBundleId'] != null) {
|
|
579
|
+
queryParameters['txId.bundleId'] = requestParameters['txIdBundleId'];
|
|
580
|
+
}
|
|
74
581
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
labelContains?: string;
|
|
79
|
-
page?: number;
|
|
80
|
-
pageSize?: number;
|
|
81
|
-
}
|
|
582
|
+
if (requestParameters['withInternalCalls'] != null) {
|
|
583
|
+
queryParameters['withInternalCalls'] = requestParameters['withInternalCalls'];
|
|
584
|
+
}
|
|
82
585
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
includeDirect?: boolean;
|
|
87
|
-
includeTrace?: boolean;
|
|
88
|
-
includeIn?: boolean;
|
|
89
|
-
includeOut?: boolean;
|
|
90
|
-
startBlock?: string;
|
|
91
|
-
endBlock?: string;
|
|
92
|
-
startTimestamp?: string;
|
|
93
|
-
endTimestamp?: string;
|
|
94
|
-
transactionStatus?: Array<number>;
|
|
95
|
-
methodSignature?: string;
|
|
96
|
-
limit?: number;
|
|
97
|
-
pageToken?: string;
|
|
98
|
-
}
|
|
586
|
+
if (requestParameters['disableOptimizer'] != null) {
|
|
587
|
+
queryParameters['disableOptimizer'] = requestParameters['disableOptimizer'];
|
|
588
|
+
}
|
|
99
589
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
590
|
+
if (requestParameters['ignoreGasCost'] != null) {
|
|
591
|
+
queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost'];
|
|
592
|
+
}
|
|
103
593
|
|
|
104
|
-
|
|
105
|
-
body: SolidityServiceSimulateTransactionBundleRequest;
|
|
106
|
-
}
|
|
594
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
107
595
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
596
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
597
|
+
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
const response = await this.request({
|
|
601
|
+
path: `/api/v1/solidity/{projectOwner}/{projectSlug}/fork/{chainSpec.forkId}/simulation/{txId.simulationId}/call_trace`.replace(`{${"projectOwner"}}`, encodeURIComponent(String(requestParameters['projectOwner']))).replace(`{${"projectSlug"}}`, encodeURIComponent(String(requestParameters['projectSlug']))).replace(`{${"chainSpec.forkId"}}`, encodeURIComponent(String(requestParameters['chainSpecForkId']))).replace(`{${"txId.simulationId"}}`, encodeURIComponent(String(requestParameters['txIdSimulationId']))),
|
|
602
|
+
method: 'GET',
|
|
603
|
+
headers: headerParameters,
|
|
604
|
+
query: queryParameters,
|
|
605
|
+
}, initOverrides);
|
|
606
|
+
|
|
607
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue));
|
|
608
|
+
}
|
|
112
609
|
|
|
113
610
|
/**
|
|
114
611
|
* API to get Sentio call trace. It takes `txId.txHash` and `networkId` 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)
|
|
115
612
|
* Get indexed call trace
|
|
116
613
|
*/
|
|
117
|
-
async
|
|
118
|
-
const
|
|
614
|
+
async getCallTrace5(requestParameters: GetCallTrace5Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
|
|
615
|
+
const response = await this.getCallTrace5Raw(requestParameters, initOverrides);
|
|
616
|
+
return await response.value();
|
|
617
|
+
}
|
|
119
618
|
|
|
120
|
-
|
|
121
|
-
|
|
619
|
+
/**
|
|
620
|
+
* API to get Sentio call trace. It takes `txId.txHash` and `networkId` 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)
|
|
621
|
+
* Get indexed call trace
|
|
622
|
+
*/
|
|
623
|
+
async getCallTrace6Raw(requestParameters: GetCallTrace6Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
|
|
624
|
+
if (requestParameters['projectOwner'] == null) {
|
|
625
|
+
throw new runtime.RequiredError(
|
|
626
|
+
'projectOwner',
|
|
627
|
+
'Required parameter "projectOwner" was null or undefined when calling getCallTrace6().'
|
|
628
|
+
);
|
|
122
629
|
}
|
|
123
630
|
|
|
124
|
-
if (requestParameters['projectSlug']
|
|
125
|
-
|
|
631
|
+
if (requestParameters['projectSlug'] == null) {
|
|
632
|
+
throw new runtime.RequiredError(
|
|
633
|
+
'projectSlug',
|
|
634
|
+
'Required parameter "projectSlug" was null or undefined when calling getCallTrace6().'
|
|
635
|
+
);
|
|
126
636
|
}
|
|
127
637
|
|
|
128
|
-
if (requestParameters['
|
|
129
|
-
|
|
638
|
+
if (requestParameters['chainSpecForkId'] == null) {
|
|
639
|
+
throw new runtime.RequiredError(
|
|
640
|
+
'chainSpecForkId',
|
|
641
|
+
'Required parameter "chainSpecForkId" was null or undefined when calling getCallTrace6().'
|
|
642
|
+
);
|
|
130
643
|
}
|
|
131
644
|
|
|
132
|
-
if (requestParameters['
|
|
133
|
-
|
|
645
|
+
if (requestParameters['txIdBundleId'] == null) {
|
|
646
|
+
throw new runtime.RequiredError(
|
|
647
|
+
'txIdBundleId',
|
|
648
|
+
'Required parameter "txIdBundleId" was null or undefined when calling getCallTrace6().'
|
|
649
|
+
);
|
|
134
650
|
}
|
|
135
651
|
|
|
136
|
-
|
|
137
|
-
|
|
652
|
+
const queryParameters: any = {};
|
|
653
|
+
|
|
654
|
+
if (requestParameters['chainSpecChainId'] != null) {
|
|
655
|
+
queryParameters['chainSpec.chainId'] = requestParameters['chainSpecChainId'];
|
|
138
656
|
}
|
|
139
657
|
|
|
140
658
|
if (requestParameters['txIdTxHash'] != null) {
|
|
@@ -145,18 +663,14 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
145
663
|
queryParameters['txId.simulationId'] = requestParameters['txIdSimulationId'];
|
|
146
664
|
}
|
|
147
665
|
|
|
148
|
-
if (requestParameters['
|
|
149
|
-
queryParameters['
|
|
666
|
+
if (requestParameters['withInternalCalls'] != null) {
|
|
667
|
+
queryParameters['withInternalCalls'] = requestParameters['withInternalCalls'];
|
|
150
668
|
}
|
|
151
669
|
|
|
152
670
|
if (requestParameters['disableOptimizer'] != null) {
|
|
153
671
|
queryParameters['disableOptimizer'] = requestParameters['disableOptimizer'];
|
|
154
672
|
}
|
|
155
673
|
|
|
156
|
-
if (requestParameters['withInternalCalls'] != null) {
|
|
157
|
-
queryParameters['withInternalCalls'] = requestParameters['withInternalCalls'];
|
|
158
|
-
}
|
|
159
|
-
|
|
160
674
|
if (requestParameters['ignoreGasCost'] != null) {
|
|
161
675
|
queryParameters['ignoreGasCost'] = requestParameters['ignoreGasCost'];
|
|
162
676
|
}
|
|
@@ -168,7 +682,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
168
682
|
}
|
|
169
683
|
|
|
170
684
|
const response = await this.request({
|
|
171
|
-
path: `/api/v1/solidity/call_trace`,
|
|
685
|
+
path: `/api/v1/solidity/{projectOwner}/{projectSlug}/fork/{chainSpec.forkId}/simulation_bundle/{txId.bundleId}/call_trace`.replace(`{${"projectOwner"}}`, encodeURIComponent(String(requestParameters['projectOwner']))).replace(`{${"projectSlug"}}`, encodeURIComponent(String(requestParameters['projectSlug']))).replace(`{${"chainSpec.forkId"}}`, encodeURIComponent(String(requestParameters['chainSpecForkId']))).replace(`{${"txId.bundleId"}}`, encodeURIComponent(String(requestParameters['txIdBundleId']))),
|
|
172
686
|
method: 'GET',
|
|
173
687
|
headers: headerParameters,
|
|
174
688
|
query: queryParameters,
|
|
@@ -181,8 +695,8 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
181
695
|
* API to get Sentio call trace. It takes `txId.txHash` and `networkId` 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)
|
|
182
696
|
* Get indexed call trace
|
|
183
697
|
*/
|
|
184
|
-
async
|
|
185
|
-
const response = await this.
|
|
698
|
+
async getCallTrace6(requestParameters: GetCallTrace6Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
|
|
699
|
+
const response = await this.getCallTrace6Raw(requestParameters, initOverrides);
|
|
186
700
|
return await response.value();
|
|
187
701
|
}
|
|
188
702
|
|
|
@@ -190,6 +704,20 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
190
704
|
* Get a simulation by id
|
|
191
705
|
*/
|
|
192
706
|
async getSimulationRaw(requestParameters: GetSimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceGetSimulationResponse>> {
|
|
707
|
+
if (requestParameters['projectOwner'] == null) {
|
|
708
|
+
throw new runtime.RequiredError(
|
|
709
|
+
'projectOwner',
|
|
710
|
+
'Required parameter "projectOwner" was null or undefined when calling getSimulation().'
|
|
711
|
+
);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
if (requestParameters['projectSlug'] == null) {
|
|
715
|
+
throw new runtime.RequiredError(
|
|
716
|
+
'projectSlug',
|
|
717
|
+
'Required parameter "projectSlug" was null or undefined when calling getSimulation().'
|
|
718
|
+
);
|
|
719
|
+
}
|
|
720
|
+
|
|
193
721
|
if (requestParameters['simulationId'] == null) {
|
|
194
722
|
throw new runtime.RequiredError(
|
|
195
723
|
'simulationId',
|
|
@@ -199,14 +727,6 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
199
727
|
|
|
200
728
|
const queryParameters: any = {};
|
|
201
729
|
|
|
202
|
-
if (requestParameters['projectOwner'] != null) {
|
|
203
|
-
queryParameters['projectOwner'] = requestParameters['projectOwner'];
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
if (requestParameters['projectSlug'] != null) {
|
|
207
|
-
queryParameters['projectSlug'] = requestParameters['projectSlug'];
|
|
208
|
-
}
|
|
209
|
-
|
|
210
730
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
211
731
|
|
|
212
732
|
if (this.configuration && this.configuration.apiKey) {
|
|
@@ -214,7 +734,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
214
734
|
}
|
|
215
735
|
|
|
216
736
|
const response = await this.request({
|
|
217
|
-
path: `/api/v1/solidity/
|
|
737
|
+
path: `/api/v1/solidity/{projectOwner}/{projectSlug}/simulation/{simulationId}`.replace(`{${"projectOwner"}}`, encodeURIComponent(String(requestParameters['projectOwner']))).replace(`{${"projectSlug"}}`, encodeURIComponent(String(requestParameters['projectSlug']))).replace(`{${"simulationId"}}`, encodeURIComponent(String(requestParameters['simulationId']))),
|
|
218
738
|
method: 'GET',
|
|
219
739
|
headers: headerParameters,
|
|
220
740
|
query: queryParameters,
|
|
@@ -234,24 +754,30 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
234
754
|
/**
|
|
235
755
|
* Get a bundle simulation by id
|
|
236
756
|
*/
|
|
237
|
-
async
|
|
238
|
-
if (requestParameters['
|
|
757
|
+
async getSimulationBundleInProjectRaw(requestParameters: GetSimulationBundleInProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceGetSimulationBundleResponse>> {
|
|
758
|
+
if (requestParameters['projectOwner'] == null) {
|
|
239
759
|
throw new runtime.RequiredError(
|
|
240
|
-
'
|
|
241
|
-
'Required parameter "
|
|
760
|
+
'projectOwner',
|
|
761
|
+
'Required parameter "projectOwner" was null or undefined when calling getSimulationBundleInProject().'
|
|
242
762
|
);
|
|
243
763
|
}
|
|
244
764
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
765
|
+
if (requestParameters['projectSlug'] == null) {
|
|
766
|
+
throw new runtime.RequiredError(
|
|
767
|
+
'projectSlug',
|
|
768
|
+
'Required parameter "projectSlug" was null or undefined when calling getSimulationBundleInProject().'
|
|
769
|
+
);
|
|
249
770
|
}
|
|
250
771
|
|
|
251
|
-
if (requestParameters['
|
|
252
|
-
|
|
772
|
+
if (requestParameters['bundleId'] == null) {
|
|
773
|
+
throw new runtime.RequiredError(
|
|
774
|
+
'bundleId',
|
|
775
|
+
'Required parameter "bundleId" was null or undefined when calling getSimulationBundleInProject().'
|
|
776
|
+
);
|
|
253
777
|
}
|
|
254
778
|
|
|
779
|
+
const queryParameters: any = {};
|
|
780
|
+
|
|
255
781
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
256
782
|
|
|
257
783
|
if (this.configuration && this.configuration.apiKey) {
|
|
@@ -259,7 +785,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
259
785
|
}
|
|
260
786
|
|
|
261
787
|
const response = await this.request({
|
|
262
|
-
path: `/api/v1/solidity/
|
|
788
|
+
path: `/api/v1/solidity/{projectOwner}/{projectSlug}/simulation_bundle/{bundleId}`.replace(`{${"projectOwner"}}`, encodeURIComponent(String(requestParameters['projectOwner']))).replace(`{${"projectSlug"}}`, encodeURIComponent(String(requestParameters['projectSlug']))).replace(`{${"bundleId"}}`, encodeURIComponent(String(requestParameters['bundleId']))),
|
|
263
789
|
method: 'GET',
|
|
264
790
|
headers: headerParameters,
|
|
265
791
|
query: queryParameters,
|
|
@@ -271,8 +797,8 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
271
797
|
/**
|
|
272
798
|
* Get a bundle simulation by id
|
|
273
799
|
*/
|
|
274
|
-
async
|
|
275
|
-
const response = await this.
|
|
800
|
+
async getSimulationBundleInProject(requestParameters: GetSimulationBundleInProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceGetSimulationBundleResponse> {
|
|
801
|
+
const response = await this.getSimulationBundleInProjectRaw(requestParameters, initOverrides);
|
|
276
802
|
return await response.value();
|
|
277
803
|
}
|
|
278
804
|
|
|
@@ -280,16 +806,22 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
280
806
|
* Get existing transaction simulations
|
|
281
807
|
*/
|
|
282
808
|
async getSimulationsRaw(requestParameters: GetSimulationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceGetSimulationsResponse>> {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
809
|
+
if (requestParameters['projectOwner'] == null) {
|
|
810
|
+
throw new runtime.RequiredError(
|
|
811
|
+
'projectOwner',
|
|
812
|
+
'Required parameter "projectOwner" was null or undefined when calling getSimulations().'
|
|
813
|
+
);
|
|
287
814
|
}
|
|
288
815
|
|
|
289
|
-
if (requestParameters['projectSlug']
|
|
290
|
-
|
|
816
|
+
if (requestParameters['projectSlug'] == null) {
|
|
817
|
+
throw new runtime.RequiredError(
|
|
818
|
+
'projectSlug',
|
|
819
|
+
'Required parameter "projectSlug" was null or undefined when calling getSimulations().'
|
|
820
|
+
);
|
|
291
821
|
}
|
|
292
822
|
|
|
823
|
+
const queryParameters: any = {};
|
|
824
|
+
|
|
293
825
|
if (requestParameters['labelContains'] != null) {
|
|
294
826
|
queryParameters['labelContains'] = requestParameters['labelContains'];
|
|
295
827
|
}
|
|
@@ -309,7 +841,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
309
841
|
}
|
|
310
842
|
|
|
311
843
|
const response = await this.request({
|
|
312
|
-
path: `/api/v1/solidity/
|
|
844
|
+
path: `/api/v1/solidity/{projectOwner}/{projectSlug}/simulation`.replace(`{${"projectOwner"}}`, encodeURIComponent(String(requestParameters['projectOwner']))).replace(`{${"projectSlug"}}`, encodeURIComponent(String(requestParameters['projectSlug']))),
|
|
313
845
|
method: 'GET',
|
|
314
846
|
headers: headerParameters,
|
|
315
847
|
query: queryParameters,
|
|
@@ -321,7 +853,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
321
853
|
/**
|
|
322
854
|
* Get existing transaction simulations
|
|
323
855
|
*/
|
|
324
|
-
async getSimulations(requestParameters: GetSimulationsRequest
|
|
856
|
+
async getSimulations(requestParameters: GetSimulationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceGetSimulationsResponse> {
|
|
325
857
|
const response = await this.getSimulationsRaw(requestParameters, initOverrides);
|
|
326
858
|
return await response.value();
|
|
327
859
|
}
|
|
@@ -330,6 +862,20 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
330
862
|
* Search for transactions
|
|
331
863
|
*/
|
|
332
864
|
async searchTransactionsRaw(requestParameters: SearchTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TxindexEvmSearchTransactionsResponse>> {
|
|
865
|
+
if (requestParameters['projectOwner'] == null) {
|
|
866
|
+
throw new runtime.RequiredError(
|
|
867
|
+
'projectOwner',
|
|
868
|
+
'Required parameter "projectOwner" was null or undefined when calling searchTransactions().'
|
|
869
|
+
);
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
if (requestParameters['projectSlug'] == null) {
|
|
873
|
+
throw new runtime.RequiredError(
|
|
874
|
+
'projectSlug',
|
|
875
|
+
'Required parameter "projectSlug" was null or undefined when calling searchTransactions().'
|
|
876
|
+
);
|
|
877
|
+
}
|
|
878
|
+
|
|
333
879
|
const queryParameters: any = {};
|
|
334
880
|
|
|
335
881
|
if (requestParameters['chainId'] != null) {
|
|
@@ -395,7 +941,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
395
941
|
}
|
|
396
942
|
|
|
397
943
|
const response = await this.request({
|
|
398
|
-
path: `/api/v1/solidity/search_transactions`,
|
|
944
|
+
path: `/api/v1/solidity/{projectOwner}/{projectSlug}/search_transactions`.replace(`{${"projectOwner"}}`, encodeURIComponent(String(requestParameters['projectOwner']))).replace(`{${"projectSlug"}}`, encodeURIComponent(String(requestParameters['projectSlug']))),
|
|
399
945
|
method: 'GET',
|
|
400
946
|
headers: headerParameters,
|
|
401
947
|
query: queryParameters,
|
|
@@ -407,7 +953,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
407
953
|
/**
|
|
408
954
|
* Search for transactions
|
|
409
955
|
*/
|
|
410
|
-
async searchTransactions(requestParameters: SearchTransactionsRequest
|
|
956
|
+
async searchTransactions(requestParameters: SearchTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TxindexEvmSearchTransactionsResponse> {
|
|
411
957
|
const response = await this.searchTransactionsRaw(requestParameters, initOverrides);
|
|
412
958
|
return await response.value();
|
|
413
959
|
}
|
|
@@ -417,6 +963,27 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
417
963
|
* Single simulation
|
|
418
964
|
*/
|
|
419
965
|
async simulateTransactionRaw(requestParameters: SimulateTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceSimulateTransactionResponse>> {
|
|
966
|
+
if (requestParameters['projectOwner'] == null) {
|
|
967
|
+
throw new runtime.RequiredError(
|
|
968
|
+
'projectOwner',
|
|
969
|
+
'Required parameter "projectOwner" was null or undefined when calling simulateTransaction().'
|
|
970
|
+
);
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
if (requestParameters['projectSlug'] == null) {
|
|
974
|
+
throw new runtime.RequiredError(
|
|
975
|
+
'projectSlug',
|
|
976
|
+
'Required parameter "projectSlug" was null or undefined when calling simulateTransaction().'
|
|
977
|
+
);
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
if (requestParameters['chainSpecChainId'] == null) {
|
|
981
|
+
throw new runtime.RequiredError(
|
|
982
|
+
'chainSpecChainId',
|
|
983
|
+
'Required parameter "chainSpecChainId" was null or undefined when calling simulateTransaction().'
|
|
984
|
+
);
|
|
985
|
+
}
|
|
986
|
+
|
|
420
987
|
if (requestParameters['body'] == null) {
|
|
421
988
|
throw new runtime.RequiredError(
|
|
422
989
|
'body',
|
|
@@ -435,11 +1002,11 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
435
1002
|
}
|
|
436
1003
|
|
|
437
1004
|
const response = await this.request({
|
|
438
|
-
path: `/api/v1/solidity/
|
|
1005
|
+
path: `/api/v1/solidity/{projectOwner}/{projectSlug}/{chainSpec.chainId}/simulation`.replace(`{${"projectOwner"}}`, encodeURIComponent(String(requestParameters['projectOwner']))).replace(`{${"projectSlug"}}`, encodeURIComponent(String(requestParameters['projectSlug']))).replace(`{${"chainSpec.chainId"}}`, encodeURIComponent(String(requestParameters['chainSpecChainId']))),
|
|
439
1006
|
method: 'POST',
|
|
440
1007
|
headers: headerParameters,
|
|
441
1008
|
query: queryParameters,
|
|
442
|
-
body:
|
|
1009
|
+
body: SolidityServiceSolidityAPIServiceSimulateTransactionBodyToJSON(requestParameters['body']),
|
|
443
1010
|
}, initOverrides);
|
|
444
1011
|
|
|
445
1012
|
return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceSimulateTransactionResponseFromJSON(jsonValue));
|
|
@@ -454,11 +1021,95 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
454
1021
|
return await response.value();
|
|
455
1022
|
}
|
|
456
1023
|
|
|
1024
|
+
/**
|
|
1025
|
+
* 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.
|
|
1026
|
+
* Single simulation
|
|
1027
|
+
*/
|
|
1028
|
+
async simulateTransaction2Raw(requestParameters: SimulateTransaction2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceSimulateTransactionResponse>> {
|
|
1029
|
+
if (requestParameters['projectOwner'] == null) {
|
|
1030
|
+
throw new runtime.RequiredError(
|
|
1031
|
+
'projectOwner',
|
|
1032
|
+
'Required parameter "projectOwner" was null or undefined when calling simulateTransaction2().'
|
|
1033
|
+
);
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
if (requestParameters['projectSlug'] == null) {
|
|
1037
|
+
throw new runtime.RequiredError(
|
|
1038
|
+
'projectSlug',
|
|
1039
|
+
'Required parameter "projectSlug" was null or undefined when calling simulateTransaction2().'
|
|
1040
|
+
);
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
if (requestParameters['chainSpecForkId'] == null) {
|
|
1044
|
+
throw new runtime.RequiredError(
|
|
1045
|
+
'chainSpecForkId',
|
|
1046
|
+
'Required parameter "chainSpecForkId" was null or undefined when calling simulateTransaction2().'
|
|
1047
|
+
);
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
if (requestParameters['body'] == null) {
|
|
1051
|
+
throw new runtime.RequiredError(
|
|
1052
|
+
'body',
|
|
1053
|
+
'Required parameter "body" was null or undefined when calling simulateTransaction2().'
|
|
1054
|
+
);
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
const queryParameters: any = {};
|
|
1058
|
+
|
|
1059
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1060
|
+
|
|
1061
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1062
|
+
|
|
1063
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1064
|
+
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
const response = await this.request({
|
|
1068
|
+
path: `/api/v1/solidity/{projectOwner}/{projectSlug}/fork/{chainSpec.forkId}/simulation`.replace(`{${"projectOwner"}}`, encodeURIComponent(String(requestParameters['projectOwner']))).replace(`{${"projectSlug"}}`, encodeURIComponent(String(requestParameters['projectSlug']))).replace(`{${"chainSpec.forkId"}}`, encodeURIComponent(String(requestParameters['chainSpecForkId']))),
|
|
1069
|
+
method: 'POST',
|
|
1070
|
+
headers: headerParameters,
|
|
1071
|
+
query: queryParameters,
|
|
1072
|
+
body: SolidityServiceSolidityAPIServiceSimulateTransactionBodyToJSON(requestParameters['body']),
|
|
1073
|
+
}, initOverrides);
|
|
1074
|
+
|
|
1075
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceSimulateTransactionResponseFromJSON(jsonValue));
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* 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.
|
|
1080
|
+
* Single simulation
|
|
1081
|
+
*/
|
|
1082
|
+
async simulateTransaction2(requestParameters: SimulateTransaction2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceSimulateTransactionResponse> {
|
|
1083
|
+
const response = await this.simulateTransaction2Raw(requestParameters, initOverrides);
|
|
1084
|
+
return await response.value();
|
|
1085
|
+
}
|
|
1086
|
+
|
|
457
1087
|
/**
|
|
458
1088
|
* 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.
|
|
459
1089
|
* Bundle simulation
|
|
460
1090
|
*/
|
|
461
1091
|
async simulateTransactionBundleRaw(requestParameters: SimulateTransactionBundleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceSimulateTransactionBundleResponse>> {
|
|
1092
|
+
if (requestParameters['projectOwner'] == null) {
|
|
1093
|
+
throw new runtime.RequiredError(
|
|
1094
|
+
'projectOwner',
|
|
1095
|
+
'Required parameter "projectOwner" was null or undefined when calling simulateTransactionBundle().'
|
|
1096
|
+
);
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
if (requestParameters['projectSlug'] == null) {
|
|
1100
|
+
throw new runtime.RequiredError(
|
|
1101
|
+
'projectSlug',
|
|
1102
|
+
'Required parameter "projectSlug" was null or undefined when calling simulateTransactionBundle().'
|
|
1103
|
+
);
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
if (requestParameters['chainSpecChainId'] == null) {
|
|
1107
|
+
throw new runtime.RequiredError(
|
|
1108
|
+
'chainSpecChainId',
|
|
1109
|
+
'Required parameter "chainSpecChainId" was null or undefined when calling simulateTransactionBundle().'
|
|
1110
|
+
);
|
|
1111
|
+
}
|
|
1112
|
+
|
|
462
1113
|
if (requestParameters['body'] == null) {
|
|
463
1114
|
throw new runtime.RequiredError(
|
|
464
1115
|
'body',
|
|
@@ -477,11 +1128,11 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
477
1128
|
}
|
|
478
1129
|
|
|
479
1130
|
const response = await this.request({
|
|
480
|
-
path: `/api/v1/solidity/
|
|
1131
|
+
path: `/api/v1/solidity/{projectOwner}/{projectSlug}/{chainSpec.chainId}/simulation_bundle`.replace(`{${"projectOwner"}}`, encodeURIComponent(String(requestParameters['projectOwner']))).replace(`{${"projectSlug"}}`, encodeURIComponent(String(requestParameters['projectSlug']))).replace(`{${"chainSpec.chainId"}}`, encodeURIComponent(String(requestParameters['chainSpecChainId']))),
|
|
481
1132
|
method: 'POST',
|
|
482
1133
|
headers: headerParameters,
|
|
483
1134
|
query: queryParameters,
|
|
484
|
-
body:
|
|
1135
|
+
body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleBodyToJSON(requestParameters['body']),
|
|
485
1136
|
}, initOverrides);
|
|
486
1137
|
|
|
487
1138
|
return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceSimulateTransactionBundleResponseFromJSON(jsonValue));
|
|
@@ -496,4 +1147,67 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
|
|
|
496
1147
|
return await response.value();
|
|
497
1148
|
}
|
|
498
1149
|
|
|
1150
|
+
/**
|
|
1151
|
+
* 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.
|
|
1152
|
+
* Bundle simulation
|
|
1153
|
+
*/
|
|
1154
|
+
async simulateTransactionBundle2Raw(requestParameters: SimulateTransactionBundle2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceSimulateTransactionBundleResponse>> {
|
|
1155
|
+
if (requestParameters['projectOwner'] == null) {
|
|
1156
|
+
throw new runtime.RequiredError(
|
|
1157
|
+
'projectOwner',
|
|
1158
|
+
'Required parameter "projectOwner" was null or undefined when calling simulateTransactionBundle2().'
|
|
1159
|
+
);
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
if (requestParameters['projectSlug'] == null) {
|
|
1163
|
+
throw new runtime.RequiredError(
|
|
1164
|
+
'projectSlug',
|
|
1165
|
+
'Required parameter "projectSlug" was null or undefined when calling simulateTransactionBundle2().'
|
|
1166
|
+
);
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
if (requestParameters['chainSpecForkId'] == null) {
|
|
1170
|
+
throw new runtime.RequiredError(
|
|
1171
|
+
'chainSpecForkId',
|
|
1172
|
+
'Required parameter "chainSpecForkId" was null or undefined when calling simulateTransactionBundle2().'
|
|
1173
|
+
);
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
if (requestParameters['body'] == null) {
|
|
1177
|
+
throw new runtime.RequiredError(
|
|
1178
|
+
'body',
|
|
1179
|
+
'Required parameter "body" was null or undefined when calling simulateTransactionBundle2().'
|
|
1180
|
+
);
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
const queryParameters: any = {};
|
|
1184
|
+
|
|
1185
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1186
|
+
|
|
1187
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1188
|
+
|
|
1189
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1190
|
+
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
const response = await this.request({
|
|
1194
|
+
path: `/api/v1/solidity/{projectOwner}/{projectSlug}/fork/{chainSpec.forkId}/simulation_bundle`.replace(`{${"projectOwner"}}`, encodeURIComponent(String(requestParameters['projectOwner']))).replace(`{${"projectSlug"}}`, encodeURIComponent(String(requestParameters['projectSlug']))).replace(`{${"chainSpec.forkId"}}`, encodeURIComponent(String(requestParameters['chainSpecForkId']))),
|
|
1195
|
+
method: 'POST',
|
|
1196
|
+
headers: headerParameters,
|
|
1197
|
+
query: queryParameters,
|
|
1198
|
+
body: SolidityServiceSolidityAPIServiceSimulateTransactionBundleBodyToJSON(requestParameters['body']),
|
|
1199
|
+
}, initOverrides);
|
|
1200
|
+
|
|
1201
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceSimulateTransactionBundleResponseFromJSON(jsonValue));
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
/**
|
|
1205
|
+
* 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.
|
|
1206
|
+
* Bundle simulation
|
|
1207
|
+
*/
|
|
1208
|
+
async simulateTransactionBundle2(requestParameters: SimulateTransactionBundle2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceSimulateTransactionBundleResponse> {
|
|
1209
|
+
const response = await this.simulateTransactionBundle2Raw(requestParameters, initOverrides);
|
|
1210
|
+
return await response.value();
|
|
1211
|
+
}
|
|
1212
|
+
|
|
499
1213
|
}
|