From d5c4f58d5b38d6a8b0fb4908a611595045acaf9d Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Wed, 28 Jul 2021 09:09:02 +0000 Subject: [PATCH] feat: set default sponsoring rate limit for contracts --- --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -154,7 +154,7 @@ transaction_version: 1, }; -pub const MILLISECS_PER_BLOCK: u64 = 1200; +pub const MILLISECS_PER_BLOCK: u64 = 12000; pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; @@ -163,6 +163,10 @@ pub const HOURS: BlockNumber = MINUTES * 60; pub const DAYS: BlockNumber = HOURS * 24; +parameter_types! { + pub const DefaultSponsoringRateLimit: BlockNumber = 1 * DAYS; +} + #[derive(codec::Encode, codec::Decode)] pub enum XCMPMessage { /// Transfer tokens to the given account from the Parachain account. @@ -757,7 +761,9 @@ impl pallet_nft_charge_transaction::Config for Runtime {} -// impl pallet_contract_helpers::Config for Runtime {} +// impl pallet_contract_helpers::Config for Runtime { +// type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit; +// } parameter_types! { // 0x842899ECF380553E8a4de75bF534cdf6fBF64049 @@ -768,6 +774,7 @@ impl pallet_evm_contract_helpers::Config for Runtime { type ContractAddress = HelpersContractAddress; + type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit; } construct_runtime!( -- gitstuff