contracts_rococo_runtime/
contracts.rs1use crate::{
17 Balance, Balances, RandomnessCollectiveFlip, Runtime, RuntimeCall, RuntimeEvent,
18 RuntimeHoldReason, Timestamp,
19};
20use frame_support::{
21 parameter_types,
22 traits::{ConstBool, ConstU32, Nothing},
23};
24use frame_system::EnsureSigned;
25use pallet_contracts::{
26 weights::SubstrateWeight, Config, DebugInfo, DefaultAddressGenerator, Frame, Schedule,
27};
28use sp_runtime::Perbill;
29
30use testnet_parachains_constants::rococo::currency::deposit;
31
32pub const CONTRACTS_DEBUG_OUTPUT: DebugInfo = DebugInfo::UnsafeDebug;
35
36parameter_types! {
37 pub const DepositPerItem: Balance = deposit(1, 0);
38 pub const DepositPerByte: Balance = deposit(0, 1);
39 pub const DefaultDepositLimit: Balance = deposit(1024, 1024 * 1024);
40 pub MySchedule: Schedule<Runtime> = Default::default();
41 pub CodeHashLockupDepositPercent: Perbill = Perbill::from_percent(30);
42}
43
44impl Config for Runtime {
45 type Time = Timestamp;
46 type Randomness = RandomnessCollectiveFlip;
47 type Currency = Balances;
48 type RuntimeEvent = RuntimeEvent;
49 type RuntimeCall = RuntimeCall;
50 type CallFilter = Nothing;
57 type DepositPerItem = DepositPerItem;
58 type DepositPerByte = DepositPerByte;
59 type DefaultDepositLimit = DefaultDepositLimit;
60 type WeightPrice = pallet_transaction_payment::Pallet<Self>;
61 type WeightInfo = SubstrateWeight<Self>;
62 type ChainExtension = ();
63 type Schedule = MySchedule;
64 type CallStack = [Frame<Self>; 5];
65 type AddressGenerator = DefaultAddressGenerator;
66 type MaxCodeLen = ConstU32<{ 123 * 1024 }>;
67 type MaxStorageKeyLen = ConstU32<128>;
68 type MaxTransientStorageSize = ConstU32<{ 1 * 1024 * 1024 }>;
69 type UnsafeUnstableInterface = ConstBool<true>;
70 type UploadOrigin = EnsureSigned<Self::AccountId>;
71 type InstantiateOrigin = EnsureSigned<Self::AccountId>;
72 type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>;
73 type MaxDelegateDependencies = ConstU32<32>;
74 type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent;
75 #[cfg(not(feature = "runtime-benchmarks"))]
76 type Migrations = ();
77 #[cfg(feature = "runtime-benchmarks")]
78 type Migrations = pallet_contracts::migration::codegen::BenchMigrations;
79 type RuntimeHoldReason = RuntimeHoldReason;
80 type Debug = ();
81 type Environment = ();
82 type ApiVersion = ();
83 type Xcm = pallet_xcm::Pallet<Self>;
84}