Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Sentio Bot committed Nov 6, 2024
1 parent ef4c92e commit f1334a6
Show file tree
Hide file tree
Showing 9 changed files with 1,032 additions and 8 deletions.
548 changes: 544 additions & 4 deletions doc/index.html

Large diffs are not rendered by default.

94 changes: 93 additions & 1 deletion openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,40 @@
]
}
},
"/api/v1/solidity/{projectOwner}/{projectSlug}/fork/{id}/state": {
"get": {
"summary": "option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {\n };",
"operationId": "GetForkState",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/google.api.HttpBody"
}
}
},
"parameters": [
{
"name": "projectOwner",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "projectSlug",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
]
}
},
"/api/v1/solidity/{projectOwner}/{projectSlug}/search_transactions": {
"get": {
"summary": "Search for transactions",
Expand Down Expand Up @@ -5143,7 +5177,31 @@
"default": "MANAGED"
},
"solidity_service.GetForkInfoResponse": {
"type": "object"
"type": "object",
"properties": {
"currentBlockNumber": {
"type": "string"
},
"currentBlockTimestamp": {
"type": "string",
"format": "uint64"
},
"currentBlockHash": {
"type": "string"
},
"hardFork": {
"type": "string"
},
"transactionOrder": {
"type": "string"
},
"environment": {
"$ref": "#/definitions/solidity_service.NodeEnvironment"
},
"forkConfig": {
"$ref": "#/definitions/solidity_service.NodeForkConfig"
}
}
},
"solidity_service.GetForkResponse": {
"type": "object",
Expand Down Expand Up @@ -5313,6 +5371,40 @@
}
}
},
"solidity_service.NodeEnvironment": {
"type": "object",
"properties": {
"chainId": {
"type": "string",
"format": "uint64"
},
"baseFee": {
"type": "string"
},
"gasLimit": {
"type": "string"
},
"gasPrice": {
"type": "string"
}
}
},
"solidity_service.NodeForkConfig": {
"type": "object",
"properties": {
"forkUrl": {
"type": "string"
},
"forkBlockNumber": {
"type": "string",
"format": "uint64"
},
"forkRetryBackoff": {
"type": "string",
"format": "uint64"
}
}
},
"solidity_service.Optimizer": {
"type": "object",
"properties": {
Expand Down
87 changes: 87 additions & 0 deletions src/apis/DefaultApi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/* tslint:disable */
/* eslint-disable */
/**
* Sentio API
* Sentio Open API for query data
*
* The version of the OpenAPI document: version not set
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


import * as runtime from '../runtime.js';
import type {
GoogleApiHttpBody,
} from '../models/index.js';
import {
GoogleApiHttpBodyFromJSON,
GoogleApiHttpBodyToJSON,
} from '../models/index.js';

export interface GetForkStateRequest {
projectOwner: string;
projectSlug: string;
id: string;
}

/**
*
*/
export class DefaultApi extends runtime.BaseAPI {

/**
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { };
*/
async getForkStateRaw(requestParameters: GetForkStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
if (requestParameters['projectOwner'] == null) {
throw new runtime.RequiredError(
'projectOwner',
'Required parameter "projectOwner" was null or undefined when calling getForkState().'
);
}

if (requestParameters['projectSlug'] == null) {
throw new runtime.RequiredError(
'projectSlug',
'Required parameter "projectSlug" was null or undefined when calling getForkState().'
);
}

if (requestParameters['id'] == null) {
throw new runtime.RequiredError(
'id',
'Required parameter "id" was null or undefined when calling getForkState().'
);
}

const queryParameters: any = {};

const headerParameters: runtime.HTTPHeaders = {};

if (this.configuration && this.configuration.apiKey) {
headerParameters["api-key"] = await this.configuration.apiKey("api-key"); // ApiKeyAuth authentication
}

const response = await this.request({
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']))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => GoogleApiHttpBodyFromJSON(jsonValue));
}

/**
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { };
*/
async getForkState(requestParameters: GetForkStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
const response = await this.getForkStateRaw(requestParameters, initOverrides);
return await response.value();
}

}
9 changes: 6 additions & 3 deletions src/apis/ForksApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import type {
SolidityServiceCreateForkResponse,
SolidityServiceForkServiceCreateForkBody,
SolidityServiceForkServiceUpdateForkBody,
SolidityServiceGetForkInfoResponse,
SolidityServiceGetForkResponse,
SolidityServiceListForksResponse,
SolidityServiceUpdateForkResponse,
Expand All @@ -29,6 +30,8 @@ import {
SolidityServiceForkServiceCreateForkBodyToJSON,
SolidityServiceForkServiceUpdateForkBodyFromJSON,
SolidityServiceForkServiceUpdateForkBodyToJSON,
SolidityServiceGetForkInfoResponseFromJSON,
SolidityServiceGetForkInfoResponseToJSON,
SolidityServiceGetForkResponseFromJSON,
SolidityServiceGetForkResponseToJSON,
SolidityServiceListForksResponseFromJSON,
Expand Down Expand Up @@ -230,7 +233,7 @@ export class ForksApi extends runtime.BaseAPI {

/**
*/
async getForkInfoRaw(requestParameters: GetForkInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
async getForkInfoRaw(requestParameters: GetForkInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SolidityServiceGetForkInfoResponse>> {
if (requestParameters['projectOwner'] == null) {
throw new runtime.RequiredError(
'projectOwner',
Expand Down Expand Up @@ -267,12 +270,12 @@ export class ForksApi extends runtime.BaseAPI {
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse<any>(response);
return new runtime.JSONApiResponse(response, (jsonValue) => SolidityServiceGetForkInfoResponseFromJSON(jsonValue));
}

/**
*/
async getForkInfo(requestParameters: GetForkInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
async getForkInfo(requestParameters: GetForkInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SolidityServiceGetForkInfoResponse> {
const response = await this.getForkInfoRaw(requestParameters, initOverrides);
return await response.value();
}
Expand Down
1 change: 1 addition & 0 deletions src/apis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* eslint-disable */
export * from './DataApi.js';
export * from './DebugAndSimulationApi.js';
export * from './DefaultApi.js';
export * from './ForksApi.js';
export * from './PriceApi.js';
export * from './WebApi.js';
128 changes: 128 additions & 0 deletions src/models/SolidityServiceGetForkInfoResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
/* tslint:disable */
/* eslint-disable */
/**
* Sentio API
* Sentio Open API for query data
*
* The version of the OpenAPI document: version not set
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { mapValues } from '../runtime.js';
import type { SolidityServiceNodeEnvironment } from './SolidityServiceNodeEnvironment.js';
import {
SolidityServiceNodeEnvironmentFromJSON,
SolidityServiceNodeEnvironmentFromJSONTyped,
SolidityServiceNodeEnvironmentToJSON,
SolidityServiceNodeEnvironmentToJSONTyped,
} from './SolidityServiceNodeEnvironment.js';
import type { SolidityServiceNodeForkConfig } from './SolidityServiceNodeForkConfig.js';
import {
SolidityServiceNodeForkConfigFromJSON,
SolidityServiceNodeForkConfigFromJSONTyped,
SolidityServiceNodeForkConfigToJSON,
SolidityServiceNodeForkConfigToJSONTyped,
} from './SolidityServiceNodeForkConfig.js';

/**
*
* @export
* @interface SolidityServiceGetForkInfoResponse
*/
export interface SolidityServiceGetForkInfoResponse {
/**
*
* @type {string}
* @memberof SolidityServiceGetForkInfoResponse
*/
currentBlockNumber?: string;
/**
*
* @type {string}
* @memberof SolidityServiceGetForkInfoResponse
*/
currentBlockTimestamp?: string;
/**
*
* @type {string}
* @memberof SolidityServiceGetForkInfoResponse
*/
currentBlockHash?: string;
/**
*
* @type {string}
* @memberof SolidityServiceGetForkInfoResponse
*/
hardFork?: string;
/**
*
* @type {string}
* @memberof SolidityServiceGetForkInfoResponse
*/
transactionOrder?: string;
/**
*
* @type {SolidityServiceNodeEnvironment}
* @memberof SolidityServiceGetForkInfoResponse
*/
environment?: SolidityServiceNodeEnvironment;
/**
*
* @type {SolidityServiceNodeForkConfig}
* @memberof SolidityServiceGetForkInfoResponse
*/
forkConfig?: SolidityServiceNodeForkConfig;
}

/**
* Check if a given object implements the SolidityServiceGetForkInfoResponse interface.
*/
export function instanceOfSolidityServiceGetForkInfoResponse(value: object): value is SolidityServiceGetForkInfoResponse {
return true;
}

export function SolidityServiceGetForkInfoResponseFromJSON(json: any): SolidityServiceGetForkInfoResponse {
return SolidityServiceGetForkInfoResponseFromJSONTyped(json, false);
}

export function SolidityServiceGetForkInfoResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SolidityServiceGetForkInfoResponse {
if (json == null) {
return json;
}
return {

'currentBlockNumber': json['currentBlockNumber'] == null ? undefined : json['currentBlockNumber'],
'currentBlockTimestamp': json['currentBlockTimestamp'] == null ? undefined : json['currentBlockTimestamp'],
'currentBlockHash': json['currentBlockHash'] == null ? undefined : json['currentBlockHash'],
'hardFork': json['hardFork'] == null ? undefined : json['hardFork'],
'transactionOrder': json['transactionOrder'] == null ? undefined : json['transactionOrder'],
'environment': json['environment'] == null ? undefined : SolidityServiceNodeEnvironmentFromJSON(json['environment']),
'forkConfig': json['forkConfig'] == null ? undefined : SolidityServiceNodeForkConfigFromJSON(json['forkConfig']),
};
}

export function SolidityServiceGetForkInfoResponseToJSON(json: any): SolidityServiceGetForkInfoResponse {
return SolidityServiceGetForkInfoResponseToJSONTyped(json, false);
}

export function SolidityServiceGetForkInfoResponseToJSONTyped(value?: SolidityServiceGetForkInfoResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}

return {

'currentBlockNumber': value['currentBlockNumber'],
'currentBlockTimestamp': value['currentBlockTimestamp'],
'currentBlockHash': value['currentBlockHash'],
'hardFork': value['hardFork'],
'transactionOrder': value['transactionOrder'],
'environment': SolidityServiceNodeEnvironmentToJSON(value['environment']),
'forkConfig': SolidityServiceNodeForkConfigToJSON(value['forkConfig']),
};
}

Loading

0 comments on commit f1334a6

Please sign in to comment.