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

Fixed schema to better render in the docs side + removed createAccessList #156

Merged
merged 2 commits into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 13 additions & 1 deletion merge-openrpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ const getFilteredExecutionAPIs = () => {

// fetch, merge and write
getFilteredExecutionAPIs().then((EthereumOpenRPC) => {
EthereumOpenRPC.methods.forEach((method) => {
const tag = {
name: "Ethereum API",
description: "Ethereum Node JSON-RPC method",
};
if (method.tags) {
method.tags.push(tag);
} else {
method.tags = [tag];
}
});
fs.writeFileSync(__dirname + "/src/build/openrpc.json",
JSON.stringify(
mergeOpenRPC(MetaMaskOpenRPC, EthereumOpenRPC),
Expand All @@ -25,7 +36,8 @@ const unneeded = [
/eth_signTransaction/,
/eth_sign/,
/debug_.*/,
/engine_.*/
/engine_.*/,
/eth_createAccessList/
];

const filterExecutionAPIs = (openrpcDocument) => {
Expand Down
12 changes: 10 additions & 2 deletions openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
},
"topics": {
"type": "array",
"description": "An array of topics to filter the logs by. Optional."
"description": "An array of topics to filter the logs by. Optional.",
"items": {
"type": "string"
}
}
}
}
Expand Down Expand Up @@ -251,9 +254,14 @@
"schema": {
"title": "requestPermissionObject",
"type": "object",
"additionalProperties": {
"type": "object",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should add a title here

"additionalProperties": true
},
"properties": {
"eth_accounts": {
"type": "object"
"type": "object",
"additionalProperties": true
}
}
}
Expand Down