Skip to content

Commit

Permalink
update config
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Jul 7, 2023
1 parent 0c1a872 commit d38bad2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
15 changes: 9 additions & 6 deletions runtime/acala/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub use frame_support::{
pallet_prelude::InvalidTransaction,
parameter_types,
traits::{
ConstBool, ConstU128, ConstU16, ConstU32, Contains, ContainsLengthBound, Currency as PalletCurrency,
ConstBool, ConstU128, ConstU16, ConstU32, Contains, ContainsLengthBound, Currency as PalletCurrency, Currency,
EnsureOrigin, EqualPrivilegeOnly, Everything, Get, Imbalance, InstanceFilter, IsSubType, IsType,
KeyOwnerProofSystem, LockIdentifier, Nothing, OnRuntimeUpgrade, OnUnbalanced, Randomness, SortedMembers,
U128CurrencyToVote,
Expand Down Expand Up @@ -577,8 +577,8 @@ parameter_types! {
pub const ProposalBond: Permill = Permill::from_percent(5);
pub ProposalBondMinimum: Balance = 10 * dollar(ACA);
pub ProposalBondMaximum: Balance = 50 * dollar(ACA);
pub const SpendPeriod: BlockNumber = 14 * DAYS;
pub const Burn: Permill = Permill::from_percent(0);
pub const SpendPeriod: BlockNumber = 30 * DAYS;
pub const Burn: Permill = Permill::from_percent(1);

pub const TipCountdown: BlockNumber = 2 * DAYS;
pub const TipFindersFee: Percent = Percent::from_percent(5);
Expand Down Expand Up @@ -1204,8 +1204,11 @@ impl OnUnbalanced<NegativeImbalance> for DealWithFees {
if let Some(tips) = fees_then_tips.next() {
tips.merge_into(&mut fees);
}
// for fees and tips, 100% to treasury
Treasury::on_unbalanced(fees);
// for fees and tips, 100% to treasury reserve
<Balances as Currency<AccountId>>::resolve_creating(
&TreasuryReservePalletId::get().into_account_truncating(),
fees,
);
}
}
}
Expand Down Expand Up @@ -1449,7 +1452,7 @@ impl module_evm::Config for Runtime {
type PrecompilesValue = PrecompilesValue;
type GasToWeight = GasToWeight;
type ChargeTransactionPayment = module_transaction_payment::ChargeTransactionPayment<Runtime>;
type NetworkContractOrigin = EnsureRootOrTwoThirdsTechnicalCommittee;
type NetworkContractOrigin = EnsureRootOrThreeFourthsGeneralCouncil;
type NetworkContractSource = NetworkContractSource;
type DeveloperDeposit = DeveloperDeposit;
type PublicationFee = PublicationFee;
Expand Down
20 changes: 12 additions & 8 deletions runtime/karura/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ use sp_std::prelude::*;
use sp_version::NativeVersion;
use sp_version::RuntimeVersion;

use frame_support::pallet_prelude::InvalidTransaction;
use frame_system::{EnsureRoot, EnsureSigned, RawOrigin};
use module_asset_registry::{AssetIdMaps, EvmErc20InfoMapping};
use module_cdp_engine::CollateralCurrencyIds;
Expand All @@ -68,9 +67,11 @@ use orml_utilities::simulate_execution;
use pallet_transaction_payment::RuntimeDispatchInfo;

pub use frame_support::{
construct_runtime, log, parameter_types,
construct_runtime, log,
pallet_prelude::InvalidTransaction,
parameter_types,
traits::{
ConstBool, ConstU128, ConstU16, ConstU32, Contains, ContainsLengthBound, Currency as PalletCurrency,
ConstBool, ConstU128, ConstU16, ConstU32, Contains, ContainsLengthBound, Currency as PalletCurrency, Currency,
EnsureOrigin, EqualPrivilegeOnly, Everything, Get, Imbalance, InstanceFilter, IsSubType, IsType,
KeyOwnerProofSystem, LockIdentifier, Nothing, OnRuntimeUpgrade, OnUnbalanced, Randomness, SortedMembers,
U128CurrencyToVote,
Expand Down Expand Up @@ -585,8 +586,8 @@ parameter_types! {
pub const ProposalBond: Permill = Permill::from_percent(5);
pub ProposalBondMinimum: Balance = 5 * dollar(KAR);
pub ProposalBondMaximum: Balance = 25 * dollar(KAR);
pub const SpendPeriod: BlockNumber = 7 * DAYS;
pub const Burn: Permill = Permill::from_percent(0);
pub const SpendPeriod: BlockNumber = 30 * DAYS;
pub const Burn: Permill = Permill::from_percent(1);

pub const TipCountdown: BlockNumber = DAYS;
pub const TipFindersFee: Percent = Percent::from_percent(5);
Expand Down Expand Up @@ -1210,8 +1211,11 @@ impl OnUnbalanced<NegativeImbalance> for DealWithFees {
if let Some(tips) = fees_then_tips.next() {
tips.merge_into(&mut fees);
}
// for fees and tips, 100% to treasury
Treasury::on_unbalanced(fees);
// for fees and tips, 100% to treasury reserve
<Balances as Currency<AccountId>>::resolve_creating(
&TreasuryReservePalletId::get().into_account_truncating(),
fees,
);
}
}
}
Expand Down Expand Up @@ -1466,7 +1470,7 @@ impl module_evm::Config for Runtime {
type PrecompilesValue = PrecompilesValue;
type GasToWeight = GasToWeight;
type ChargeTransactionPayment = module_transaction_payment::ChargeTransactionPayment<Runtime>;
type NetworkContractOrigin = EnsureRootOrTwoThirdsTechnicalCommittee;
type NetworkContractOrigin = EnsureRootOrThreeFourthsGeneralCouncil;
type NetworkContractSource = NetworkContractSource;
type DeveloperDeposit = DeveloperDeposit;
type PublicationFee = PublicationFee;
Expand Down
2 changes: 1 addition & 1 deletion runtime/mandala/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1643,7 +1643,7 @@ impl module_evm::Config for Runtime {
type PrecompilesValue = PrecompilesValue;
type GasToWeight = GasToWeight;
type ChargeTransactionPayment = module_transaction_payment::ChargeTransactionPayment<Runtime>;
type NetworkContractOrigin = EnsureRootOrTwoThirdsTechnicalCommittee;
type NetworkContractOrigin = EnsureRootOrThreeFourthsGeneralCouncil;
type NetworkContractSource = NetworkContractSource;
type DeveloperDeposit = DeveloperDeposit;
type PublicationFee = PublicationFee;
Expand Down

0 comments on commit d38bad2

Please sign in to comment.