Skip to content

Commit

Permalink
chore: extend the format checking via openrpcjson (#3285)
Browse files Browse the repository at this point in the history
* chore: extend format check via relay openrpc

Signed-off-by: Nadezhda Popova <nadezhda.popova@limechain.tech>

* chore: update openrpc file

Signed-off-by: Nadezhda Popova <nadezhda.popova@limechain.tech>

* fixup! chore: update openrpc file

Signed-off-by: Nadezhda Popova <nadezhda.popova@limechain.tech>

* fixup! fixup! chore: update openrpc file

Signed-off-by: Nadezhda Popova <nadezhda.popova@limechain.tech>

* fixup! fixup! fixup! chore: update openrpc file

Signed-off-by: Nadezhda Popova <nadezhda.popova@limechain.tech>

---------

Signed-off-by: Nadezhda Popova <nadezhda.popova@limechain.tech>
  • Loading branch information
nadezhdapopovaa authored Nov 29, 2024
1 parent b021318 commit 1551da6
Show file tree
Hide file tree
Showing 3 changed files with 422 additions and 504 deletions.
138 changes: 16 additions & 122 deletions docs/openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@
"name": "Accounts",
"description": "Always returns an empty array",
"schema": {
"$ref": "#/components/schemas/addresses"
"title": "empty array",
"type": "array",
"pattern": "^\\[\\s*\\]$"
}
}
},
Expand Down Expand Up @@ -577,8 +579,9 @@
"description": "![](https://raw.githubusercontent.com/hashgraph/hedera-json-rpc-relay/main/docs/images/http_label.png)",
"params": [],
"result": {
"name": "Always returns null. There are no uncles in Hedera.",
"name": "eth_getUncleByBlockHashAndIndex result",
"schema": {
"description": "Always returns null. There are no uncles in Hedera.",
"$ref": "#/components/schemas/null"
}
}
Expand All @@ -589,8 +592,9 @@
"description": "![](https://raw.githubusercontent.com/hashgraph/hedera-json-rpc-relay/main/docs/images/http_label.png)",
"params": [],
"result": {
"name": "Always returns null. There are no uncles in Hedera.",
"name": "eth_getUncleByBlockNumberAndIndex result",
"schema": {
"description": "Always returns null. There are no uncles in Hedera.",
"$ref": "#/components/schemas/null"
}
}
Expand All @@ -601,8 +605,9 @@
"description": "![](https://raw.githubusercontent.com/hashgraph/hedera-json-rpc-relay/main/docs/images/http_label.png)",
"params": [],
"result": {
"name": "Always returns '0x0'. There are no uncles in Hedera.",
"name": "eth_getUncleCountByBlockHash result",
"schema": {
"description": "Always returns '0x0'. There are no uncles in Hedera.",
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "0x0"
Expand All @@ -615,8 +620,9 @@
"description": "![](https://raw.githubusercontent.com/hashgraph/hedera-json-rpc-relay/main/docs/images/http_label.png)",
"params": [],
"result": {
"name": "Always returns '0x0'. There are no uncles in Hedera.",
"name": "eth_getUncleCountByBlockNumber result",
"schema": {
"description": "Always returns '0x0'. There are no uncles in Hedera.",
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "0x0"
Expand Down Expand Up @@ -651,8 +657,9 @@
"description": "![](https://raw.githubusercontent.com/hashgraph/hedera-json-rpc-relay/main/docs/images/http_label.png) ![](https://raw.githubusercontent.com/hashgraph/hedera-json-rpc-relay/main/docs/images/ws_label.png)",
"params": [],
"result": {
"name": "Always returns '0x0'. Hedera doesn't have a concept of tipping nodes to promote any behavior",
"name": "eth_maxPriorityFeePerGas result",
"schema": {
"description": "Always returns '0x0'. Hedera doesn't have a concept of tipping nodes to promote any behavior",
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "0x0"
Expand Down Expand Up @@ -937,7 +944,7 @@
"name": "The current client version.",
"schema": {
"type": "string",
"pattern": "relay/[0-9]\\.[0-9]\\.[0-9]"
"pattern": "relay/[0-9]+\\.[0-9]+\\.[0-9]+(-[a-zA-Z0-9-]+)?$"
}
}
},
Expand Down Expand Up @@ -988,7 +995,8 @@
"result": {
"name": "subscription_id",
"schema": {
"type": "string"
"type": "string",
"$ref": "#/components/schemas/hash32"
},
"description": "The hex encoded subscription ID used to identify and manage the subscription."
}
Expand All @@ -1015,120 +1023,6 @@
"description": "True if the subscription was successfully cancelled, otherwise false."
}
},
{
"name": "eth_newFilter",
"summary": "Creates a filter object for notifying when the state changes (logs).",
"description": "![](https://raw.githubusercontent.com/hashgraph/hedera-json-rpc-relay/main/docs/images/http_label.png) ![](https://raw.githubusercontent.com/hashgraph/hedera-json-rpc-relay/main/docs/images/ws_label.png)",
"params": [
{
"name": "filter_options",
"required": true,
"schema": {
"type": "object",
"properties": {
"fromBlock": {
"$ref": "#/components/schemas/BlockNumberOrTag"
},
"toBlock": {
"$ref": "#/components/schemas/BlockNumberOrTag"
},
"address": {
"type": ["string", "array"],
"items": {
"type": "string"
}
},
"topics": {
"type": ["array"],
"items": {
"type": ["string", "null"]
}
}
}
},
"description": "Filter options to specify the exact event(s) logs to get."
}
],
"result": {
"name": "filter_id",
"schema": {
"type": "string"
},
"description": "The ID of the newly created filter."
}
},
{
"name": "eth_uninstallFilter",
"summary": "Uninstalls a filter with given ID. Should always be called when watch is no longer needed.",
"description": "![](https://raw.githubusercontent.com/hashgraph/hedera-json-rpc-relay/main/docs/images/http_label.png)",
"params": [
{
"name": "filter_id",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the filter to uninstall."
}
],
"result": {
"name": "uninstalled",
"schema": {
"type": "boolean"
},
"description": "True if the filter was successfully uninstalled, otherwise false."
}
},
{
"name": "eth_getFilterChanges",
"summary": "Polling method for a filter, which returns an array of logs which occurred since last poll.",
"description": "![](https://raw.githubusercontent.com/hashgraph/hedera-json-rpc-relay/main/docs/images/http_label.png)",
"params": [
{
"name": "filter_id",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the filter to check for changes."
}
],
"result": {
"name": "logs",
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Log"
}
},
"description": "Array of log objects since last poll."
}
},
{
"name": "eth_getFilterLogs",
"summary": "Returns an array of all logs matching filter with given ID.",
"description": "![](https://raw.githubusercontent.com/hashgraph/hedera-json-rpc-relay/main/docs/images/http_label.png)",
"params": [
{
"name": "filter_id",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the filter to retrieve all matching logs."
}
],
"result": {
"name": "logs",
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Log"
}
},
"description": "Array of log objects that match the filter."
}
},
{
"name": "debug_traceTransaction",
"summary": "Attempts to run the transaction in the exact same manner as it was executed on the network.",
Expand Down
Loading

0 comments on commit 1551da6

Please sign in to comment.