From fb08215e0d4c51a0e9697e5d5d6e95dccacbf738 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 15 Apr 2020 18:15:11 +0200 Subject: [PATCH] Add Fixed128 type (#2175) --- packages/types/src/augment/registry.ts | 5 ++++- packages/types/src/interfaces/runtime/definitions.ts | 1 + packages/types/src/interfaces/runtime/types.ts | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/types/src/augment/registry.ts b/packages/types/src/augment/registry.ts index 0de4523deb..5fbcab33b4 100644 --- a/packages/types/src/augment/registry.ts +++ b/packages/types/src/augment/registry.ts @@ -31,7 +31,7 @@ import { AttestedCandidate, AuctionIndex, Bidder, CandidateReceipt, CollatorId, import { RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment'; import { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery'; import { RpcMethods } from '@polkadot/types/interfaces/rpc'; -import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, DispatchClass, DispatchInfo, DispatchInfoTo190, Fixed64, H160, H256, H512, Hash, Header, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, Moment, Origin, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Seal, SealV0, SignedBlock, StorageData, ValidatorId, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime'; +import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, DispatchClass, DispatchInfo, DispatchInfoTo190, Fixed128, Fixed64, H160, H256, H512, Hash, Header, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, Moment, Origin, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Seal, SealV0, SignedBlock, StorageData, ValidatorId, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime'; import { SchedulePeriod, SchedulePriority, Scheduled, TaskAddress } from '@polkadot/types/interfaces/scheduler'; import { FullIdentification, IdentificationTuple, Keys, SessionIndex, SessionKeys1, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6 } from '@polkadot/types/interfaces/session'; import { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society'; @@ -182,6 +182,9 @@ declare module '@polkadot/types/types/registry' { Fixed64: Fixed64; 'Option': Option; 'Vec': Vec; + Fixed128: Fixed128; + 'Option': Option; + 'Vec': Vec; H160: H160; 'Option': Option; 'Vec': Vec; diff --git a/packages/types/src/interfaces/runtime/definitions.ts b/packages/types/src/interfaces/runtime/definitions.ts index 5eca92f623..1c0807c30c 100644 --- a/packages/types/src/interfaces/runtime/definitions.ts +++ b/packages/types/src/interfaces/runtime/definitions.ts @@ -52,6 +52,7 @@ export default { class: 'DispatchClass' }, Fixed64: 'Int<64, Fixed64>', + Fixed128: 'Int<128, Fixed128>', H160: '[u8; 20; H160]', H256: '[u8; 32; H256]', H512: '[u8; 64; H512]', diff --git a/packages/types/src/interfaces/runtime/types.ts b/packages/types/src/interfaces/runtime/types.ts index d5742c16c7..ed6f3405ec 100644 --- a/packages/types/src/interfaces/runtime/types.ts +++ b/packages/types/src/interfaces/runtime/types.ts @@ -93,6 +93,9 @@ export interface DispatchInfoTo190 extends Struct { readonly class: DispatchClass; } +/** @name Fixed128 */ +export interface Fixed128 extends Int {} + /** @name Fixed64 */ export interface Fixed64 extends Int {}