pallet_revive/
test_utils.rs1pub mod builder;
22
23pub use sp_runtime::AccountId32;
24
25use crate::{BalanceOf, Config};
26use frame_support::weights::Weight;
27use hex_literal::hex;
28use sp_core::H160;
29
30const fn ee_suffix(mut account: [u8; 32]) -> AccountId32 {
31 let mut i = 20;
32 while i < 32 {
33 account[i] = 0xee;
34 i += 1;
35 }
36 AccountId32::new(account)
37}
38
39const fn ee_extend(address: [u8; 20]) -> AccountId32 {
40 let mut account = [0xEEu8; 32];
41 let mut i = 0;
42 while i < 20 {
43 account[i] = address[i];
44 i += 1;
45 }
46 AccountId32::new(account)
47}
48
49pub const ALICE: AccountId32 = ee_suffix([1u8; 32]);
54pub const ALICE_ADDR: H160 = H160([1u8; 20]);
55pub const ALICE_FALLBACK: AccountId32 = ALICE;
56
57pub const BOB: AccountId32 = ee_suffix([2u8; 32]);
58pub const BOB_ADDR: H160 = H160([2u8; 20]);
59pub const BOB_FALLBACK: AccountId32 = BOB;
60
61pub const CHARLIE: AccountId32 = ee_suffix([3u8; 32]);
62pub const CHARLIE_ADDR: H160 = H160([3u8; 20]);
63pub const CHARLIE_FALLBACK: AccountId32 = CHARLIE;
64
65pub const DJANGO: AccountId32 = ee_suffix([4u8; 32]);
66pub const DJANGO_ADDR: H160 = H160([4u8; 20]);
67pub const DJANGO_FALLBACK: AccountId32 = DJANGO;
68
69pub const EVE: AccountId32 = AccountId32::new([5u8; 32]);
72pub const EVE_ADDR: H160 = H160(hex!("e21eecd6e51cbcda5b0c5207ae87e605839e70ef"));
73pub const EVE_FALLBACK: AccountId32 = ee_extend(EVE_ADDR.0);
74
75pub const GAS_LIMIT: Weight = Weight::from_parts(100_000_000_000, 3 * 1024 * 1024);
76
77pub fn deposit_limit<T: Config>() -> BalanceOf<T> {
78 10_000_000u32.into()
79}