File tree Expand file tree Collapse file tree
crates/precompiles/src/account_keychain Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ pub mod dispatch;
1111use std:: collections:: HashSet ;
1212
1313use alloy:: sol_types:: SolCall ;
14- use alloy_rlp:: Decodable ;
1514use tempo_contracts:: precompiles:: { AccountKeychainError , AccountKeychainEvent , ITIP20 } ;
1615pub use tempo_contracts:: precompiles:: {
1716 IAccountKeychain ,
@@ -587,12 +586,8 @@ impl AccountKeychain {
587586 ) -> Result < ( ) > {
588587 self . storage . deduct_gas ( rlp_input_cost ( call. scopes . len ( ) ) ) ?;
589588
590- let mut encoded_scopes = call. scopes . as_ref ( ) ;
591- let scopes = Vec :: < RlpCallScope > :: decode ( & mut encoded_scopes)
589+ let scopes: Vec < RlpCallScope > = alloy_rlp:: decode_exact ( call. scopes . as_ref ( ) )
592590 . map_err ( |_| AccountKeychainError :: invalid_call_scope ( ) ) ?;
593- if !encoded_scopes. is_empty ( ) {
594- return Err ( AccountKeychainError :: invalid_call_scope ( ) . into ( ) ) ;
595- }
596591 let scopes: Vec < CallScope > = scopes. into_iter ( ) . map ( Into :: into) . collect ( ) ;
597592 if scopes. is_empty ( ) {
598593 return Err ( AccountKeychainError :: invalid_call_scope ( ) . into ( ) ) ;
You can’t perform that action at this time.
0 commit comments