Skip to content

Commit 205a508

Browse files
author
Sentio Bot
committed
chore: update
1 parent 11d9a6a commit 205a508

6 files changed

+245
-50
lines changed

doc/index.html

Lines changed: 113 additions & 40 deletions
Large diffs are not rendered by default.

openapi.json

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,20 +1113,34 @@
11131113
"parameters": [
11141114
{
11151115
"name": "projectOwner",
1116+
"description": "Required if fork id is specified",
11161117
"in": "query",
11171118
"required": false,
11181119
"type": "string"
11191120
},
11201121
{
11211122
"name": "projectSlug",
1123+
"description": "Required if fork id is specified",
11221124
"in": "query",
11231125
"required": false,
11241126
"type": "string"
11251127
},
11261128
{
11271129
"name": "networkId",
11281130
"in": "query",
1129-
"required": true,
1131+
"required": false,
1132+
"type": "string"
1133+
},
1134+
{
1135+
"name": "chainSpec.chainId",
1136+
"in": "query",
1137+
"required": false,
1138+
"type": "string"
1139+
},
1140+
{
1141+
"name": "chainSpec.forkId",
1142+
"in": "query",
1143+
"required": false,
11301144
"type": "string"
11311145
},
11321146
{
@@ -4188,6 +4202,17 @@
41884202
}
41894203
}
41904204
},
4205+
"solidity_service.ChainIdentifier": {
4206+
"type": "object",
4207+
"properties": {
4208+
"chainId": {
4209+
"type": "string"
4210+
},
4211+
"forkId": {
4212+
"type": "string"
4213+
}
4214+
}
4215+
},
41914216
"solidity_service.CompileSourceInternalResponse": {
41924217
"type": "object",
41934218
"properties": {
@@ -4619,6 +4644,9 @@
46194644
"type": "string",
46204645
"title": "we should use chain_id in favor of network_id"
46214646
},
4647+
"chainSpec": {
4648+
"$ref": "#/definitions/solidity_service.ChainIdentifier"
4649+
},
46224650
"to": {
46234651
"type": "string"
46244652
},
@@ -4690,6 +4718,7 @@
46904718
},
46914719
"required": [
46924720
"networkId",
4721+
"chainSpec",
46934722
"to",
46944723
"input",
46954724
"blockNumber",

src/apis/DebugAndSimulationApi.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ import {
4747
} from '../models/index.js';
4848

4949
export interface GetCallTraceRequest {
50-
networkId: string;
5150
projectOwner?: string;
5251
projectSlug?: string;
52+
networkId?: string;
53+
chainSpecChainId?: string;
54+
chainSpecForkId?: string;
5355
txIdTxHash?: string;
5456
txIdSimulationId?: string;
5557
txIdBundleId?: string;
@@ -113,13 +115,6 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
113115
* Get indexed call trace
114116
*/
115117
async getCallTraceRaw(requestParameters: GetCallTraceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
116-
if (requestParameters['networkId'] == null) {
117-
throw new runtime.RequiredError(
118-
'networkId',
119-
'Required parameter "networkId" was null or undefined when calling getCallTrace().'
120-
);
121-
}
122-
123118
const queryParameters: any = {};
124119

125120
if (requestParameters['projectOwner'] != null) {
@@ -134,6 +129,14 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
134129
queryParameters['networkId'] = requestParameters['networkId'];
135130
}
136131

132+
if (requestParameters['chainSpecChainId'] != null) {
133+
queryParameters['chainSpec.chainId'] = requestParameters['chainSpecChainId'];
134+
}
135+
136+
if (requestParameters['chainSpecForkId'] != null) {
137+
queryParameters['chainSpec.forkId'] = requestParameters['chainSpecForkId'];
138+
}
139+
137140
if (requestParameters['txIdTxHash'] != null) {
138141
queryParameters['txId.txHash'] = requestParameters['txIdTxHash'];
139142
}
@@ -178,7 +181,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
178181
* 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. ![screenshot](https://raw.githubusercontent.com/sentioxyz/docs/main/.gitbook/assets/image%20(2)%20(1)%20(1)%20(1).png)
179182
* Get indexed call trace
180183
*/
181-
async getCallTrace(requestParameters: GetCallTraceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
184+
async getCallTrace(requestParameters: GetCallTraceRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
182185
const response = await this.getCallTraceRaw(requestParameters, initOverrides);
183186
return await response.value();
184187
}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* Sentio API
5+
* Sentio Open API for query data
6+
*
7+
* The version of the OpenAPI document: version not set
8+
*
9+
*
10+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11+
* https://openapi-generator.tech
12+
* Do not edit the class manually.
13+
*/
14+
15+
import { mapValues } from '../runtime.js';
16+
/**
17+
*
18+
* @export
19+
* @interface SolidityServiceChainIdentifier
20+
*/
21+
export interface SolidityServiceChainIdentifier {
22+
/**
23+
*
24+
* @type {string}
25+
* @memberof SolidityServiceChainIdentifier
26+
*/
27+
chainId?: string;
28+
/**
29+
*
30+
* @type {string}
31+
* @memberof SolidityServiceChainIdentifier
32+
*/
33+
forkId?: string;
34+
}
35+
36+
/**
37+
* Check if a given object implements the SolidityServiceChainIdentifier interface.
38+
*/
39+
export function instanceOfSolidityServiceChainIdentifier(value: object): value is SolidityServiceChainIdentifier {
40+
return true;
41+
}
42+
43+
export function SolidityServiceChainIdentifierFromJSON(json: any): SolidityServiceChainIdentifier {
44+
return SolidityServiceChainIdentifierFromJSONTyped(json, false);
45+
}
46+
47+
export function SolidityServiceChainIdentifierFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceChainIdentifier {
48+
if (json == null) {
49+
return json;
50+
}
51+
return {
52+
53+
'chainId': json['chainId'] == null ? undefined : json['chainId'],
54+
'forkId': json['forkId'] == null ? undefined : json['forkId'],
55+
};
56+
}
57+
58+
export function SolidityServiceChainIdentifierToJSON(json: any): SolidityServiceChainIdentifier {
59+
return SolidityServiceChainIdentifierToJSONTyped(json, false);
60+
}
61+
62+
export function SolidityServiceChainIdentifierToJSONTyped(value?: SolidityServiceChainIdentifier | null, ignoreDiscriminator: boolean = false): any {
63+
if (value == null) {
64+
return value;
65+
}
66+
67+
return {
68+
69+
'chainId': value['chainId'],
70+
'forkId': value['forkId'],
71+
};
72+
}
73+

src/models/SolidityServiceSimulation.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ import {
3434
SolidityServiceStateOverrideToJSON,
3535
SolidityServiceStateOverrideToJSONTyped,
3636
} from './SolidityServiceStateOverride.js';
37+
import type { SolidityServiceChainIdentifier } from './SolidityServiceChainIdentifier.js';
38+
import {
39+
SolidityServiceChainIdentifierFromJSON,
40+
SolidityServiceChainIdentifierFromJSONTyped,
41+
SolidityServiceChainIdentifierToJSON,
42+
SolidityServiceChainIdentifierToJSONTyped,
43+
} from './SolidityServiceChainIdentifier.js';
3744
import type { SolidityServiceBlockOverrides } from './SolidityServiceBlockOverrides.js';
3845
import {
3946
SolidityServiceBlockOverridesFromJSON,
@@ -78,6 +85,12 @@ export interface SolidityServiceSimulation {
7885
* @memberof SolidityServiceSimulation
7986
*/
8087
chainId?: string;
88+
/**
89+
*
90+
* @type {SolidityServiceChainIdentifier}
91+
* @memberof SolidityServiceSimulation
92+
*/
93+
chainSpec: SolidityServiceChainIdentifier;
8194
/**
8295
*
8396
* @type {string}
@@ -193,6 +206,7 @@ export interface SolidityServiceSimulation {
193206
*/
194207
export function instanceOfSolidityServiceSimulation(value: object): value is SolidityServiceSimulation {
195208
if (!('networkId' in value) || value['networkId'] === undefined) return false;
209+
if (!('chainSpec' in value) || value['chainSpec'] === undefined) return false;
196210
if (!('to' in value) || value['to'] === undefined) return false;
197211
if (!('input' in value) || value['input'] === undefined) return false;
198212
if (!('blockNumber' in value) || value['blockNumber'] === undefined) return false;
@@ -219,6 +233,7 @@ export function SolidityServiceSimulationFromJSONTyped(json: any, ignoreDiscrimi
219233
'bundleId': json['bundleId'] == null ? undefined : json['bundleId'],
220234
'networkId': json['networkId'],
221235
'chainId': json['chainId'] == null ? undefined : json['chainId'],
236+
'chainSpec': SolidityServiceChainIdentifierFromJSON(json['chainSpec']),
222237
'to': json['to'],
223238
'input': json['input'],
224239
'blockNumber': json['blockNumber'],
@@ -256,6 +271,7 @@ export function SolidityServiceSimulationFromJSONTyped(json: any, ignoreDiscrimi
256271
'bundleId': value['bundleId'],
257272
'networkId': value['networkId'],
258273
'chainId': value['chainId'],
274+
'chainSpec': SolidityServiceChainIdentifierToJSON(value['chainSpec']),
259275
'to': value['to'],
260276
'input': value['input'],
261277
'blockNumber': value['blockNumber'],

src/models/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ export * from './PriceServiceGetPriceResponse.js';
133133
export * from './PriceServiceListCoinsResponse.js';
134134
export * from './SolidityServiceBaseChainConfig.js';
135135
export * from './SolidityServiceBlockOverrides.js';
136+
export * from './SolidityServiceChainIdentifier.js';
136137
export * from './SolidityServiceCompileSourceInternalResponse.js';
137138
export * from './SolidityServiceCompilerOptions.js';
138139
export * from './SolidityServiceContractKeyInfo.js';

0 commit comments

Comments
 (0)