#![cfg_attr(not(feature = "std"), no_std)]
use codec::{Decode, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
use sp_runtime::{Perbill, Percent};
#[derive(Encode, Decode, Clone, Copy, Eq, PartialEq, MaxEncodedLen, Debug, TypeInfo)]
pub enum OneOrPercent {
One,
ZeroPoint(Percent),
}
#[derive(Encode, Decode, Clone, Eq, PartialEq, MaxEncodedLen, Debug, TypeInfo)]
pub enum Parentage<AccountId, IpsId> {
Parent(AccountId),
Child(IpsId, AccountId),
}
#[derive(Encode, Decode, Clone, Eq, PartialEq, MaxEncodedLen, Debug, TypeInfo)]
pub enum IpsType<IpsId> {
Normal,
Replica(IpsId),
}
#[derive(Encode, Decode, Clone, Eq, PartialEq, MaxEncodedLen, Debug, TypeInfo)]
pub enum BoolOrWasm<Wasm> {
Bool(bool),
Wasm(Wasm),
}
#[derive(Encode, Decode, Clone, Eq, PartialEq, MaxEncodedLen, Debug, TypeInfo)]
pub struct CoreInfo<AccountId, CoreMetadataOf> {
pub account: AccountId,
pub metadata: CoreMetadataOf,
pub minimum_support: Perbill,
pub required_approval: Perbill,
pub frozen_tokens: bool,
}
#[derive(Encode, Decode, Clone, Eq, PartialEq, MaxEncodedLen, Debug, TypeInfo)]
pub struct IpfInfo<AccountId, Data, IpfMetadataOf> {
pub owner: AccountId,
pub author: AccountId,
pub metadata: IpfMetadataOf,
pub data: Data,
}
#[derive(Debug, Clone, Encode, Decode, Eq, PartialEq, MaxEncodedLen, TypeInfo)]
pub struct SubTokenInfo<IptId, SubAssetMetadata> {
pub id: IptId,
pub metadata: SubAssetMetadata,
}
#[derive(Debug, Clone, Encode, Decode, Eq, PartialEq, MaxEncodedLen, TypeInfo)]
pub struct CallInfo<Data> {
pub pallet: Data,
pub function: Data,
}