diff --git a/src/contract/custom/custom.rs b/src/contract/custom/custom.rs index 7b3377a..4a9c879 100644 --- a/src/contract/custom/custom.rs +++ b/src/contract/custom/custom.rs @@ -5,12 +5,9 @@ use crate::{ Preferences, }, runtime::{ - AccountId, BalancesConfig, Contracts, - Runtime, RuntimeGenesisConfig, - RuntimeOrigin, }, }, EmptyResult, @@ -25,24 +22,21 @@ use sp_core::{ storage::Storage, }; use sp_runtime::BuildStorage; -use std::{ - fs, - str::FromStr, -}; +use std::fs; /// This file is made to be customized. Feel free to remove, add, modify code impl DevelopperPreferences for Preferences { fn runtime_storage() -> Storage { - let specific_address = - AccountId32::from_str("5CJwK57RASwYZexBDvxoybV7BoRTbGtxckrWKbtpBug35yx2").unwrap(); - let mut balances = (0..u8::MAX) - .map(|i| ([i; 32].into(), 10000000000000000000 * 2)) - .collect::>(); - - balances.push((specific_address.into(), 10000000000000000000 * 2)); - let storage = RuntimeGenesisConfig { - balances: BalancesConfig { balances }, + balances: BalancesConfig { + balances: (0..u8::MAX) // Lot of money for Alice, Bob ... Ferdie + .map(|i| [i; 32].into()) + .collect::>() + .iter() + .cloned() + .map(|k| (k, 10000000000000000000 * 2)) + .collect(), + }, ..Default::default() } .build_storage() diff --git a/tests/cli_instrument_integration_test.rs b/tests/cli_instrument_integration_test.rs index ef52ea1..4903164 100644 --- a/tests/cli_instrument_integration_test.rs +++ b/tests/cli_instrument_integration_test.rs @@ -14,14 +14,12 @@ mod tests { }; use anyhow::ensure; use assert_cmd::Command as CommandAssertCmd; - use contract_transcode::env_types::AccountId; use phink_lib::{ cli::config::Configuration, instrumenter::path::InstrumentedPath, EmptyResult, }; use predicates::prelude::predicate; - use sp_core::crypto::AccountId32; use std::fs; use tempfile::tempdir; use walkdir::WalkDir; @@ -68,20 +66,6 @@ mod tests { assert!(test.is_ok(), "{}", test.err().unwrap().to_string()); Ok(()) } - - #[test] - fn aaa() -> EmptyResult { - // let a = AccountId32::new([1; 32]); - // println!("{}", a); - let bcd = contract_transcode::AccountId32::try_from([ - 10, 218, 186, 223, 239, 138, 14, 204, 129, 51, 100, 132, 99, 100, 82, 52, 32, 4, 43, - 116, 79, 198, 231, 242, 83, 147, 228, 45, 81, 6, 222, 125, - ]); - println!("{:?}", bcd?.to_ss58check()); - - Ok(()) - } - #[test] fn test_instrumentation_multifile_contract() -> EmptyResult { let path_instrumented_contract = InstrumentedPath::from(tempdir()?.into_path());