-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
The getEvents method in the JSON-RPC playground currently provides only a single input box, even though the parameter should be a JSON object with multiple nested fields. This makes it difficult to enter valid input, as users must manually type the entire object structure.
We should have dedicated input box (as long as it makes sense) for each nested field of the filter object.
JSON-RPC spec for the starknet_getEvents method: https://github.com/starkware-libs/starknet-specs/blob/a2d10fc6cbaddbe2d3cf6ace5174dd0a306f4885/api/starknet_api_openrpc.json#L799-L815
Reference on the Rust types used in Katana:
/// Events request.
pub struct EventFilterWithPage {
pub event_filter: EventFilter,
pub result_page_request: ResultPageRequest,
}
/// Event filter.
///
/// An event filter/query.
pub struct EventFilter {
/// From block
pub from_block: Option<BlockId>,
/// To block
pub to_block: Option<BlockId>,
/// From contract
pub address: Option<Felt>,
/// The keys to filter over
pub keys: Option<Vec<Vec<Felt>>>,
}
/// Result page request.
pub struct ResultPageRequest {
/// The token returned from the previous query. If no token is provided the first page is
/// returned.
pub continuation_token: Option<String>,
/// Chunk size
pub chunk_size: u64,
}This also applies to other RPC methods whose parameters consist of an object with multiple nested fields (eg. starknet_call).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels