1 | import { runtime } from './runtime.js';
|
2 | const deprecated = {
|
3 | Points: 'u32',
|
4 | EraPoints: {
|
5 | total: 'Points',
|
6 | individual: 'Vec<Points>'
|
7 | }
|
8 | };
|
9 | const phragmen = {
|
10 | CompactAssignments: 'CompactAssignmentsWith16',
|
11 | CompactAssignmentsWith16: {
|
12 | votes1: 'Vec<(NominatorIndexCompact, ValidatorIndexCompact)>',
|
13 | votes2: 'Vec<(NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact)>',
|
14 | votes3: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 2], ValidatorIndexCompact)>',
|
15 | votes4: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 3], ValidatorIndexCompact)>',
|
16 | votes5: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 4], ValidatorIndexCompact)>',
|
17 | votes6: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 5], ValidatorIndexCompact)>',
|
18 | votes7: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 6], ValidatorIndexCompact)>',
|
19 | votes8: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 7], ValidatorIndexCompact)>',
|
20 | votes9: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 8], ValidatorIndexCompact)>',
|
21 | votes10: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 9], ValidatorIndexCompact)>',
|
22 | votes11: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 10], ValidatorIndexCompact)>',
|
23 | votes12: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 11], ValidatorIndexCompact)>',
|
24 | votes13: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 12], ValidatorIndexCompact)>',
|
25 | votes14: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 13], ValidatorIndexCompact)>',
|
26 | votes15: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 14], ValidatorIndexCompact)>',
|
27 | votes16: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 15], ValidatorIndexCompact)>'
|
28 | },
|
29 | CompactAssignmentsWith24: {
|
30 | votes1: 'Vec<(NominatorIndexCompact, ValidatorIndexCompact)>',
|
31 | votes2: 'Vec<(NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact)>',
|
32 | votes3: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 2], ValidatorIndexCompact)>',
|
33 | votes4: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 3], ValidatorIndexCompact)>',
|
34 | votes5: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 4], ValidatorIndexCompact)>',
|
35 | votes6: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 5], ValidatorIndexCompact)>',
|
36 | votes7: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 6], ValidatorIndexCompact)>',
|
37 | votes8: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 7], ValidatorIndexCompact)>',
|
38 | votes9: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 8], ValidatorIndexCompact)>',
|
39 | votes10: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 9], ValidatorIndexCompact)>',
|
40 | votes11: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 10], ValidatorIndexCompact)>',
|
41 | votes12: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 11], ValidatorIndexCompact)>',
|
42 | votes13: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 12], ValidatorIndexCompact)>',
|
43 | votes14: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 13], ValidatorIndexCompact)>',
|
44 | votes15: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 14], ValidatorIndexCompact)>',
|
45 | votes16: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 15], ValidatorIndexCompact)>',
|
46 | votes17: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 16], ValidatorIndexCompact)>',
|
47 | votes18: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 17], ValidatorIndexCompact)>',
|
48 | votes19: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 18], ValidatorIndexCompact)>',
|
49 | votes20: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 19], ValidatorIndexCompact)>',
|
50 | votes21: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 20], ValidatorIndexCompact)>',
|
51 | votes22: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 21], ValidatorIndexCompact)>',
|
52 | votes23: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 22], ValidatorIndexCompact)>',
|
53 | votes24: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 23], ValidatorIndexCompact)>'
|
54 | },
|
55 | CompactAssignmentsTo265: 'CompactAssignmentsWith16',
|
56 | CompactAssignmentsTo257: {
|
57 | votes1: 'Vec<(NominatorIndex, [CompactScore; 0], ValidatorIndex)>',
|
58 | votes2: 'Vec<(NominatorIndex, [CompactScore; 1], ValidatorIndex)>',
|
59 | votes3: 'Vec<(NominatorIndex, [CompactScore; 2], ValidatorIndex)>',
|
60 | votes4: 'Vec<(NominatorIndex, [CompactScore; 3], ValidatorIndex)>',
|
61 | votes5: 'Vec<(NominatorIndex, [CompactScore; 4], ValidatorIndex)>',
|
62 | votes6: 'Vec<(NominatorIndex, [CompactScore; 5], ValidatorIndex)>',
|
63 | votes7: 'Vec<(NominatorIndex, [CompactScore; 6], ValidatorIndex)>',
|
64 | votes8: 'Vec<(NominatorIndex, [CompactScore; 7], ValidatorIndex)>',
|
65 | votes9: 'Vec<(NominatorIndex, [CompactScore; 8], ValidatorIndex)>',
|
66 | votes10: 'Vec<(NominatorIndex, [CompactScore; 9], ValidatorIndex)>',
|
67 | votes11: 'Vec<(NominatorIndex, [CompactScore; 10], ValidatorIndex)>',
|
68 | votes12: 'Vec<(NominatorIndex, [CompactScore; 11], ValidatorIndex)>',
|
69 | votes13: 'Vec<(NominatorIndex, [CompactScore; 12], ValidatorIndex)>',
|
70 | votes14: 'Vec<(NominatorIndex, [CompactScore; 13], ValidatorIndex)>',
|
71 | votes15: 'Vec<(NominatorIndex, [CompactScore; 14], ValidatorIndex)>',
|
72 | votes16: 'Vec<(NominatorIndex, [CompactScore; 15], ValidatorIndex)>'
|
73 | },
|
74 | CompactScore: '(ValidatorIndex, OffchainAccuracy)',
|
75 | CompactScoreCompact: '(ValidatorIndexCompact, OffchainAccuracyCompact)',
|
76 | ElectionCompute: {
|
77 |
|
78 |
|
79 | _enum: ['OnChain', 'Signed', 'Unsigned']
|
80 | },
|
81 | ElectionPhase: {
|
82 | _enum: {
|
83 | Off: null,
|
84 | Signed: null,
|
85 | Unsigned: '(bool, BlockNumber)',
|
86 | Emergency: null
|
87 | }
|
88 | },
|
89 | ElectionResult: {
|
90 | compute: 'ElectionCompute',
|
91 | slotStake: 'Balance',
|
92 | electedStashes: 'Vec<AccountId>',
|
93 | exposures: 'Vec<(AccountId, Exposure)>'
|
94 | },
|
95 | ElectionScore: '[u128; 3]',
|
96 | ElectionSize: {
|
97 | validators: 'Compact<ValidatorIndex>',
|
98 | nominators: 'Compact<NominatorIndex>'
|
99 | },
|
100 | ElectionStatus: {
|
101 | _enum: {
|
102 | Close: 'Null',
|
103 | Open: 'BlockNumber'
|
104 | }
|
105 | },
|
106 | ExtendedBalance: 'u128',
|
107 | RawSolution: 'RawSolutionWith16',
|
108 | RawSolutionWith16: {
|
109 | compact: 'CompactAssignmentsWith16',
|
110 | score: 'ElectionScore',
|
111 | round: 'u32'
|
112 | },
|
113 | RawSolutionWith24: {
|
114 | compact: 'CompactAssignmentsWith24',
|
115 | score: 'ElectionScore',
|
116 | round: 'u32'
|
117 | },
|
118 | RawSolutionTo265: 'RawSolutionWith16',
|
119 | ReadySolution: {
|
120 | supports: 'SolutionSupports',
|
121 | score: 'ElectionScore',
|
122 | compute: 'ElectionCompute'
|
123 | },
|
124 | RoundSnapshot: {
|
125 | voters: 'Vec<(AccountId, VoteWeight, Vec<AccountId>)>',
|
126 | targets: 'Vec<AccountId>'
|
127 | },
|
128 | SeatHolder: {
|
129 | who: 'AccountId',
|
130 | stake: 'Balance',
|
131 | deposit: 'Balance'
|
132 | },
|
133 | SignedSubmission: {
|
134 | _fallback: 'SignedSubmissionTo276',
|
135 | who: 'AccountId',
|
136 | deposit: 'Balance',
|
137 | solution: 'RawSolution',
|
138 | reward: 'Balance'
|
139 | },
|
140 | SignedSubmissionTo276: {
|
141 | who: 'AccountId',
|
142 | deposit: 'Balance',
|
143 | solution: 'RawSolution'
|
144 | },
|
145 | SignedSubmissionOf: 'SignedSubmission',
|
146 | SolutionOrSnapshotSize: {
|
147 | voters: 'Compact<u32>',
|
148 | targets: 'Compact<u32>'
|
149 | },
|
150 | SolutionSupport: {
|
151 | total: 'ExtendedBalance',
|
152 | voters: 'Vec<(AccountId, ExtendedBalance)>'
|
153 | },
|
154 | SolutionSupports: 'Vec<(AccountId, SolutionSupport)>',
|
155 | Supports: 'SolutionSupports',
|
156 | SubmissionIndicesOf: 'BTreeMap<ElectionScore, u32>',
|
157 | Voter: {
|
158 | votes: 'Vec<AccountId>',
|
159 | stake: 'Balance',
|
160 | deposit: 'Balance'
|
161 | },
|
162 | VoteWeight: 'u64'
|
163 | };
|
164 | export default {
|
165 | rpc: {},
|
166 | runtime,
|
167 | types: {
|
168 | ...deprecated,
|
169 | ...phragmen,
|
170 | ActiveEraInfo: {
|
171 | index: 'EraIndex',
|
172 | start: 'Option<Moment>'
|
173 | },
|
174 | EraIndex: 'u32',
|
175 | EraRewardPoints: {
|
176 | total: 'RewardPoint',
|
177 | individual: 'BTreeMap<AccountId, RewardPoint>'
|
178 | },
|
179 | EraRewards: {
|
180 | total: 'u32',
|
181 | rewards: 'Vec<u32>'
|
182 | },
|
183 | Exposure: {
|
184 | total: 'Compact<Balance>',
|
185 | own: 'Compact<Balance>',
|
186 | others: 'Vec<IndividualExposure>'
|
187 | },
|
188 | Forcing: {
|
189 | _enum: [
|
190 | 'NotForcing',
|
191 | 'ForceNew',
|
192 | 'ForceNone',
|
193 | 'ForceAlways'
|
194 | ]
|
195 | },
|
196 | IndividualExposure: {
|
197 | who: 'AccountId',
|
198 | value: 'Compact<Balance>'
|
199 | },
|
200 | KeyType: 'AccountId',
|
201 | MomentOf: 'Moment',
|
202 | Nominations: {
|
203 | targets: 'Vec<AccountId>',
|
204 | submittedIn: 'EraIndex',
|
205 | suppressed: 'bool'
|
206 | },
|
207 | NominatorIndex: 'u32',
|
208 | NominatorIndexCompact: 'Compact<NominatorIndex>',
|
209 | OffchainAccuracy: 'PerU16',
|
210 | OffchainAccuracyCompact: 'Compact<OffchainAccuracy>',
|
211 | PhragmenScore: '[u128; 3]',
|
212 | Points: 'u32',
|
213 | RewardDestination: {
|
214 | _enum: {
|
215 | Staked: 'Null',
|
216 | Stash: 'Null',
|
217 | Controller: 'Null',
|
218 | Account: 'AccountId',
|
219 | None: 'Null'
|
220 | }
|
221 | },
|
222 | RewardPoint: 'u32',
|
223 | SlashJournalEntry: {
|
224 | who: 'AccountId',
|
225 | amount: 'Balance',
|
226 | ownSlash: 'Balance'
|
227 | },
|
228 | SlashingSpansTo204: {
|
229 | spanIndex: 'SpanIndex',
|
230 | lastStart: 'EraIndex',
|
231 | prior: 'Vec<EraIndex>'
|
232 | },
|
233 | SlashingSpans: {
|
234 | spanIndex: 'SpanIndex',
|
235 | lastStart: 'EraIndex',
|
236 | lastNonzeroSlash: 'EraIndex',
|
237 | prior: 'Vec<EraIndex>'
|
238 | },
|
239 | SpanIndex: 'u32',
|
240 | SpanRecord: {
|
241 | slashed: 'Balance',
|
242 | paidOut: 'Balance'
|
243 | },
|
244 | StakingLedgerTo223: {
|
245 | stash: 'AccountId',
|
246 | total: 'Compact<Balance>',
|
247 | active: 'Compact<Balance>',
|
248 | unlocking: 'Vec<UnlockChunk>'
|
249 | },
|
250 | StakingLedgerTo240: {
|
251 | _fallback: 'StakingLedgerTo223',
|
252 | stash: 'AccountId',
|
253 | total: 'Compact<Balance>',
|
254 | active: 'Compact<Balance>',
|
255 | unlocking: 'Vec<UnlockChunk>',
|
256 | lastReward: 'Option<EraIndex>'
|
257 | },
|
258 | StakingLedger: {
|
259 | stash: 'AccountId',
|
260 | total: 'Compact<Balance>',
|
261 | active: 'Compact<Balance>',
|
262 | unlocking: 'Vec<UnlockChunk>',
|
263 | claimedRewards: 'Vec<EraIndex>'
|
264 | },
|
265 | UnappliedSlashOther: '(AccountId, Balance)',
|
266 | UnappliedSlash: {
|
267 | validator: 'AccountId',
|
268 | own: 'Balance',
|
269 | others: 'Vec<UnappliedSlashOther>',
|
270 | reporters: 'Vec<AccountId>',
|
271 | payout: 'Balance'
|
272 | },
|
273 | UnlockChunk: {
|
274 | value: 'Compact<Balance>',
|
275 | era: 'Compact<BlockNumber>'
|
276 | },
|
277 | ValidatorIndex: 'u16',
|
278 | ValidatorIndexCompact: 'Compact<ValidatorIndex>',
|
279 | ValidatorPrefs: 'ValidatorPrefsWithBlocked',
|
280 | ValidatorPrefsWithCommission: {
|
281 | commission: 'Compact<Perbill>'
|
282 | },
|
283 | ValidatorPrefsWithBlocked: {
|
284 | commission: 'Compact<Perbill>',
|
285 | blocked: 'bool'
|
286 | },
|
287 | ValidatorPrefsTo196: {
|
288 | validatorPayment: 'Compact<Balance>'
|
289 | },
|
290 | ValidatorPrefsTo145: {
|
291 | unstakeThreshold: 'Compact<u32>',
|
292 | validatorPayment: 'Compact<Balance>'
|
293 | }
|
294 | }
|
295 | };
|