CompactSolution for 24 nominees (#3537)
* CompactSolution for 24 nominees
* Westend & Rococo
* CompactAssignments: 'CompactAssignmentsTo265'
* With{16, 24}
* CompactAssignmentsWith16 in test
* With16 in historic types
* RawSolution alias
* Types
* Bump common
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/api": "4.9.3-23",
|
||||
"@polkadot/types": "4.9.3-23",
|
||||
"@polkadot/util": "^6.3.2-13",
|
||||
"@polkadot/x-rxjs": "^6.3.2-13",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/x-rxjs": "^6.4.1",
|
||||
"bn.js": "^4.11.9"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
"@polkadot/api": "4.9.3-23",
|
||||
"@polkadot/rpc-core": "4.9.3-23",
|
||||
"@polkadot/types": "4.9.3-23",
|
||||
"@polkadot/util": "^6.3.2-13",
|
||||
"@polkadot/util-crypto": "^6.3.2-13",
|
||||
"@polkadot/x-rxjs": "^6.3.2-13",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/util-crypto": "^6.4.1",
|
||||
"@polkadot/x-rxjs": "^6.4.1",
|
||||
"bn.js": "^4.11.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.3.2-13",
|
||||
"@polkadot/keyring": "^6.4.1",
|
||||
"@polkadot/rpc-provider": "4.9.3-23"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/api-derive": "4.9.3-23",
|
||||
"@polkadot/keyring": "^6.3.2-13",
|
||||
"@polkadot/keyring": "^6.4.1",
|
||||
"@polkadot/metadata": "4.9.3-23",
|
||||
"@polkadot/rpc-core": "4.9.3-23",
|
||||
"@polkadot/rpc-provider": "4.9.3-23",
|
||||
"@polkadot/types": "4.9.3-23",
|
||||
"@polkadot/types-known": "4.9.3-23",
|
||||
"@polkadot/util": "^6.3.2-13",
|
||||
"@polkadot/util-crypto": "^6.3.2-13",
|
||||
"@polkadot/x-rxjs": "^6.3.2-13",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/util-crypto": "^6.4.1",
|
||||
"@polkadot/x-rxjs": "^6.4.1",
|
||||
"bn.js": "^4.11.9",
|
||||
"eventemitter3": "^4.0.7"
|
||||
}
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/types": "4.9.3-23",
|
||||
"@polkadot/types-known": "4.9.3-23",
|
||||
"@polkadot/util": "^6.3.2-13",
|
||||
"@polkadot/util-crypto": "^6.3.2-13",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/util-crypto": "^6.4.1",
|
||||
"bn.js": "^4.11.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.3.2-13"
|
||||
"@polkadot/keyring": "^6.4.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
"@polkadot/metadata": "4.9.3-23",
|
||||
"@polkadot/rpc-provider": "4.9.3-23",
|
||||
"@polkadot/types": "4.9.3-23",
|
||||
"@polkadot/util": "^6.3.2-13",
|
||||
"@polkadot/x-rxjs": "^6.3.2-13"
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/x-rxjs": "^6.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.3.2-13"
|
||||
"@polkadot/keyring": "^6.4.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,16 +21,16 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/types": "4.9.3-23",
|
||||
"@polkadot/util": "^6.3.2-13",
|
||||
"@polkadot/util-crypto": "^6.3.2-13",
|
||||
"@polkadot/x-fetch": "^6.3.2-13",
|
||||
"@polkadot/x-global": "^6.3.2-13",
|
||||
"@polkadot/x-ws": "^6.3.2-13",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/util-crypto": "^6.4.1",
|
||||
"@polkadot/x-fetch": "^6.4.1",
|
||||
"@polkadot/x-global": "^6.4.1",
|
||||
"@polkadot/x-ws": "^6.4.1",
|
||||
"bn.js": "^4.11.9",
|
||||
"eventemitter3": "^4.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.3.2-13",
|
||||
"@polkadot/keyring": "^6.4.1",
|
||||
"@polkadot/metadata": "4.9.3-23",
|
||||
"mock-socket": "^9.0.3",
|
||||
"nock": "^13.0.11"
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/typegen#readme",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.14.0",
|
||||
"@babel/core": "^7.14.2",
|
||||
"@babel/register": "^7.13.16",
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/api": "4.9.3-23",
|
||||
"@polkadot/metadata": "4.9.3-23",
|
||||
"@polkadot/rpc-provider": "4.9.3-23",
|
||||
"@polkadot/types": "4.9.3-23",
|
||||
"@polkadot/util": "^6.3.2-13",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"handlebars": "^4.7.7",
|
||||
"websocket": "^1.0.34",
|
||||
"yargs": "^17.0.1"
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/networks": "^6.3.2-13",
|
||||
"@polkadot/networks": "^6.4.1",
|
||||
"@polkadot/types": "4.9.3-23",
|
||||
"@polkadot/util": "^6.3.2-13",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"bn.js": "^4.11.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -15,16 +15,20 @@ const sharedTypes = {
|
||||
const addrIndicesTypes = {
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'LookupSource',
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'IndicesLookupSource',
|
||||
RawSolution: 'RawSolutionWith16',
|
||||
ValidatorPrefs: 'ValidatorPrefsWithCommission'
|
||||
};
|
||||
|
||||
const addrAccountIdTypes = {
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'AccountId',
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId',
|
||||
RawSolution: 'RawSolutionWith16',
|
||||
ValidatorPrefs: 'ValidatorPrefsWithCommission'
|
||||
};
|
||||
|
||||
@@ -164,11 +168,21 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [2028, 2029],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
AccountInfo: 'AccountInfoWithDualRefCount'
|
||||
AccountInfo: 'AccountInfoWithDualRefCount',
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
RawSolution: 'RawSolutionWith16'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [2030, undefined],
|
||||
minmax: [2030, 9000],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
RawSolution: 'RawSolutionWith16'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [9010, undefined],
|
||||
types: {
|
||||
...sharedTypes
|
||||
}
|
||||
|
||||
@@ -23,8 +23,10 @@ const sharedTypes = {
|
||||
const addrAccountIdTypes = {
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'AccountId',
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId',
|
||||
RawSolution: 'RawSolutionWith16',
|
||||
ValidatorPrefs: 'ValidatorPrefsWithCommission'
|
||||
};
|
||||
|
||||
@@ -68,11 +70,21 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [28, 29],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
RawSolution: 'RawSolutionWith16',
|
||||
AccountInfo: 'AccountInfoWithDualRefCount'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [30, undefined],
|
||||
minmax: [30, 9000],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
RawSolution: 'RawSolutionWith16'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [9010, undefined],
|
||||
types: {
|
||||
...sharedTypes
|
||||
}
|
||||
|
||||
@@ -20,25 +20,39 @@ const versioned: OverrideVersionedType[] = [
|
||||
...sharedTypes,
|
||||
AccountInfo: 'AccountInfoWithDualRefCount',
|
||||
Address: 'AccountId',
|
||||
LookupSource: 'AccountId'
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
LookupSource: 'AccountId',
|
||||
RawSolution: 'RawSolutionWith16'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [201, 214],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
AccountInfo: 'AccountInfoWithDualRefCount'
|
||||
AccountInfo: 'AccountInfoWithDualRefCount',
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
RawSolution: 'RawSolutionWith16'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [215, 228],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
Keys: 'SessionKeys6'
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
Keys: 'SessionKeys6',
|
||||
RawSolution: 'RawSolutionWith16'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [229, undefined],
|
||||
minmax: [229, 9000],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
RawSolution: 'RawSolutionWith16'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [9010, undefined],
|
||||
types: {
|
||||
...sharedTypes
|
||||
}
|
||||
|
||||
@@ -15,8 +15,10 @@ const sharedTypes = {
|
||||
const addrAccountIdTypes = {
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'AccountId',
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
LookupSource: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
RawSolution: 'RawSolutionWith16',
|
||||
ValidatorPrefs: 'ValidatorPrefsWithCommission'
|
||||
};
|
||||
|
||||
@@ -71,11 +73,21 @@ const versioned: OverrideVersionedType[] = [
|
||||
minmax: [48, 49],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
AccountInfo: 'AccountInfoWithDualRefCount'
|
||||
AccountInfo: 'AccountInfoWithDualRefCount',
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
RawSolution: 'RawSolutionWith16'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [50, undefined],
|
||||
minmax: [50, 9000],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
CompactAssignments: 'CompactAssignmentsWith16',
|
||||
RawSolution: 'RawSolutionWith16'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [9010, undefined],
|
||||
types: {
|
||||
...sharedTypes
|
||||
}
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/metadata": "4.9.3-23",
|
||||
"@polkadot/util": "^6.3.2-13",
|
||||
"@polkadot/util-crypto": "^6.3.2-13",
|
||||
"@polkadot/x-rxjs": "^6.3.2-13",
|
||||
"@polkadot/util": "^6.4.1",
|
||||
"@polkadot/util-crypto": "^6.4.1",
|
||||
"@polkadot/x-rxjs": "^6.4.1",
|
||||
"@types/bn.js": "^4.11.6",
|
||||
"bn.js": "^4.11.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.3.2-13"
|
||||
"@polkadot/keyring": "^6.4.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ import type { SiField, SiLookupTypeId, SiPath, SiType, SiTypeDef, SiTypeDefArray
|
||||
import type { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, ScheduledTo254, TaskAddress } from '@polkadot/types/interfaces/scheduler';
|
||||
import type { BeefyKey, FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys10, SessionKeys10B, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, SessionKeys6B, SessionKeys7, SessionKeys7B, SessionKeys8, SessionKeys8B, SessionKeys9, SessionKeys9B, ValidatorCount } from '@polkadot/types/interfaces/session';
|
||||
import type { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
||||
import type { ActiveEraInfo, CompactAssignments, CompactAssignmentsTo257, CompactScore, CompactScoreCompact, ElectionCompute, ElectionPhase, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, ExtendedBalance, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, NominatorIndexCompact, OffchainAccuracy, OffchainAccuracyCompact, PhragmenScore, Points, RawSolution, ReadySolution, RewardDestination, RewardPoint, RoundSnapshot, SeatHolder, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SolutionOrSnapshotSize, SolutionSupport, SolutionSupports, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196, ValidatorPrefsWithBlocked, ValidatorPrefsWithCommission, VoteWeight, Voter } from '@polkadot/types/interfaces/staking';
|
||||
import type { ActiveEraInfo, CompactAssignments, CompactAssignmentsTo257, CompactAssignmentsTo265, CompactAssignmentsWith16, CompactAssignmentsWith24, CompactScore, CompactScoreCompact, ElectionCompute, ElectionPhase, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, ExtendedBalance, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, NominatorIndexCompact, OffchainAccuracy, OffchainAccuracyCompact, PhragmenScore, Points, RawSolution, RawSolutionTo265, RawSolutionWith16, RawSolutionWith24, ReadySolution, RewardDestination, RewardPoint, RoundSnapshot, SeatHolder, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SolutionOrSnapshotSize, SolutionSupport, SolutionSupports, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196, ValidatorPrefsWithBlocked, ValidatorPrefsWithCommission, VoteWeight, Voter } from '@polkadot/types/interfaces/staking';
|
||||
import type { ApiId, BlockTrace, BlockTraceEvent, BlockTraceEventData, BlockTraceSpan, KeyValueOption, ReadProof, RuntimeVersion, RuntimeVersionApi, RuntimeVersionPartial, StorageChangeSet, TraceBlockResponse, TraceError } from '@polkadot/types/interfaces/state';
|
||||
import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
|
||||
import type { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, ArithmeticError, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, PerDispatchClassU32, PerDispatchClassWeight, PerDispatchClassWeightsPerClass, Phase, RawOrigin, RefCount, RefCountTo259, SyncState, SystemOrigin, TokenError, TransactionValidityError, UnknownTransaction, WeightPerClass } from '@polkadot/types/interfaces/system';
|
||||
@@ -270,6 +270,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<CommittedCandidateReceipt>': Option<CommittedCandidateReceipt>;
|
||||
'Option<CompactAssignments>': Option<CompactAssignments>;
|
||||
'Option<CompactAssignmentsTo257>': Option<CompactAssignmentsTo257>;
|
||||
'Option<CompactAssignmentsTo265>': Option<CompactAssignmentsTo265>;
|
||||
'Option<CompactAssignmentsWith16>': Option<CompactAssignmentsWith16>;
|
||||
'Option<CompactAssignmentsWith24>': Option<CompactAssignmentsWith24>;
|
||||
'Option<CompactScore>': Option<CompactScore>;
|
||||
'Option<CompactScoreCompact>': Option<CompactScoreCompact>;
|
||||
'Option<ConfigData>': Option<ConfigData>;
|
||||
@@ -719,6 +722,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<RawBabePreDigestTo159>': Option<RawBabePreDigestTo159>;
|
||||
'Option<RawOrigin>': Option<RawOrigin>;
|
||||
'Option<RawSolution>': Option<RawSolution>;
|
||||
'Option<RawSolutionTo265>': Option<RawSolutionTo265>;
|
||||
'Option<RawSolutionWith16>': Option<RawSolutionWith16>;
|
||||
'Option<RawSolutionWith24>': Option<RawSolutionWith24>;
|
||||
'Option<RawVRFOutput>': Option<RawVRFOutput>;
|
||||
'Option<ReadProof>': Option<ReadProof>;
|
||||
'Option<ReadySolution>': Option<ReadySolution>;
|
||||
@@ -1107,6 +1113,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<CommittedCandidateReceipt>': Vec<CommittedCandidateReceipt>;
|
||||
'Vec<CompactAssignments>': Vec<CompactAssignments>;
|
||||
'Vec<CompactAssignmentsTo257>': Vec<CompactAssignmentsTo257>;
|
||||
'Vec<CompactAssignmentsTo265>': Vec<CompactAssignmentsTo265>;
|
||||
'Vec<CompactAssignmentsWith16>': Vec<CompactAssignmentsWith16>;
|
||||
'Vec<CompactAssignmentsWith24>': Vec<CompactAssignmentsWith24>;
|
||||
'Vec<CompactScore>': Vec<CompactScore>;
|
||||
'Vec<CompactScoreCompact>': Vec<CompactScoreCompact>;
|
||||
'Vec<ConfigData>': Vec<ConfigData>;
|
||||
@@ -1556,6 +1565,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<RawBabePreDigestTo159>': Vec<RawBabePreDigestTo159>;
|
||||
'Vec<RawOrigin>': Vec<RawOrigin>;
|
||||
'Vec<RawSolution>': Vec<RawSolution>;
|
||||
'Vec<RawSolutionTo265>': Vec<RawSolutionTo265>;
|
||||
'Vec<RawSolutionWith16>': Vec<RawSolutionWith16>;
|
||||
'Vec<RawSolutionWith24>': Vec<RawSolutionWith24>;
|
||||
'Vec<RawVRFOutput>': Vec<RawVRFOutput>;
|
||||
'Vec<ReadProof>': Vec<ReadProof>;
|
||||
'Vec<ReadySolution>': Vec<ReadySolution>;
|
||||
@@ -1944,6 +1956,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
CommittedCandidateReceipt: CommittedCandidateReceipt;
|
||||
CompactAssignments: CompactAssignments;
|
||||
CompactAssignmentsTo257: CompactAssignmentsTo257;
|
||||
CompactAssignmentsTo265: CompactAssignmentsTo265;
|
||||
CompactAssignmentsWith16: CompactAssignmentsWith16;
|
||||
CompactAssignmentsWith24: CompactAssignmentsWith24;
|
||||
CompactScore: CompactScore;
|
||||
CompactScoreCompact: CompactScoreCompact;
|
||||
ConfigData: ConfigData;
|
||||
@@ -2393,6 +2408,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
RawBabePreDigestTo159: RawBabePreDigestTo159;
|
||||
RawOrigin: RawOrigin;
|
||||
RawSolution: RawSolution;
|
||||
RawSolutionTo265: RawSolutionTo265;
|
||||
RawSolutionWith16: RawSolutionWith16;
|
||||
RawSolutionWith24: RawSolutionWith24;
|
||||
RawVRFOutput: RawVRFOutput;
|
||||
ReadProof: ReadProof;
|
||||
ReadySolution: ReadySolution;
|
||||
|
||||
@@ -148,7 +148,7 @@ describe('CompactAssignmentSiNormal', (): void => {
|
||||
]);
|
||||
|
||||
const registry = new TypeRegistry();
|
||||
const compact = registry.createType('CompactAssignments', bytes);
|
||||
const compact = registry.createType('CompactAssignmentsWith16', bytes);
|
||||
|
||||
expect(compact.toJSON()).toEqual({
|
||||
votes1: [[2, 20], [4, 40]],
|
||||
|
||||
@@ -15,7 +15,8 @@ const deprecated = {
|
||||
};
|
||||
|
||||
const phragmen = {
|
||||
CompactAssignments: {
|
||||
CompactAssignments: 'CompactAssignmentsWith24',
|
||||
CompactAssignmentsWith16: {
|
||||
votes1: 'Vec<(NominatorIndexCompact, ValidatorIndexCompact)>',
|
||||
votes2: 'Vec<(NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact)>',
|
||||
votes3: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 2], ValidatorIndexCompact)>',
|
||||
@@ -33,6 +34,33 @@ const phragmen = {
|
||||
votes15: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 14], ValidatorIndexCompact)>',
|
||||
votes16: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 15], ValidatorIndexCompact)>'
|
||||
},
|
||||
CompactAssignmentsWith24: {
|
||||
votes1: 'Vec<(NominatorIndexCompact, ValidatorIndexCompact)>',
|
||||
votes2: 'Vec<(NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact)>',
|
||||
votes3: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 2], ValidatorIndexCompact)>',
|
||||
votes4: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 3], ValidatorIndexCompact)>',
|
||||
votes5: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 4], ValidatorIndexCompact)>',
|
||||
votes6: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 5], ValidatorIndexCompact)>',
|
||||
votes7: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 6], ValidatorIndexCompact)>',
|
||||
votes8: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 7], ValidatorIndexCompact)>',
|
||||
votes9: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 8], ValidatorIndexCompact)>',
|
||||
votes10: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 9], ValidatorIndexCompact)>',
|
||||
votes11: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 10], ValidatorIndexCompact)>',
|
||||
votes12: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 11], ValidatorIndexCompact)>',
|
||||
votes13: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 12], ValidatorIndexCompact)>',
|
||||
votes14: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 13], ValidatorIndexCompact)>',
|
||||
votes15: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 14], ValidatorIndexCompact)>',
|
||||
votes16: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 15], ValidatorIndexCompact)>',
|
||||
votes17: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 16], ValidatorIndexCompact)>',
|
||||
votes18: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 17], ValidatorIndexCompact)>',
|
||||
votes19: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 18], ValidatorIndexCompact)>',
|
||||
votes20: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 19], ValidatorIndexCompact)>',
|
||||
votes21: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 20], ValidatorIndexCompact)>',
|
||||
votes22: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 21], ValidatorIndexCompact)>',
|
||||
votes23: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 22], ValidatorIndexCompact)>',
|
||||
votes24: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 23], ValidatorIndexCompact)>'
|
||||
},
|
||||
CompactAssignmentsTo265: 'CompactAssignmentsWith16',
|
||||
CompactAssignmentsTo257: {
|
||||
votes1: 'Vec<(NominatorIndex, [CompactScore; 0], ValidatorIndex)>',
|
||||
votes2: 'Vec<(NominatorIndex, [CompactScore; 1], ValidatorIndex)>',
|
||||
@@ -83,11 +111,18 @@ const phragmen = {
|
||||
}
|
||||
},
|
||||
ExtendedBalance: 'u128',
|
||||
RawSolution: {
|
||||
compact: 'CompactAssignments',
|
||||
RawSolution: 'RawSolutionWith24',
|
||||
RawSolutionWith16: {
|
||||
compact: 'CompactAssignmentsWith16',
|
||||
score: 'ElectionScore',
|
||||
round: 'u32'
|
||||
},
|
||||
RawSolutionWith24: {
|
||||
compact: 'CompactAssignmentsWith24',
|
||||
score: 'ElectionScore',
|
||||
round: 'u32'
|
||||
},
|
||||
RawSolutionTo265: 'RawSolutionWith16',
|
||||
ReadySolution: {
|
||||
supports: 'SolutionSupports',
|
||||
score: 'ElectionScore',
|
||||
|
||||
@@ -12,24 +12,7 @@ export interface ActiveEraInfo extends Struct {
|
||||
}
|
||||
|
||||
/** @name CompactAssignments */
|
||||
export interface CompactAssignments extends Struct {
|
||||
readonly votes1: Vec<ITuple<[NominatorIndexCompact, ValidatorIndexCompact]>>;
|
||||
readonly votes2: Vec<ITuple<[NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact]>>;
|
||||
readonly votes3: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes4: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes5: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes6: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes7: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes8: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes9: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes10: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes11: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes12: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes13: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes14: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes15: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes16: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
}
|
||||
export interface CompactAssignments extends CompactAssignmentsWith24 {}
|
||||
|
||||
/** @name CompactAssignmentsTo257 */
|
||||
export interface CompactAssignmentsTo257 extends Struct {
|
||||
@@ -51,6 +34,57 @@ export interface CompactAssignmentsTo257 extends Struct {
|
||||
readonly votes16: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
|
||||
}
|
||||
|
||||
/** @name CompactAssignmentsTo265 */
|
||||
export interface CompactAssignmentsTo265 extends CompactAssignmentsWith16 {}
|
||||
|
||||
/** @name CompactAssignmentsWith16 */
|
||||
export interface CompactAssignmentsWith16 extends Struct {
|
||||
readonly votes1: Vec<ITuple<[NominatorIndexCompact, ValidatorIndexCompact]>>;
|
||||
readonly votes2: Vec<ITuple<[NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact]>>;
|
||||
readonly votes3: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes4: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes5: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes6: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes7: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes8: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes9: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes10: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes11: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes12: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes13: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes14: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes15: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes16: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
}
|
||||
|
||||
/** @name CompactAssignmentsWith24 */
|
||||
export interface CompactAssignmentsWith24 extends Struct {
|
||||
readonly votes1: Vec<ITuple<[NominatorIndexCompact, ValidatorIndexCompact]>>;
|
||||
readonly votes2: Vec<ITuple<[NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact]>>;
|
||||
readonly votes3: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes4: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes5: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes6: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes7: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes8: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes9: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes10: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes11: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes12: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes13: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes14: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes15: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes16: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes17: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes18: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes19: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes20: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes21: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes22: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes23: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
readonly votes24: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
|
||||
}
|
||||
|
||||
/** @name CompactScore */
|
||||
export interface CompactScore extends ITuple<[ValidatorIndex, OffchainAccuracy]> {}
|
||||
|
||||
@@ -173,8 +207,21 @@ export interface PhragmenScore extends Vec<u128> {}
|
||||
export interface Points extends u32 {}
|
||||
|
||||
/** @name RawSolution */
|
||||
export interface RawSolution extends Struct {
|
||||
readonly compact: CompactAssignments;
|
||||
export interface RawSolution extends RawSolutionWith24 {}
|
||||
|
||||
/** @name RawSolutionTo265 */
|
||||
export interface RawSolutionTo265 extends RawSolutionWith16 {}
|
||||
|
||||
/** @name RawSolutionWith16 */
|
||||
export interface RawSolutionWith16 extends Struct {
|
||||
readonly compact: CompactAssignmentsWith16;
|
||||
readonly score: ElectionScore;
|
||||
readonly round: u32;
|
||||
}
|
||||
|
||||
/** @name RawSolutionWith24 */
|
||||
export interface RawSolutionWith24 extends Struct {
|
||||
readonly compact: CompactAssignmentsWith24;
|
||||
readonly score: ElectionScore;
|
||||
readonly round: u32;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user