Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: extend the format checking via openrpcjson #3285

Merged
merged 5 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
quiet-node marked this conversation as resolved.
Show resolved Hide resolved
"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",
nadezhdapopovaa marked this conversation as resolved.
Show resolved Hide resolved
"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."
}
},
quiet-node marked this conversation as resolved.
Show resolved Hide resolved
{
"name": "debug_traceTransaction",
"summary": "Attempts to run the transaction in the exact same manner as it was executed on the network.",
Expand Down
Loading
Loading