Skip to content

Commit

Permalink
feature: transaction's input truncate function (#12236)
Browse files Browse the repository at this point in the history
Signed-off-by: nadtech-hub <[email protected]>
  • Loading branch information
nadtech-hub authored Nov 1, 2024
1 parent f93dbf5 commit f6bd11c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/rpc/rpc-types-compat/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ impl TransactionCompat for () {
WithOtherFields::default()
}

fn otterscan_api_truncate_input(_tx: &mut Self::Transaction) {}
fn otterscan_api_truncate_input(tx: &mut Self::Transaction) {
tx.input = tx.input.slice(..4);
}

fn tx_type(_tx: &Self::Transaction) -> u8 {
0
Expand Down

0 comments on commit f6bd11c

Please sign in to comment.