diff --git a/CHANGELOG.md b/CHANGELOG.md index 8092bbf7d..16a94b4e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ git # Deoxys Changelog ## Next release +- fix: fix get_events minor issues - fix: l1HandlerTx computed for commit - refactor: optimise get_events RPC - fix(root): fixed state commitments broken due to genesis loader diff --git a/crates/client/rpc/src/methods/read/get_events.rs b/crates/client/rpc/src/methods/read/get_events.rs index 865480100..5685533c6 100644 --- a/crates/client/rpc/src/methods/read/get_events.rs +++ b/crates/client/rpc/src/methods/read/get_events.rs @@ -159,7 +159,7 @@ where let to = if to_block == Some(BlockId::Tag(BlockTag::Pending)) { latest + 1 } else { - starknet.substrate_block_number_from_starknet_block(from_block.unwrap_or(BlockId::Number(0))).map_err(|e| { + starknet.substrate_block_number_from_starknet_block(to_block.unwrap_or(BlockId::Number(0))).map_err(|e| { log::error!("'{e}'"); StarknetRpcApiError::BlockNotFound })? diff --git a/crates/client/rpc/src/types.rs b/crates/client/rpc/src/types.rs index 37884e3f7..fd16a0ea9 100644 --- a/crates/client/rpc/src/types.rs +++ b/crates/client/rpc/src/types.rs @@ -26,7 +26,7 @@ impl ContinuationToken { return Err(ParseTokenError::WrongToken); } let block_n = arr[0].parse::().map_err(ParseTokenError::ParseFailed)?; - let event_n = arr[0].parse::().map_err(ParseTokenError::ParseFailed)?; + let event_n = arr[1].parse::().map_err(ParseTokenError::ParseFailed)?; Ok(ContinuationToken { block_n, event_n }) }