-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sentio Bot
committed
Nov 6, 2024
1 parent
ef4c92e
commit f1334a6
Showing
9 changed files
with
1,032 additions
and
8 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']), | ||
}; | ||
} | ||
|
Oops, something went wrong.