Make parameter types implementation more flexible (#3112)

* Make parameter types implementation more flexible

* Bump `impl_version`
This commit is contained in:
Bastian Köcher
2019-07-13 10:54:41 +02:00
committed by Gavin Wood
parent 9ee79d5c5e
commit c42d73d302
5 changed files with 68 additions and 64 deletions
+11 -21
View File
@@ -70,7 +70,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
spec_version: 110,
impl_version: 110,
impl_version: 111,
apis: RUNTIME_API_VERSIONS,
};
@@ -341,21 +341,11 @@ impl treasury::Trait for Runtime {
}
parameter_types! {
pub const SignedClaimHandicap: BlockNumber = 2;
pub const TombstoneDeposit: Balance = 16;
pub const StorageSizeOffset: u32 = 8;
pub const RentByteFee: Balance = 4;
pub const RentDepositOffset: Balance = 1000;
pub const SurchargeReward: Balance = 150;
pub const ContractTransferFee: Balance = 1 * CENTS;
pub const ContractCreationFee: Balance = 1 * CENTS;
pub const ContractTransactionBaseFee: Balance = 1 * CENTS;
pub const ContractTransactionByteFee: Balance = 10 * MILLICENTS;
pub const ContractFee: Balance = 1 * CENTS;
pub const CallBaseFee: Gas = 1000;
pub const CreateBaseFee: Gas = 1000;
pub const MaxDepth: u32 = 1024;
pub const BlockGasLimit: Gas = 10_000_000;
}
impl contracts::Trait for Runtime {
@@ -366,21 +356,21 @@ impl contracts::Trait for Runtime {
type ComputeDispatchFee = contracts::DefaultDispatchFeeComputor<Runtime>;
type TrieIdGenerator = contracts::TrieIdFromParentCounter<Runtime>;
type GasPayment = ();
type SignedClaimHandicap = SignedClaimHandicap;
type TombstoneDeposit = TombstoneDeposit;
type StorageSizeOffset = StorageSizeOffset;
type RentByteFee = RentByteFee;
type RentDepositOffset = RentDepositOffset;
type SurchargeReward = SurchargeReward;
type SignedClaimHandicap = contracts::DefaultSignedClaimHandicap;
type TombstoneDeposit = contracts::DefaultTombstoneDeposit;
type StorageSizeOffset = contracts::DefaultStorageSizeOffset;
type RentByteFee = contracts::DefaultRentByteFee;
type RentDepositOffset = contracts::DefaultRentDepositOffset;
type SurchargeReward = contracts::DefaultSurchargeReward;
type TransferFee = ContractTransferFee;
type CreationFee = ContractCreationFee;
type TransactionBaseFee = ContractTransactionBaseFee;
type TransactionByteFee = ContractTransactionByteFee;
type ContractFee = ContractFee;
type CallBaseFee = CallBaseFee;
type CreateBaseFee = CreateBaseFee;
type MaxDepth = MaxDepth;
type BlockGasLimit = BlockGasLimit;
type CallBaseFee = contracts::DefaultCallBaseFee;
type CreateBaseFee = contracts::DefaultCreateBaseFee;
type MaxDepth = contracts::DefaultMaxDepth;
type BlockGasLimit = contracts::DefaultBlockGasLimit;
}
impl sudo::Trait for Runtime {