From 84857599f73d6f6670f854b18ffcefdf599f7931 Mon Sep 17 00:00:00 2001 From: Rim Rakhimov Date: Fri, 17 May 2024 13:01:43 +0300 Subject: [PATCH] Add visualizer --- index.html | 1 + services/visualizer/index.html | 19 +++++ services/visualizer/swagger.yaml | 142 +++++++++++++++++++++++++++++++ 3 files changed, 162 insertions(+) create mode 100644 services/visualizer/index.html create mode 100644 services/visualizer/swagger.yaml diff --git a/index.html b/index.html index 799f680..2cf1098 100644 --- a/index.html +++ b/index.html @@ -17,6 +17,7 @@
  • smart-contract-verifier
  • stats
  • user-ops-indexer
  • +
  • visualizer
  • diff --git a/services/visualizer/index.html b/services/visualizer/index.html new file mode 100644 index 0000000..f358d61 --- /dev/null +++ b/services/visualizer/index.html @@ -0,0 +1,19 @@ + + + + + + visualizer + + + + + + + +
    + + + + + diff --git a/services/visualizer/swagger.yaml b/services/visualizer/swagger.yaml new file mode 100644 index 0000000..2820cfc --- /dev/null +++ b/services/visualizer/swagger.yaml @@ -0,0 +1,142 @@ +swagger: "2.0" +info: + title: visualizer.proto + version: version not set +tags: + - name: SolidityVisualizer + - name: Health +consumes: + - application/json +produces: + - application/json +paths: + /api/v1/solidity:visualize-contracts: + post: + operationId: SolidityVisualizer_VisualizeContracts + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1VisualizeResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1VisualizeContractsRequest' + tags: + - SolidityVisualizer + /api/v1/solidity:visualize-storage: + post: + operationId: SolidityVisualizer_VisualizeStorage + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1VisualizeResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1VisualizeStorageRequest' + tags: + - SolidityVisualizer + /health: + get: + summary: |- + If the requested service is unknown, the call will fail with status + NOT_FOUND. + operationId: Health_Check + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1HealthCheckResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: service + in: query + required: false + type: string + tags: + - Health +definitions: + HealthCheckResponseServingStatus: + type: string + enum: + - UNKNOWN + - SERVING + - NOT_SERVING + - SERVICE_UNKNOWN + default: UNKNOWN + description: ' - SERVICE_UNKNOWN: Used only by the Watch method.' + protobufAny: + type: object + properties: + '@type': + type: string + additionalProperties: {} + rpcStatus: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + $ref: '#/definitions/protobufAny' + v1HealthCheckResponse: + type: object + properties: + status: + $ref: '#/definitions/HealthCheckResponseServingStatus' + v1VisualizeContractsRequest: + type: object + properties: + sources: + type: object + additionalProperties: + type: string + outputMask: + type: string + v1VisualizeResponse: + type: object + properties: + png: + type: string + format: byte + svg: + type: string + format: byte + description: |- + The client should decide on what type they are interested in + and specify it through `request.output_mask` field. If omitted, + all types would be calculated and returned to the client. + v1VisualizeStorageRequest: + type: object + properties: + sources: + type: object + additionalProperties: + type: string + fileName: + type: string + contractName: + type: string + outputMask: + type: string