Got this runtime error while implementing assets pallet
1002: Verification Error: Runtime error: Execution failed: ApiError(FailedToConvertParameter
More info about error:
1002: Verification Error: Runtime error: Execution failed: ApiError(FailedToConvertParameter { function: "validate_transaction", parameter: "tx", error: Error { cause: Some(Error { cause: Some(Error { cause: None, desc: "Not enough data to fill buffer" }), desc: "Could not decode
Call::create.2
" }), desc: "Could not decodeCall::Assets.0
" } }): RuntimeApi, Execution failed: ApiError, FailedToConvertParameter { function: "validate_transaction", parameter: "tx", error: Error { cause: Some, Error { cause: Some, Error { cause: None, desc: "Not enough data to fill buffer" }, desc: "Could not…
Implementation of assets pallet config trait:
lib.rs:
parameter_types!{
pub const StringLimit: u32 = 50;
pub const MetadataDepositBase: Balance = 2 * DOLLARS ;
pub const MetaDataDepositPerByte: Balance = 2 * DOLLARS ;
//pub const AssetDepositBase: Balance = 2;
pub const AssetDepositPerZombie: Balance = 2 * DOLLARS;
pub const AssetDeposit: Balance = 2 * DOLLARS ;
pub const ApprovalDeposit: Balance = 2 * DOLLARS ;
}
impl pallet_assets::pallet::Config for Runtime {
// The ubiquitous event type.
type Event= Event;
type Balance= Balance;
type AssetId= u32;
type Currency = Balances;
type ForceOrigin = EnsureRoot<AccountId>;
type AssetDeposit = AssetDeposit;
type ApprovalDeposit = ApprovalDeposit;
type StringLimit = StringLimit;
//type AssetDepositBase=AssetDepositBase;
//type AssetDepositPerZombie= AssetDepositPerZombie;
type MetadataDepositBase = MetadataDepositBase;
type MetadataDepositPerByte = MetaDataDepositPerByte;
type Freezer = ();
type Extra = ();
type WeightInfo = pallet_assets::weights::SubstrateWeight<Runtime>;
}