@@ -31,9 +31,9 @@ use pallet_evm::{
31
31
ExitError , ExitSucceed , PrecompileFailure , PrecompileHandle , PrecompileOutput , PrecompileResult ,
32
32
} ;
33
33
use sp_core:: crypto:: Ss58Codec ;
34
- use sp_core:: U256 ;
34
+ use sp_core:: { U256 , H256 } ;
35
35
use sp_runtime:: traits:: Dispatchable ;
36
- use sp_runtime:: traits:: { BlakeTwo256 , UniqueSaturatedInto } ;
36
+ use sp_runtime:: traits:: { BlakeTwo256 , UniqueSaturatedInto , StaticLookup } ;
37
37
use sp_runtime:: AccountId32 ;
38
38
39
39
use crate :: {
@@ -108,7 +108,8 @@ impl StakingPrecompile {
108
108
}
109
109
110
110
fn add_proxy ( handle : & mut impl PrecompileHandle , data : & [ u8 ] ) -> PrecompileResult {
111
- let delegate = sp_runtime:: MultiAddress :: Address32 ( Self :: parse_pub_key ( data) ?) ;
111
+ let delegate = AccountId32 :: from ( Self :: parse_pub_key ( data) ?) ;
112
+ let delegate = <Runtime as frame_system:: Config >:: Lookup :: unlookup ( delegate) ;
112
113
let call = RuntimeCall :: Proxy ( pallet_proxy:: Call :: < Runtime > :: add_proxy {
113
114
delegate,
114
115
proxy_type : ProxyType :: Staking ,
@@ -119,7 +120,8 @@ impl StakingPrecompile {
119
120
}
120
121
121
122
fn remove_proxy ( handle : & mut impl PrecompileHandle , data : & [ u8 ] ) -> PrecompileResult {
122
- let delegate = sp_runtime:: MultiAddress :: Address32 ( Self :: parse_pub_key ( data) ?) ;
123
+ let delegate = AccountId32 :: from ( Self :: parse_pub_key ( data) ?) ;
124
+ let delegate = <Runtime as frame_system:: Config >:: Lookup :: unlookup ( delegate) ;
123
125
let call = RuntimeCall :: Proxy ( pallet_proxy:: Call :: < Runtime > :: remove_proxy {
124
126
delegate,
125
127
proxy_type : ProxyType :: Staking ,
0 commit comments