Skip to content

Commit f1334a6

Browse files
author
Sentio Bot
committed
chore: update
1 parent ef4c92e commit f1334a6

9 files changed

+1032
-8
lines changed

doc/index.html

Lines changed: 544 additions & 4 deletions
Large diffs are not rendered by default.

openapi.json

Lines changed: 93 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1656,6 +1656,40 @@
16561656
]
16571657
}
16581658
},
1659+
"/api/v1/solidity/{projectOwner}/{projectSlug}/fork/{id}/state": {
1660+
"get": {
1661+
"summary": "option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {\n };",
1662+
"operationId": "GetForkState",
1663+
"responses": {
1664+
"200": {
1665+
"description": "A successful response.",
1666+
"schema": {
1667+
"$ref": "#/definitions/google.api.HttpBody"
1668+
}
1669+
}
1670+
},
1671+
"parameters": [
1672+
{
1673+
"name": "projectOwner",
1674+
"in": "path",
1675+
"required": true,
1676+
"type": "string"
1677+
},
1678+
{
1679+
"name": "projectSlug",
1680+
"in": "path",
1681+
"required": true,
1682+
"type": "string"
1683+
},
1684+
{
1685+
"name": "id",
1686+
"in": "path",
1687+
"required": true,
1688+
"type": "string"
1689+
}
1690+
]
1691+
}
1692+
},
16591693
"/api/v1/solidity/{projectOwner}/{projectSlug}/search_transactions": {
16601694
"get": {
16611695
"summary": "Search for transactions",
@@ -5143,7 +5177,31 @@
51435177
"default": "MANAGED"
51445178
},
51455179
"solidity_service.GetForkInfoResponse": {
5146-
"type": "object"
5180+
"type": "object",
5181+
"properties": {
5182+
"currentBlockNumber": {
5183+
"type": "string"
5184+
},
5185+
"currentBlockTimestamp": {
5186+
"type": "string",
5187+
"format": "uint64"
5188+
},
5189+
"currentBlockHash": {
5190+
"type": "string"
5191+
},
5192+
"hardFork": {
5193+
"type": "string"
5194+
},
5195+
"transactionOrder": {
5196+
"type": "string"
5197+
},
5198+
"environment": {
5199+
"$ref": "#/definitions/solidity_service.NodeEnvironment"
5200+
},
5201+
"forkConfig": {
5202+
"$ref": "#/definitions/solidity_service.NodeForkConfig"
5203+
}
5204+
}
51475205
},
51485206
"solidity_service.GetForkResponse": {
51495207
"type": "object",
@@ -5313,6 +5371,40 @@
53135371
}
53145372
}
53155373
},
5374+
"solidity_service.NodeEnvironment": {
5375+
"type": "object",
5376+
"properties": {
5377+
"chainId": {
5378+
"type": "string",
5379+
"format": "uint64"
5380+
},
5381+
"baseFee": {
5382+
"type": "string"
5383+
},
5384+
"gasLimit": {
5385+
"type": "string"
5386+
},
5387+
"gasPrice": {
5388+
"type": "string"
5389+
}
5390+
}
5391+
},
5392+
"solidity_service.NodeForkConfig": {
5393+
"type": "object",
5394+
"properties": {
5395+
"forkUrl": {
5396+
"type": "string"
5397+
},
5398+
"forkBlockNumber": {
5399+
"type": "string",
5400+
"format": "uint64"
5401+
},
5402+
"forkRetryBackoff": {
5403+
"type": "string",
5404+
"format": "uint64"
5405+
}
5406+
}
5407+
},
53165408
"solidity_service.Optimizer": {
53175409
"type": "object",
53185410
"properties": {

src/apis/DefaultApi.ts

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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+
16+
import * as runtime from '../runtime.js';
17+
import type {
18+
GoogleApiHttpBody,
19+
} from '../models/index.js';
20+
import {
21+
GoogleApiHttpBodyFromJSON,
22+
GoogleApiHttpBodyToJSON,
23+
} from '../models/index.js';
24+
25+
export interface GetForkStateRequest {
26+
projectOwner: string;
27+
projectSlug: string;
28+
id: string;
29+
}
30+
31+
/**
32+
*
33+
*/
34+
export class DefaultApi extends runtime.BaseAPI {
35+
36+
/**
37+
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { };
38+
*/
39+
async getForkStateRaw(requestParameters: GetForkStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
40+
if (requestParameters['projectOwner'] == null) {
41+
throw new runtime.RequiredError(
42+
'projectOwner',
43+
'Required parameter "projectOwner" was null or undefined when calling getForkState().'
44+
);
45+
}
46+
47+
if (requestParameters['projectSlug'] == null) {
48+
throw new runtime.RequiredError(
49+
'projectSlug',
50+
'Required parameter "projectSlug" was null or undefined when calling getForkState().'
51+
);
52+
}
53+
54+
if (requestParameters['id'] == null) {
55+
throw new runtime.RequiredError(
56+
'id',
57+
'Required parameter "id" was null or undefined when calling getForkState().'
58+
);
59+
}
60+
61+
const queryParameters: any = {};
62+
63+
const headerParameters: runtime.HTTPHeaders = {};
64+
65+
if (this.configuration && this.configuration.apiKey) {
66+
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
67+
}
68+
69+
const response = await this.request({
70+
path: `/api/v1/solidity/{projectOwner}/{projectSlug}/fork/{id}/state`.replace(`{${"projectOwner"}}`, encodeURIComponent(String(requestParameters['projectOwner']))).replace(`{${"projectSlug"}}`, encodeURIComponent(String(requestParameters['projectSlug']))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
71+
method: 'GET',
72+
headers: headerParameters,
73+
query: queryParameters,
74+
}, initOverrides);
75+
76+
return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue));
77+
}
78+
79+
/**
80+
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { };
81+
*/
82+
async getForkState(requestParameters: GetForkStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
83+
const response = await this.getForkStateRaw(requestParameters, initOverrides);
84+
return await response.value();
85+
}
86+
87+
}

src/apis/ForksApi.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import type {
1818
SolidityServiceCreateForkResponse,
1919
SolidityServiceForkServiceCreateForkBody,
2020
SolidityServiceForkServiceUpdateForkBody,
21+
SolidityServiceGetForkInfoResponse,
2122
SolidityServiceGetForkResponse,
2223
SolidityServiceListForksResponse,
2324
SolidityServiceUpdateForkResponse,
@@ -29,6 +30,8 @@ import {
2930
SolidityServiceForkServiceCreateForkBodyToJSON,
3031
SolidityServiceForkServiceUpdateForkBodyFromJSON,
3132
SolidityServiceForkServiceUpdateForkBodyToJSON,
33+
SolidityServiceGetForkInfoResponseFromJSON,
34+
SolidityServiceGetForkInfoResponseToJSON,
3235
SolidityServiceGetForkResponseFromJSON,
3336
SolidityServiceGetForkResponseToJSON,
3437
SolidityServiceListForksResponseFromJSON,
@@ -230,7 +233,7 @@ export class ForksApi extends runtime.BaseAPI {
230233

231234
/**
232235
*/
233-
async getForkInfoRaw(requestParameters: GetForkInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
236+
async getForkInfoRaw(requestParameters: GetForkInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceGetForkInfoResponse>> {
234237
if (requestParameters['projectOwner'] == null) {
235238
throw new runtime.RequiredError(
236239
'projectOwner',
@@ -267,12 +270,12 @@ export class ForksApi extends runtime.BaseAPI {
267270
query: queryParameters,
268271
}, initOverrides);
269272

270-
return new runtime.JSONApiResponse<any>(response);
273+
return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceGetForkInfoResponseFromJSON(jsonValue));
271274
}
272275

273276
/**
274277
*/
275-
async getForkInfo(requestParameters: GetForkInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
278+
async getForkInfo(requestParameters: GetForkInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceGetForkInfoResponse> {
276279
const response = await this.getForkInfoRaw(requestParameters, initOverrides);
277280
return await response.value();
278281
}

src/apis/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/* eslint-disable */
33
export * from './DataApi.js';
44
export * from './DebugAndSimulationApi.js';
5+
export * from './DefaultApi.js';
56
export * from './ForksApi.js';
67
export * from './PriceApi.js';
78
export * from './WebApi.js';
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
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+
import type { SolidityServiceNodeEnvironment } from './SolidityServiceNodeEnvironment.js';
17+
import {
18+
SolidityServiceNodeEnvironmentFromJSON,
19+
SolidityServiceNodeEnvironmentFromJSONTyped,
20+
SolidityServiceNodeEnvironmentToJSON,
21+
SolidityServiceNodeEnvironmentToJSONTyped,
22+
} from './SolidityServiceNodeEnvironment.js';
23+
import type { SolidityServiceNodeForkConfig } from './SolidityServiceNodeForkConfig.js';
24+
import {
25+
SolidityServiceNodeForkConfigFromJSON,
26+
SolidityServiceNodeForkConfigFromJSONTyped,
27+
SolidityServiceNodeForkConfigToJSON,
28+
SolidityServiceNodeForkConfigToJSONTyped,
29+
} from './SolidityServiceNodeForkConfig.js';
30+
31+
/**
32+
*
33+
* @export
34+
* @interface SolidityServiceGetForkInfoResponse
35+
*/
36+
export interface SolidityServiceGetForkInfoResponse {
37+
/**
38+
*
39+
* @type {string}
40+
* @memberof SolidityServiceGetForkInfoResponse
41+
*/
42+
currentBlockNumber?: string;
43+
/**
44+
*
45+
* @type {string}
46+
* @memberof SolidityServiceGetForkInfoResponse
47+
*/
48+
currentBlockTimestamp?: string;
49+
/**
50+
*
51+
* @type {string}
52+
* @memberof SolidityServiceGetForkInfoResponse
53+
*/
54+
currentBlockHash?: string;
55+
/**
56+
*
57+
* @type {string}
58+
* @memberof SolidityServiceGetForkInfoResponse
59+
*/
60+
hardFork?: string;
61+
/**
62+
*
63+
* @type {string}
64+
* @memberof SolidityServiceGetForkInfoResponse
65+
*/
66+
transactionOrder?: string;
67+
/**
68+
*
69+
* @type {SolidityServiceNodeEnvironment}
70+
* @memberof SolidityServiceGetForkInfoResponse
71+
*/
72+
environment?: SolidityServiceNodeEnvironment;
73+
/**
74+
*
75+
* @type {SolidityServiceNodeForkConfig}
76+
* @memberof SolidityServiceGetForkInfoResponse
77+
*/
78+
forkConfig?: SolidityServiceNodeForkConfig;
79+
}
80+
81+
/**
82+
* Check if a given object implements the SolidityServiceGetForkInfoResponse interface.
83+
*/
84+
export function instanceOfSolidityServiceGetForkInfoResponse(value: object): value is SolidityServiceGetForkInfoResponse {
85+
return true;
86+
}
87+
88+
export function SolidityServiceGetForkInfoResponseFromJSON(json: any): SolidityServiceGetForkInfoResponse {
89+
return SolidityServiceGetForkInfoResponseFromJSONTyped(json, false);
90+
}
91+
92+
export function SolidityServiceGetForkInfoResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceGetForkInfoResponse {
93+
if (json == null) {
94+
return json;
95+
}
96+
return {
97+
98+
'currentBlockNumber': json['currentBlockNumber'] == null ? undefined : json['currentBlockNumber'],
99+
'currentBlockTimestamp': json['currentBlockTimestamp'] == null ? undefined : json['currentBlockTimestamp'],
100+
'currentBlockHash': json['currentBlockHash'] == null ? undefined : json['currentBlockHash'],
101+
'hardFork': json['hardFork'] == null ? undefined : json['hardFork'],
102+
'transactionOrder': json['transactionOrder'] == null ? undefined : json['transactionOrder'],
103+
'environment': json['environment'] == null ? undefined : SolidityServiceNodeEnvironmentFromJSON(json['environment']),
104+
'forkConfig': json['forkConfig'] == null ? undefined : SolidityServiceNodeForkConfigFromJSON(json['forkConfig']),
105+
};
106+
}
107+
108+
export function SolidityServiceGetForkInfoResponseToJSON(json: any): SolidityServiceGetForkInfoResponse {
109+
return SolidityServiceGetForkInfoResponseToJSONTyped(json, false);
110+
}
111+
112+
export function SolidityServiceGetForkInfoResponseToJSONTyped(value?: SolidityServiceGetForkInfoResponse | null, ignoreDiscriminator: boolean = false): any {
113+
if (value == null) {
114+
return value;
115+
}
116+
117+
return {
118+
119+
'currentBlockNumber': value['currentBlockNumber'],
120+
'currentBlockTimestamp': value['currentBlockTimestamp'],
121+
'currentBlockHash': value['currentBlockHash'],
122+
'hardFork': value['hardFork'],
123+
'transactionOrder': value['transactionOrder'],
124+
'environment': SolidityServiceNodeEnvironmentToJSON(value['environment']),
125+
'forkConfig': SolidityServiceNodeForkConfigToJSON(value['forkConfig']),
126+
};
127+
}
128+

0 commit comments

Comments
 (0)