Unverified Commit efa9b994 authored by thiolliere's avatar thiolliere Committed by GitHub
Browse files

Companion: Rename pallet trait `Trait` to `Config` (#2014)

* rename Trait -> Config

* revert diener changes

* rename HostConfig to ActiveConfig as more meaningful

* fix merge

* "Update Substrate"

* cargo update -p sp-io

Co-authored-by: parity-processbot <>
parent c58fd0ea
Pipeline #115490 passed with stages
in 20 minutes and 23 seconds
This diff is collapsed.
...@@ -37,13 +37,13 @@ use sp_runtime::{ ...@@ -37,13 +37,13 @@ use sp_runtime::{
}; };
use primitives::v1::ValidityError; use primitives::v1::ValidityError;
type CurrencyOf<T> = <<T as Trait>::VestingSchedule as VestingSchedule<<T as frame_system::Trait>::AccountId>>::Currency; type CurrencyOf<T> = <<T as Config>::VestingSchedule as VestingSchedule<<T as frame_system::Config>::AccountId>>::Currency;
type BalanceOf<T> = <CurrencyOf<T> as Currency<<T as frame_system::Trait>::AccountId>>::Balance; type BalanceOf<T> = <CurrencyOf<T> as Currency<<T as frame_system::Config>::AccountId>>::Balance;
/// Configuration trait. /// Configuration trait.
pub trait Trait: frame_system::Trait { pub trait Config: frame_system::Config {
/// The overarching event type. /// The overarching event type.
type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>; type Event: From<Event<Self>> + Into<<Self as frame_system::Config>::Event>;
type VestingSchedule: VestingSchedule<Self::AccountId, Moment=Self::BlockNumber>; type VestingSchedule: VestingSchedule<Self::AccountId, Moment=Self::BlockNumber>;
type Prefix: Get<&'static [u8]>; type Prefix: Get<&'static [u8]>;
type MoveClaimOrigin: EnsureOrigin<Self::Origin>; type MoveClaimOrigin: EnsureOrigin<Self::Origin>;
...@@ -130,7 +130,7 @@ impl sp_std::fmt::Debug for EcdsaSignature { ...@@ -130,7 +130,7 @@ impl sp_std::fmt::Debug for EcdsaSignature {
decl_event!( decl_event!(
pub enum Event<T> where pub enum Event<T> where
Balance = BalanceOf<T>, Balance = BalanceOf<T>,
AccountId = <T as frame_system::Trait>::AccountId AccountId = <T as frame_system::Config>::AccountId
{ {
/// Someone claimed some DOTs. [who, ethereum_address, amount] /// Someone claimed some DOTs. [who, ethereum_address, amount]
Claimed(AccountId, EthereumAddress, Balance), Claimed(AccountId, EthereumAddress, Balance),
...@@ -138,7 +138,7 @@ decl_event!( ...@@ -138,7 +138,7 @@ decl_event!(
); );
decl_error! { decl_error! {
pub enum Error for Module<T: Trait> { pub enum Error for Module<T: Config> {
/// Invalid Ethereum signature. /// Invalid Ethereum signature.
InvalidEthereumSignature, InvalidEthereumSignature,
/// Ethereum address has no claim. /// Ethereum address has no claim.
...@@ -159,7 +159,7 @@ decl_storage! { ...@@ -159,7 +159,7 @@ decl_storage! {
// A macro for the Storage trait, and its implementation, for this module. // A macro for the Storage trait, and its implementation, for this module.
// This allows for type-safe usage of the Substrate storage database, so you can // This allows for type-safe usage of the Substrate storage database, so you can
// keep things around between blocks. // keep things around between blocks.
trait Store for Module<T: Trait> as Claims { trait Store for Module<T: Config> as Claims {
Claims get(fn claims) build(|config: &GenesisConfig<T>| { Claims get(fn claims) build(|config: &GenesisConfig<T>| {
config.claims.iter().map(|(a, b, _, _)| (a.clone(), b.clone())).collect::<Vec<_>>() config.claims.iter().map(|(a, b, _, _)| (a.clone(), b.clone())).collect::<Vec<_>>()
}): map hasher(identity) EthereumAddress => Option<BalanceOf<T>>; }): map hasher(identity) EthereumAddress => Option<BalanceOf<T>>;
...@@ -194,7 +194,7 @@ decl_storage! { ...@@ -194,7 +194,7 @@ decl_storage! {
} }
decl_module! { decl_module! {
pub struct Module<T: Trait> for enum Call where origin: T::Origin { pub struct Module<T: Config> for enum Call where origin: T::Origin {
type Error = Error<T>; type Error = Error<T>;
/// The Prefix that is used in signed Ethereum messages for this network /// The Prefix that is used in signed Ethereum messages for this network
...@@ -426,7 +426,7 @@ fn to_ascii_hex(data: &[u8]) -> Vec<u8> { ...@@ -426,7 +426,7 @@ fn to_ascii_hex(data: &[u8]) -> Vec<u8> {
r r
} }
impl<T: Trait> Module<T> { impl<T: Config> Module<T> {
// Constructs the message that Ethereum RPC's `personal_sign` and `eth_sign` would sign. // Constructs the message that Ethereum RPC's `personal_sign` and `eth_sign` would sign.
fn ethereum_signable_message(what: &[u8], extra: &[u8]) -> Vec<u8> { fn ethereum_signable_message(what: &[u8], extra: &[u8]) -> Vec<u8> {
let prefix = T::Prefix::get(); let prefix = T::Prefix::get();
...@@ -487,7 +487,7 @@ impl<T: Trait> Module<T> { ...@@ -487,7 +487,7 @@ impl<T: Trait> Module<T> {
} }
} }
impl<T: Trait> sp_runtime::traits::ValidateUnsigned for Module<T> { impl<T: Config> sp_runtime::traits::ValidateUnsigned for Module<T> {
type Call = Call<T>; type Call = Call<T>;
fn validate_unsigned(_source: TransactionSource, call: &Self::Call) -> TransactionValidity { fn validate_unsigned(_source: TransactionSource, call: &Self::Call) -> TransactionValidity {
...@@ -538,11 +538,11 @@ impl<T: Trait> sp_runtime::traits::ValidateUnsigned for Module<T> { ...@@ -538,11 +538,11 @@ impl<T: Trait> sp_runtime::traits::ValidateUnsigned for Module<T> {
/// Validate `attest` calls prior to execution. Needed to avoid a DoS attack since they are /// Validate `attest` calls prior to execution. Needed to avoid a DoS attack since they are
/// otherwise free to place on chain. /// otherwise free to place on chain.
#[derive(Encode, Decode, Clone, Eq, PartialEq)] #[derive(Encode, Decode, Clone, Eq, PartialEq)]
pub struct PrevalidateAttests<T: Trait + Send + Sync>(sp_std::marker::PhantomData<T>) where pub struct PrevalidateAttests<T: Config + Send + Sync>(sp_std::marker::PhantomData<T>) where
<T as frame_system::Trait>::Call: IsSubType<Call<T>>; <T as frame_system::Config>::Call: IsSubType<Call<T>>;
impl<T: Trait + Send + Sync> Debug for PrevalidateAttests<T> where impl<T: Config + Send + Sync> Debug for PrevalidateAttests<T> where
<T as frame_system::Trait>::Call: IsSubType<Call<T>> <T as frame_system::Config>::Call: IsSubType<Call<T>>
{ {
#[cfg(feature = "std")] #[cfg(feature = "std")]
fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
...@@ -555,8 +555,8 @@ impl<T: Trait + Send + Sync> Debug for PrevalidateAttests<T> where ...@@ -555,8 +555,8 @@ impl<T: Trait + Send + Sync> Debug for PrevalidateAttests<T> where
} }
} }
impl<T: Trait + Send + Sync> PrevalidateAttests<T> where impl<T: Config + Send + Sync> PrevalidateAttests<T> where
<T as frame_system::Trait>::Call: IsSubType<Call<T>> <T as frame_system::Config>::Call: IsSubType<Call<T>>
{ {
/// Create new `SignedExtension` to check runtime version. /// Create new `SignedExtension` to check runtime version.
pub fn new() -> Self { pub fn new() -> Self {
...@@ -564,11 +564,11 @@ impl<T: Trait + Send + Sync> PrevalidateAttests<T> where ...@@ -564,11 +564,11 @@ impl<T: Trait + Send + Sync> PrevalidateAttests<T> where
} }
} }
impl<T: Trait + Send + Sync> SignedExtension for PrevalidateAttests<T> where impl<T: Config + Send + Sync> SignedExtension for PrevalidateAttests<T> where
<T as frame_system::Trait>::Call: IsSubType<Call<T>> <T as frame_system::Config>::Call: IsSubType<Call<T>>
{ {
type AccountId = T::AccountId; type AccountId = T::AccountId;
type Call = <T as frame_system::Trait>::Call; type Call = <T as frame_system::Config>::Call;
type AdditionalSigned = (); type AdditionalSigned = ();
type Pre = (); type Pre = ();
const IDENTIFIER: &'static str = "PrevalidateAttests"; const IDENTIFIER: &'static str = "PrevalidateAttests";
...@@ -615,7 +615,7 @@ mod secp_utils { ...@@ -615,7 +615,7 @@ mod secp_utils {
res.0.copy_from_slice(&keccak_256(&public(secret).serialize()[1..65])[12..]); res.0.copy_from_slice(&keccak_256(&public(secret).serialize()[1..65])[12..]);
res res
} }
pub fn sig<T: Trait>(secret: &secp256k1::SecretKey, what: &[u8], extra: &[u8]) -> EcdsaSignature { pub fn sig<T: Config>(secret: &secp256k1::SecretKey, what: &[u8], extra: &[u8]) -> EcdsaSignature {
let msg = keccak_256(&<super::Module<T>>::ethereum_signable_message(&to_ascii_hex(what)[..], extra)); let msg = keccak_256(&<super::Module<T>>::ethereum_signable_message(&to_ascii_hex(what)[..], extra));
let (sig, recovery_id) = secp256k1::sign(&secp256k1::Message::parse(&msg), secret); let (sig, recovery_id) = secp256k1::sign(&secp256k1::Message::parse(&msg), secret);
let mut r = [0u8; 65]; let mut r = [0u8; 65];
...@@ -665,7 +665,7 @@ mod tests { ...@@ -665,7 +665,7 @@ mod tests {
pub const MaximumBlockLength: u32 = 4 * 1024 * 1024; pub const MaximumBlockLength: u32 = 4 * 1024 * 1024;
pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
} }
impl frame_system::Trait for Test { impl frame_system::Config for Test {
type BaseCallFilter = (); type BaseCallFilter = ();
type Origin = Origin; type Origin = Origin;
type Call = Call; type Call = Call;
...@@ -697,7 +697,7 @@ mod tests { ...@@ -697,7 +697,7 @@ mod tests {
pub const ExistentialDeposit: u64 = 1; pub const ExistentialDeposit: u64 = 1;
} }
impl pallet_balances::Trait for Test { impl pallet_balances::Config for Test {
type Balance = u64; type Balance = u64;
type Event = (); type Event = ();
type DustRemoval = (); type DustRemoval = ();
...@@ -711,7 +711,7 @@ mod tests { ...@@ -711,7 +711,7 @@ mod tests {
pub const MinVestedTransfer: u64 = 0; pub const MinVestedTransfer: u64 = 0;
} }
impl pallet_vesting::Trait for Test { impl pallet_vesting::Config for Test {
type Event = (); type Event = ();
type Currency = Balances; type Currency = Balances;
type BlockNumberToBalance = Identity; type BlockNumberToBalance = Identity;
...@@ -726,7 +726,7 @@ mod tests { ...@@ -726,7 +726,7 @@ mod tests {
pub const Six: u64 = 6; pub const Six: u64 = 6;
} }
impl Trait for Test { impl Config for Test {
type Event = (); type Event = ();
type VestingSchedule = Vesting; type VestingSchedule = Vesting;
type Prefix = Prefix; type Prefix = Prefix;
...@@ -1048,7 +1048,7 @@ mod tests { ...@@ -1048,7 +1048,7 @@ mod tests {
fn claiming_while_vested_doesnt_work() { fn claiming_while_vested_doesnt_work() {
new_test_ext().execute_with(|| { new_test_ext().execute_with(|| {
// A user is already vested // A user is already vested
assert_ok!(<Test as Trait>::VestingSchedule::add_vesting_schedule(&69, total_claims(), 100, 10)); assert_ok!(<Test as Config>::VestingSchedule::add_vesting_schedule(&69, total_claims(), 100, 10));
CurrencyOf::<Test>::make_free_balance_be(&69, total_claims()); CurrencyOf::<Test>::make_free_balance_be(&69, total_claims());
assert_eq!(Balances::free_balance(69), total_claims()); assert_eq!(Balances::free_balance(69), total_claims());
assert_ok!(Claims::mint_claim(Origin::root(), eth(&bob()), 200, Some((50, 10, 1)), None)); assert_ok!(Claims::mint_claim(Origin::root(), eth(&bob()), 200, Some((50, 10, 1)), None));
...@@ -1181,7 +1181,7 @@ mod benchmarking { ...@@ -1181,7 +1181,7 @@ mod benchmarking {
const MAX_CLAIMS: u32 = 10_000; const MAX_CLAIMS: u32 = 10_000;
const VALUE: u32 = 1_000_000; const VALUE: u32 = 1_000_000;
fn create_claim<T: Trait>(input: u32) -> DispatchResult { fn create_claim<T: Config>(input: u32) -> DispatchResult {
let secret_key = secp256k1::SecretKey::parse(&keccak_256(&input.encode())).unwrap(); let secret_key = secp256k1::SecretKey::parse(&keccak_256(&input.encode())).unwrap();
let eth_address = eth(&secret_key); let eth_address = eth(&secret_key);
let vesting = Some((100_000u32.into(), 1_000u32.into(), 100u32.into())); let vesting = Some((100_000u32.into(), 1_000u32.into(), 100u32.into()));
...@@ -1189,7 +1189,7 @@ mod benchmarking { ...@@ -1189,7 +1189,7 @@ mod benchmarking {
Ok(()) Ok(())
} }
fn create_claim_attest<T: Trait>(input: u32) -> DispatchResult { fn create_claim_attest<T: Config>(input: u32) -> DispatchResult {
let secret_key = secp256k1::SecretKey::parse(&keccak_256(&input.encode())).unwrap(); let secret_key = secp256k1::SecretKey::parse(&keccak_256(&input.encode())).unwrap();
let eth_address = eth(&secret_key); let eth_address = eth(&secret_key);
let vesting = Some((100_000u32.into(), 1_000u32.into(), 100u32.into())); let vesting = Some((100_000u32.into(), 1_000u32.into(), 100u32.into()));
......
...@@ -82,13 +82,13 @@ use sp_std::vec::Vec; ...@@ -82,13 +82,13 @@ use sp_std::vec::Vec;
use primitives::v1::{Id as ParaId, HeadData}; use primitives::v1::{Id as ParaId, HeadData};
pub type BalanceOf<T> = pub type BalanceOf<T> =
<<T as slots::Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance; <<T as slots::Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance;
#[allow(dead_code)] #[allow(dead_code)]
pub type NegativeImbalanceOf<T> = pub type NegativeImbalanceOf<T> =
<<T as slots::Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::NegativeImbalance; <<T as slots::Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::NegativeImbalance;
pub trait Trait: slots::Trait { pub trait Config: slots::Config {
type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>; type Event: From<Event<Self>> + Into<<Self as frame_system::Config>::Event>;
/// ModuleID for the crowdfund module. An appropriate value could be ```ModuleId(*b"py/cfund")``` /// ModuleID for the crowdfund module. An appropriate value could be ```ModuleId(*b"py/cfund")```
type ModuleId: Get<ModuleId>; type ModuleId: Get<ModuleId>;
...@@ -164,7 +164,7 @@ pub struct FundInfo<AccountId, Balance, Hash, BlockNumber> { ...@@ -164,7 +164,7 @@ pub struct FundInfo<AccountId, Balance, Hash, BlockNumber> {
} }
decl_storage! { decl_storage! {
trait Store for Module<T: Trait> as Crowdfund { trait Store for Module<T: Config> as Crowdfund {
/// Info on all of the funds. /// Info on all of the funds.
Funds get(fn funds): Funds get(fn funds):
map hasher(twox_64_concat) FundIndex map hasher(twox_64_concat) FundIndex
...@@ -184,7 +184,7 @@ decl_storage! { ...@@ -184,7 +184,7 @@ decl_storage! {
decl_event! { decl_event! {
pub enum Event<T> where pub enum Event<T> where
<T as frame_system::Trait>::AccountId, <T as frame_system::Config>::AccountId,
Balance = BalanceOf<T>, Balance = BalanceOf<T>,
{ {
/// Create a new crowdfunding campaign. [fund_index] /// Create a new crowdfunding campaign. [fund_index]
...@@ -205,7 +205,7 @@ decl_event! { ...@@ -205,7 +205,7 @@ decl_event! {
} }
decl_error! { decl_error! {
pub enum Error for Module<T: Trait> { pub enum Error for Module<T: Config> {
/// Last slot must be greater than first slot. /// Last slot must be greater than first slot.
LastSlotBeforeFirstSlot, LastSlotBeforeFirstSlot,
/// The last slot cannot be more then 3 slots after the first slot. /// The last slot cannot be more then 3 slots after the first slot.
...@@ -251,7 +251,7 @@ decl_error! { ...@@ -251,7 +251,7 @@ decl_error! {
} }
decl_module! { decl_module! {
pub struct Module<T: Trait> for enum Call where origin: T::Origin { pub struct Module<T: Config> for enum Call where origin: T::Origin {
type Error = Error<T>; type Error = Error<T>;
const ModuleId: ModuleId = T::ModuleId::get(); const ModuleId: ModuleId = T::ModuleId::get();
...@@ -528,7 +528,7 @@ decl_module! { ...@@ -528,7 +528,7 @@ decl_module! {
} }
} }
impl<T: Trait> Module<T> { impl<T: Config> Module<T> {
/// The account ID of the fund pot. /// The account ID of the fund pot.
/// ///
/// This actually does computation. If you need to keep using it, then make sure you cache the /// This actually does computation. If you need to keep using it, then make sure you cache the
...@@ -599,7 +599,7 @@ mod tests { ...@@ -599,7 +599,7 @@ mod tests {
pub const MaximumBlockLength: u32 = 4 * 1024 * 1024; pub const MaximumBlockLength: u32 = 4 * 1024 * 1024;
pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
} }
impl frame_system::Trait for Test { impl frame_system::Config for Test {
type BaseCallFilter = (); type BaseCallFilter = ();
type Origin = Origin; type Origin = Origin;
type Call = (); type Call = ();
...@@ -629,7 +629,7 @@ mod tests { ...@@ -629,7 +629,7 @@ mod tests {
parameter_types! { parameter_types! {
pub const ExistentialDeposit: u64 = 1; pub const ExistentialDeposit: u64 = 1;
} }
impl pallet_balances::Trait for Test { impl pallet_balances::Config for Test {
type Balance = u64; type Balance = u64;
type Event = (); type Event = ();
type DustRemoval = (); type DustRemoval = ();
...@@ -667,7 +667,7 @@ mod tests { ...@@ -667,7 +667,7 @@ mod tests {
fn min_len() -> usize { 0 } fn min_len() -> usize { 0 }
fn max_len() -> usize { 0 } fn max_len() -> usize { 0 }
} }
impl pallet_treasury::Trait for Test { impl pallet_treasury::Config for Test {
type Currency = pallet_balances::Module<Test>; type Currency = pallet_balances::Module<Test>;
type ApproveOrigin = frame_system::EnsureRoot<u64>; type ApproveOrigin = frame_system::EnsureRoot<u64>;
type RejectOrigin = frame_system::EnsureRoot<u64>; type RejectOrigin = frame_system::EnsureRoot<u64>;
...@@ -749,7 +749,7 @@ mod tests { ...@@ -749,7 +749,7 @@ mod tests {
pub const LeasePeriod: u64 = 10; pub const LeasePeriod: u64 = 10;
pub const EndingPeriod: u64 = 3; pub const EndingPeriod: u64 = 3;
} }
impl slots::Trait for Test { impl slots::Config for Test {
type Event = (); type Event = ();
type Currency = Balances; type Currency = Balances;
type Parachains = TestParachains; type Parachains = TestParachains;
...@@ -763,7 +763,7 @@ mod tests { ...@@ -763,7 +763,7 @@ mod tests {
pub const RetirementPeriod: u64 = 5; pub const RetirementPeriod: u64 = 5;
pub const CrowdfundModuleId: ModuleId = ModuleId(*b"py/cfund"); pub const CrowdfundModuleId: ModuleId = ModuleId(*b"py/cfund");
} }
impl Trait for Test { impl Config for Test {
type Event = (); type Event = ();
type SubmissionDeposit = SubmissionDeposit; type SubmissionDeposit = SubmissionDeposit;
type MinContribution = MinContribution; type MinContribution = MinContribution;
...@@ -936,7 +936,7 @@ mod tests { ...@@ -936,7 +936,7 @@ mod tests {
assert_ok!(Crowdfund::fix_deploy_data( assert_ok!(Crowdfund::fix_deploy_data(
Origin::signed(1), Origin::signed(1),
0, 0,
<Test as frame_system::Trait>::Hash::default(), <Test as frame_system::Config>::Hash::default(),
0, 0,
vec![0].into() vec![0].into()
)); ));
...@@ -947,7 +947,7 @@ mod tests { ...@@ -947,7 +947,7 @@ mod tests {
assert_eq!( assert_eq!(
fund.deploy_data, fund.deploy_data,
Some(DeployData { Some(DeployData {
code_hash: <Test as frame_system::Trait>::Hash::default(), code_hash: <Test as frame_system::Config>::Hash::default(),
code_size: 0, code_size: 0,
initial_head_data: vec![0].into(), initial_head_data: vec![0].into(),
}), }),
...@@ -966,7 +966,7 @@ mod tests { ...@@ -966,7 +966,7 @@ mod tests {
assert_noop!(Crowdfund::fix_deploy_data( assert_noop!(Crowdfund::fix_deploy_data(
Origin::signed(2), Origin::signed(2),
0, 0,
<Test as frame_system::Trait>::Hash::default(), <Test as frame_system::Config>::Hash::default(),
0, 0,
vec![0].into()), vec![0].into()),
Error::<Test>::InvalidOrigin Error::<Test>::InvalidOrigin
...@@ -976,7 +976,7 @@ mod tests { ...@@ -976,7 +976,7 @@ mod tests {
assert_noop!(Crowdfund::fix_deploy_data( assert_noop!(Crowdfund::fix_deploy_data(
Origin::signed(1), Origin::signed(1),
1, 1,
<Test as frame_system::Trait>::Hash::default(), <Test as frame_system::Config>::Hash::default(),
0, 0,
vec![0].into()), vec![0].into()),
Error::<Test>::InvalidFundIndex Error::<Test>::InvalidFundIndex
...@@ -986,7 +986,7 @@ mod tests { ...@@ -986,7 +986,7 @@ mod tests {
assert_ok!(Crowdfund::fix_deploy_data( assert_ok!(Crowdfund::fix_deploy_data(
Origin::signed(1), Origin::signed(1),
0, 0,
<Test as frame_system::Trait>::Hash::default(), <Test as frame_system::Config>::Hash::default(),
0, 0,
vec![0].into(), vec![0].into(),
)); ));
...@@ -994,7 +994,7 @@ mod tests { ...@@ -994,7 +994,7 @@ mod tests {
assert_noop!(Crowdfund::fix_deploy_data( assert_noop!(Crowdfund::fix_deploy_data(
Origin::signed(1), Origin::signed(1),
0, 0,
<Test as frame_system::Trait>::Hash::default(), <Test as frame_system::Config>::Hash::default(),
0, 0,
vec![1].into()), vec![1].into()),
Error::<Test>::ExistingDeployData Error::<Test>::ExistingDeployData
...@@ -1014,7 +1014,7 @@ mod tests { ...@@ -1014,7 +1014,7 @@ mod tests {
assert_ok!(Crowdfund::fix_deploy_data( assert_ok!(Crowdfund::fix_deploy_data(
Origin::signed(1), Origin::signed(1),
0, 0,
<Test as frame_system::Trait>::Hash::default(), <Test as frame_system::Config>::Hash::default(),
0, 0,
vec![0].into(), vec![0].into(),
)); ));
...@@ -1060,7 +1060,7 @@ mod tests { ...@@ -1060,7 +1060,7 @@ mod tests {
assert_ok!(Crowdfund::fix_deploy_data( assert_ok!(Crowdfund::fix_deploy_data(
Origin::signed(1), Origin::signed(1),
0, 0,
<Test as frame_system::Trait>::Hash::default(), <Test as frame_system::Config>::Hash::default(),
0, 0,
vec![0].into(), vec![0].into(),
)); ));
...@@ -1088,7 +1088,7 @@ mod tests { ...@@ -1088,7 +1088,7 @@ mod tests {
assert_ok!(Crowdfund::fix_deploy_data( assert_ok!(Crowdfund::fix_deploy_data(
Origin::signed(1), Origin::signed(1),
0, 0,
<Test as frame_system::Trait>::Hash::default(), <Test as frame_system::Config>::Hash::default(),
0, 0,
vec![0].into(), vec![0].into(),
)); ));
...@@ -1131,7 +1131,7 @@ mod tests { ...@@ -1131,7 +1131,7 @@ mod tests {
assert_ok!(Crowdfund::fix_deploy_data( assert_ok!(Crowdfund::fix_deploy_data(
Origin::signed(1), Origin::signed(1),
0, 0,
<Test as frame_system::Trait>::Hash::default(), <Test as frame_system::Config>::Hash::default(),
0, 0,
vec![0].into(), vec![0].into(),
)); ));
...@@ -1273,7 +1273,7 @@ mod tests { ...@@ -1273,7 +1273,7 @@ mod tests {
assert_ok!(Crowdfund::fix_deploy_data( assert_ok!(Crowdfund::fix_deploy_data(
Origin::signed(1), Origin::signed(1),
0, 0,
<Test as frame_system::Trait>::Hash::default(), <Test as frame_system::Config>::Hash::default(),
0, 0,
vec![0].into(), vec![0].into(),
)); ));
...@@ -1302,7 +1302,7 @@ mod tests { ...@@ -1302,7 +1302,7 @@ mod tests {
assert_ok!(Crowdfund::fix_deploy_data( assert_ok!(Crowdfund::fix_deploy_data(
Origin::signed(1), Origin::signed(1),
0, 0,
<Test as frame_system::Trait>::Hash::default(), <Test as frame_system::Config>::Hash::default(),
0, 0,
vec![0].into(), vec![0].into(),
)); ));
...@@ -1341,14 +1341,14 @@ mod tests { ...@@ -1341,14 +1341,14 @@ mod tests {
assert_ok!(Crowdfund::fix_deploy_data( assert_ok!(Crowdfund::fix_deploy_data(
Origin::signed(1), Origin::signed(1),
0, 0,
<Test as frame_system::Trait>::Hash::default(), <Test as frame_system::Config>::Hash::default(),
0, 0,