Skip to content

Commit

Permalink
Add visualizer
Browse files Browse the repository at this point in the history
  • Loading branch information
rimrakhimov committed May 17, 2024
1 parent 80b7e0d commit 8485759
Show file tree
Hide file tree
Showing 3 changed files with 162 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<li><a href="services/smart-contract-verifier/index.html">smart-contract-verifier</a></li>
<li><a href="services/stats/index.html">stats</a></li>
<li><a href="services/user-ops-indexer/index.html">user-ops-indexer</a></li>
<li><a href="services/visualizer/index.html">visualizer</a></li>
</ol>
</body>
</html>
19 changes: 19 additions & 0 deletions services/visualizer/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>visualizer</title>
<link rel="stylesheet" type="text/css" href="../../dist/swagger-ui.css" />
<link rel="stylesheet" type="text/css" href="../../dist/index.css" />
<link rel="icon" type="image/png" href="../../dist/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="../../dist/favicon-16x16.png" sizes="16x16" />
</head>

<body>
<div id="swagger-ui"></div>
<script src="../../dist/swagger-ui-bundle.js" charset="UTF-8"> </script>
<script src="../../dist/swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
<script src="../../dist/swagger-initializer.js" charset="UTF-8"> </script>
</body>
</html>
142 changes: 142 additions & 0 deletions services/visualizer/swagger.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8485759

Please sign in to comment.