i gonna add pallet-assets
in my project but i faced this error :
error[E0046]: not all trait items implemented, missing:
RemoveItemsLimit
,AssetIdParameter
,CreateOrigin
,CallbackHandle
--> /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:289:1 | 289 | impl pallet_assets::Config for Runtime { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missingRemoveItemsLimit
,AssetIdParameter
,CreateOrigin
,CallbackHandle
in implementation | = help: implement the missing item:type RemoveItemsLimit = Type;
= help: implement the missing item:type AssetIdParameter = Type;
= help: implement the missing item:type CreateOrigin = Type;
= help: implement the missing item:type CallbackHandle = Type;
i did these steps :
1 - Add pallet-assets
in Cargo.toml
:
pallet-assets = { default-features = false, version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", " branch" = "polkadot-v0.9.35" }
2 - Add this Config in runtime.rs
:
pub type AssetBalance = Balance;
pub type AssetId = u32;
impl pallet_assets::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = AssetBalance;
type AssetId = AssetId;
type Currency = Balances;
type ForceOrigin = EnsureRoot<AccountId>;
type AssetDeposit = ConstU128<1>;
type AssetAccountDeposit = ConstU128<10>;
type MetadataDepositBase = ConstU128<1>;
type MetadataDepositPerByte = ConstU128<1>;
type ApprovalDeposit = ConstU128<1>;
type StringLimit = ConstU32<50>;
type Freezer = ();
type Extra = ();
type WeightInfo = ();
}
whats the problem ? how can i solve this problem ?