From a1a63e63f09fc44f93e84e129b215fa866b019e4 Mon Sep 17 00:00:00 2001 From: WoeOm <1015996366@qq.com> Date: Mon, 26 Oct 2020 15:04:43 +0800 Subject: [PATCH] update crab types (#3933) * update crab types * lint * Update packages/apps-config/src/api/spec/crab.ts Co-authored-by: Jaco Greeff --- packages/apps-config/src/api/spec/crab.ts | 74 ++++++++++------------- 1 file changed, 32 insertions(+), 42 deletions(-) diff --git a/packages/apps-config/src/api/spec/crab.ts b/packages/apps-config/src/api/spec/crab.ts index e7edebc000..46b606ef1d 100644 --- a/packages/apps-config/src/api/spec/crab.ts +++ b/packages/apps-config/src/api/spec/crab.ts @@ -7,7 +7,7 @@ export default { Address: 'AccountId', LookupSource: 'AccountId', - RefCount: 'u8', + BalanceInfo: 'Null', BalanceLock: { id: 'LockIdentifier', lock_for: 'LockFor', @@ -76,16 +76,6 @@ export default { start_time: 'Compact', expire_time: 'Compact' }, - RewardDestination: { - _enum: { - Staked: 'Staked', - Stash: null, - Controller: null - } - }, - Staked: { - promise_month: 'u8' - }, ExposureT: { own_ring_balance: 'Compact', own_kton_balance: 'Compact', @@ -98,8 +88,6 @@ export default { ring_balance: 'Compact', kton_balance: 'Compact', power: 'Power' - // not in https://github.com/darwinia-network/darwinia-common/blob/master/frame/staking/src/lib.rs - // value: 'Compact' }, ElectionResultT: { elected_stashes: 'Vec', @@ -131,27 +119,7 @@ export default { }, MappedRing: 'u128', EthereumTransactionIndex: '(H256, u64)', - EthereumHeaderBrief: { - total_difficulty: 'U256', - parent_hash: 'H256', - number: 'EthereumBlockNumber', - relayer: 'AccountId' - }, EthereumBlockNumber: 'u64', - EthereumHeaderThingWithProof: { - header: 'EthereumHeader', - ethash_proof: 'Vec', - mmr_root: 'H256', - mmr_proof: 'Vec' - }, - ConfirmedEthereumHeaderInfo: { - header: 'EthereumHeader', - mmr_root: 'H256' - }, - EthereumHeaderThing: { - header: 'EthereumHeader', - mmr_root: 'H256' - }, EthereumHeader: { parent_hash: 'H256', timestamp: 'u64', @@ -205,6 +173,14 @@ export default { last_leaf_index: 'u64', proof: 'Vec' }, + EthereumRelayHeaderParcel: { + header: 'EthereumHeader', + mmr_root: 'H256' + }, + EthereumRelayProofs: { + ethash_proof: 'Vec', + mmr_proof: 'Vec' + }, OtherSignature: { _enum: { Eth: 'EcdsaSignature', @@ -223,16 +199,30 @@ export default { prefix: '[u8; 4; Prefix]', mmr_root: 'Hash' }, - Round: 'u64', - TcHeaderThingWithProof: 'EthereumHeaderThingWithProof', - TcHeaderThing: 'EthereumHeaderThing', - TcBlockNumber: 'u64', - TcHeaderHash: 'H256', - GameId: 'TcBlockNumber', - RelayProposalT: { + RelayHeaderId: 'u64', + RelayHeaderParcel: 'EthereumRelayHeaderParcel', + RelayProofs: 'Vec', + RelayAffirmationId: { + relay_header_id: 'Vec', + round: 'u32', + index: 'u32' + }, + RelayAffirmationT: { relayer: 'AccountId', - bonded_proposal: 'Vec<(Balance, TcHeaderThing)>', - extend_from_header_hash: 'Option' + relay_header_parcels: 'Vec', + bond: 'Balance', + maybe_extended_relay_affirmation_id: 'Option>', + verified: 'bool' + }, + ProxyType: { + _enum: { + Any: null, + NonTransfer: null, + Governance: null, + Staking: null, + IdentityJudgement: null, + EthereumBridge: null + } }, BalancesRuntimeDispatchInfo: { usable_balance: 'Balance'