// Copyright 2017-2021 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 import { DefinitionRpc, DefinitionRpcSub, OverrideBundleDefinition, OverrideBundleType } from '@polkadot/types/types'; // structs need to be in order /* eslint-disable sort-keys */ export const rpcDefinitions: Record> = { txpool: { content: { aliasSection: 'txpool', description: 'The detailed information regarding Ethereum transactions that are currently in the ' + 'Substrate transaction pool.', params: [], type: 'TxPoolResultContent' }, inspect: { aliasSection: 'txpool', description: 'Summarized information of the Ethereum transactions that are currently in the Substrate' + ' transaction pool.', params: [], type: 'TxPoolResultInspect' }, status: { aliasSection: 'txpool', description: 'The number of Ethereum transaction that are currently in the Substrate transaction pool.', params: [], type: 'TxPoolResultStatus' } } }; // structs need to be in order /* eslint-disable sort-keys */ const origintrailDefinitions = { rpc: rpcDefinitions, types: [ { minmax: [0, undefined], types: { AccountId: 'EthereumAccountId', AccountId32: 'H256', AccountInfo: 'AccountInfoWithTripleRefCount', Address: 'AccountId', AuthorId: 'AccountId32', Balance: 'u128', LookupSource: 'AccountId', Account: { nonce: 'U256', balance: 'u128' }, ExtrinsicSignature: 'EthereumSignature', RoundIndex: 'u32', Candidate: { id: 'AccountId', fee: 'Perbill', bond: 'Balance', nominators: 'Vec', total: 'Balance', state: 'CollatorStatus' }, Nominator: { nominations: 'Vec', total: 'Balance' }, NominatorStatus: { _enum: ['Active', { Leaving: 'RoundIndex' }] }, Nominator2: { nominations: 'Vec', revocations: 'Vec', total: 'Balance', scheduled_revocations_count: 'u32', scheduled_revocations_total: 'Balance', status: 'NominatorStatus' }, Bond: { owner: 'AccountId', amount: 'Balance' }, CollatorStatus: { _enum: ['Active', 'Idle', { Leaving: 'RoundIndex' }] }, TxPoolResultContent: { pending: 'HashMap>', queued: 'HashMap>' }, TxPoolResultInspect: { pending: 'HashMap>', queued: 'HashMap>' }, TxPoolResultStatus: { pending: 'U256', queued: 'U256' }, Summary: 'Bytes', PoolTransaction: { hash: 'H256', nonce: 'U256', block_hash: 'Option', block_number: 'Option', from: 'H160', to: 'Option', value: 'U256', gas_price: 'U256', gas: 'U256', input: 'Bytes' }, // Staking inflation Range: 'RangeBalance', RangeBalance: { min: 'Balance', ideal: 'Balance', max: 'Balance' }, RangePerbill: { min: 'Perbill', ideal: 'Perbill', max: 'Perbill' }, InflationInfo: { expect: 'RangeBalance', annual: 'RangePerbill', round: 'RangePerbill' }, OrderedSet: 'Vec', Collator: { id: 'AccountId', bond: 'Balance', nominators: 'Vec', total: 'Balance', state: 'CollatorStatus' }, Collator2: { id: 'AccountId', bond: 'Balance', nominators: 'Vec', top_nominators: 'Vec', bottom_nominators: 'Vec', total_counted: 'Balance', total_backing: 'Balance', state: 'CollatorStatus' }, NominatorAdded: { _enum: [{ AddedToTop: 'Balance' }, 'AddedToBottom'] }, CollatorSnapshot: { bond: 'Balance', nominators: 'Vec', total: 'Balance' }, SystemInherentData: { validation_data: 'PersistedValidationData', relay_chain_state: 'StorageProof', downward_messages: 'Vec', horizontal_messages: 'BTreeMap>' }, RelayChainAccountId: 'AccountId32', RoundInfo: { current: 'RoundIndex', first: 'BlockNumber', length: 'u32' }, RewardInfo: { total_reward: 'Balance', claimed_reward: 'Balance' }, RegistrationInfo: { account: 'AccountId', deposit: 'Balance' }, ParachainBondConfig: { account: 'AccountId', deposit: 'Balance' }, EthereumSignature: { r: 'H256', s: 'H256', v: 'U8' }, ExitQ: { candidates: 'Vec', nominators_leaving: 'Vec', candidate_schedule: 'Vec<(AccountId, RoundIndex)>', nominator_schedule: 'Vec<(AccountId, Option, RoundIndex)>' } } } ] } as OverrideBundleDefinition; export default origintrailDefinitions; export const typesBundle = { spec: { 'origintrail-parachain': origintrailDefinitions } } as OverrideBundleType;