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 5, 2024
1 parent 11d9a6a commit 205a508
Show file tree
Hide file tree
Showing 6 changed files with 245 additions and 50 deletions.
153 changes: 113 additions & 40 deletions doc/index.html

Large diffs are not rendered by default.

31 changes: 30 additions & 1 deletion openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1113,20 +1113,34 @@
"parameters": [
{
"name": "projectOwner",
"description": "Required if fork id is specified",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "projectSlug",
"description": "Required if fork id is specified",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "networkId",
"in": "query",
"required": true,
"required": false,
"type": "string"
},
{
"name": "chainSpec.chainId",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "chainSpec.forkId",
"in": "query",
"required": false,
"type": "string"
},
{
Expand Down Expand Up @@ -4188,6 +4202,17 @@
}
}
},
"solidity_service.ChainIdentifier": {
"type": "object",
"properties": {
"chainId": {
"type": "string"
},
"forkId": {
"type": "string"
}
}
},
"solidity_service.CompileSourceInternalResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -4619,6 +4644,9 @@
"type": "string",
"title": "we should use chain_id in favor of network_id"
},
"chainSpec": {
"$ref": "#/definitions/solidity_service.ChainIdentifier"
},
"to": {
"type": "string"
},
Expand Down Expand Up @@ -4690,6 +4718,7 @@
},
"required": [
"networkId",
"chainSpec",
"to",
"input",
"blockNumber",
Expand Down
21 changes: 12 additions & 9 deletions src/apis/DebugAndSimulationApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ import {
} from '../models/index.js';

export interface GetCallTraceRequest {
networkId: string;
projectOwner?: string;
projectSlug?: string;
networkId?: string;
chainSpecChainId?: string;
chainSpecForkId?: string;
txIdTxHash?: string;
txIdSimulationId?: string;
txIdBundleId?: string;
Expand Down Expand Up @@ -113,13 +115,6 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
* Get indexed call trace
*/
async getCallTraceRaw(requestParameters: GetCallTraceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GoogleApiHttpBody>> {
if (requestParameters['networkId'] == null) {
throw new runtime.RequiredError(
'networkId',
'Required parameter "networkId" was null or undefined when calling getCallTrace().'
);
}

const queryParameters: any = {};

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

if (requestParameters['chainSpecChainId'] != null) {
queryParameters['chainSpec.chainId'] = requestParameters['chainSpecChainId'];
}

if (requestParameters['chainSpecForkId'] != null) {
queryParameters['chainSpec.forkId'] = requestParameters['chainSpecForkId'];
}

if (requestParameters['txIdTxHash'] != null) {
queryParameters['txId.txHash'] = requestParameters['txIdTxHash'];
}
Expand Down Expand Up @@ -178,7 +181,7 @@ export class DebugAndSimulationApi extends runtime.BaseAPI {
* 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)
* Get indexed call trace
*/
async getCallTrace(requestParameters: GetCallTraceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
async getCallTrace(requestParameters: GetCallTraceRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GoogleApiHttpBody> {
const response = await this.getCallTraceRaw(requestParameters, initOverrides);
return await response.value();
}
Expand Down
73 changes: 73 additions & 0 deletions src/models/SolidityServiceChainIdentifier.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/* 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';
/**
*
* @export
* @interface SolidityServiceChainIdentifier
*/
export interface SolidityServiceChainIdentifier {
/**
*
* @type {string}
* @memberof SolidityServiceChainIdentifier
*/
chainId?: string;
/**
*
* @type {string}
* @memberof SolidityServiceChainIdentifier
*/
forkId?: string;
}

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

export function SolidityServiceChainIdentifierFromJSON(json: any): SolidityServiceChainIdentifier {
return SolidityServiceChainIdentifierFromJSONTyped(json, false);
}

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

'chainId': json['chainId'] == null ? undefined : json['chainId'],
'forkId': json['forkId'] == null ? undefined : json['forkId'],
};
}

export function SolidityServiceChainIdentifierToJSON(json: any): SolidityServiceChainIdentifier {
return SolidityServiceChainIdentifierToJSONTyped(json, false);
}

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

return {

'chainId': value['chainId'],
'forkId': value['forkId'],
};
}

16 changes: 16 additions & 0 deletions src/models/SolidityServiceSimulation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ import {
SolidityServiceStateOverrideToJSON,
SolidityServiceStateOverrideToJSONTyped,
} from './SolidityServiceStateOverride.js';
import type { SolidityServiceChainIdentifier } from './SolidityServiceChainIdentifier.js';
import {
SolidityServiceChainIdentifierFromJSON,
SolidityServiceChainIdentifierFromJSONTyped,
SolidityServiceChainIdentifierToJSON,
SolidityServiceChainIdentifierToJSONTyped,
} from './SolidityServiceChainIdentifier.js';
import type { SolidityServiceBlockOverrides } from './SolidityServiceBlockOverrides.js';
import {
SolidityServiceBlockOverridesFromJSON,
Expand Down Expand Up @@ -78,6 +85,12 @@ export interface SolidityServiceSimulation {
* @memberof SolidityServiceSimulation
*/
chainId?: string;
/**
*
* @type {SolidityServiceChainIdentifier}
* @memberof SolidityServiceSimulation
*/
chainSpec: SolidityServiceChainIdentifier;
/**
*
* @type {string}
Expand Down Expand Up @@ -193,6 +206,7 @@ export interface SolidityServiceSimulation {
*/
export function instanceOfSolidityServiceSimulation(value: object): value is SolidityServiceSimulation {
if (!('networkId' in value) || value['networkId'] === undefined) return false;
if (!('chainSpec' in value) || value['chainSpec'] === undefined) return false;
if (!('to' in value) || value['to'] === undefined) return false;
if (!('input' in value) || value['input'] === undefined) return false;
if (!('blockNumber' in value) || value['blockNumber'] === undefined) return false;
Expand All @@ -219,6 +233,7 @@ export function SolidityServiceSimulationFromJSONTyped(json: any, ignoreDiscrimi
'bundleId': json['bundleId'] == null ? undefined : json['bundleId'],
'networkId': json['networkId'],
'chainId': json['chainId'] == null ? undefined : json['chainId'],
'chainSpec': SolidityServiceChainIdentifierFromJSON(json['chainSpec']),
'to': json['to'],
'input': json['input'],
'blockNumber': json['blockNumber'],
Expand Down Expand Up @@ -256,6 +271,7 @@ export function SolidityServiceSimulationFromJSONTyped(json: any, ignoreDiscrimi
'bundleId': value['bundleId'],
'networkId': value['networkId'],
'chainId': value['chainId'],
'chainSpec': SolidityServiceChainIdentifierToJSON(value['chainSpec']),
'to': value['to'],
'input': value['input'],
'blockNumber': value['blockNumber'],
Expand Down
1 change: 1 addition & 0 deletions src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export * from './PriceServiceGetPriceResponse.js';
export * from './PriceServiceListCoinsResponse.js';
export * from './SolidityServiceBaseChainConfig.js';
export * from './SolidityServiceBlockOverrides.js';
export * from './SolidityServiceChainIdentifier.js';
export * from './SolidityServiceCompileSourceInternalResponse.js';
export * from './SolidityServiceCompilerOptions.js';
export * from './SolidityServiceContractKeyInfo.js';
Expand Down

0 comments on commit 205a508

Please sign in to comment.