From 9d1af1eaebd69df0e18bef52dd2c99a0712cce28 Mon Sep 17 00:00:00 2001 From: Miguel Hervas Date: Thu, 6 Aug 2020 11:57:07 -0700 Subject: [PATCH] Add Centrifuge missing types (#2475) * Add missing types * sort attempt * sort attempt 1 * sort attempt 2 --- .../types-known/src/spec/centrifuge-chain.ts | 39 ++++++++++++++----- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/packages/types-known/src/spec/centrifuge-chain.ts b/packages/types-known/src/spec/centrifuge-chain.ts index a523d7fb82..3b4da31910 100644 --- a/packages/types-known/src/spec/centrifuge-chain.ts +++ b/packages/types-known/src/spec/centrifuge-chain.ts @@ -6,27 +6,46 @@ import { OverrideVersionedType } from '@polkadot/types/types'; const sharedTypes = { Address: 'GenericAddress', + AnchorData: { + anchoredBlock: 'u64', + docRoot: 'H256', + id: 'H256' + }, + Fee: { + key: 'Hash', + price: 'Balance' + }, LookupSource: 'GenericAddress', + MultiAccountData: { + deposit: 'Balance', + depositor: 'AccountId', + signatories: 'Vec', + threshold: 'u16' + }, Multiplier: 'Fixed64', + PreCommitData: { + expirationBlock: 'u64', + identity: 'H256', + signingRoot: 'H256' + }, + Proof: { + leafHash: 'H256', + sortedHashes: 'H256' + }, ReferendumInfo: 'ReferendumInfoTo239', StakingLedger: 'StakingLedgerTo240', Weight: 'u32' }; const versioned: OverrideVersionedType[] = [ - { - // most chains started at 1000 (Fulvous at 224) - minmax: [1, 228], - types: { - ...sharedTypes, - Address: 'AccountId', - LookupSource: 'AccountId' - } - }, { minmax: [229, undefined], types: { - ...sharedTypes + ...sharedTypes, + ChainId: 'u8', + DepositNonce: 'u64', + ResourceId: '[u8; 32]', + 'chainbridge::ChainId': 'u8' } } ];