Add CollectCollationInfo runtime interfaces (#5002)

This commit is contained in:
Jaco
2022-06-30 19:44:02 +03:00
committed by GitHub
parent 64384a6a04
commit 332b79a04a
4 changed files with 76 additions and 2 deletions
@@ -22,7 +22,7 @@ import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/conse
import type { AliveContractInfo, CodeHash, CodeSource, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractInstantiateResultTo299, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateRequestV1, InstantiateRequestV2, InstantiateReturnValue, InstantiateReturnValueOk, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';
import type { ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';
import type { CollationInfo, CollationInfoV1, ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';
import type { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PreimageStatus, PreimageStatusAvailable, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy';
import type { BlockStats } from '@polkadot/types/interfaces/dev';
import type { ApprovalFlag, DefunctVoter, Renouncing, SetIndex, Vote, VoteIndex, VoteThreshold, VoterInfo } from '@polkadot/types/interfaces/elections';
@@ -216,6 +216,8 @@ declare module '@polkadot/types/types/registry' {
CodeUploadRequest: CodeUploadRequest;
CodeUploadResult: CodeUploadResult;
CodeUploadResultValue: CodeUploadResultValue;
CollationInfo: CollationInfo;
CollationInfoV1: CollationInfoV1;
CollatorId: CollatorId;
CollatorSignature: CollatorSignature;
CollectiveOrigin: CollectiveOrigin;
@@ -6,7 +6,24 @@
import type { Definitions } from '../../types';
import { runtime } from './runtime';
const dmpQueue = {
CollationInfo: {
upwardMessages: 'Vec<UpwardMessage>',
horizontalMessages: 'Vec<OutboundHrmpMessage>',
newValidationCode: 'Option<ValidationCode>',
processedDownwardMessages: 'u32',
hrmpWatermark: 'RelayBlockNumber',
headData: 'HeadData'
},
CollationInfoV1: {
upwardMessages: 'Vec<UpwardMessage>',
horizontalMessages: 'Vec<OutboundHrmpMessage>',
newValidationCode: 'Option<ValidationCode>',
processedDownwardMessages: 'u32',
hrmpWatermark: 'RelayBlockNumber'
},
ConfigData: {
maxIndividual: 'Weight'
},
@@ -22,5 +39,6 @@ const dmpQueue = {
export default {
rpc: {},
runtime,
types: dmpQueue
} as Definitions;
@@ -0,0 +1,34 @@
// Copyright 2017-2022 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DefinitionsCall } from '../../types';
export const runtime: DefinitionsCall = {
CollectCollationInfo: [
{
methods: {
collect_collation_info: {
description: 'Collect information about a collation.',
params: [
{
name: 'header',
type: 'Header'
}
],
type: 'CollationInfo'
}
},
version: 2
},
{
methods: {
collect_collation_info: {
description: 'Collect information about a collation.',
params: [],
type: 'CollationInfoV1'
}
},
version: 1
}
]
};
+21 -1
View File
@@ -1,9 +1,29 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Struct, U8aFixed, u32, u64 } from '@polkadot/types-codec';
import type { Option, Struct, U8aFixed, Vec, u32, u64 } from '@polkadot/types-codec';
import type { HeadData, OutboundHrmpMessage, RelayBlockNumber, UpwardMessage, ValidationCode } from '@polkadot/types/interfaces/parachains';
import type { Weight } from '@polkadot/types/interfaces/runtime';
/** @name CollationInfo */
export interface CollationInfo extends Struct {
readonly upwardMessages: Vec<UpwardMessage>;
readonly horizontalMessages: Vec<OutboundHrmpMessage>;
readonly newValidationCode: Option<ValidationCode>;
readonly processedDownwardMessages: u32;
readonly hrmpWatermark: RelayBlockNumber;
readonly headData: HeadData;
}
/** @name CollationInfoV1 */
export interface CollationInfoV1 extends Struct {
readonly upwardMessages: Vec<UpwardMessage>;
readonly horizontalMessages: Vec<OutboundHrmpMessage>;
readonly newValidationCode: Option<ValidationCode>;
readonly processedDownwardMessages: u32;
readonly hrmpWatermark: RelayBlockNumber;
}
/** @name ConfigData */
export interface ConfigData extends Struct {
readonly maxIndividual: Weight;