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

RPC Spec for starknet_getEvents does not seem correct #48

Open
claytonneal opened this issue Aug 26, 2022 · 5 comments
Open

RPC Spec for starknet_getEvents does not seem correct #48

claytonneal opened this issue Aug 26, 2022 · 5 comments

Comments

@claytonneal
Copy link

claytonneal commented Aug 26, 2022

The rpc spec says that there is a "from_block" property, but in reality this has to be called "fromBlock"
Also the spec says that the page_size and page_number are their own object, this is not true
Example:

{
"jsonrpc": "2.0",
"id": 0,
"method": "starknet_getEvents",
"params": [ { "fromBlock": { "block_number": 2271 },
"toBlock": { "block_number": 2272},
"page_size": 10, "page_number": 1 }
]
}

--> "fromBlock" rather than "from_block"
--> "page_size" / "page_number" are part of same object

Can you review and update.
(Im using pathfinder v0.3.01)

Regards

@Mirko-von-Leipzig
Copy link
Contributor

That would be a bug in pathfinder :) I'll open an issue and link it to this one.

@Mirko-von-Leipzig
Copy link
Contributor

Mirko-von-Leipzig commented Aug 26, 2022

The page_size and page_number being part of the same object I think is intended as it is part of all_of?

Nevermind scratch that.

@claytonneal
Copy link
Author

hiya: in the spec there is:

"schema": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/EVENT_FILTER"
                            },
                            {
                                "$ref": "#/components/schemas/RESULT_PAGE_REQUEST"
                            }
                        ]
                    }

This suggests 2x objects, when in my request above its only 1

@Mirko-von-Leipzig
Copy link
Contributor

I'm not sure that implies two objects? As I understand it, it implies there is a single object which complies with all of the below schema's.

Two objects would need explicit naming as separate properties.

@claytonneal
Copy link
Author

OK no probs, thanks for the linked issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants