From ca9f79fbdd657edbbe86b480b5a64bc3832e3bd8 Mon Sep 17 00:00:00 2001 From: WoeOm <1015996366@qq.com> Date: Tue, 15 Sep 2020 13:31:04 +0800 Subject: [PATCH] update crab 0.6.11 types (#3682) --- packages/apps-config/src/api/spec/crab.ts | 67 ++++++++++++++--------- 1 file changed, 40 insertions(+), 27 deletions(-) diff --git a/packages/apps-config/src/api/spec/crab.ts b/packages/apps-config/src/api/spec/crab.ts index f8c0301ed6..68a404bdc6 100644 --- a/packages/apps-config/src/api/spec/crab.ts +++ b/packages/apps-config/src/api/spec/crab.ts @@ -91,9 +91,7 @@ export default { own_kton_balance: 'Compact', own_power: 'Power', total_power: 'Power', - others: 'Vec', - total: 'Compact', - own: 'Compact' + others: 'Vec' }, IndividualExposure: { who: 'AccountId', @@ -128,29 +126,36 @@ export default { ring_value: 'Balance', kton_value: 'Balance', ring_bond: 'Balance', - kton_bond: 'Balance', - value: 'Balance', - bond: 'Balance' + kton_bond: 'Balance' }, - EthTransactionIndex: '(H256, u64)', - EthHeaderBrief: { + MappedRing: 'u128', + EthereumTransactionIndex: '(H256, u64)', + EthereumHeaderBrief: { total_difficulty: 'U256', parent_hash: 'H256', - number: 'EthBlockNumber', + number: 'EthereumBlockNumber', relayer: 'AccountId' }, - EthBlockNumber: 'u64', - EthHeaderThing: { - eth_header: 'EthHeader', + EthereumBlockNumber: 'u64', + EthereumHeaderThingWithProof: { + header: 'EthereumHeader', ethash_proof: 'Vec', - mmr_root: 'MMRHash', - mmr_proof: 'Vec' + mmr_root: 'H256', + mmr_proof: 'Vec' }, - EthHeader: { + ConfirmedEthereumHeaderInfo: { + header: 'EthereumHeader', + mmr_root: 'H256' + }, + EthereumHeaderThing: { + header: 'EthereumHeader', + mmr_root: 'H256' + }, + EthereumHeader: { parent_hash: 'H256', timestamp: 'u64', - number: 'EthBlockNumber', - author: 'EthAddress', + number: 'EthereumBlockNumber', + author: 'EthereumAddress', transactions_root: 'H256', uncles_hash: 'H256', extra_data: 'Bytes', @@ -163,14 +168,14 @@ export default { seal: 'Vec', hash: 'Option' }, - EthAddress: 'H160', + EthereumAddress: 'H160', Bloom: '[u8; 256; Bloom]', H128: '[u8; 16; H128]', EthashProof: { dag_nodes: '(H512, H512)', proof: 'Vec' }, - Receipt: { + EthereumReceipt: { gas_used: 'U256', log_bloom: 'Bloom', logs: 'Vec', @@ -184,8 +189,7 @@ export default { }, RedeemFor: { _enum: { - Ring: null, - Kton: null, + Token: null, Deposit: null } }, @@ -194,7 +198,12 @@ export default { proof: 'Bytes', header_hash: 'H256' }, - MMRProof: 'Vec', + EthereumReceiptProofThing: '(EthereumHeader, EthereumReceiptProof, MMRProof)', + MMRProof: { + member_leaf_index: 'u64', + last_leaf_index: 'u64', + proof: 'Vec' + }, OtherSignature: { _enum: { Eth: 'EcdsaSignature', @@ -214,12 +223,16 @@ export default { mmr_root: 'Hash' }, Round: 'u64', - TcBlockNumber: 'Vec', - TcHeaderHash: 'Vec', - TcHeaderMMR: 'Vec', - MMRHash: 'Vec', + TcHeaderThingWithProof: 'EthereumHeaderThingWithProof', + TcHeaderThing: 'EthereumHeaderThing', + TcBlockNumber: 'u64', + TcHeaderHash: 'H256', GameId: 'TcBlockNumber', - RawHeaderThing: 'Vec', + RelayProposalT: { + relayer: 'AccountId', + bonded_proposal: 'Vec<(Balance, TcHeaderThing)>', + extend_from_header_hash: 'Option' + }, BalancesRuntimeDispatchInfo: { usable_balance: 'Balance' },