From 45d054637f1e9bf506adc161d903104dfd5bf51f Mon Sep 17 00:00:00 2001 From: PierreOssun Date: Mon, 20 Mar 2023 10:31:37 +0100 Subject: [PATCH] Updated values to Astar values --- runtime/src/lib.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 0b66667..bf4e075 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -144,12 +144,15 @@ const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX); /// Constant values used within the runtime. -pub const MILLIUNIT: Balance = 1_000_000_000_000_000; +pub const MICROUNIT: Balance = 1_000_000_000_000; +pub const MILLIUNIT: Balance = 1_000 * MICROUNIT; pub const UNIT: Balance = 1_000 * MILLIUNIT; +pub const STORAGE_BYTE_FEE: Balance = 100 * MICROUNIT; + /// Charge fee for stored bytes and items. pub const fn deposit(items: u32, bytes: u32) -> Balance { - (items as Balance + bytes as Balance) * MILLIUNIT / 1_000_000 + items as Balance * 1 * UNIT + (bytes as Balance) * STORAGE_BYTE_FEE } parameter_types! { @@ -348,9 +351,9 @@ impl pallet_contracts::Config for Runtime { type DeletionQueueDepth = ConstU32<128>; type DeletionWeightLimit = DeletionWeightLimit; type Schedule = Schedule; - type CallStack = [pallet_contracts::Frame; 31]; + type CallStack = [pallet_contracts::Frame; 5]; type AddressGenerator = pallet_contracts::DefaultAddressGenerator; - type MaxCodeLen = ConstU32<{ 128 * 1024 }>; + type MaxCodeLen = ConstU32<{ 123 * 1024 }>; type MaxStorageKeyLen = ConstU32<128>; type UnsafeUnstableInterface = ConstBool; type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>;