Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Adjust asset types
  • Loading branch information
jacogr committed Feb 27, 2021
commit 7e947d71c8836a429bd3f891f7b6e63493a01423
11 changes: 10 additions & 1 deletion packages/types/src/augment/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-disable */

import type { BitVec, Bool, Bytes, Compact, Data, DoNotConstruct, I128, I16, I256, I32, I64, I8, Json, Null, Option, Raw, StorageKey, Text, Type, U128, U16, U256, U32, U64, U8, USize, Vec, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types';
import type { AssetBalance, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';
import type { AssetBalance, AssetBalanceTo265, AssetDetails, AssetDetailsTo265, AssetMetadata, DestroyWitness, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';
import type { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations';
import type { RawAuraPreDigest } from '@polkadot/types/interfaces/aura';
import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
Expand Down Expand Up @@ -169,7 +169,9 @@ declare module '@polkadot/types/types/registry' {
'Option<ApprovalFlag>': Option<ApprovalFlag>;
'Option<Approvals>': Option<Approvals>;
'Option<AssetBalance>': Option<AssetBalance>;
'Option<AssetBalanceTo265>': Option<AssetBalanceTo265>;
'Option<AssetDetails>': Option<AssetDetails>;
'Option<AssetDetailsTo265>': Option<AssetDetailsTo265>;
'Option<AssetId>': Option<AssetId>;
'Option<AssetInstance>': Option<AssetInstance>;
'Option<AssetMetadata>': Option<AssetMetadata>;
Expand Down Expand Up @@ -293,6 +295,7 @@ declare module '@polkadot/types/types/registry' {
'Option<DeployData>': Option<DeployData>;
'Option<DepositAsset>': Option<DepositAsset>;
'Option<DepositReserveAsset>': Option<DepositReserveAsset>;
'Option<DestroyWitness>': Option<DestroyWitness>;
'Option<Digest>': Option<Digest>;
'Option<DigestItem>': Option<DigestItem>;
'Option<DigestOf>': Option<DigestOf>;
Expand Down Expand Up @@ -909,7 +912,9 @@ declare module '@polkadot/types/types/registry' {
'Vec<ApprovalFlag>': Vec<ApprovalFlag>;
'Vec<Approvals>': Vec<Approvals>;
'Vec<AssetBalance>': Vec<AssetBalance>;
'Vec<AssetBalanceTo265>': Vec<AssetBalanceTo265>;
'Vec<AssetDetails>': Vec<AssetDetails>;
'Vec<AssetDetailsTo265>': Vec<AssetDetailsTo265>;
'Vec<AssetId>': Vec<AssetId>;
'Vec<AssetInstance>': Vec<AssetInstance>;
'Vec<AssetMetadata>': Vec<AssetMetadata>;
Expand Down Expand Up @@ -1033,6 +1038,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<DeployData>': Vec<DeployData>;
'Vec<DepositAsset>': Vec<DepositAsset>;
'Vec<DepositReserveAsset>': Vec<DepositReserveAsset>;
'Vec<DestroyWitness>': Vec<DestroyWitness>;
'Vec<Digest>': Vec<Digest>;
'Vec<DigestItem>': Vec<DigestItem>;
'Vec<DigestOf>': Vec<DigestOf>;
Expand Down Expand Up @@ -1649,7 +1655,9 @@ declare module '@polkadot/types/types/registry' {
ApprovalFlag: ApprovalFlag;
Approvals: Approvals;
AssetBalance: AssetBalance;
AssetBalanceTo265: AssetBalanceTo265;
AssetDetails: AssetDetails;
AssetDetailsTo265: AssetDetailsTo265;
AssetId: AssetId;
AssetInstance: AssetInstance;
AssetMetadata: AssetMetadata;
Expand Down Expand Up @@ -1773,6 +1781,7 @@ declare module '@polkadot/types/types/registry' {
DeployData: DeployData;
DepositAsset: DepositAsset;
DepositReserveAsset: DepositReserveAsset;
DestroyWitness: DestroyWitness;
Digest: Digest;
DigestItem: DigestItem;
DigestOf: DigestOf;
Expand Down
28 changes: 26 additions & 2 deletions packages/types/src/interfaces/assets/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,30 @@ export default {
rpc: {},
types: {
AssetBalance: {
balance: 'TAssetBalance',
isFrozen: 'bool',
sufficient: 'bool'
},
AssetBalanceTo265: {
balance: 'TAssetBalance',
isFrozen: 'bool',
isZombie: 'bool'
},
AssetDetails: {
owner: 'AccountId',
issuer: 'AccountId',
admin: 'AccountId',
freezer: 'AccountId',
supply: 'TAssetBalance',
deposit: 'TAssetDepositBalance',
minBalance: 'TAssetBalance',
isSufficient: 'bool',
accounts: 'u32',
sufficients: 'u32',
approvals: 'u32',
isFrozen: 'bool'
},
AssetDetailsTo265: {
owner: 'AccountId',
issuer: 'AccountId',
admin: 'AccountId',
Expand All @@ -28,10 +47,15 @@ export default {
},
AssetMetadata: {
deposit: 'TAssetDepositBalance',
name: 'Vec<u8>',
symbol: 'Vec<u8>',
name: 'Bytes',
symbol: 'Bytes',
decimals: 'u8'
},
DestroyWitness: {
accounts: 'Compact<u32>',
sufficients: 'Compact<u32>',
approvals: 'Compact<u32>'
},
TAssetBalance: 'u64',
TAssetDepositBalance: 'BalanceOf'
}
Expand Down
32 changes: 31 additions & 1 deletion packages/types/src/interfaces/assets/types.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,41 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */

import type { Bytes, Struct, bool, u32, u64, u8 } from '@polkadot/types';
import type { Bytes, Compact, Struct, bool, u32, u64, u8 } from '@polkadot/types';
import type { AccountId, BalanceOf } from '@polkadot/types/interfaces/runtime';

/** @name AssetBalance */
export interface AssetBalance extends Struct {
readonly balance: TAssetBalance;
readonly isFrozen: bool;
readonly sufficient: bool;
}

/** @name AssetBalanceTo265 */
export interface AssetBalanceTo265 extends Struct {
readonly balance: TAssetBalance;
readonly isFrozen: bool;
readonly isZombie: bool;
}

/** @name AssetDetails */
export interface AssetDetails extends Struct {
readonly owner: AccountId;
readonly issuer: AccountId;
readonly admin: AccountId;
readonly freezer: AccountId;
readonly supply: TAssetBalance;
readonly deposit: TAssetDepositBalance;
readonly minBalance: TAssetBalance;
readonly isSufficient: bool;
readonly accounts: u32;
readonly sufficients: u32;
readonly approvals: u32;
readonly isFrozen: bool;
}

/** @name AssetDetailsTo265 */
export interface AssetDetailsTo265 extends Struct {
readonly owner: AccountId;
readonly issuer: AccountId;
readonly admin: AccountId;
Expand All @@ -33,6 +56,13 @@ export interface AssetMetadata extends Struct {
readonly decimals: u8;
}

/** @name DestroyWitness */
export interface DestroyWitness extends Struct {
readonly accounts: Compact<u32>;
readonly sufficients: Compact<u32>;
readonly approvals: Compact<u32>;
}

/** @name TAssetBalance */
export interface TAssetBalance extends u64 {}

Expand Down