ink_node_runtime/
assets_config.rs1use crate::{AccountId, Balance, Balances, Runtime, RuntimeEvent};
2use frame_support::{
3 parameter_types,
4 traits::{AsEnsureOriginWithArg, ConstU128, ConstU32},
5};
6use frame_system::EnsureSigned;
7
8pub const MILLICENTS: Balance = 1_000_000_000;
9pub const CENTS: Balance = 1_000 * MILLICENTS; pub const DOLLARS: Balance = 100 * CENTS;
11
12parameter_types! {
13 pub const AssetDeposit: Balance = 100 * DOLLARS;
14 pub const ApprovalDeposit: Balance = 1 * DOLLARS;
15 pub const StringLimit: u32 = 50;
16 pub const MetadataDepositBase: Balance = 10 * DOLLARS;
17 pub const MetadataDepositPerByte: Balance = 1 * DOLLARS;
18}
19
20impl pallet_assets::Config for Runtime {
21 type RuntimeEvent = RuntimeEvent;
22 type Balance = u128;
23 type AssetId = u32;
24 type AssetIdParameter = codec::Compact<u32>;
25 type CreateOrigin = AsEnsureOriginWithArg<EnsureSigned<AccountId>>;
26 type Currency = Balances;
27 type ForceOrigin = frame_system::EnsureRoot<AccountId>;
28 type AssetDeposit = AssetDeposit;
29 type AssetAccountDeposit = ConstU128<DOLLARS>;
30 type MetadataDepositBase = MetadataDepositBase;
31 type MetadataDepositPerByte = MetadataDepositPerByte;
32 type ApprovalDeposit = ApprovalDeposit;
33 type StringLimit = StringLimit;
34 type Freezer = ();
35 type Extra = ();
36 type WeightInfo = pallet_assets::weights::SubstrateWeight<Runtime>;
37 type RemoveItemsLimit = ConstU32<1000>;
38 type CallbackHandle = ();
39 #[cfg(feature = "runtime-benchmarks")]
40 type BenchmarkHelper = ();
41 type Holder = ();
42}