|
62 | 62 | <<R as frame_system::Config>::Lookup as StaticLookup>::Source: From<R::AccountId>,
|
63 | 63 | {
|
64 | 64 | const INDEX: u64 = 2053;
|
65 |
| - const ADDRESS_SS58: [u8; 32] = [0; 32]; |
| 65 | + const ADDRESS_SS58: Option<[u8; 32]> = None; |
66 | 66 | }
|
67 | 67 |
|
68 | 68 | #[precompile_utils::precompile]
|
@@ -211,11 +211,11 @@ where
|
211 | 211 | <<R as frame_system::Config>::Lookup as StaticLookup>::Source: From<R::AccountId>,
|
212 | 212 | {
|
213 | 213 | const INDEX: u64 = 2049;
|
214 |
| - const ADDRESS_SS58: [u8; 32] = [ |
| 214 | + const ADDRESS_SS58: Option<[u8; 32]> = Some([ |
215 | 215 | 0x26, 0xf4, 0x10, 0x1e, 0x52, 0xb7, 0x57, 0x34, 0x33, 0x24, 0x5b, 0xc3, 0x0a, 0xe1, 0x8b,
|
216 | 216 | 0x63, 0x99, 0x53, 0xd8, 0x41, 0x79, 0x33, 0x03, 0x61, 0x4d, 0xfa, 0xcf, 0xf0, 0x37, 0xf7,
|
217 | 217 | 0x12, 0x94,
|
218 |
| - ]; |
| 218 | + ]); |
219 | 219 | }
|
220 | 220 |
|
221 | 221 | #[precompile_utils::precompile]
|
@@ -368,7 +368,9 @@ where
|
368 | 368 | account_id: &<R as frame_system::Config>::AccountId,
|
369 | 369 | amount: U256,
|
370 | 370 | ) -> Result<(), PrecompileFailure> {
|
371 |
| - let smart_contract_account_id = R::AccountId::from(Self::ADDRESS_SS58); |
| 371 | + let smart_contract_account_id = R::AccountId::from( |
| 372 | + Self::ADDRESS_SS58.expect("ADDRESS_SS58 is defined for StakingPrecompile"), |
| 373 | + ); |
372 | 374 | let amount_sub =
|
373 | 375 | <R as pallet_evm::Config>::BalanceConverter::into_substrate_balance(amount)
|
374 | 376 | .ok_or(ExitError::OutOfFund)?;
|
|
0 commit comments