· 4 years ago · Aug 03, 2021, 06:16 AM
1{
2 magicNumber: 1,635,018,093,
3 metadata: {
4 V13: {
5 modules: [
6 {
7 name: System,
8 storage: {
9 prefix: System,
10 items: [
11 {
12 name: Account,
13 modifier: Default,
14 type: {
15 Map: {
16 hasher: Blake2_128Concat,
17 key: AccountId,
18 value: AccountInfo,
19 linked: false
20 }
21 },
22 fallback: 0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,
23 docs: [
24 The full account information for a particular account ID.
25 ]
26 },
27 {
28 name: ExtrinsicCount,
29 modifier: Optional,
30 type: {
31 Plain: u32
32 },
33 fallback: 0x00,
34 docs: [
35 Total extrinsics count for the current block.
36 ]
37 },
38 {
39 name: BlockWeight,
40 modifier: Default,
41 type: {
42 Plain: ConsumedWeight
43 },
44 fallback: 0x000000000000000000000000000000000000000000000000,
45 docs: [
46 The current weight for the block.
47 ]
48 },
49 {
50 name: AllExtrinsicsLen,
51 modifier: Optional,
52 type: {
53 Plain: u32
54 },
55 fallback: 0x00,
56 docs: [
57 Total length (in bytes) for all extrinsics put together, for the current block.
58 ]
59 },
60 {
61 name: BlockHash,
62 modifier: Default,
63 type: {
64 Map: {
65 hasher: Twox64Concat,
66 key: BlockNumber,
67 value: Hash,
68 linked: false
69 }
70 },
71 fallback: 0x0000000000000000000000000000000000000000000000000000000000000000,
72 docs: [
73 Map of block numbers to block hashes.
74 ]
75 },
76 {
77 name: ExtrinsicData,
78 modifier: Default,
79 type: {
80 Map: {
81 hasher: Twox64Concat,
82 key: u32,
83 value: Bytes,
84 linked: false
85 }
86 },
87 fallback: 0x00,
88 docs: [
89 Extrinsics data for the current block (maps an extrinsic's index to its data).
90 ]
91 },
92 {
93 name: Number,
94 modifier: Default,
95 type: {
96 Plain: BlockNumber
97 },
98 fallback: 0x00000000,
99 docs: [
100 The current block number being processed. Set by `execute_block`.
101 ]
102 },
103 {
104 name: ParentHash,
105 modifier: Default,
106 type: {
107 Plain: Hash
108 },
109 fallback: 0x0000000000000000000000000000000000000000000000000000000000000000,
110 docs: [
111 Hash of the previous block.
112 ]
113 },
114 {
115 name: Digest,
116 modifier: Default,
117 type: {
118 Plain: DigestOf
119 },
120 fallback: 0x00,
121 docs: [
122 Digest of the current block, also part of the block header.
123 ]
124 },
125 {
126 name: Events,
127 modifier: Default,
128 type: {
129 Plain: Vec<EventRecord>
130 },
131 fallback: 0x00,
132 docs: [
133 Events deposited for the current block.
134 ]
135 },
136 {
137 name: EventCount,
138 modifier: Default,
139 type: {
140 Plain: EventIndex
141 },
142 fallback: 0x00000000,
143 docs: [
144 The number of events in the `Events<T>` list.
145 ]
146 },
147 {
148 name: EventTopics,
149 modifier: Default,
150 type: {
151 Map: {
152 hasher: Blake2_128Concat,
153 key: Hash,
154 value: Vec<(BlockNumber,EventIndex)>,
155 linked: false
156 }
157 },
158 fallback: 0x00,
159 docs: [
160 Mapping between a topic (represented by T::Hash) and a vector of indexes,
161 of events in the `<Events<T>>` list.,
162 ,
163 All topic vectors have deterministic storage locations depending on the topic. This,
164 allows light-clients to leverage the changes trie storage tracking mechanism and,
165 in case of changes fetch the list of events of interest.,
166 ,
167 The value has the type `(T::BlockNumber, EventIndex)` because if we used only just,
168 the `EventIndex` then in case if the topic has the same contents on the next block,
169 no notification will be triggered thus the event might be lost.
170 ]
171 },
172 {
173 name: LastRuntimeUpgrade,
174 modifier: Optional,
175 type: {
176 Plain: LastRuntimeUpgradeInfo
177 },
178 fallback: 0x00,
179 docs: [
180 Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.
181 ]
182 },
183 {
184 name: UpgradedToU32RefCount,
185 modifier: Default,
186 type: {
187 Plain: bool
188 },
189 fallback: 0x00,
190 docs: [
191 True if we have upgraded so that `type RefCount` is `u32`. False (default) if not.
192 ]
193 },
194 {
195 name: UpgradedToTripleRefCount,
196 modifier: Default,
197 type: {
198 Plain: bool
199 },
200 fallback: 0x00,
201 docs: [
202 True if we have upgraded so that AccountInfo contains three types of `RefCount`. False,
203 (default) if not.
204 ]
205 },
206 {
207 name: ExecutionPhase,
208 modifier: Optional,
209 type: {
210 Plain: Phase
211 },
212 fallback: 0x00,
213 docs: [
214 The execution phase of the block.
215 ]
216 }
217 ]
218 },
219 calls: [
220 {
221 name: fill_block,
222 args: [
223 {
224 name: _ratio,
225 type: Perbill
226 }
227 ],
228 docs: [
229 A dispatch that will fill the block weight up to the given ratio.
230 ]
231 },
232 {
233 name: remark,
234 args: [
235 {
236 name: _remark,
237 type: Bytes
238 }
239 ],
240 docs: [
241 Make some on-chain remark.,
242 ,
243 # <weight>,
244 - `O(1)`,
245 # </weight>
246 ]
247 },
248 {
249 name: set_heap_pages,
250 args: [
251 {
252 name: pages,
253 type: u64
254 }
255 ],
256 docs: [
257 Set the number of pages in the WebAssembly environment's heap.,
258 ,
259 # <weight>,
260 - `O(1)`,
261 - 1 storage write.,
262 - Base Weight: 1.405 µs,
263 - 1 write to HEAP_PAGES,
264 # </weight>
265 ]
266 },
267 {
268 name: set_code,
269 args: [
270 {
271 name: code,
272 type: Bytes
273 }
274 ],
275 docs: [
276 Set the new runtime code.,
277 ,
278 # <weight>,
279 - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`,
280 - 1 storage write (codec `O(C)`).,
281 - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive).,
282 - 1 event.,
283 The weight of this function is dependent on the runtime, but generally this is very expensive.,
284 We will treat this as a full block.,
285 # </weight>
286 ]
287 },
288 {
289 name: set_code_without_checks,
290 args: [
291 {
292 name: code,
293 type: Bytes
294 }
295 ],
296 docs: [
297 Set the new runtime code without doing any checks of the given `code`.,
298 ,
299 # <weight>,
300 - `O(C)` where `C` length of `code`,
301 - 1 storage write (codec `O(C)`).,
302 - 1 event.,
303 The weight of this function is dependent on the runtime. We will treat this as a full block.,
304 # </weight>
305 ]
306 },
307 {
308 name: set_changes_trie_config,
309 args: [
310 {
311 name: changes_trie_config,
312 type: Option<ChangesTrieConfiguration>
313 }
314 ],
315 docs: [
316 Set the new changes trie configuration.,
317 ,
318 # <weight>,
319 - `O(1)`,
320 - 1 storage write or delete (codec `O(1)`).,
321 - 1 call to `deposit_log`: Uses `append` API, so O(1),
322 - Base Weight: 7.218 µs,
323 - DB Weight:,
324 - Writes: Changes Trie, System Digest,
325 # </weight>
326 ]
327 },
328 {
329 name: set_storage,
330 args: [
331 {
332 name: items,
333 type: Vec<KeyValue>
334 }
335 ],
336 docs: [
337 Set some items of storage.,
338 ,
339 # <weight>,
340 - `O(I)` where `I` length of `items`,
341 - `I` storage writes (`O(1)`).,
342 - Base Weight: 0.568 * i µs,
343 - Writes: Number of items,
344 # </weight>
345 ]
346 },
347 {
348 name: kill_storage,
349 args: [
350 {
351 name: keys,
352 type: Vec<Key>
353 }
354 ],
355 docs: [
356 Kill some items from storage.,
357 ,
358 # <weight>,
359 - `O(IK)` where `I` length of `keys` and `K` length of one key,
360 - `I` storage deletions.,
361 - Base Weight: .378 * i µs,
362 - Writes: Number of items,
363 # </weight>
364 ]
365 },
366 {
367 name: kill_prefix,
368 args: [
369 {
370 name: prefix,
371 type: Key
372 },
373 {
374 name: _subkeys,
375 type: u32
376 }
377 ],
378 docs: [
379 Kill all storage items with a key that starts with the given prefix.,
380 ,
381 **NOTE:** We rely on the Root origin to provide us the number of subkeys under,
382 the prefix we are removing to accurately calculate the weight of this function.,
383 ,
384 # <weight>,
385 - `O(P)` where `P` amount of keys with prefix `prefix`,
386 - `P` storage deletions.,
387 - Base Weight: 0.834 * P µs,
388 - Writes: Number of subkeys + 1,
389 # </weight>
390 ]
391 },
392 {
393 name: remark_with_event,
394 args: [
395 {
396 name: remark,
397 type: Bytes
398 }
399 ],
400 docs: [
401 Make some on-chain remark and emit event.,
402 ,
403 # <weight>,
404 - `O(b)` where b is the length of the remark.,
405 - 1 event.,
406 # </weight>
407 ]
408 }
409 ],
410 events: [
411 {
412 name: ExtrinsicSuccess,
413 args: [
414 DispatchInfo
415 ],
416 docs: [
417 An extrinsic completed successfully. [info]
418 ]
419 },
420 {
421 name: ExtrinsicFailed,
422 args: [
423 DispatchError,
424 DispatchInfo
425 ],
426 docs: [
427 An extrinsic failed. [error, info]
428 ]
429 },
430 {
431 name: CodeUpdated,
432 args: [],
433 docs: [
434 `:code` was updated.
435 ]
436 },
437 {
438 name: NewAccount,
439 args: [
440 AccountId
441 ],
442 docs: [
443 A new [account] was created.
444 ]
445 },
446 {
447 name: KilledAccount,
448 args: [
449 AccountId
450 ],
451 docs: [
452 An [account] was reaped.
453 ]
454 },
455 {
456 name: Remarked,
457 args: [
458 AccountId,
459 Hash
460 ],
461 docs: [
462 On on-chain remark happened. [origin, remark_hash]
463 ]
464 }
465 ],
466 constants: [
467 {
468 name: BlockWeights,
469 type: BlockWeights,
470 value: 0x00f2052a010000000088526a74000000405973070000000001c0d22c76510000000100e6bd4f57000000010000000000000000405973070000000001c074c1906e000000010088526a740000000100a2941a1d0000004059730700000000000000,
471 docs: [
472 Block & extrinsics weights: base values and limits.
473 ]
474 },
475 {
476 name: BlockLength,
477 type: BlockLength,
478 value: 0x00003c000000500000005000,
479 docs: [
480 The maximum length of a block (in bytes).
481 ]
482 },
483 {
484 name: BlockHashCount,
485 type: BlockNumber,
486 value: 0xb0040000,
487 docs: [
488 Maximum number of block number to block hash mappings to keep (oldest pruned first).
489 ]
490 },
491 {
492 name: DbWeight,
493 type: RuntimeDbWeight,
494 value: 0x40787d010000000000e1f50500000000,
495 docs: [
496 The weight of runtime database operations the runtime can invoke.
497 ]
498 },
499 {
500 name: Version,
501 type: RuntimeVersion,
502 value: 0x146b68616c61146b68616c61010000000a0000000000000028dd718d5cc53262d401000000df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a801000000ea93e3f16f3d69620100000001000000,
503 docs: [
504 Get the chain's current version.
505 ]
506 },
507 {
508 name: SS58Prefix,
509 type: u16,
510 value: 0x1e00,
511 docs: [
512 The designated SS85 prefix of this chain.,
513 ,
514 This replaces the ss58Format property declared in the chain spec. Reason is,
515 that the runtime should know about the prefix in order to make use of it as,
516 an identifier of the chain.
517 ]
518 }
519 ],
520 errors: [
521 {
522 name: InvalidSpecName,
523 docs: [
524 The name of specification does not match between the current runtime,
525 and the new runtime.
526 ]
527 },
528 {
529 name: SpecVersionNeedsToIncrease,
530 docs: [
531 The specification version is not allowed to decrease between the current runtime,
532 and the new runtime.
533 ]
534 },
535 {
536 name: FailedToExtractRuntimeVersion,
537 docs: [
538 Failed to extract the runtime version from the new runtime.,
539 ,
540 Either calling `Core_version` or decoding `RuntimeVersion` failed.
541 ]
542 },
543 {
544 name: NonDefaultComposite,
545 docs: [
546 Suicide called when the account has non-default composite data.
547 ]
548 },
549 {
550 name: NonZeroRefCount,
551 docs: [
552 There is a non-zero reference count preventing the account from being purged.
553 ]
554 }
555 ],
556 index: 0
557 },
558 {
559 name: Timestamp,
560 storage: {
561 prefix: Timestamp,
562 items: [
563 {
564 name: Now,
565 modifier: Default,
566 type: {
567 Plain: Moment
568 },
569 fallback: 0x0000000000000000,
570 docs: [
571 Current time for the current block.
572 ]
573 },
574 {
575 name: DidUpdate,
576 modifier: Default,
577 type: {
578 Plain: bool
579 },
580 fallback: 0x00,
581 docs: [
582 Did the timestamp get updated in this block?
583 ]
584 }
585 ]
586 },
587 calls: [
588 {
589 name: set,
590 args: [
591 {
592 name: now,
593 type: Compact<Moment>
594 }
595 ],
596 docs: [
597 Set the current time.,
598 ,
599 This call should be invoked exactly once per block. It will panic at the finalization,
600 phase, if this call hasn't been invoked by that time.,
601 ,
602 The timestamp should be greater than the previous one by the amount specified by,
603 `MinimumPeriod`.,
604 ,
605 The dispatch origin for this call must be `Inherent`.,
606 ,
607 # <weight>,
608 - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`),
609 - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`),
610 - 1 event handler `on_timestamp_set`. Must be `O(1)`.,
611 # </weight>
612 ]
613 }
614 ],
615 events: null,
616 constants: [
617 {
618 name: MinimumPeriod,
619 type: Moment,
620 value: 0x7017000000000000,
621 docs: [
622 The minimum period between blocks. Beware that this is different to the *expected* period,
623 that the block production apparatus provides. Your chosen consensus system will generally,
624 work with this to determine a sensible block time. e.g. For Aura, it will be double this,
625 period on default settings.
626 ]
627 }
628 ],
629 errors: [],
630 index: 1
631 },
632 {
633 name: RandomnessCollectiveFlip,
634 storage: {
635 prefix: RandomnessCollectiveFlip,
636 items: [
637 {
638 name: RandomMaterial,
639 modifier: Default,
640 type: {
641 Plain: Vec<Hash>
642 },
643 fallback: 0x00,
644 docs: [
645 Series of block headers from the last 81 blocks that acts as random seed material. This,
646 is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of,
647 the oldest hash.
648 ]
649 }
650 ]
651 },
652 calls: null,
653 events: null,
654 constants: [],
655 errors: [],
656 index: 2
657 },
658 {
659 name: Utility,
660 storage: null,
661 calls: [
662 {
663 name: batch,
664 args: [
665 {
666 name: calls,
667 type: Vec<Call>
668 }
669 ],
670 docs: [
671 Send a batch of dispatch calls.,
672 ,
673 May be called from any origin.,
674 ,
675 - `calls`: The calls to be dispatched from the same origin.,
676 ,
677 If origin is root then call are dispatch without checking origin filter. (This includes,
678 bypassing `frame_system::Config::BaseCallFilter`).,
679 ,
680 # <weight>,
681 - Complexity: O(C) where C is the number of calls to be batched.,
682 # </weight>,
683 ,
684 This will return `Ok` in all circumstances. To determine the success of the batch, an,
685 event is deposited. If a call failed and the batch was interrupted, then the,
686 `BatchInterrupted` event is deposited, along with the number of successful calls made,
687 and the error of the failed call. If all were successful, then the `BatchCompleted`,
688 event is deposited.
689 ]
690 },
691 {
692 name: as_derivative,
693 args: [
694 {
695 name: index,
696 type: u16
697 },
698 {
699 name: call,
700 type: Call
701 }
702 ],
703 docs: [
704 Send a call through an indexed pseudonym of the sender.,
705 ,
706 Filter from origin are passed along. The call will be dispatched with an origin which,
707 use the same filter as the origin of this call.,
708 ,
709 NOTE: If you need to ensure that any account-based filtering is not honored (i.e.,
710 because you expect `proxy` to have been used prior in the call stack and you do not want,
711 the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`,
712 in the Multisig pallet instead.,
713 ,
714 NOTE: Prior to version *12, this was called `as_limited_sub`.,
715 ,
716 The dispatch origin for this call must be _Signed_.
717 ]
718 },
719 {
720 name: batch_all,
721 args: [
722 {
723 name: calls,
724 type: Vec<Call>
725 }
726 ],
727 docs: [
728 Send a batch of dispatch calls and atomically execute them.,
729 The whole transaction will rollback and fail if any of the calls failed.,
730 ,
731 May be called from any origin.,
732 ,
733 - `calls`: The calls to be dispatched from the same origin.,
734 ,
735 If origin is root then call are dispatch without checking origin filter. (This includes,
736 bypassing `frame_system::Config::BaseCallFilter`).,
737 ,
738 # <weight>,
739 - Complexity: O(C) where C is the number of calls to be batched.,
740 # </weight>
741 ]
742 }
743 ],
744 events: [
745 {
746 name: BatchInterrupted,
747 args: [
748 u32,
749 DispatchError
750 ],
751 docs: [
752 Batch of dispatches did not complete fully. Index of first failing dispatch given, as,
753 well as the error. [index, error]
754 ]
755 },
756 {
757 name: BatchCompleted,
758 args: [],
759 docs: [
760 Batch of dispatches completed fully with no error.
761 ]
762 }
763 ],
764 constants: [],
765 errors: [],
766 index: 3
767 },
768 {
769 name: Multisig,
770 storage: {
771 prefix: Multisig,
772 items: [
773 {
774 name: Multisigs,
775 modifier: Optional,
776 type: {
777 DoubleMap: {
778 hasher: Twox64Concat,
779 key1: AccountId,
780 key2: [u8;32],
781 value: Multisig,
782 key2Hasher: Blake2_128Concat
783 }
784 },
785 fallback: 0x00,
786 docs: [
787 The set of open multisig operations.
788 ]
789 },
790 {
791 name: Calls,
792 modifier: Optional,
793 type: {
794 Map: {
795 hasher: Identity,
796 key: [u8;32],
797 value: (OpaqueCall,AccountId,BalanceOf),
798 linked: false
799 }
800 },
801 fallback: 0x00,
802 docs: []
803 }
804 ]
805 },
806 calls: [
807 {
808 name: as_multi_threshold_1,
809 args: [
810 {
811 name: other_signatories,
812 type: Vec<AccountId>
813 },
814 {
815 name: call,
816 type: Call
817 }
818 ],
819 docs: [
820 Immediately dispatch a multi-signature call using a single approval from the caller.,
821 ,
822 The dispatch origin for this call must be _Signed_.,
823 ,
824 - `other_signatories`: The accounts (other than the sender) who are part of the,
825 multi-signature, but do not participate in the approval process.,
826 - `call`: The call to be executed.,
827 ,
828 Result is equivalent to the dispatched result.,
829 ,
830 # <weight>,
831 O(Z + C) where Z is the length of the call and C its execution weight.,
832 -------------------------------,
833 - DB Weight: None,
834 - Plus Call Weight,
835 # </weight>
836 ]
837 },
838 {
839 name: as_multi,
840 args: [
841 {
842 name: threshold,
843 type: u16
844 },
845 {
846 name: other_signatories,
847 type: Vec<AccountId>
848 },
849 {
850 name: maybe_timepoint,
851 type: Option<Timepoint>
852 },
853 {
854 name: call,
855 type: OpaqueCall
856 },
857 {
858 name: store_call,
859 type: bool
860 },
861 {
862 name: max_weight,
863 type: Weight
864 }
865 ],
866 docs: [
867 Register approval for a dispatch to be made from a deterministic composite account if,
868 approved by a total of `threshold - 1` of `other_signatories`.,
869 ,
870 If there are enough, then dispatch the call.,
871 ,
872 Payment: `DepositBase` will be reserved if this is the first approval, plus,
873 `threshold` times `DepositFactor`. It is returned once this dispatch happens or,
874 is cancelled.,
875 ,
876 The dispatch origin for this call must be _Signed_.,
877 ,
878 - `threshold`: The total number of approvals for this dispatch before it is executed.,
879 - `other_signatories`: The accounts (other than the sender) who can approve this,
880 dispatch. May not be empty.,
881 - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is,
882 not the first approval, then it must be `Some`, with the timepoint (block number and,
883 transaction index) of the first approval transaction.,
884 - `call`: The call to be executed.,
885 ,
886 NOTE: Unless this is the final approval, you will generally want to use,
887 `approve_as_multi` instead, since it only requires a hash of the call.,
888 ,
889 Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise,
890 on success, result is `Ok` and the result from the interior call, if it was executed,,
891 may be found in the deposited `MultisigExecuted` event.,
892 ,
893 # <weight>,
894 - `O(S + Z + Call)`.,
895 - Up to one balance-reserve or unreserve operation.,
896 - One passthrough operation, one insert, both `O(S)` where `S` is the number of,
897 signatories. `S` is capped by `MaxSignatories`, with weight being proportional.,
898 - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len.,
899 - One encode & hash, both of complexity `O(S)`.,
900 - Up to one binary search and insert (`O(logS + S)`).,
901 - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.,
902 - One event.,
903 - The weight of the `call`.,
904 - Storage: inserts one item, value size bounded by `MaxSignatories`, with a,
905 deposit taken for its lifetime of,
906 `DepositBase + threshold * DepositFactor`.,
907 -------------------------------,
908 - DB Weight:,
909 - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`),
910 - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`),
911 - Plus Call Weight,
912 # </weight>
913 ]
914 },
915 {
916 name: approve_as_multi,
917 args: [
918 {
919 name: threshold,
920 type: u16
921 },
922 {
923 name: other_signatories,
924 type: Vec<AccountId>
925 },
926 {
927 name: maybe_timepoint,
928 type: Option<Timepoint>
929 },
930 {
931 name: call_hash,
932 type: [u8;32]
933 },
934 {
935 name: max_weight,
936 type: Weight
937 }
938 ],
939 docs: [
940 Register approval for a dispatch to be made from a deterministic composite account if,
941 approved by a total of `threshold - 1` of `other_signatories`.,
942 ,
943 Payment: `DepositBase` will be reserved if this is the first approval, plus,
944 `threshold` times `DepositFactor`. It is returned once this dispatch happens or,
945 is cancelled.,
946 ,
947 The dispatch origin for this call must be _Signed_.,
948 ,
949 - `threshold`: The total number of approvals for this dispatch before it is executed.,
950 - `other_signatories`: The accounts (other than the sender) who can approve this,
951 dispatch. May not be empty.,
952 - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is,
953 not the first approval, then it must be `Some`, with the timepoint (block number and,
954 transaction index) of the first approval transaction.,
955 - `call_hash`: The hash of the call to be executed.,
956 ,
957 NOTE: If this is the final approval, you will want to use `as_multi` instead.,
958 ,
959 # <weight>,
960 - `O(S)`.,
961 - Up to one balance-reserve or unreserve operation.,
962 - One passthrough operation, one insert, both `O(S)` where `S` is the number of,
963 signatories. `S` is capped by `MaxSignatories`, with weight being proportional.,
964 - One encode & hash, both of complexity `O(S)`.,
965 - Up to one binary search and insert (`O(logS + S)`).,
966 - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.,
967 - One event.,
968 - Storage: inserts one item, value size bounded by `MaxSignatories`, with a,
969 deposit taken for its lifetime of,
970 `DepositBase + threshold * DepositFactor`.,
971 ----------------------------------,
972 - DB Weight:,
973 - Read: Multisig Storage, [Caller Account],
974 - Write: Multisig Storage, [Caller Account],
975 # </weight>
976 ]
977 },
978 {
979 name: cancel_as_multi,
980 args: [
981 {
982 name: threshold,
983 type: u16
984 },
985 {
986 name: other_signatories,
987 type: Vec<AccountId>
988 },
989 {
990 name: timepoint,
991 type: Timepoint
992 },
993 {
994 name: call_hash,
995 type: [u8;32]
996 }
997 ],
998 docs: [
999 Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously,
1000 for this operation will be unreserved on success.,
1001 ,
1002 The dispatch origin for this call must be _Signed_.,
1003 ,
1004 - `threshold`: The total number of approvals for this dispatch before it is executed.,
1005 - `other_signatories`: The accounts (other than the sender) who can approve this,
1006 dispatch. May not be empty.,
1007 - `timepoint`: The timepoint (block number and transaction index) of the first approval,
1008 transaction for this dispatch.,
1009 - `call_hash`: The hash of the call to be executed.,
1010 ,
1011 # <weight>,
1012 - `O(S)`.,
1013 - Up to one balance-reserve or unreserve operation.,
1014 - One passthrough operation, one insert, both `O(S)` where `S` is the number of,
1015 signatories. `S` is capped by `MaxSignatories`, with weight being proportional.,
1016 - One encode & hash, both of complexity `O(S)`.,
1017 - One event.,
1018 - I/O: 1 read `O(S)`, one remove.,
1019 - Storage: removes one item.,
1020 ----------------------------------,
1021 - DB Weight:,
1022 - Read: Multisig Storage, [Caller Account], Refund Account, Calls,
1023 - Write: Multisig Storage, [Caller Account], Refund Account, Calls,
1024 # </weight>
1025 ]
1026 }
1027 ],
1028 events: [
1029 {
1030 name: NewMultisig,
1031 args: [
1032 AccountId,
1033 AccountId,
1034 CallHash
1035 ],
1036 docs: [
1037 A new multisig operation has begun. [approving, multisig, call_hash]
1038 ]
1039 },
1040 {
1041 name: MultisigApproval,
1042 args: [
1043 AccountId,
1044 Timepoint,
1045 AccountId,
1046 CallHash
1047 ],
1048 docs: [
1049 A multisig operation has been approved by someone.,
1050 [approving, timepoint, multisig, call_hash]
1051 ]
1052 },
1053 {
1054 name: MultisigExecuted,
1055 args: [
1056 AccountId,
1057 Timepoint,
1058 AccountId,
1059 CallHash,
1060 DispatchResult
1061 ],
1062 docs: [
1063 A multisig operation has been executed. [approving, timepoint, multisig, call_hash]
1064 ]
1065 },
1066 {
1067 name: MultisigCancelled,
1068 args: [
1069 AccountId,
1070 Timepoint,
1071 AccountId,
1072 CallHash
1073 ],
1074 docs: [
1075 A multisig operation has been cancelled. [cancelling, timepoint, multisig, call_hash]
1076 ]
1077 }
1078 ],
1079 constants: [
1080 {
1081 name: DepositBase,
1082 type: BalanceOf,
1083 value: 0x009c3845f00400000000000000000000,
1084 docs: [
1085 The base amount of currency needed to reserve for creating a multisig execution or to store,
1086 a dispatch call for later.,
1087 ,
1088 This is held for an additional storage item whose value size is,
1089 `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is,
1090 `32 + sizeof(AccountId)` bytes.
1091 ]
1092 },
1093 {
1094 name: DepositFactor,
1095 type: BalanceOf,
1096 value: 0x0000eb08bf0100000000000000000000,
1097 docs: [
1098 The amount of currency needed per unit threshold when creating a multisig execution.,
1099 ,
1100 This is held for adding 32 bytes more into a pre-existing storage value.
1101 ]
1102 },
1103 {
1104 name: MaxSignatories,
1105 type: u16,
1106 value: 0x6400,
1107 docs: [
1108 The maximum amount of signatories allowed in the multisig.
1109 ]
1110 }
1111 ],
1112 errors: [
1113 {
1114 name: MinimumThreshold,
1115 docs: [
1116 Threshold must be 2 or greater.
1117 ]
1118 },
1119 {
1120 name: AlreadyApproved,
1121 docs: [
1122 Call is already approved by this signatory.
1123 ]
1124 },
1125 {
1126 name: NoApprovalsNeeded,
1127 docs: [
1128 Call doesn't need any (more) approvals.
1129 ]
1130 },
1131 {
1132 name: TooFewSignatories,
1133 docs: [
1134 There are too few signatories in the list.
1135 ]
1136 },
1137 {
1138 name: TooManySignatories,
1139 docs: [
1140 There are too many signatories in the list.
1141 ]
1142 },
1143 {
1144 name: SignatoriesOutOfOrder,
1145 docs: [
1146 The signatories were provided out of order; they should be ordered.
1147 ]
1148 },
1149 {
1150 name: SenderInSignatories,
1151 docs: [
1152 The sender was contained in the other signatories; it shouldn't be.
1153 ]
1154 },
1155 {
1156 name: NotFound,
1157 docs: [
1158 Multisig operation not found when attempting to cancel.
1159 ]
1160 },
1161 {
1162 name: NotOwner,
1163 docs: [
1164 Only the account that originally created the multisig is able to cancel it.
1165 ]
1166 },
1167 {
1168 name: NoTimepoint,
1169 docs: [
1170 No timepoint was given, yet the multisig operation is already underway.
1171 ]
1172 },
1173 {
1174 name: WrongTimepoint,
1175 docs: [
1176 A different timepoint was given to the multisig operation that is underway.
1177 ]
1178 },
1179 {
1180 name: UnexpectedTimepoint,
1181 docs: [
1182 A timepoint was given, yet no multisig operation is underway.
1183 ]
1184 },
1185 {
1186 name: MaxWeightTooLow,
1187 docs: [
1188 The maximum weight information provided was too low.
1189 ]
1190 },
1191 {
1192 name: AlreadyStored,
1193 docs: [
1194 The data to be stored is already stored.
1195 ]
1196 }
1197 ],
1198 index: 4
1199 },
1200 {
1201 name: Proxy,
1202 storage: {
1203 prefix: Proxy,
1204 items: [
1205 {
1206 name: Proxies,
1207 modifier: Default,
1208 type: {
1209 Map: {
1210 hasher: Twox64Concat,
1211 key: AccountId,
1212 value: (Vec<ProxyDefinition>,BalanceOf),
1213 linked: false
1214 }
1215 },
1216 fallback: 0x0000000000000000000000000000000000,
1217 docs: [
1218 The set of account proxies. Maps the account which has delegated to the accounts,
1219 which are being delegated to, together with the amount held on deposit.
1220 ]
1221 },
1222 {
1223 name: Announcements,
1224 modifier: Default,
1225 type: {
1226 Map: {
1227 hasher: Twox64Concat,
1228 key: AccountId,
1229 value: (Vec<Announcement>,BalanceOf),
1230 linked: false
1231 }
1232 },
1233 fallback: 0x0000000000000000000000000000000000,
1234 docs: [
1235 The announcements made by the proxy (key).
1236 ]
1237 }
1238 ]
1239 },
1240 calls: [
1241 {
1242 name: proxy,
1243 args: [
1244 {
1245 name: real,
1246 type: AccountId
1247 },
1248 {
1249 name: force_proxy_type,
1250 type: Option<ProxyType>
1251 },
1252 {
1253 name: call,
1254 type: Call
1255 }
1256 ],
1257 docs: [
1258 Dispatch the given `call` from an account that the sender is authorised for through,
1259 `add_proxy`.,
1260 ,
1261 Removes any corresponding announcement(s).,
1262 ,
1263 The dispatch origin for this call must be _Signed_.,
1264 ,
1265 Parameters:,
1266 - `real`: The account that the proxy will make a call on behalf of.,
1267 - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.,
1268 - `call`: The call to be made by the `real` account.,
1269 ,
1270 # <weight>,
1271 Weight is a function of the number of proxies the user has (P).,
1272 # </weight>
1273 ]
1274 },
1275 {
1276 name: add_proxy,
1277 args: [
1278 {
1279 name: delegate,
1280 type: AccountId
1281 },
1282 {
1283 name: proxy_type,
1284 type: ProxyType
1285 },
1286 {
1287 name: delay,
1288 type: BlockNumber
1289 }
1290 ],
1291 docs: [
1292 Register a proxy account for the sender that is able to make calls on its behalf.,
1293 ,
1294 The dispatch origin for this call must be _Signed_.,
1295 ,
1296 Parameters:,
1297 - `proxy`: The account that the `caller` would like to make a proxy.,
1298 - `proxy_type`: The permissions allowed for this proxy account.,
1299 - `delay`: The announcement period required of the initial proxy. Will generally be,
1300 zero.,
1301 ,
1302 # <weight>,
1303 Weight is a function of the number of proxies the user has (P).,
1304 # </weight>
1305 ]
1306 },
1307 {
1308 name: remove_proxy,
1309 args: [
1310 {
1311 name: delegate,
1312 type: AccountId
1313 },
1314 {
1315 name: proxy_type,
1316 type: ProxyType
1317 },
1318 {
1319 name: delay,
1320 type: BlockNumber
1321 }
1322 ],
1323 docs: [
1324 Unregister a proxy account for the sender.,
1325 ,
1326 The dispatch origin for this call must be _Signed_.,
1327 ,
1328 Parameters:,
1329 - `proxy`: The account that the `caller` would like to remove as a proxy.,
1330 - `proxy_type`: The permissions currently enabled for the removed proxy account.,
1331 ,
1332 # <weight>,
1333 Weight is a function of the number of proxies the user has (P).,
1334 # </weight>
1335 ]
1336 },
1337 {
1338 name: remove_proxies,
1339 args: [],
1340 docs: [
1341 Unregister all proxy accounts for the sender.,
1342 ,
1343 The dispatch origin for this call must be _Signed_.,
1344 ,
1345 WARNING: This may be called on accounts created by `anonymous`, however if done, then,
1346 the unreserved fees will be inaccessible. **All access to this account will be lost.**,
1347 ,
1348 # <weight>,
1349 Weight is a function of the number of proxies the user has (P).,
1350 # </weight>
1351 ]
1352 },
1353 {
1354 name: anonymous,
1355 args: [
1356 {
1357 name: proxy_type,
1358 type: ProxyType
1359 },
1360 {
1361 name: delay,
1362 type: BlockNumber
1363 },
1364 {
1365 name: index,
1366 type: u16
1367 }
1368 ],
1369 docs: [
1370 Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and,
1371 initialize it with a proxy of `proxy_type` for `origin` sender.,
1372 ,
1373 Requires a `Signed` origin.,
1374 ,
1375 - `proxy_type`: The type of the proxy that the sender will be registered as over the,
1376 new account. This will almost always be the most permissive `ProxyType` possible to,
1377 allow for maximum flexibility.,
1378 - `index`: A disambiguation index, in case this is called multiple times in the same,
1379 transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just,
1380 want to use `0`.,
1381 - `delay`: The announcement period required of the initial proxy. Will generally be,
1382 zero.,
1383 ,
1384 Fails with `Duplicate` if this has already been called in this transaction, from the,
1385 same sender, with the same parameters.,
1386 ,
1387 Fails if there are insufficient funds to pay for deposit.,
1388 ,
1389 # <weight>,
1390 Weight is a function of the number of proxies the user has (P).,
1391 # </weight>,
1392 TODO: Might be over counting 1 read
1393 ]
1394 },
1395 {
1396 name: kill_anonymous,
1397 args: [
1398 {
1399 name: spawner,
1400 type: AccountId
1401 },
1402 {
1403 name: proxy_type,
1404 type: ProxyType
1405 },
1406 {
1407 name: index,
1408 type: u16
1409 },
1410 {
1411 name: height,
1412 type: Compact<BlockNumber>
1413 },
1414 {
1415 name: ext_index,
1416 type: Compact<u32>
1417 }
1418 ],
1419 docs: [
1420 Removes a previously spawned anonymous proxy.,
1421 ,
1422 WARNING: **All access to this account will be lost.** Any funds held in it will be,
1423 inaccessible.,
1424 ,
1425 Requires a `Signed` origin, and the sender account must have been created by a call to,
1426 `anonymous` with corresponding parameters.,
1427 ,
1428 - `spawner`: The account that originally called `anonymous` to create this account.,
1429 - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`.,
1430 - `proxy_type`: The proxy type originally passed to `anonymous`.,
1431 - `height`: The height of the chain when the call to `anonymous` was processed.,
1432 - `ext_index`: The extrinsic index in which the call to `anonymous` was processed.,
1433 ,
1434 Fails with `NoPermission` in case the caller is not a previously created anonymous,
1435 account whose `anonymous` call has corresponding parameters.,
1436 ,
1437 # <weight>,
1438 Weight is a function of the number of proxies the user has (P).,
1439 # </weight>
1440 ]
1441 },
1442 {
1443 name: announce,
1444 args: [
1445 {
1446 name: real,
1447 type: AccountId
1448 },
1449 {
1450 name: call_hash,
1451 type: CallHashOf
1452 }
1453 ],
1454 docs: [
1455 Publish the hash of a proxy-call that will be made in the future.,
1456 ,
1457 This must be called some number of blocks before the corresponding `proxy` is attempted,
1458 if the delay associated with the proxy relationship is greater than zero.,
1459 ,
1460 No more than `MaxPending` announcements may be made at any one time.,
1461 ,
1462 This will take a deposit of `AnnouncementDepositFactor` as well as,
1463 `AnnouncementDepositBase` if there are no other pending announcements.,
1464 ,
1465 The dispatch origin for this call must be _Signed_ and a proxy of `real`.,
1466 ,
1467 Parameters:,
1468 - `real`: The account that the proxy will make a call on behalf of.,
1469 - `call_hash`: The hash of the call to be made by the `real` account.,
1470 ,
1471 # <weight>,
1472 Weight is a function of:,
1473 - A: the number of announcements made.,
1474 - P: the number of proxies the user has.,
1475 # </weight>
1476 ]
1477 },
1478 {
1479 name: remove_announcement,
1480 args: [
1481 {
1482 name: real,
1483 type: AccountId
1484 },
1485 {
1486 name: call_hash,
1487 type: CallHashOf
1488 }
1489 ],
1490 docs: [
1491 Remove a given announcement.,
1492 ,
1493 May be called by a proxy account to remove a call they previously announced and return,
1494 the deposit.,
1495 ,
1496 The dispatch origin for this call must be _Signed_.,
1497 ,
1498 Parameters:,
1499 - `real`: The account that the proxy will make a call on behalf of.,
1500 - `call_hash`: The hash of the call to be made by the `real` account.,
1501 ,
1502 # <weight>,
1503 Weight is a function of:,
1504 - A: the number of announcements made.,
1505 - P: the number of proxies the user has.,
1506 # </weight>
1507 ]
1508 },
1509 {
1510 name: reject_announcement,
1511 args: [
1512 {
1513 name: delegate,
1514 type: AccountId
1515 },
1516 {
1517 name: call_hash,
1518 type: CallHashOf
1519 }
1520 ],
1521 docs: [
1522 Remove the given announcement of a delegate.,
1523 ,
1524 May be called by a target (proxied) account to remove a call that one of their delegates,
1525 (`delegate`) has announced they want to execute. The deposit is returned.,
1526 ,
1527 The dispatch origin for this call must be _Signed_.,
1528 ,
1529 Parameters:,
1530 - `delegate`: The account that previously announced the call.,
1531 - `call_hash`: The hash of the call to be made.,
1532 ,
1533 # <weight>,
1534 Weight is a function of:,
1535 - A: the number of announcements made.,
1536 - P: the number of proxies the user has.,
1537 # </weight>
1538 ]
1539 },
1540 {
1541 name: proxy_announced,
1542 args: [
1543 {
1544 name: delegate,
1545 type: AccountId
1546 },
1547 {
1548 name: real,
1549 type: AccountId
1550 },
1551 {
1552 name: force_proxy_type,
1553 type: Option<ProxyType>
1554 },
1555 {
1556 name: call,
1557 type: Call
1558 }
1559 ],
1560 docs: [
1561 Dispatch the given `call` from an account that the sender is authorized for through,
1562 `add_proxy`.,
1563 ,
1564 Removes any corresponding announcement(s).,
1565 ,
1566 The dispatch origin for this call must be _Signed_.,
1567 ,
1568 Parameters:,
1569 - `real`: The account that the proxy will make a call on behalf of.,
1570 - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.,
1571 - `call`: The call to be made by the `real` account.,
1572 ,
1573 # <weight>,
1574 Weight is a function of:,
1575 - A: the number of announcements made.,
1576 - P: the number of proxies the user has.,
1577 # </weight>
1578 ]
1579 }
1580 ],
1581 events: [
1582 {
1583 name: ProxyExecuted,
1584 args: [
1585 DispatchResult
1586 ],
1587 docs: [
1588 A proxy was executed correctly, with the given [result].
1589 ]
1590 },
1591 {
1592 name: AnonymousCreated,
1593 args: [
1594 AccountId,
1595 AccountId,
1596 ProxyType,
1597 u16
1598 ],
1599 docs: [
1600 Anonymous account has been created by new proxy with given,
1601 disambiguation index and proxy type. [anonymous, who, proxy_type, disambiguation_index]
1602 ]
1603 },
1604 {
1605 name: Announced,
1606 args: [
1607 AccountId,
1608 AccountId,
1609 Hash
1610 ],
1611 docs: [
1612 An announcement was placed to make a call in the future. [real, proxy, call_hash]
1613 ]
1614 }
1615 ],
1616 constants: [
1617 {
1618 name: ProxyDepositBase,
1619 type: BalanceOf,
1620 value: 0x001cd8b7510200000000000000000000,
1621 docs: [
1622 The base amount of currency needed to reserve for creating a proxy.,
1623 ,
1624 This is held for an additional storage item whose value size is,
1625 `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes.
1626 ]
1627 },
1628 {
1629 name: ProxyDepositFactor,
1630 type: BalanceOf,
1631 value: 0x00583201cd0100000000000000000000,
1632 docs: [
1633 The amount of currency needed per proxy added.,
1634 ,
1635 This is held for adding 32 bytes plus an instance of `ProxyType` more into a pre-existing,
1636 storage value. Thus, when configuring `ProxyDepositFactor` one should take into account,
1637 `32 + proxy_type.encode().len()` bytes of data.
1638 ]
1639 },
1640 {
1641 name: MaxProxies,
1642 type: u32,
1643 value: 0x20000000,
1644 docs: [
1645 The maximum amount of proxies allowed for a single account.
1646 ]
1647 },
1648 {
1649 name: MaxPending,
1650 type: u32,
1651 value: 0x20000000,
1652 docs: [
1653 The maximum amount of time-delayed announcements that are allowed to be pending.
1654 ]
1655 },
1656 {
1657 name: AnnouncementDepositBase,
1658 type: BalanceOf,
1659 value: 0x00dc127ac10200000000000000000000,
1660 docs: [
1661 The base amount of currency needed to reserve for creating an announcement.,
1662 ,
1663 This is held when a new storage item holding a `Balance` is created (typically 16 bytes).
1664 ]
1665 },
1666 {
1667 name: AnnouncementDepositFactor,
1668 type: BalanceOf,
1669 value: 0x00b064029a0300000000000000000000,
1670 docs: [
1671 The amount of currency needed per announcement made.,
1672 ,
1673 This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes),
1674 into a pre-existing storage value.
1675 ]
1676 }
1677 ],
1678 errors: [
1679 {
1680 name: TooMany,
1681 docs: [
1682 There are too many proxies registered or too many announcements pending.
1683 ]
1684 },
1685 {
1686 name: NotFound,
1687 docs: [
1688 Proxy registration not found.
1689 ]
1690 },
1691 {
1692 name: NotProxy,
1693 docs: [
1694 Sender is not a proxy of the account to be proxied.
1695 ]
1696 },
1697 {
1698 name: Unproxyable,
1699 docs: [
1700 A call which is incompatible with the proxy type's filter was attempted.
1701 ]
1702 },
1703 {
1704 name: Duplicate,
1705 docs: [
1706 Account is already a proxy.
1707 ]
1708 },
1709 {
1710 name: NoPermission,
1711 docs: [
1712 Call may not be made by proxy because it may escalate its privileges.
1713 ]
1714 },
1715 {
1716 name: Unannounced,
1717 docs: [
1718 Announcement, if made at all, was made too recently.
1719 ]
1720 },
1721 {
1722 name: NoSelfProxy,
1723 docs: [
1724 Cannot add self as proxy.
1725 ]
1726 }
1727 ],
1728 index: 5
1729 },
1730 {
1731 name: Vesting,
1732 storage: {
1733 prefix: Vesting,
1734 items: [
1735 {
1736 name: Vesting,
1737 modifier: Optional,
1738 type: {
1739 Map: {
1740 hasher: Blake2_128Concat,
1741 key: AccountId,
1742 value: VestingInfo,
1743 linked: false
1744 }
1745 },
1746 fallback: 0x00,
1747 docs: [
1748 Information regarding the vesting of a given account.
1749 ]
1750 }
1751 ]
1752 },
1753 calls: [
1754 {
1755 name: vest,
1756 args: [],
1757 docs: [
1758 Unlock any vested funds of the sender account.,
1759 ,
1760 The dispatch origin for this call must be _Signed_ and the sender must have funds still,
1761 locked under this pallet.,
1762 ,
1763 Emits either `VestingCompleted` or `VestingUpdated`.,
1764 ,
1765 # <weight>,
1766 - `O(1)`.,
1767 - DbWeight: 2 Reads, 2 Writes,
1768 - Reads: Vesting Storage, Balances Locks, [Sender Account],
1769 - Writes: Vesting Storage, Balances Locks, [Sender Account],
1770 # </weight>
1771 ]
1772 },
1773 {
1774 name: vest_other,
1775 args: [
1776 {
1777 name: target,
1778 type: LookupSource
1779 }
1780 ],
1781 docs: [
1782 Unlock any vested funds of a `target` account.,
1783 ,
1784 The dispatch origin for this call must be _Signed_.,
1785 ,
1786 - `target`: The account whose vested funds should be unlocked. Must have funds still,
1787 locked under this pallet.,
1788 ,
1789 Emits either `VestingCompleted` or `VestingUpdated`.,
1790 ,
1791 # <weight>,
1792 - `O(1)`.,
1793 - DbWeight: 3 Reads, 3 Writes,
1794 - Reads: Vesting Storage, Balances Locks, Target Account,
1795 - Writes: Vesting Storage, Balances Locks, Target Account,
1796 # </weight>
1797 ]
1798 },
1799 {
1800 name: vested_transfer,
1801 args: [
1802 {
1803 name: target,
1804 type: LookupSource
1805 },
1806 {
1807 name: schedule,
1808 type: VestingInfo
1809 }
1810 ],
1811 docs: [
1812 Create a vested transfer.,
1813 ,
1814 The dispatch origin for this call must be _Signed_.,
1815 ,
1816 - `target`: The account that should be transferred the vested funds.,
1817 - `amount`: The amount of funds to transfer and will be vested.,
1818 - `schedule`: The vesting schedule attached to the transfer.,
1819 ,
1820 Emits `VestingCreated`.,
1821 ,
1822 # <weight>,
1823 - `O(1)`.,
1824 - DbWeight: 3 Reads, 3 Writes,
1825 - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account],
1826 - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account],
1827 # </weight>
1828 ]
1829 },
1830 {
1831 name: force_vested_transfer,
1832 args: [
1833 {
1834 name: source,
1835 type: LookupSource
1836 },
1837 {
1838 name: target,
1839 type: LookupSource
1840 },
1841 {
1842 name: schedule,
1843 type: VestingInfo
1844 }
1845 ],
1846 docs: [
1847 Force a vested transfer.,
1848 ,
1849 The dispatch origin for this call must be _Root_.,
1850 ,
1851 - `source`: The account whose funds should be transferred.,
1852 - `target`: The account that should be transferred the vested funds.,
1853 - `amount`: The amount of funds to transfer and will be vested.,
1854 - `schedule`: The vesting schedule attached to the transfer.,
1855 ,
1856 Emits `VestingCreated`.,
1857 ,
1858 # <weight>,
1859 - `O(1)`.,
1860 - DbWeight: 4 Reads, 4 Writes,
1861 - Reads: Vesting Storage, Balances Locks, Target Account, Source Account,
1862 - Writes: Vesting Storage, Balances Locks, Target Account, Source Account,
1863 # </weight>
1864 ]
1865 }
1866 ],
1867 events: [
1868 {
1869 name: VestingUpdated,
1870 args: [
1871 AccountId,
1872 Balance
1873 ],
1874 docs: [
1875 The amount vested has been updated. This could indicate more funds are available. The,
1876 balance given is the amount which is left unvested (and thus locked).,
1877 [account, unvested]
1878 ]
1879 },
1880 {
1881 name: VestingCompleted,
1882 args: [
1883 AccountId
1884 ],
1885 docs: [
1886 An [account] has become fully vested. No further vesting can happen.
1887 ]
1888 }
1889 ],
1890 constants: [
1891 {
1892 name: MinVestedTransfer,
1893 type: BalanceOf,
1894 value: 0x00e40b54020000000000000000000000,
1895 docs: [
1896 The minimum amount transferred to call `vested_transfer`.
1897 ]
1898 }
1899 ],
1900 errors: [
1901 {
1902 name: NotVesting,
1903 docs: [
1904 The account given is not vesting.
1905 ]
1906 },
1907 {
1908 name: ExistingVestingSchedule,
1909 docs: [
1910 An existing vesting schedule already exists for this account that cannot be clobbered.
1911 ]
1912 },
1913 {
1914 name: AmountLow,
1915 docs: [
1916 Amount being transferred is too low to create a vesting schedule.
1917 ]
1918 }
1919 ],
1920 index: 6
1921 },
1922 {
1923 name: Scheduler,
1924 storage: {
1925 prefix: Scheduler,
1926 items: [
1927 {
1928 name: Agenda,
1929 modifier: Default,
1930 type: {
1931 Map: {
1932 hasher: Twox64Concat,
1933 key: BlockNumber,
1934 value: Vec<Option<Scheduled>>,
1935 linked: false
1936 }
1937 },
1938 fallback: 0x00,
1939 docs: [
1940 Items to be executed, indexed by the block number that they should be executed on.
1941 ]
1942 },
1943 {
1944 name: Lookup,
1945 modifier: Optional,
1946 type: {
1947 Map: {
1948 hasher: Twox64Concat,
1949 key: Bytes,
1950 value: TaskAddress,
1951 linked: false
1952 }
1953 },
1954 fallback: 0x00,
1955 docs: [
1956 Lookup from identity to the block number and index of the task.
1957 ]
1958 },
1959 {
1960 name: StorageVersion,
1961 modifier: Default,
1962 type: {
1963 Plain: Releases
1964 },
1965 fallback: 0x00,
1966 docs: [
1967 Storage version of the pallet.,
1968 ,
1969 New networks start with last version.
1970 ]
1971 }
1972 ]
1973 },
1974 calls: [
1975 {
1976 name: schedule,
1977 args: [
1978 {
1979 name: when,
1980 type: BlockNumber
1981 },
1982 {
1983 name: maybe_periodic,
1984 type: Option<Period>
1985 },
1986 {
1987 name: priority,
1988 type: Priority
1989 },
1990 {
1991 name: call,
1992 type: Call
1993 }
1994 ],
1995 docs: [
1996 Anonymously schedule a task.,
1997 ,
1998 # <weight>,
1999 - S = Number of already scheduled calls,
2000 - Base Weight: 22.29 + .126 * S µs,
2001 - DB Weight:,
2002 - Read: Agenda,
2003 - Write: Agenda,
2004 - Will use base weight of 25 which should be good for up to 30 scheduled calls,
2005 # </weight>
2006 ]
2007 },
2008 {
2009 name: cancel,
2010 args: [
2011 {
2012 name: when,
2013 type: BlockNumber
2014 },
2015 {
2016 name: index,
2017 type: u32
2018 }
2019 ],
2020 docs: [
2021 Cancel an anonymously scheduled task.,
2022 ,
2023 # <weight>,
2024 - S = Number of already scheduled calls,
2025 - Base Weight: 22.15 + 2.869 * S µs,
2026 - DB Weight:,
2027 - Read: Agenda,
2028 - Write: Agenda, Lookup,
2029 - Will use base weight of 100 which should be good for up to 30 scheduled calls,
2030 # </weight>
2031 ]
2032 },
2033 {
2034 name: schedule_named,
2035 args: [
2036 {
2037 name: id,
2038 type: Bytes
2039 },
2040 {
2041 name: when,
2042 type: BlockNumber
2043 },
2044 {
2045 name: maybe_periodic,
2046 type: Option<Period>
2047 },
2048 {
2049 name: priority,
2050 type: Priority
2051 },
2052 {
2053 name: call,
2054 type: Call
2055 }
2056 ],
2057 docs: [
2058 Schedule a named task.,
2059 ,
2060 # <weight>,
2061 - S = Number of already scheduled calls,
2062 - Base Weight: 29.6 + .159 * S µs,
2063 - DB Weight:,
2064 - Read: Agenda, Lookup,
2065 - Write: Agenda, Lookup,
2066 - Will use base weight of 35 which should be good for more than 30 scheduled calls,
2067 # </weight>
2068 ]
2069 },
2070 {
2071 name: cancel_named,
2072 args: [
2073 {
2074 name: id,
2075 type: Bytes
2076 }
2077 ],
2078 docs: [
2079 Cancel a named scheduled task.,
2080 ,
2081 # <weight>,
2082 - S = Number of already scheduled calls,
2083 - Base Weight: 24.91 + 2.907 * S µs,
2084 - DB Weight:,
2085 - Read: Agenda, Lookup,
2086 - Write: Agenda, Lookup,
2087 - Will use base weight of 100 which should be good for up to 30 scheduled calls,
2088 # </weight>
2089 ]
2090 },
2091 {
2092 name: schedule_after,
2093 args: [
2094 {
2095 name: after,
2096 type: BlockNumber
2097 },
2098 {
2099 name: maybe_periodic,
2100 type: Option<Period>
2101 },
2102 {
2103 name: priority,
2104 type: Priority
2105 },
2106 {
2107 name: call,
2108 type: Call
2109 }
2110 ],
2111 docs: [
2112 Anonymously schedule a task after a delay.,
2113 ,
2114 # <weight>,
2115 Same as [`schedule`].,
2116 # </weight>
2117 ]
2118 },
2119 {
2120 name: schedule_named_after,
2121 args: [
2122 {
2123 name: id,
2124 type: Bytes
2125 },
2126 {
2127 name: after,
2128 type: BlockNumber
2129 },
2130 {
2131 name: maybe_periodic,
2132 type: Option<Period>
2133 },
2134 {
2135 name: priority,
2136 type: Priority
2137 },
2138 {
2139 name: call,
2140 type: Call
2141 }
2142 ],
2143 docs: [
2144 Schedule a named task after a delay.,
2145 ,
2146 # <weight>,
2147 Same as [`schedule_named`].,
2148 # </weight>
2149 ]
2150 }
2151 ],
2152 events: [
2153 {
2154 name: Scheduled,
2155 args: [
2156 BlockNumber,
2157 u32
2158 ],
2159 docs: [
2160 Scheduled some task. [when, index]
2161 ]
2162 },
2163 {
2164 name: Canceled,
2165 args: [
2166 BlockNumber,
2167 u32
2168 ],
2169 docs: [
2170 Canceled some task. [when, index]
2171 ]
2172 },
2173 {
2174 name: Dispatched,
2175 args: [
2176 TaskAddress,
2177 Option<Bytes>,
2178 DispatchResult
2179 ],
2180 docs: [
2181 Dispatched some task. [task, id, result]
2182 ]
2183 }
2184 ],
2185 constants: [],
2186 errors: [
2187 {
2188 name: FailedToSchedule,
2189 docs: [
2190 Failed to schedule a call
2191 ]
2192 },
2193 {
2194 name: NotFound,
2195 docs: [
2196 Cannot find the scheduled call.
2197 ]
2198 },
2199 {
2200 name: TargetBlockNumberInPast,
2201 docs: [
2202 Given target block number is in the past.
2203 ]
2204 },
2205 {
2206 name: RescheduleNoChange,
2207 docs: [
2208 Reschedule failed because it does not change scheduled time.
2209 ]
2210 }
2211 ],
2212 index: 7
2213 },
2214 {
2215 name: ParachainInfo,
2216 storage: {
2217 prefix: ParachainInfo,
2218 items: [
2219 {
2220 name: ParachainId,
2221 modifier: Default,
2222 type: {
2223 Plain: ParaId
2224 },
2225 fallback: 0x64000000,
2226 docs: []
2227 }
2228 ]
2229 },
2230 calls: null,
2231 events: null,
2232 constants: [],
2233 errors: [],
2234 index: 20
2235 },
2236 {
2237 name: ParachainSystem,
2238 storage: {
2239 prefix: ParachainSystem,
2240 items: [
2241 {
2242 name: PendingRelayChainBlockNumber,
2243 modifier: Optional,
2244 type: {
2245 Plain: RelayChainBlockNumber
2246 },
2247 fallback: 0x00,
2248 docs: [
2249 We need to store the new validation function for the span between,
2250 setting it and applying it. If it has a,
2251 value, then [`PendingValidationCode`] must have a real value, and,
2252 together will coordinate the block number where the upgrade will happen.
2253 ]
2254 },
2255 {
2256 name: PendingValidationCode,
2257 modifier: Default,
2258 type: {
2259 Plain: Bytes
2260 },
2261 fallback: 0x00,
2262 docs: [
2263 The new validation function we will upgrade to when the relay chain,
2264 reaches [`PendingRelayChainBlockNumber`]. A real validation function must,
2265 exist here as long as [`PendingRelayChainBlockNumber`] is set.
2266 ]
2267 },
2268 {
2269 name: ValidationData,
2270 modifier: Optional,
2271 type: {
2272 Plain: PersistedValidationData
2273 },
2274 fallback: 0x00,
2275 docs: [
2276 The [`PersistedValidationData`] set for this block.
2277 ]
2278 },
2279 {
2280 name: DidSetValidationCode,
2281 modifier: Default,
2282 type: {
2283 Plain: bool
2284 },
2285 fallback: 0x00,
2286 docs: [
2287 Were the validation data set to notify the relay chain?
2288 ]
2289 },
2290 {
2291 name: LastUpgrade,
2292 modifier: Default,
2293 type: {
2294 Plain: BlockNumber
2295 },
2296 fallback: 0x00000000,
2297 docs: [
2298 The last relay parent block number at which we signalled the code upgrade.
2299 ]
2300 },
2301 {
2302 name: RelevantMessagingState,
2303 modifier: Optional,
2304 type: {
2305 Plain: MessagingStateSnapshot
2306 },
2307 fallback: 0x00,
2308 docs: [
2309 The snapshot of some state related to messaging relevant to the current parachain as per,
2310 the relay parent.,
2311 ,
2312 This field is meant to be updated each block with the validation data inherent. Therefore,,
2313 before processing of the inherent, e.g. in `on_initialize` this data may be stale.,
2314 ,
2315 This data is also absent from the genesis.
2316 ]
2317 },
2318 {
2319 name: HostConfiguration,
2320 modifier: Optional,
2321 type: {
2322 Plain: AbridgedHostConfiguration
2323 },
2324 fallback: 0x00,
2325 docs: [
2326 The parachain host configuration that was obtained from the relay parent.,
2327 ,
2328 This field is meant to be updated each block with the validation data inherent. Therefore,,
2329 before processing of the inherent, e.g. in `on_initialize` this data may be stale.,
2330 ,
2331 This data is also absent from the genesis.
2332 ]
2333 },
2334 {
2335 name: LastDmqMqcHead,
2336 modifier: Default,
2337 type: {
2338 Plain: MessageQueueChain
2339 },
2340 fallback: 0x0000000000000000000000000000000000000000000000000000000000000000,
2341 docs: [
2342 The last downward message queue chain head we have observed.,
2343 ,
2344 This value is loaded before and saved after processing inbound downward messages carried,
2345 by the system inherent.
2346 ]
2347 },
2348 {
2349 name: LastHrmpMqcHeads,
2350 modifier: Default,
2351 type: {
2352 Plain: BTreeMap<ParaId,MessageQueueChain>
2353 },
2354 fallback: 0x00,
2355 docs: [
2356 The message queue chain heads we have observed per each channel incoming channel.,
2357 ,
2358 This value is loaded before and saved after processing inbound downward messages carried,
2359 by the system inherent.
2360 ]
2361 },
2362 {
2363 name: ProcessedDownwardMessages,
2364 modifier: Default,
2365 type: {
2366 Plain: u32
2367 },
2368 fallback: 0x00000000,
2369 docs: [
2370 Number of downward messages processed in a block.,
2371 ,
2372 This will be cleared in `on_initialize` of each new block.
2373 ]
2374 },
2375 {
2376 name: NewValidationCode,
2377 modifier: Optional,
2378 type: {
2379 Plain: Bytes
2380 },
2381 fallback: 0x00,
2382 docs: [
2383 New validation code that was set in a block.,
2384 ,
2385 This will be cleared in `on_initialize` of each new block if no other pallet already set,
2386 the value.
2387 ]
2388 },
2389 {
2390 name: HrmpWatermark,
2391 modifier: Default,
2392 type: {
2393 Plain: BlockNumber
2394 },
2395 fallback: 0x00000000,
2396 docs: [
2397 HRMP watermark that was set in a block.,
2398 ,
2399 This will be cleared in `on_initialize` of each new block.
2400 ]
2401 },
2402 {
2403 name: HrmpOutboundMessages,
2404 modifier: Default,
2405 type: {
2406 Plain: Vec<OutboundHrmpMessage>
2407 },
2408 fallback: 0x00,
2409 docs: [
2410 HRMP messages that were sent in a block.,
2411 ,
2412 This will be cleared in `on_initialize` of each new block.
2413 ]
2414 },
2415 {
2416 name: UpwardMessages,
2417 modifier: Default,
2418 type: {
2419 Plain: Vec<UpwardMessage>
2420 },
2421 fallback: 0x00,
2422 docs: [
2423 Upward messages that were sent in a block.,
2424 ,
2425 This will be cleared in `on_initialize` of each new block.
2426 ]
2427 },
2428 {
2429 name: PendingUpwardMessages,
2430 modifier: Default,
2431 type: {
2432 Plain: Vec<UpwardMessage>
2433 },
2434 fallback: 0x00,
2435 docs: [
2436 Upward messages that are still pending and not yet send to the relay chain.
2437 ]
2438 },
2439 {
2440 name: AnnouncedHrmpMessagesPerCandidate,
2441 modifier: Default,
2442 type: {
2443 Plain: u32
2444 },
2445 fallback: 0x00000000,
2446 docs: [
2447 The number of HRMP messages we observed in `on_initialize` and thus used that number for,
2448 announcing the weight of `on_initialize` and `on_finalize`.
2449 ]
2450 },
2451 {
2452 name: ReservedXcmpWeightOverride,
2453 modifier: Optional,
2454 type: {
2455 Plain: Weight
2456 },
2457 fallback: 0x00,
2458 docs: [
2459 The weight we reserve at the beginning of the block for processing XCMP messages. This,
2460 overrides the amount set in the Config trait.
2461 ]
2462 },
2463 {
2464 name: ReservedDmpWeightOverride,
2465 modifier: Optional,
2466 type: {
2467 Plain: Weight
2468 },
2469 fallback: 0x00,
2470 docs: [
2471 The weight we reserve at the beginning of the block for processing DMP messages. This,
2472 overrides the amount set in the Config trait.
2473 ]
2474 },
2475 {
2476 name: AuthorizedUpgrade,
2477 modifier: Optional,
2478 type: {
2479 Plain: Hash
2480 },
2481 fallback: 0x00,
2482 docs: [
2483 The next authorized upgrade, if there is one.
2484 ]
2485 }
2486 ]
2487 },
2488 calls: [
2489 {
2490 name: set_upgrade_block,
2491 args: [
2492 {
2493 name: relay_chain_block,
2494 type: RelayChainBlockNumber
2495 }
2496 ],
2497 docs: [
2498 Force an already scheduled validation function upgrade to happen on a particular block.,
2499 ,
2500 Note that coordinating this block for the upgrade has to happen independently on the,
2501 relay chain and this parachain. Synchronizing the block for the upgrade is sensitive,,
2502 and this bypasses all checks and and normal protocols. Very easy to brick your chain,
2503 if done wrong.
2504 ]
2505 },
2506 {
2507 name: set_validation_data,
2508 args: [
2509 {
2510 name: data,
2511 type: ParachainInherentData
2512 }
2513 ],
2514 docs: [
2515 Set the current validation data.,
2516 ,
2517 This should be invoked exactly once per block. It will panic at the finalization,
2518 phase if the call was not invoked.,
2519 ,
2520 The dispatch origin for this call must be `Inherent`,
2521 ,
2522 As a side effect, this function upgrades the current validation function,
2523 if the appropriate time has come.
2524 ]
2525 },
2526 {
2527 name: sudo_send_upward_message,
2528 args: [
2529 {
2530 name: message,
2531 type: UpwardMessage
2532 }
2533 ],
2534 docs: []
2535 },
2536 {
2537 name: authorize_upgrade,
2538 args: [
2539 {
2540 name: code_hash,
2541 type: Hash
2542 }
2543 ],
2544 docs: []
2545 },
2546 {
2547 name: enact_authorized_upgrade,
2548 args: [
2549 {
2550 name: code,
2551 type: Bytes
2552 }
2553 ],
2554 docs: []
2555 }
2556 ],
2557 events: [
2558 {
2559 name: ValidationFunctionStored,
2560 args: [
2561 RelayChainBlockNumber
2562 ],
2563 docs: [
2564 The validation function has been scheduled to apply as of the contained relay chain,
2565 block number.
2566 ]
2567 },
2568 {
2569 name: ValidationFunctionApplied,
2570 args: [
2571 RelayChainBlockNumber
2572 ],
2573 docs: [
2574 The validation function was applied as of the contained relay chain block number.
2575 ]
2576 },
2577 {
2578 name: UpgradeAuthorized,
2579 args: [
2580 Hash
2581 ],
2582 docs: [
2583 An upgrade has been authorized.
2584 ]
2585 },
2586 {
2587 name: DownwardMessagesReceived,
2588 args: [
2589 u32
2590 ],
2591 docs: [
2592 Some downward messages have been received and will be processed.,
2593 [ count ]
2594 ]
2595 },
2596 {
2597 name: DownwardMessagesProcessed,
2598 args: [
2599 Weight,
2600 Hash
2601 ],
2602 docs: [
2603 Downward messages were processed using the given weight.,
2604 [ weight_used, result_mqc_head ]
2605 ]
2606 }
2607 ],
2608 constants: [],
2609 errors: [
2610 {
2611 name: OverlappingUpgrades,
2612 docs: [
2613 Attempt to upgrade validation function while existing upgrade pending
2614 ]
2615 },
2616 {
2617 name: ProhibitedByPolkadot,
2618 docs: [
2619 Polkadot currently prohibits this parachain from upgrading its validation function
2620 ]
2621 },
2622 {
2623 name: TooBig,
2624 docs: [
2625 The supplied validation function has compiled into a blob larger than Polkadot is,
2626 willing to run
2627 ]
2628 },
2629 {
2630 name: ValidationDataNotAvailable,
2631 docs: [
2632 The inherent which supplies the validation data did not run this block
2633 ]
2634 },
2635 {
2636 name: HostConfigurationNotAvailable,
2637 docs: [
2638 The inherent which supplies the host configuration did not run this block
2639 ]
2640 },
2641 {
2642 name: NotScheduled,
2643 docs: [
2644 No validation function upgrade is currently scheduled.
2645 ]
2646 },
2647 {
2648 name: NothingAuthorized,
2649 docs: [
2650 No code upgrade has been authorized.
2651 ]
2652 },
2653 {
2654 name: Unauthorized,
2655 docs: [
2656 The given code upgrade has not been authorized.
2657 ]
2658 }
2659 ],
2660 index: 21
2661 },
2662 {
2663 name: Balances,
2664 storage: {
2665 prefix: Balances,
2666 items: [
2667 {
2668 name: TotalIssuance,
2669 modifier: Default,
2670 type: {
2671 Plain: Balance
2672 },
2673 fallback: 0x00000000000000000000000000000000,
2674 docs: [
2675 The total units issued in the system.
2676 ]
2677 },
2678 {
2679 name: Account,
2680 modifier: Default,
2681 type: {
2682 Map: {
2683 hasher: Blake2_128Concat,
2684 key: AccountId,
2685 value: AccountData,
2686 linked: false
2687 }
2688 },
2689 fallback: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,
2690 docs: [
2691 The balance of an account.,
2692 ,
2693 NOTE: This is only used in the case that this pallet is used to store balances.
2694 ]
2695 },
2696 {
2697 name: Locks,
2698 modifier: Default,
2699 type: {
2700 Map: {
2701 hasher: Blake2_128Concat,
2702 key: AccountId,
2703 value: Vec<BalanceLock>,
2704 linked: false
2705 }
2706 },
2707 fallback: 0x00,
2708 docs: [
2709 Any liquidity locks on some account balances.,
2710 NOTE: Should only be accessed when setting, changing and freeing a lock.
2711 ]
2712 },
2713 {
2714 name: Reserves,
2715 modifier: Default,
2716 type: {
2717 Map: {
2718 hasher: Blake2_128Concat,
2719 key: AccountId,
2720 value: Vec<ReserveData>,
2721 linked: false
2722 }
2723 },
2724 fallback: 0x00,
2725 docs: [
2726 Named reserves on some account balances.
2727 ]
2728 },
2729 {
2730 name: StorageVersion,
2731 modifier: Default,
2732 type: {
2733 Plain: Releases
2734 },
2735 fallback: 0x00,
2736 docs: [
2737 Storage version of the pallet.,
2738 ,
2739 This is set to v2.0.0 for new networks.
2740 ]
2741 }
2742 ]
2743 },
2744 calls: [
2745 {
2746 name: transfer,
2747 args: [
2748 {
2749 name: dest,
2750 type: LookupSource
2751 },
2752 {
2753 name: value,
2754 type: Compact<Balance>
2755 }
2756 ],
2757 docs: [
2758 Transfer some liquid free balance to another account.,
2759 ,
2760 `transfer` will set the `FreeBalance` of the sender and receiver.,
2761 It will decrease the total issuance of the system by the `TransferFee`.,
2762 If the sender's account is below the existential deposit as a result,
2763 of the transfer, the account will be reaped.,
2764 ,
2765 The dispatch origin for this call must be `Signed` by the transactor.,
2766 ,
2767 # <weight>,
2768 - Dependent on arguments but not critical, given proper implementations for,
2769 input config types. See related functions below.,
2770 - It contains a limited number of reads and writes internally and no complex computation.,
2771 ,
2772 Related functions:,
2773 ,
2774 - `ensure_can_withdraw` is always called internally but has a bounded complexity.,
2775 - Transferring balances to accounts that did not exist before will cause,
2776 `T::OnNewAccount::on_new_account` to be called.,
2777 - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`.,
2778 - `transfer_keep_alive` works the same way as `transfer`, but has an additional,
2779 check that the transfer will not kill the origin account.,
2780 ---------------------------------,
2781 - Base Weight: 73.64 µs, worst case scenario (account created, account removed),
2782 - DB Weight: 1 Read and 1 Write to destination account,
2783 - Origin account is already in memory, so no DB operations for them.,
2784 # </weight>
2785 ]
2786 },
2787 {
2788 name: set_balance,
2789 args: [
2790 {
2791 name: who,
2792 type: LookupSource
2793 },
2794 {
2795 name: new_free,
2796 type: Compact<Balance>
2797 },
2798 {
2799 name: new_reserved,
2800 type: Compact<Balance>
2801 }
2802 ],
2803 docs: [
2804 Set the balances of a given account.,
2805 ,
2806 This will alter `FreeBalance` and `ReservedBalance` in storage. it will,
2807 also decrease the total issuance of the system (`TotalIssuance`).,
2808 If the new free or reserved balance is below the existential deposit,,
2809 it will reset the account nonce (`frame_system::AccountNonce`).,
2810 ,
2811 The dispatch origin for this call is `root`.,
2812 ,
2813 # <weight>,
2814 - Independent of the arguments.,
2815 - Contains a limited number of reads and writes.,
2816 ---------------------,
2817 - Base Weight:,
2818 - Creating: 27.56 µs,
2819 - Killing: 35.11 µs,
2820 - DB Weight: 1 Read, 1 Write to `who`,
2821 # </weight>
2822 ]
2823 },
2824 {
2825 name: force_transfer,
2826 args: [
2827 {
2828 name: source,
2829 type: LookupSource
2830 },
2831 {
2832 name: dest,
2833 type: LookupSource
2834 },
2835 {
2836 name: value,
2837 type: Compact<Balance>
2838 }
2839 ],
2840 docs: [
2841 Exactly as `transfer`, except the origin must be root and the source account may be,
2842 specified.,
2843 # <weight>,
2844 - Same as transfer, but additional read and write because the source account is,
2845 not assumed to be in the overlay.,
2846 # </weight>
2847 ]
2848 },
2849 {
2850 name: transfer_keep_alive,
2851 args: [
2852 {
2853 name: dest,
2854 type: LookupSource
2855 },
2856 {
2857 name: value,
2858 type: Compact<Balance>
2859 }
2860 ],
2861 docs: [
2862 Same as the [`transfer`] call, but with a check that the transfer will not kill the,
2863 origin account.,
2864 ,
2865 99% of the time you want [`transfer`] instead.,
2866 ,
2867 [`transfer`]: struct.Pallet.html#method.transfer,
2868 # <weight>,
2869 - Cheaper than transfer because account cannot be killed.,
2870 - Base Weight: 51.4 µs,
2871 - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already),
2872 #</weight>
2873 ]
2874 },
2875 {
2876 name: transfer_all,
2877 args: [
2878 {
2879 name: dest,
2880 type: LookupSource
2881 },
2882 {
2883 name: keep_alive,
2884 type: bool
2885 }
2886 ],
2887 docs: [
2888 Transfer the entire transferable balance from the caller account.,
2889 ,
2890 NOTE: This function only attempts to transfer _transferable_ balances. This means that,
2891 any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be,
2892 transferred by this function. To ensure that this function results in a killed account,,
2893 you might need to prepare the account by removing any reference counters, storage,
2894 deposits, etc...,
2895 ,
2896 The dispatch origin of this call must be Signed.,
2897 ,
2898 - `dest`: The recipient of the transfer.,
2899 - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all,
2900 of the funds the account has, causing the sender account to be killed (false), or,
2901 transfer everything except at least the existential deposit, which will guarantee to,
2902 keep the sender account alive (true).,
2903 # <weight>,
2904 - O(1). Just like transfer, but reading the user's transferable balance first.,
2905 #</weight>
2906 ]
2907 }
2908 ],
2909 events: [
2910 {
2911 name: Endowed,
2912 args: [
2913 AccountId,
2914 Balance
2915 ],
2916 docs: [
2917 An account was created with some free balance. [account, free_balance]
2918 ]
2919 },
2920 {
2921 name: DustLost,
2922 args: [
2923 AccountId,
2924 Balance
2925 ],
2926 docs: [
2927 An account was removed whose balance was non-zero but below ExistentialDeposit,,
2928 resulting in an outright loss. [account, balance]
2929 ]
2930 },
2931 {
2932 name: Transfer,
2933 args: [
2934 AccountId,
2935 AccountId,
2936 Balance
2937 ],
2938 docs: [
2939 Transfer succeeded. [from, to, value]
2940 ]
2941 },
2942 {
2943 name: BalanceSet,
2944 args: [
2945 AccountId,
2946 Balance,
2947 Balance
2948 ],
2949 docs: [
2950 A balance was set by root. [who, free, reserved]
2951 ]
2952 },
2953 {
2954 name: Deposit,
2955 args: [
2956 AccountId,
2957 Balance
2958 ],
2959 docs: [
2960 Some amount was deposited (e.g. for transaction fees). [who, deposit]
2961 ]
2962 },
2963 {
2964 name: Reserved,
2965 args: [
2966 AccountId,
2967 Balance
2968 ],
2969 docs: [
2970 Some balance was reserved (moved from free to reserved). [who, value]
2971 ]
2972 },
2973 {
2974 name: Unreserved,
2975 args: [
2976 AccountId,
2977 Balance
2978 ],
2979 docs: [
2980 Some balance was unreserved (moved from reserved to free). [who, value]
2981 ]
2982 },
2983 {
2984 name: ReserveRepatriated,
2985 args: [
2986 AccountId,
2987 AccountId,
2988 Balance,
2989 Status
2990 ],
2991 docs: [
2992 Some balance was moved from the reserve of the first account to the second account.,
2993 Final argument indicates the destination balance type.,
2994 [from, to, balance, destination_status]
2995 ]
2996 }
2997 ],
2998 constants: [
2999 {
3000 name: ExistentialDeposit,
3001 type: Balance,
3002 value: 0x00e40b54020000000000000000000000,
3003 docs: [
3004 The minimum amount required to keep an account open.
3005 ]
3006 }
3007 ],
3008 errors: [
3009 {
3010 name: VestingBalance,
3011 docs: [
3012 Vesting balance too high to send value
3013 ]
3014 },
3015 {
3016 name: LiquidityRestrictions,
3017 docs: [
3018 Account liquidity restrictions prevent withdrawal
3019 ]
3020 },
3021 {
3022 name: InsufficientBalance,
3023 docs: [
3024 Balance too low to send value
3025 ]
3026 },
3027 {
3028 name: ExistentialDeposit,
3029 docs: [
3030 Value too low to create account due to existential deposit
3031 ]
3032 },
3033 {
3034 name: KeepAlive,
3035 docs: [
3036 Transfer/payment would kill account
3037 ]
3038 },
3039 {
3040 name: ExistingVestingSchedule,
3041 docs: [
3042 A vesting schedule already exists for this account
3043 ]
3044 },
3045 {
3046 name: DeadAccount,
3047 docs: [
3048 Beneficiary account must pre-exist
3049 ]
3050 },
3051 {
3052 name: TooManyReserves,
3053 docs: [
3054 Number of named reserves exceed MaxReserves
3055 ]
3056 }
3057 ],
3058 index: 40
3059 },
3060 {
3061 name: TransactionPayment,
3062 storage: {
3063 prefix: TransactionPayment,
3064 items: [
3065 {
3066 name: NextFeeMultiplier,
3067 modifier: Default,
3068 type: {
3069 Plain: Multiplier
3070 },
3071 fallback: 0x000064a7b3b6e00d0000000000000000,
3072 docs: []
3073 },
3074 {
3075 name: StorageVersion,
3076 modifier: Default,
3077 type: {
3078 Plain: Releases
3079 },
3080 fallback: 0x00,
3081 docs: []
3082 }
3083 ]
3084 },
3085 calls: null,
3086 events: null,
3087 constants: [
3088 {
3089 name: TransactionByteFee,
3090 type: BalanceOf,
3091 value: 0x00e1f505000000000000000000000000,
3092 docs: [
3093 The fee to be paid for making a transaction; the per-byte portion.
3094 ]
3095 },
3096 {
3097 name: WeightToFee,
3098 type: Vec<WeightToFeeCoefficient>,
3099 value: 0x0401000000000000000000000000000000000000000001,
3100 docs: [
3101 The polynomial that is applied in order to derive fee from weight.
3102 ]
3103 }
3104 ],
3105 errors: [],
3106 index: 41
3107 },
3108 {
3109 name: Authorship,
3110 storage: {
3111 prefix: Authorship,
3112 items: [
3113 {
3114 name: Uncles,
3115 modifier: Default,
3116 type: {
3117 Plain: Vec<UncleEntryItem>
3118 },
3119 fallback: 0x00,
3120 docs: [
3121 Uncles
3122 ]
3123 },
3124 {
3125 name: Author,
3126 modifier: Optional,
3127 type: {
3128 Plain: AccountId
3129 },
3130 fallback: 0x00,
3131 docs: [
3132 Author of current block.
3133 ]
3134 },
3135 {
3136 name: DidSetUncles,
3137 modifier: Default,
3138 type: {
3139 Plain: bool
3140 },
3141 fallback: 0x00,
3142 docs: [
3143 Whether uncles were already set in this block.
3144 ]
3145 }
3146 ]
3147 },
3148 calls: [
3149 {
3150 name: set_uncles,
3151 args: [
3152 {
3153 name: new_uncles,
3154 type: Vec<Header>
3155 }
3156 ],
3157 docs: [
3158 Provide a set of uncles.
3159 ]
3160 }
3161 ],
3162 events: null,
3163 constants: [],
3164 errors: [
3165 {
3166 name: InvalidUncleParent,
3167 docs: [
3168 The uncle parent not in the chain.
3169 ]
3170 },
3171 {
3172 name: UnclesAlreadySet,
3173 docs: [
3174 Uncles already set in the block.
3175 ]
3176 },
3177 {
3178 name: TooManyUncles,
3179 docs: [
3180 Too many uncles.
3181 ]
3182 },
3183 {
3184 name: GenesisUncle,
3185 docs: [
3186 The uncle is genesis.
3187 ]
3188 },
3189 {
3190 name: TooHighUncle,
3191 docs: [
3192 The uncle is too high in chain.
3193 ]
3194 },
3195 {
3196 name: UncleAlreadyIncluded,
3197 docs: [
3198 The uncle is already included.
3199 ]
3200 },
3201 {
3202 name: OldUncle,
3203 docs: [
3204 The uncle isn't recent enough to be included.
3205 ]
3206 }
3207 ],
3208 index: 50
3209 },
3210 {
3211 name: CollatorSelection,
3212 storage: {
3213 prefix: CollatorSelection,
3214 items: [
3215 {
3216 name: Invulnerables,
3217 modifier: Default,
3218 type: {
3219 Plain: Vec<AccountId>
3220 },
3221 fallback: 0x00,
3222 docs: [
3223 The invulnerable, fixed collators.
3224 ]
3225 },
3226 {
3227 name: Candidates,
3228 modifier: Default,
3229 type: {
3230 Plain: Vec<CandidateInfo>
3231 },
3232 fallback: 0x00,
3233 docs: [
3234 The (community, limited) collation candidates.
3235 ]
3236 },
3237 {
3238 name: LastAuthoredBlock,
3239 modifier: Default,
3240 type: {
3241 Map: {
3242 hasher: Twox64Concat,
3243 key: AccountId,
3244 value: BlockNumber,
3245 linked: false
3246 }
3247 },
3248 fallback: 0x00000000,
3249 docs: [
3250 Last block authored by collator.
3251 ]
3252 },
3253 {
3254 name: DesiredCandidates,
3255 modifier: Default,
3256 type: {
3257 Plain: u32
3258 },
3259 fallback: 0x00000000,
3260 docs: [
3261 Desired number of candidates.,
3262 ,
3263 This should ideally always be less than [`Config::MaxCandidates`] for weights to be correct.
3264 ]
3265 },
3266 {
3267 name: CandidacyBond,
3268 modifier: Default,
3269 type: {
3270 Plain: BalanceOf
3271 },
3272 fallback: 0x00000000000000000000000000000000,
3273 docs: [
3274 Fixed deposit bond for each candidate.
3275 ]
3276 }
3277 ]
3278 },
3279 calls: [
3280 {
3281 name: set_invulnerables,
3282 args: [
3283 {
3284 name: new,
3285 type: Vec<AccountId>
3286 }
3287 ],
3288 docs: []
3289 },
3290 {
3291 name: set_desired_candidates,
3292 args: [
3293 {
3294 name: max,
3295 type: u32
3296 }
3297 ],
3298 docs: []
3299 },
3300 {
3301 name: set_candidacy_bond,
3302 args: [
3303 {
3304 name: bond,
3305 type: BalanceOf
3306 }
3307 ],
3308 docs: []
3309 },
3310 {
3311 name: register_as_candidate,
3312 args: [],
3313 docs: []
3314 },
3315 {
3316 name: leave_intent,
3317 args: [],
3318 docs: []
3319 }
3320 ],
3321 events: [
3322 {
3323 name: NewInvulnerables,
3324 args: [
3325 Vec<AccountId>
3326 ],
3327 docs: []
3328 },
3329 {
3330 name: NewDesiredCandidates,
3331 args: [
3332 u32
3333 ],
3334 docs: []
3335 },
3336 {
3337 name: NewCandidacyBond,
3338 args: [
3339 Balance
3340 ],
3341 docs: []
3342 },
3343 {
3344 name: CandidateAdded,
3345 args: [
3346 AccountId,
3347 Balance
3348 ],
3349 docs: []
3350 },
3351 {
3352 name: CandidateRemoved,
3353 args: [
3354 AccountId
3355 ],
3356 docs: []
3357 }
3358 ],
3359 constants: [],
3360 errors: [
3361 {
3362 name: TooManyCandidates,
3363 docs: [
3364 Too many candidates
3365 ]
3366 },
3367 {
3368 name: TooFewCandidates,
3369 docs: [
3370 Too few candidates
3371 ]
3372 },
3373 {
3374 name: Unknown,
3375 docs: [
3376 Unknown error
3377 ]
3378 },
3379 {
3380 name: Permission,
3381 docs: [
3382 Permission issue
3383 ]
3384 },
3385 {
3386 name: AlreadyCandidate,
3387 docs: [
3388 User is already a candidate
3389 ]
3390 },
3391 {
3392 name: NotCandidate,
3393 docs: [
3394 User is not a candidate
3395 ]
3396 },
3397 {
3398 name: AlreadyInvulnerable,
3399 docs: [
3400 User is already an Invulnerable
3401 ]
3402 },
3403 {
3404 name: NoAssociatedValidatorId,
3405 docs: [
3406 Account has no associated validator ID
3407 ]
3408 },
3409 {
3410 name: ValidatorNotRegistered,
3411 docs: [
3412 Validator ID is not yet registered
3413 ]
3414 }
3415 ],
3416 index: 51
3417 },
3418 {
3419 name: Session,
3420 storage: {
3421 prefix: Session,
3422 items: [
3423 {
3424 name: Validators,
3425 modifier: Default,
3426 type: {
3427 Plain: Vec<ValidatorId>
3428 },
3429 fallback: 0x00,
3430 docs: [
3431 The current set of validators.
3432 ]
3433 },
3434 {
3435 name: CurrentIndex,
3436 modifier: Default,
3437 type: {
3438 Plain: SessionIndex
3439 },
3440 fallback: 0x00000000,
3441 docs: [
3442 Current index of the session.
3443 ]
3444 },
3445 {
3446 name: QueuedChanged,
3447 modifier: Default,
3448 type: {
3449 Plain: bool
3450 },
3451 fallback: 0x00,
3452 docs: [
3453 True if the underlying economic identities or weighting behind the validators,
3454 has changed in the queued validator set.
3455 ]
3456 },
3457 {
3458 name: QueuedKeys,
3459 modifier: Default,
3460 type: {
3461 Plain: Vec<(ValidatorId,Keys)>
3462 },
3463 fallback: 0x00,
3464 docs: [
3465 The queued keys for the next session. When the next session begins, these keys,
3466 will be used to determine the validator's session keys.
3467 ]
3468 },
3469 {
3470 name: DisabledValidators,
3471 modifier: Default,
3472 type: {
3473 Plain: Vec<u32>
3474 },
3475 fallback: 0x00,
3476 docs: [
3477 Indices of disabled validators.,
3478 ,
3479 The set is cleared when `on_session_ending` returns a new set of identities.
3480 ]
3481 },
3482 {
3483 name: NextKeys,
3484 modifier: Optional,
3485 type: {
3486 Map: {
3487 hasher: Twox64Concat,
3488 key: ValidatorId,
3489 value: Keys,
3490 linked: false
3491 }
3492 },
3493 fallback: 0x00,
3494 docs: [
3495 The next session keys for a validator.
3496 ]
3497 },
3498 {
3499 name: KeyOwner,
3500 modifier: Optional,
3501 type: {
3502 Map: {
3503 hasher: Twox64Concat,
3504 key: (KeyTypeId,Bytes),
3505 value: ValidatorId,
3506 linked: false
3507 }
3508 },
3509 fallback: 0x00,
3510 docs: [
3511 The owner of a key. The key is the `KeyTypeId` + the encoded key.
3512 ]
3513 }
3514 ]
3515 },
3516 calls: [
3517 {
3518 name: set_keys,
3519 args: [
3520 {
3521 name: keys,
3522 type: Keys
3523 },
3524 {
3525 name: proof,
3526 type: Bytes
3527 }
3528 ],
3529 docs: [
3530 Sets the session key(s) of the function caller to `keys`.,
3531 Allows an account to set its session key prior to becoming a validator.,
3532 This doesn't take effect until the next session.,
3533 ,
3534 The dispatch origin of this function must be signed.,
3535 ,
3536 # <weight>,
3537 - Complexity: `O(1)`,
3538 Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed.,
3539 - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys`,
3540 - DbWrites: `origin account`, `NextKeys`,
3541 - DbReads per key id: `KeyOwner`,
3542 - DbWrites per key id: `KeyOwner`,
3543 # </weight>
3544 ]
3545 },
3546 {
3547 name: purge_keys,
3548 args: [],
3549 docs: [
3550 Removes any session key(s) of the function caller.,
3551 This doesn't take effect until the next session.,
3552 ,
3553 The dispatch origin of this function must be signed.,
3554 ,
3555 # <weight>,
3556 - Complexity: `O(1)` in number of key types.,
3557 Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed.,
3558 - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account`,
3559 - DbWrites: `NextKeys`, `origin account`,
3560 - DbWrites per key id: `KeyOwner`,
3561 # </weight>
3562 ]
3563 }
3564 ],
3565 events: [
3566 {
3567 name: NewSession,
3568 args: [
3569 SessionIndex
3570 ],
3571 docs: [
3572 New session has happened. Note that the argument is the [session_index], not the block,
3573 number as the type might suggest.
3574 ]
3575 }
3576 ],
3577 constants: [],
3578 errors: [
3579 {
3580 name: InvalidProof,
3581 docs: [
3582 Invalid ownership proof.
3583 ]
3584 },
3585 {
3586 name: NoAssociatedValidatorId,
3587 docs: [
3588 No associated validator ID for account.
3589 ]
3590 },
3591 {
3592 name: DuplicatedKey,
3593 docs: [
3594 Registered duplicate key.
3595 ]
3596 },
3597 {
3598 name: NoKeys,
3599 docs: [
3600 No keys are associated with this account.
3601 ]
3602 },
3603 {
3604 name: NoAccount,
3605 docs: [
3606 Key setting account is not live, so it's impossible to associate keys.
3607 ]
3608 }
3609 ],
3610 index: 52
3611 },
3612 {
3613 name: Aura,
3614 storage: {
3615 prefix: Aura,
3616 items: [
3617 {
3618 name: Authorities,
3619 modifier: Default,
3620 type: {
3621 Plain: Vec<AuthorityId>
3622 },
3623 fallback: 0x00,
3624 docs: [
3625 The current authority set.
3626 ]
3627 },
3628 {
3629 name: CurrentSlot,
3630 modifier: Default,
3631 type: {
3632 Plain: Slot
3633 },
3634 fallback: 0x0000000000000000,
3635 docs: [
3636 The current slot of this block.,
3637 ,
3638 This will be set in `on_initialize`.
3639 ]
3640 }
3641 ]
3642 },
3643 calls: null,
3644 events: null,
3645 constants: [],
3646 errors: [],
3647 index: 53
3648 },
3649 {
3650 name: AuraExt,
3651 storage: {
3652 prefix: AuraExt,
3653 items: [
3654 {
3655 name: Authorities,
3656 modifier: Default,
3657 type: {
3658 Plain: Vec<AuthorityId>
3659 },
3660 fallback: 0x00,
3661 docs: [
3662 Serves as cache for the authorities.,
3663 ,
3664 The authorities in AuRa are overwritten in `on_initialize` when we switch to a new session,,
3665 but we require the old authorities to verify the seal when validating a PoV. This will always,
3666 be updated to the latest AuRa authorities in `on_finalize`.
3667 ]
3668 }
3669 ]
3670 },
3671 calls: null,
3672 events: null,
3673 constants: [],
3674 errors: [],
3675 index: 54
3676 },
3677 {
3678 name: Identity,
3679 storage: {
3680 prefix: Identity,
3681 items: [
3682 {
3683 name: IdentityOf,
3684 modifier: Optional,
3685 type: {
3686 Map: {
3687 hasher: Twox64Concat,
3688 key: AccountId,
3689 value: Registration,
3690 linked: false
3691 }
3692 },
3693 fallback: 0x00,
3694 docs: [
3695 Information that is pertinent to identify the entity behind an account.,
3696 ,
3697 TWOX-NOTE: OK ― `AccountId` is a secure hash.
3698 ]
3699 },
3700 {
3701 name: SuperOf,
3702 modifier: Optional,
3703 type: {
3704 Map: {
3705 hasher: Blake2_128Concat,
3706 key: AccountId,
3707 value: (AccountId,Data),
3708 linked: false
3709 }
3710 },
3711 fallback: 0x00,
3712 docs: [
3713 The super-identity of an alternative sub identity together with its name, within that,
3714 context. If the account is not some other account's sub-identity, then just `None`.
3715 ]
3716 },
3717 {
3718 name: SubsOf,
3719 modifier: Default,
3720 type: {
3721 Map: {
3722 hasher: Twox64Concat,
3723 key: AccountId,
3724 value: (BalanceOf,Vec<AccountId>),
3725 linked: false
3726 }
3727 },
3728 fallback: 0x0000000000000000000000000000000000,
3729 docs: [
3730 Alternative sub identities of this account.,
3731 ,
3732 The first item is the deposit, the second is a vector of the accounts.,
3733 ,
3734 TWOX-NOTE: OK ― `AccountId` is a secure hash.
3735 ]
3736 },
3737 {
3738 name: Registrars,
3739 modifier: Default,
3740 type: {
3741 Plain: Vec<Option<RegistrarInfo>>
3742 },
3743 fallback: 0x00,
3744 docs: [
3745 The set of registrars. Not expected to get very big as can only be added through a,
3746 special origin (likely a council motion).,
3747 ,
3748 The index into this can be cast to `RegistrarIndex` to get a valid value.
3749 ]
3750 }
3751 ]
3752 },
3753 calls: [
3754 {
3755 name: add_registrar,
3756 args: [
3757 {
3758 name: account,
3759 type: AccountId
3760 }
3761 ],
3762 docs: [
3763 Add a registrar to the system.,
3764 ,
3765 The dispatch origin for this call must be `T::RegistrarOrigin`.,
3766 ,
3767 - `account`: the account of the registrar.,
3768 ,
3769 Emits `RegistrarAdded` if successful.,
3770 ,
3771 # <weight>,
3772 - `O(R)` where `R` registrar-count (governance-bounded and code-bounded).,
3773 - One storage mutation (codec `O(R)`).,
3774 - One event.,
3775 # </weight>
3776 ]
3777 },
3778 {
3779 name: set_identity,
3780 args: [
3781 {
3782 name: info,
3783 type: IdentityInfo
3784 }
3785 ],
3786 docs: [
3787 Set an account's identity information and reserve the appropriate deposit.,
3788 ,
3789 If the account already has identity information, the deposit is taken as part payment,
3790 for the new deposit.,
3791 ,
3792 The dispatch origin for this call must be _Signed_.,
3793 ,
3794 - `info`: The identity information.,
3795 ,
3796 Emits `IdentitySet` if successful.,
3797 ,
3798 # <weight>,
3799 - `O(X + X' + R)`,
3800 - where `X` additional-field-count (deposit-bounded and code-bounded),
3801 - where `R` judgements-count (registrar-count-bounded),
3802 - One balance reserve operation.,
3803 - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`).,
3804 - One event.,
3805 # </weight>
3806 ]
3807 },
3808 {
3809 name: set_subs,
3810 args: [
3811 {
3812 name: subs,
3813 type: Vec<(AccountId,Data)>
3814 }
3815 ],
3816 docs: [
3817 Set the sub-accounts of the sender.,
3818 ,
3819 Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned,
3820 and an amount `SubAccountDeposit` will be reserved for each item in `subs`.,
3821 ,
3822 The dispatch origin for this call must be _Signed_ and the sender must have a registered,
3823 identity.,
3824 ,
3825 - `subs`: The identity's (new) sub-accounts.,
3826 ,
3827 # <weight>,
3828 - `O(P + S)`,
3829 - where `P` old-subs-count (hard- and deposit-bounded).,
3830 - where `S` subs-count (hard- and deposit-bounded).,
3831 - At most one balance operations.,
3832 - DB:,
3833 - `P + S` storage mutations (codec complexity `O(1)`),
3834 - One storage read (codec complexity `O(P)`).,
3835 - One storage write (codec complexity `O(S)`).,
3836 - One storage-exists (`IdentityOf::contains_key`).,
3837 # </weight>
3838 ]
3839 },
3840 {
3841 name: clear_identity,
3842 args: [],
3843 docs: [
3844 Clear an account's identity info and all sub-accounts and return all deposits.,
3845 ,
3846 Payment: All reserved balances on the account are returned.,
3847 ,
3848 The dispatch origin for this call must be _Signed_ and the sender must have a registered,
3849 identity.,
3850 ,
3851 Emits `IdentityCleared` if successful.,
3852 ,
3853 # <weight>,
3854 - `O(R + S + X)`,
3855 - where `R` registrar-count (governance-bounded).,
3856 - where `S` subs-count (hard- and deposit-bounded).,
3857 - where `X` additional-field-count (deposit-bounded and code-bounded).,
3858 - One balance-unreserve operation.,
3859 - `2` storage reads and `S + 2` storage deletions.,
3860 - One event.,
3861 # </weight>
3862 ]
3863 },
3864 {
3865 name: request_judgement,
3866 args: [
3867 {
3868 name: reg_index,
3869 type: Compact<RegistrarIndex>
3870 },
3871 {
3872 name: max_fee,
3873 type: Compact<BalanceOf>
3874 }
3875 ],
3876 docs: [
3877 Request a judgement from a registrar.,
3878 ,
3879 Payment: At most `max_fee` will be reserved for payment to the registrar if judgement,
3880 given.,
3881 ,
3882 The dispatch origin for this call must be _Signed_ and the sender must have a,
3883 registered identity.,
3884 ,
3885 - `reg_index`: The index of the registrar whose judgement is requested.,
3886 - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:,
3887 ,
3888 ```nocompile,
3889 Self::registrars().get(reg_index).unwrap().fee,
3890 ```,
3891 ,
3892 Emits `JudgementRequested` if successful.,
3893 ,
3894 # <weight>,
3895 - `O(R + X)`.,
3896 - One balance-reserve operation.,
3897 - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`.,
3898 - One event.,
3899 # </weight>
3900 ]
3901 },
3902 {
3903 name: cancel_request,
3904 args: [
3905 {
3906 name: reg_index,
3907 type: RegistrarIndex
3908 }
3909 ],
3910 docs: [
3911 Cancel a previous request.,
3912 ,
3913 Payment: A previously reserved deposit is returned on success.,
3914 ,
3915 The dispatch origin for this call must be _Signed_ and the sender must have a,
3916 registered identity.,
3917 ,
3918 - `reg_index`: The index of the registrar whose judgement is no longer requested.,
3919 ,
3920 Emits `JudgementUnrequested` if successful.,
3921 ,
3922 # <weight>,
3923 - `O(R + X)`.,
3924 - One balance-reserve operation.,
3925 - One storage mutation `O(R + X)`.,
3926 - One event,
3927 # </weight>
3928 ]
3929 },
3930 {
3931 name: set_fee,
3932 args: [
3933 {
3934 name: index,
3935 type: Compact<RegistrarIndex>
3936 },
3937 {
3938 name: fee,
3939 type: Compact<BalanceOf>
3940 }
3941 ],
3942 docs: [
3943 Set the fee required for a judgement to be requested from a registrar.,
3944 ,
3945 The dispatch origin for this call must be _Signed_ and the sender must be the account,
3946 of the registrar whose index is `index`.,
3947 ,
3948 - `index`: the index of the registrar whose fee is to be set.,
3949 - `fee`: the new fee.,
3950 ,
3951 # <weight>,
3952 - `O(R)`.,
3953 - One storage mutation `O(R)`.,
3954 - Benchmark: 7.315 + R * 0.329 µs (min squares analysis),
3955 # </weight>
3956 ]
3957 },
3958 {
3959 name: set_account_id,
3960 args: [
3961 {
3962 name: index,
3963 type: Compact<RegistrarIndex>
3964 },
3965 {
3966 name: new,
3967 type: AccountId
3968 }
3969 ],
3970 docs: [
3971 Change the account associated with a registrar.,
3972 ,
3973 The dispatch origin for this call must be _Signed_ and the sender must be the account,
3974 of the registrar whose index is `index`.,
3975 ,
3976 - `index`: the index of the registrar whose fee is to be set.,
3977 - `new`: the new account ID.,
3978 ,
3979 # <weight>,
3980 - `O(R)`.,
3981 - One storage mutation `O(R)`.,
3982 - Benchmark: 8.823 + R * 0.32 µs (min squares analysis),
3983 # </weight>
3984 ]
3985 },
3986 {
3987 name: set_fields,
3988 args: [
3989 {
3990 name: index,
3991 type: Compact<RegistrarIndex>
3992 },
3993 {
3994 name: fields,
3995 type: IdentityFields
3996 }
3997 ],
3998 docs: [
3999 Set the field information for a registrar.,
4000 ,
4001 The dispatch origin for this call must be _Signed_ and the sender must be the account,
4002 of the registrar whose index is `index`.,
4003 ,
4004 - `index`: the index of the registrar whose fee is to be set.,
4005 - `fields`: the fields that the registrar concerns themselves with.,
4006 ,
4007 # <weight>,
4008 - `O(R)`.,
4009 - One storage mutation `O(R)`.,
4010 - Benchmark: 7.464 + R * 0.325 µs (min squares analysis),
4011 # </weight>
4012 ]
4013 },
4014 {
4015 name: provide_judgement,
4016 args: [
4017 {
4018 name: reg_index,
4019 type: Compact<RegistrarIndex>
4020 },
4021 {
4022 name: target,
4023 type: LookupSource
4024 },
4025 {
4026 name: judgement,
4027 type: Judgement
4028 }
4029 ],
4030 docs: [
4031 Provide a judgement for an account's identity.,
4032 ,
4033 The dispatch origin for this call must be _Signed_ and the sender must be the account,
4034 of the registrar whose index is `reg_index`.,
4035 ,
4036 - `reg_index`: the index of the registrar whose judgement is being made.,
4037 - `target`: the account whose identity the judgement is upon. This must be an account,
4038 with a registered identity.,
4039 - `judgement`: the judgement of the registrar of index `reg_index` about `target`.,
4040 ,
4041 Emits `JudgementGiven` if successful.,
4042 ,
4043 # <weight>,
4044 - `O(R + X)`.,
4045 - One balance-transfer operation.,
4046 - Up to one account-lookup operation.,
4047 - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`.,
4048 - One event.,
4049 # </weight>
4050 ]
4051 },
4052 {
4053 name: kill_identity,
4054 args: [
4055 {
4056 name: target,
4057 type: LookupSource
4058 }
4059 ],
4060 docs: [
4061 Remove an account's identity and sub-account information and slash the deposits.,
4062 ,
4063 Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by,
4064 `Slash`. Verification request deposits are not returned; they should be cancelled,
4065 manually using `cancel_request`.,
4066 ,
4067 The dispatch origin for this call must match `T::ForceOrigin`.,
4068 ,
4069 - `target`: the account whose identity the judgement is upon. This must be an account,
4070 with a registered identity.,
4071 ,
4072 Emits `IdentityKilled` if successful.,
4073 ,
4074 # <weight>,
4075 - `O(R + S + X)`.,
4076 - One balance-reserve operation.,
4077 - `S + 2` storage mutations.,
4078 - One event.,
4079 # </weight>
4080 ]
4081 },
4082 {
4083 name: add_sub,
4084 args: [
4085 {
4086 name: sub,
4087 type: LookupSource
4088 },
4089 {
4090 name: data,
4091 type: Data
4092 }
4093 ],
4094 docs: [
4095 Add the given account to the sender's subs.,
4096 ,
4097 Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated,
4098 to the sender.,
4099 ,
4100 The dispatch origin for this call must be _Signed_ and the sender must have a registered,
4101 sub identity of `sub`.
4102 ]
4103 },
4104 {
4105 name: rename_sub,
4106 args: [
4107 {
4108 name: sub,
4109 type: LookupSource
4110 },
4111 {
4112 name: data,
4113 type: Data
4114 }
4115 ],
4116 docs: [
4117 Alter the associated name of the given sub-account.,
4118 ,
4119 The dispatch origin for this call must be _Signed_ and the sender must have a registered,
4120 sub identity of `sub`.
4121 ]
4122 },
4123 {
4124 name: remove_sub,
4125 args: [
4126 {
4127 name: sub,
4128 type: LookupSource
4129 }
4130 ],
4131 docs: [
4132 Remove the given account from the sender's subs.,
4133 ,
4134 Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated,
4135 to the sender.,
4136 ,
4137 The dispatch origin for this call must be _Signed_ and the sender must have a registered,
4138 sub identity of `sub`.
4139 ]
4140 },
4141 {
4142 name: quit_sub,
4143 args: [],
4144 docs: [
4145 Remove the sender as a sub-account.,
4146 ,
4147 Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated,
4148 to the sender (*not* the original depositor).,
4149 ,
4150 The dispatch origin for this call must be _Signed_ and the sender must have a registered,
4151 super-identity.,
4152 ,
4153 NOTE: This should not normally be used, but is provided in the case that the non-,
4154 controller of an account is maliciously registered as a sub-account.
4155 ]
4156 }
4157 ],
4158 events: [
4159 {
4160 name: IdentitySet,
4161 args: [
4162 AccountId
4163 ],
4164 docs: [
4165 A name was set or reset (which will remove all judgements). [who]
4166 ]
4167 },
4168 {
4169 name: IdentityCleared,
4170 args: [
4171 AccountId,
4172 Balance
4173 ],
4174 docs: [
4175 A name was cleared, and the given balance returned. [who, deposit]
4176 ]
4177 },
4178 {
4179 name: IdentityKilled,
4180 args: [
4181 AccountId,
4182 Balance
4183 ],
4184 docs: [
4185 A name was removed and the given balance slashed. [who, deposit]
4186 ]
4187 },
4188 {
4189 name: JudgementRequested,
4190 args: [
4191 AccountId,
4192 RegistrarIndex
4193 ],
4194 docs: [
4195 A judgement was asked from a registrar. [who, registrar_index]
4196 ]
4197 },
4198 {
4199 name: JudgementUnrequested,
4200 args: [
4201 AccountId,
4202 RegistrarIndex
4203 ],
4204 docs: [
4205 A judgement request was retracted. [who, registrar_index]
4206 ]
4207 },
4208 {
4209 name: JudgementGiven,
4210 args: [
4211 AccountId,
4212 RegistrarIndex
4213 ],
4214 docs: [
4215 A judgement was given by a registrar. [target, registrar_index]
4216 ]
4217 },
4218 {
4219 name: RegistrarAdded,
4220 args: [
4221 RegistrarIndex
4222 ],
4223 docs: [
4224 A registrar was added. [registrar_index]
4225 ]
4226 },
4227 {
4228 name: SubIdentityAdded,
4229 args: [
4230 AccountId,
4231 AccountId,
4232 Balance
4233 ],
4234 docs: [
4235 A sub-identity was added to an identity and the deposit paid. [sub, main, deposit]
4236 ]
4237 },
4238 {
4239 name: SubIdentityRemoved,
4240 args: [
4241 AccountId,
4242 AccountId,
4243 Balance
4244 ],
4245 docs: [
4246 A sub-identity was removed from an identity and the deposit freed.,
4247 [sub, main, deposit]
4248 ]
4249 },
4250 {
4251 name: SubIdentityRevoked,
4252 args: [
4253 AccountId,
4254 AccountId,
4255 Balance
4256 ],
4257 docs: [
4258 A sub-identity was cleared, and the given deposit repatriated from the,
4259 main identity account to the sub-identity account. [sub, main, deposit]
4260 ]
4261 }
4262 ],
4263 constants: [
4264 {
4265 name: BasicDeposit,
4266 type: BalanceOf,
4267 value: 0x00a0724e180900000000000000000000,
4268 docs: [
4269 The amount held on deposit for a registered identity
4270 ]
4271 },
4272 {
4273 name: FieldDeposit,
4274 type: BalanceOf,
4275 value: 0x00a89c13460200000000000000000000,
4276 docs: [
4277 The amount held on deposit per additional field for a registered identity.
4278 ]
4279 },
4280 {
4281 name: SubAccountDeposit,
4282 type: BalanceOf,
4283 value: 0x00204aa9d10100000000000000000000,
4284 docs: [
4285 The amount held on deposit for a registered subaccount. This should account for the fact,
4286 that one storage item's value will increase by the size of an account ID, and there will be,
4287 another trie item whose value is the size of an account ID plus 32 bytes.
4288 ]
4289 },
4290 {
4291 name: MaxSubAccounts,
4292 type: u32,
4293 value: 0x64000000,
4294 docs: [
4295 The maximum number of sub-accounts allowed per identified account.
4296 ]
4297 },
4298 {
4299 name: MaxAdditionalFields,
4300 type: u32,
4301 value: 0x64000000,
4302 docs: [
4303 Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O,
4304 required to access an identity, but can be pretty high.
4305 ]
4306 },
4307 {
4308 name: MaxRegistrars,
4309 type: u32,
4310 value: 0x14000000,
4311 docs: [
4312 Maxmimum number of registrars allowed in the system. Needed to bound the complexity,
4313 of, e.g., updating judgements.
4314 ]
4315 }
4316 ],
4317 errors: [
4318 {
4319 name: TooManySubAccounts,
4320 docs: [
4321 Too many subs-accounts.
4322 ]
4323 },
4324 {
4325 name: NotFound,
4326 docs: [
4327 Account isn't found.
4328 ]
4329 },
4330 {
4331 name: NotNamed,
4332 docs: [
4333 Account isn't named.
4334 ]
4335 },
4336 {
4337 name: EmptyIndex,
4338 docs: [
4339 Empty index.
4340 ]
4341 },
4342 {
4343 name: FeeChanged,
4344 docs: [
4345 Fee is changed.
4346 ]
4347 },
4348 {
4349 name: NoIdentity,
4350 docs: [
4351 No identity found.
4352 ]
4353 },
4354 {
4355 name: StickyJudgement,
4356 docs: [
4357 Sticky judgement.
4358 ]
4359 },
4360 {
4361 name: JudgementGiven,
4362 docs: [
4363 Judgement given.
4364 ]
4365 },
4366 {
4367 name: InvalidJudgement,
4368 docs: [
4369 Invalid judgement.
4370 ]
4371 },
4372 {
4373 name: InvalidIndex,
4374 docs: [
4375 The index is invalid.
4376 ]
4377 },
4378 {
4379 name: InvalidTarget,
4380 docs: [
4381 The target is invalid.
4382 ]
4383 },
4384 {
4385 name: TooManyFields,
4386 docs: [
4387 Too many additional fields.
4388 ]
4389 },
4390 {
4391 name: TooManyRegistrars,
4392 docs: [
4393 Maximum amount of registrars reached. Cannot add any more.
4394 ]
4395 },
4396 {
4397 name: AlreadyClaimed,
4398 docs: [
4399 Account ID is already named.
4400 ]
4401 },
4402 {
4403 name: NotSub,
4404 docs: [
4405 Sender is not a sub-account.
4406 ]
4407 },
4408 {
4409 name: NotOwned,
4410 docs: [
4411 Sub-account isn't owned by sender.
4412 ]
4413 }
4414 ],
4415 index: 60
4416 },
4417 {
4418 name: Democracy,
4419 storage: {
4420 prefix: Democracy,
4421 items: [
4422 {
4423 name: PublicPropCount,
4424 modifier: Default,
4425 type: {
4426 Plain: PropIndex
4427 },
4428 fallback: 0x00000000,
4429 docs: [
4430 The number of (public) proposals that have been made so far.
4431 ]
4432 },
4433 {
4434 name: PublicProps,
4435 modifier: Default,
4436 type: {
4437 Plain: Vec<(PropIndex,Hash,AccountId)>
4438 },
4439 fallback: 0x00,
4440 docs: [
4441 The public proposals. Unsorted. The second item is the proposal's hash.
4442 ]
4443 },
4444 {
4445 name: DepositOf,
4446 modifier: Optional,
4447 type: {
4448 Map: {
4449 hasher: Twox64Concat,
4450 key: PropIndex,
4451 value: (Vec<AccountId>,BalanceOf),
4452 linked: false
4453 }
4454 },
4455 fallback: 0x00,
4456 docs: [
4457 Those who have locked a deposit.,
4458 ,
4459 TWOX-NOTE: Safe, as increasing integer keys are safe.
4460 ]
4461 },
4462 {
4463 name: Preimages,
4464 modifier: Optional,
4465 type: {
4466 Map: {
4467 hasher: Identity,
4468 key: Hash,
4469 value: PreimageStatus,
4470 linked: false
4471 }
4472 },
4473 fallback: 0x00,
4474 docs: [
4475 Map of hashes to the proposal preimage, along with who registered it and their deposit.,
4476 The block number is the block at which it was deposited.
4477 ]
4478 },
4479 {
4480 name: ReferendumCount,
4481 modifier: Default,
4482 type: {
4483 Plain: ReferendumIndex
4484 },
4485 fallback: 0x00000000,
4486 docs: [
4487 The next free referendum index, aka the number of referenda started so far.
4488 ]
4489 },
4490 {
4491 name: LowestUnbaked,
4492 modifier: Default,
4493 type: {
4494 Plain: ReferendumIndex
4495 },
4496 fallback: 0x00000000,
4497 docs: [
4498 The lowest referendum index representing an unbaked referendum. Equal to,
4499 `ReferendumCount` if there isn't a unbaked referendum.
4500 ]
4501 },
4502 {
4503 name: ReferendumInfoOf,
4504 modifier: Optional,
4505 type: {
4506 Map: {
4507 hasher: Twox64Concat,
4508 key: ReferendumIndex,
4509 value: ReferendumInfo,
4510 linked: false
4511 }
4512 },
4513 fallback: 0x00,
4514 docs: [
4515 Information concerning any given referendum.,
4516 ,
4517 TWOX-NOTE: SAFE as indexes are not under an attacker’s control.
4518 ]
4519 },
4520 {
4521 name: VotingOf,
4522 modifier: Default,
4523 type: {
4524 Map: {
4525 hasher: Twox64Concat,
4526 key: AccountId,
4527 value: Voting,
4528 linked: false
4529 }
4530 },
4531 fallback: 0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,
4532 docs: [
4533 All votes for a particular voter. We store the balance for the number of votes that we,
4534 have recorded. The second item is the total amount of delegations, that will be added.,
4535 ,
4536 TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway.
4537 ]
4538 },
4539 {
4540 name: Locks,
4541 modifier: Optional,
4542 type: {
4543 Map: {
4544 hasher: Twox64Concat,
4545 key: AccountId,
4546 value: BlockNumber,
4547 linked: false
4548 }
4549 },
4550 fallback: 0x00,
4551 docs: [
4552 Accounts for which there are locks in action which may be removed at some point in the,
4553 future. The value is the block number at which the lock expires and may be removed.,
4554 ,
4555 TWOX-NOTE: OK ― `AccountId` is a secure hash.
4556 ]
4557 },
4558 {
4559 name: LastTabledWasExternal,
4560 modifier: Default,
4561 type: {
4562 Plain: bool
4563 },
4564 fallback: 0x00,
4565 docs: [
4566 True if the last referendum tabled was submitted externally. False if it was a public,
4567 proposal.
4568 ]
4569 },
4570 {
4571 name: NextExternal,
4572 modifier: Optional,
4573 type: {
4574 Plain: (Hash,VoteThreshold)
4575 },
4576 fallback: 0x00,
4577 docs: [
4578 The referendum to be tabled whenever it would be valid to table an external proposal.,
4579 This happens when a referendum needs to be tabled and one of two conditions are met:,
4580 - `LastTabledWasExternal` is `false`; or,
4581 - `PublicProps` is empty.
4582 ]
4583 },
4584 {
4585 name: Blacklist,
4586 modifier: Optional,
4587 type: {
4588 Map: {
4589 hasher: Identity,
4590 key: Hash,
4591 value: (BlockNumber,Vec<AccountId>),
4592 linked: false
4593 }
4594 },
4595 fallback: 0x00,
4596 docs: [
4597 A record of who vetoed what. Maps proposal hash to a possible existent block number,
4598 (until when it may not be resubmitted) and who vetoed it.
4599 ]
4600 },
4601 {
4602 name: Cancellations,
4603 modifier: Default,
4604 type: {
4605 Map: {
4606 hasher: Identity,
4607 key: Hash,
4608 value: bool,
4609 linked: false
4610 }
4611 },
4612 fallback: 0x00,
4613 docs: [
4614 Record of all proposals that have been subject to emergency cancellation.
4615 ]
4616 },
4617 {
4618 name: StorageVersion,
4619 modifier: Optional,
4620 type: {
4621 Plain: Releases
4622 },
4623 fallback: 0x00,
4624 docs: [
4625 Storage version of the pallet.,
4626 ,
4627 New networks start with last version.
4628 ]
4629 }
4630 ]
4631 },
4632 calls: [
4633 {
4634 name: propose,
4635 args: [
4636 {
4637 name: proposal_hash,
4638 type: Hash
4639 },
4640 {
4641 name: value,
4642 type: Compact<BalanceOf>
4643 }
4644 ],
4645 docs: [
4646 Propose a sensitive action to be taken.,
4647 ,
4648 The dispatch origin of this call must be _Signed_ and the sender must,
4649 have funds to cover the deposit.,
4650 ,
4651 - `proposal_hash`: The hash of the proposal preimage.,
4652 - `value`: The amount of deposit (must be at least `MinimumDeposit`).,
4653 ,
4654 Emits `Proposed`.,
4655 ,
4656 Weight: `O(p)`
4657 ]
4658 },
4659 {
4660 name: second,
4661 args: [
4662 {
4663 name: proposal,
4664 type: Compact<PropIndex>
4665 },
4666 {
4667 name: seconds_upper_bound,
4668 type: Compact<u32>
4669 }
4670 ],
4671 docs: [
4672 Signals agreement with a particular proposal.,
4673 ,
4674 The dispatch origin of this call must be _Signed_ and the sender,
4675 must have funds to cover the deposit, equal to the original deposit.,
4676 ,
4677 - `proposal`: The index of the proposal to second.,
4678 - `seconds_upper_bound`: an upper bound on the current number of seconds on this,
4679 proposal. Extrinsic is weighted according to this value with no refund.,
4680 ,
4681 Weight: `O(S)` where S is the number of seconds a proposal already has.
4682 ]
4683 },
4684 {
4685 name: vote,
4686 args: [
4687 {
4688 name: ref_index,
4689 type: Compact<ReferendumIndex>
4690 },
4691 {
4692 name: vote,
4693 type: AccountVote
4694 }
4695 ],
4696 docs: [
4697 Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;,
4698 otherwise it is a vote to keep the status quo.,
4699 ,
4700 The dispatch origin of this call must be _Signed_.,
4701 ,
4702 - `ref_index`: The index of the referendum to vote for.,
4703 - `vote`: The vote configuration.,
4704 ,
4705 Weight: `O(R)` where R is the number of referendums the voter has voted on.
4706 ]
4707 },
4708 {
4709 name: emergency_cancel,
4710 args: [
4711 {
4712 name: ref_index,
4713 type: ReferendumIndex
4714 }
4715 ],
4716 docs: [
4717 Schedule an emergency cancellation of a referendum. Cannot happen twice to the same,
4718 referendum.,
4719 ,
4720 The dispatch origin of this call must be `CancellationOrigin`.,
4721 ,
4722 -`ref_index`: The index of the referendum to cancel.,
4723 ,
4724 Weight: `O(1)`.
4725 ]
4726 },
4727 {
4728 name: external_propose,
4729 args: [
4730 {
4731 name: proposal_hash,
4732 type: Hash
4733 }
4734 ],
4735 docs: [
4736 Schedule a referendum to be tabled once it is legal to schedule an external,
4737 referendum.,
4738 ,
4739 The dispatch origin of this call must be `ExternalOrigin`.,
4740 ,
4741 - `proposal_hash`: The preimage hash of the proposal.,
4742 ,
4743 Weight: `O(V)` with V number of vetoers in the blacklist of proposal.,
4744 Decoding vec of length V. Charged as maximum
4745 ]
4746 },
4747 {
4748 name: external_propose_majority,
4749 args: [
4750 {
4751 name: proposal_hash,
4752 type: Hash
4753 }
4754 ],
4755 docs: [
4756 Schedule a majority-carries referendum to be tabled next once it is legal to schedule,
4757 an external referendum.,
4758 ,
4759 The dispatch of this call must be `ExternalMajorityOrigin`.,
4760 ,
4761 - `proposal_hash`: The preimage hash of the proposal.,
4762 ,
4763 Unlike `external_propose`, blacklisting has no effect on this and it may replace a,
4764 pre-scheduled `external_propose` call.,
4765 ,
4766 Weight: `O(1)`
4767 ]
4768 },
4769 {
4770 name: external_propose_default,
4771 args: [
4772 {
4773 name: proposal_hash,
4774 type: Hash
4775 }
4776 ],
4777 docs: [
4778 Schedule a negative-turnout-bias referendum to be tabled next once it is legal to,
4779 schedule an external referendum.,
4780 ,
4781 The dispatch of this call must be `ExternalDefaultOrigin`.,
4782 ,
4783 - `proposal_hash`: The preimage hash of the proposal.,
4784 ,
4785 Unlike `external_propose`, blacklisting has no effect on this and it may replace a,
4786 pre-scheduled `external_propose` call.,
4787 ,
4788 Weight: `O(1)`
4789 ]
4790 },
4791 {
4792 name: fast_track,
4793 args: [
4794 {
4795 name: proposal_hash,
4796 type: Hash
4797 },
4798 {
4799 name: voting_period,
4800 type: BlockNumber
4801 },
4802 {
4803 name: delay,
4804 type: BlockNumber
4805 }
4806 ],
4807 docs: [
4808 Schedule the currently externally-proposed majority-carries referendum to be tabled,
4809 immediately. If there is no externally-proposed referendum currently, or if there is one,
4810 but it is not a majority-carries referendum then it fails.,
4811 ,
4812 The dispatch of this call must be `FastTrackOrigin`.,
4813 ,
4814 - `proposal_hash`: The hash of the current external proposal.,
4815 - `voting_period`: The period that is allowed for voting on this proposal. Increased to,
4816 `FastTrackVotingPeriod` if too low.,
4817 - `delay`: The number of block after voting has ended in approval and this should be,
4818 enacted. This doesn't have a minimum amount.,
4819 ,
4820 Emits `Started`.,
4821 ,
4822 Weight: `O(1)`
4823 ]
4824 },
4825 {
4826 name: veto_external,
4827 args: [
4828 {
4829 name: proposal_hash,
4830 type: Hash
4831 }
4832 ],
4833 docs: [
4834 Veto and blacklist the external proposal hash.,
4835 ,
4836 The dispatch origin of this call must be `VetoOrigin`.,
4837 ,
4838 - `proposal_hash`: The preimage hash of the proposal to veto and blacklist.,
4839 ,
4840 Emits `Vetoed`.,
4841 ,
4842 Weight: `O(V + log(V))` where V is number of `existing vetoers`
4843 ]
4844 },
4845 {
4846 name: cancel_referendum,
4847 args: [
4848 {
4849 name: ref_index,
4850 type: Compact<ReferendumIndex>
4851 }
4852 ],
4853 docs: [
4854 Remove a referendum.,
4855 ,
4856 The dispatch origin of this call must be _Root_.,
4857 ,
4858 - `ref_index`: The index of the referendum to cancel.,
4859 ,
4860 # Weight: `O(1)`.
4861 ]
4862 },
4863 {
4864 name: cancel_queued,
4865 args: [
4866 {
4867 name: which,
4868 type: ReferendumIndex
4869 }
4870 ],
4871 docs: [
4872 Cancel a proposal queued for enactment.,
4873 ,
4874 The dispatch origin of this call must be _Root_.,
4875 ,
4876 - `which`: The index of the referendum to cancel.,
4877 ,
4878 Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`.
4879 ]
4880 },
4881 {
4882 name: delegate,
4883 args: [
4884 {
4885 name: to,
4886 type: AccountId
4887 },
4888 {
4889 name: conviction,
4890 type: Conviction
4891 },
4892 {
4893 name: balance,
4894 type: BalanceOf
4895 }
4896 ],
4897 docs: [
4898 Delegate the voting power (with some given conviction) of the sending account.,
4899 ,
4900 The balance delegated is locked for as long as it's delegated, and thereafter for the,
4901 time appropriate for the conviction's lock period.,
4902 ,
4903 The dispatch origin of this call must be _Signed_, and the signing account must either:,
4904 - be delegating already; or,
4905 - have no voting activity (if there is, then it will need to be removed/consolidated,
4906 through `reap_vote` or `unvote`).,
4907 ,
4908 - `to`: The account whose voting the `target` account's voting power will follow.,
4909 - `conviction`: The conviction that will be attached to the delegated votes. When the,
4910 account is undelegated, the funds will be locked for the corresponding period.,
4911 - `balance`: The amount of the account's balance to be used in delegating. This must,
4912 not be more than the account's current balance.,
4913 ,
4914 Emits `Delegated`.,
4915 ,
4916 Weight: `O(R)` where R is the number of referendums the voter delegating to has,
4917 voted on. Weight is charged as if maximum votes.
4918 ]
4919 },
4920 {
4921 name: undelegate,
4922 args: [],
4923 docs: [
4924 Undelegate the voting power of the sending account.,
4925 ,
4926 Tokens may be unlocked following once an amount of time consistent with the lock period,
4927 of the conviction with which the delegation was issued.,
4928 ,
4929 The dispatch origin of this call must be _Signed_ and the signing account must be,
4930 currently delegating.,
4931 ,
4932 Emits `Undelegated`.,
4933 ,
4934 Weight: `O(R)` where R is the number of referendums the voter delegating to has,
4935 voted on. Weight is charged as if maximum votes.
4936 ]
4937 },
4938 {
4939 name: clear_public_proposals,
4940 args: [],
4941 docs: [
4942 Clears all public proposals.,
4943 ,
4944 The dispatch origin of this call must be _Root_.,
4945 ,
4946 Weight: `O(1)`.
4947 ]
4948 },
4949 {
4950 name: note_preimage,
4951 args: [
4952 {
4953 name: encoded_proposal,
4954 type: Bytes
4955 }
4956 ],
4957 docs: [
4958 Register the preimage for an upcoming proposal. This doesn't require the proposal to be,
4959 in the dispatch queue but does require a deposit, returned once enacted.,
4960 ,
4961 The dispatch origin of this call must be _Signed_.,
4962 ,
4963 - `encoded_proposal`: The preimage of a proposal.,
4964 ,
4965 Emits `PreimageNoted`.,
4966 ,
4967 Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit).
4968 ]
4969 },
4970 {
4971 name: note_preimage_operational,
4972 args: [
4973 {
4974 name: encoded_proposal,
4975 type: Bytes
4976 }
4977 ],
4978 docs: [
4979 Same as `note_preimage` but origin is `OperationalPreimageOrigin`.
4980 ]
4981 },
4982 {
4983 name: note_imminent_preimage,
4984 args: [
4985 {
4986 name: encoded_proposal,
4987 type: Bytes
4988 }
4989 ],
4990 docs: [
4991 Register the preimage for an upcoming proposal. This requires the proposal to be,
4992 in the dispatch queue. No deposit is needed. When this call is successful, i.e.,
4993 the preimage has not been uploaded before and matches some imminent proposal,,
4994 no fee is paid.,
4995 ,
4996 The dispatch origin of this call must be _Signed_.,
4997 ,
4998 - `encoded_proposal`: The preimage of a proposal.,
4999 ,
5000 Emits `PreimageNoted`.,
5001 ,
5002 Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit).
5003 ]
5004 },
5005 {
5006 name: note_imminent_preimage_operational,
5007 args: [
5008 {
5009 name: encoded_proposal,
5010 type: Bytes
5011 }
5012 ],
5013 docs: [
5014 Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`.
5015 ]
5016 },
5017 {
5018 name: reap_preimage,
5019 args: [
5020 {
5021 name: proposal_hash,
5022 type: Hash
5023 },
5024 {
5025 name: proposal_len_upper_bound,
5026 type: Compact<u32>
5027 }
5028 ],
5029 docs: [
5030 Remove an expired proposal preimage and collect the deposit.,
5031 ,
5032 The dispatch origin of this call must be _Signed_.,
5033 ,
5034 - `proposal_hash`: The preimage hash of a proposal.,
5035 - `proposal_length_upper_bound`: an upper bound on length of the proposal.,
5036 Extrinsic is weighted according to this value with no refund.,
5037 ,
5038 This will only work after `VotingPeriod` blocks from the time that the preimage was,
5039 noted, if it's the same account doing it. If it's a different account, then it'll only,
5040 work an additional `EnactmentPeriod` later.,
5041 ,
5042 Emits `PreimageReaped`.,
5043 ,
5044 Weight: `O(D)` where D is length of proposal.
5045 ]
5046 },
5047 {
5048 name: unlock,
5049 args: [
5050 {
5051 name: target,
5052 type: AccountId
5053 }
5054 ],
5055 docs: [
5056 Unlock tokens that have an expired lock.,
5057 ,
5058 The dispatch origin of this call must be _Signed_.,
5059 ,
5060 - `target`: The account to remove the lock on.,
5061 ,
5062 Weight: `O(R)` with R number of vote of target.
5063 ]
5064 },
5065 {
5066 name: remove_vote,
5067 args: [
5068 {
5069 name: index,
5070 type: ReferendumIndex
5071 }
5072 ],
5073 docs: [
5074 Remove a vote for a referendum.,
5075 ,
5076 If:,
5077 - the referendum was cancelled, or,
5078 - the referendum is ongoing, or,
5079 - the referendum has ended such that,
5080 - the vote of the account was in opposition to the result; or,
5081 - there was no conviction to the account's vote; or,
5082 - the account made a split vote,
5083 ...then the vote is removed cleanly and a following call to `unlock` may result in more,
5084 funds being available.,
5085 ,
5086 If, however, the referendum has ended and:,
5087 - it finished corresponding to the vote of the account, and,
5088 - the account made a standard vote with conviction, and,
5089 - the lock period of the conviction is not over,
5090 ...then the lock will be aggregated into the overall account's lock, which may involve,
5091 *overlocking* (where the two locks are combined into a single lock that is the maximum,
5092 of both the amount locked and the time is it locked for).,
5093 ,
5094 The dispatch origin of this call must be _Signed_, and the signer must have a vote,
5095 registered for referendum `index`.,
5096 ,
5097 - `index`: The index of referendum of the vote to be removed.,
5098 ,
5099 Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.,
5100 Weight is calculated for the maximum number of vote.
5101 ]
5102 },
5103 {
5104 name: remove_other_vote,
5105 args: [
5106 {
5107 name: target,
5108 type: AccountId
5109 },
5110 {
5111 name: index,
5112 type: ReferendumIndex
5113 }
5114 ],
5115 docs: [
5116 Remove a vote for a referendum.,
5117 ,
5118 If the `target` is equal to the signer, then this function is exactly equivalent to,
5119 `remove_vote`. If not equal to the signer, then the vote must have expired,,
5120 either because the referendum was cancelled, because the voter lost the referendum or,
5121 because the conviction period is over.,
5122 ,
5123 The dispatch origin of this call must be _Signed_.,
5124 ,
5125 - `target`: The account of the vote to be removed; this account must have voted for,
5126 referendum `index`.,
5127 - `index`: The index of referendum of the vote to be removed.,
5128 ,
5129 Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.,
5130 Weight is calculated for the maximum number of vote.
5131 ]
5132 },
5133 {
5134 name: enact_proposal,
5135 args: [
5136 {
5137 name: proposal_hash,
5138 type: Hash
5139 },
5140 {
5141 name: index,
5142 type: ReferendumIndex
5143 }
5144 ],
5145 docs: [
5146 Enact a proposal from a referendum. For now we just make the weight be the maximum.
5147 ]
5148 },
5149 {
5150 name: blacklist,
5151 args: [
5152 {
5153 name: proposal_hash,
5154 type: Hash
5155 },
5156 {
5157 name: maybe_ref_index,
5158 type: Option<ReferendumIndex>
5159 }
5160 ],
5161 docs: [
5162 Permanently place a proposal into the blacklist. This prevents it from ever being,
5163 proposed again.,
5164 ,
5165 If called on a queued public or external proposal, then this will result in it being,
5166 removed. If the `ref_index` supplied is an active referendum with the proposal hash,,
5167 then it will be cancelled.,
5168 ,
5169 The dispatch origin of this call must be `BlacklistOrigin`.,
5170 ,
5171 - `proposal_hash`: The proposal hash to blacklist permanently.,
5172 - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be,
5173 cancelled.,
5174 ,
5175 Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a,
5176 reasonable value).
5177 ]
5178 },
5179 {
5180 name: cancel_proposal,
5181 args: [
5182 {
5183 name: prop_index,
5184 type: Compact<PropIndex>
5185 }
5186 ],
5187 docs: [
5188 Remove a proposal.,
5189 ,
5190 The dispatch origin of this call must be `CancelProposalOrigin`.,
5191 ,
5192 - `prop_index`: The index of the proposal to cancel.,
5193 ,
5194 Weight: `O(p)` where `p = PublicProps::<T>::decode_len()`
5195 ]
5196 }
5197 ],
5198 events: [
5199 {
5200 name: Proposed,
5201 args: [
5202 PropIndex,
5203 Balance
5204 ],
5205 docs: [
5206 A motion has been proposed by a public account. [proposal_index, deposit]
5207 ]
5208 },
5209 {
5210 name: Tabled,
5211 args: [
5212 PropIndex,
5213 Balance,
5214 Vec<AccountId>
5215 ],
5216 docs: [
5217 A public proposal has been tabled for referendum vote. [proposal_index, deposit, depositors]
5218 ]
5219 },
5220 {
5221 name: ExternalTabled,
5222 args: [],
5223 docs: [
5224 An external proposal has been tabled.
5225 ]
5226 },
5227 {
5228 name: Started,
5229 args: [
5230 ReferendumIndex,
5231 VoteThreshold
5232 ],
5233 docs: [
5234 A referendum has begun. [ref_index, threshold]
5235 ]
5236 },
5237 {
5238 name: Passed,
5239 args: [
5240 ReferendumIndex
5241 ],
5242 docs: [
5243 A proposal has been approved by referendum. [ref_index]
5244 ]
5245 },
5246 {
5247 name: NotPassed,
5248 args: [
5249 ReferendumIndex
5250 ],
5251 docs: [
5252 A proposal has been rejected by referendum. [ref_index]
5253 ]
5254 },
5255 {
5256 name: Cancelled,
5257 args: [
5258 ReferendumIndex
5259 ],
5260 docs: [
5261 A referendum has been cancelled. [ref_index]
5262 ]
5263 },
5264 {
5265 name: Executed,
5266 args: [
5267 ReferendumIndex,
5268 bool
5269 ],
5270 docs: [
5271 A proposal has been enacted. [ref_index, is_ok]
5272 ]
5273 },
5274 {
5275 name: Delegated,
5276 args: [
5277 AccountId,
5278 AccountId
5279 ],
5280 docs: [
5281 An account has delegated their vote to another account. [who, target]
5282 ]
5283 },
5284 {
5285 name: Undelegated,
5286 args: [
5287 AccountId
5288 ],
5289 docs: [
5290 An [account] has cancelled a previous delegation operation.
5291 ]
5292 },
5293 {
5294 name: Vetoed,
5295 args: [
5296 AccountId,
5297 Hash,
5298 BlockNumber
5299 ],
5300 docs: [
5301 An external proposal has been vetoed. [who, proposal_hash, until]
5302 ]
5303 },
5304 {
5305 name: PreimageNoted,
5306 args: [
5307 Hash,
5308 AccountId,
5309 Balance
5310 ],
5311 docs: [
5312 A proposal's preimage was noted, and the deposit taken. [proposal_hash, who, deposit]
5313 ]
5314 },
5315 {
5316 name: PreimageUsed,
5317 args: [
5318 Hash,
5319 AccountId,
5320 Balance
5321 ],
5322 docs: [
5323 A proposal preimage was removed and used (the deposit was returned).,
5324 [proposal_hash, provider, deposit]
5325 ]
5326 },
5327 {
5328 name: PreimageInvalid,
5329 args: [
5330 Hash,
5331 ReferendumIndex
5332 ],
5333 docs: [
5334 A proposal could not be executed because its preimage was invalid.,
5335 [proposal_hash, ref_index]
5336 ]
5337 },
5338 {
5339 name: PreimageMissing,
5340 args: [
5341 Hash,
5342 ReferendumIndex
5343 ],
5344 docs: [
5345 A proposal could not be executed because its preimage was missing.,
5346 [proposal_hash, ref_index]
5347 ]
5348 },
5349 {
5350 name: PreimageReaped,
5351 args: [
5352 Hash,
5353 AccountId,
5354 Balance,
5355 AccountId
5356 ],
5357 docs: [
5358 A registered preimage was removed and the deposit collected by the reaper.,
5359 [proposal_hash, provider, deposit, reaper]
5360 ]
5361 },
5362 {
5363 name: Unlocked,
5364 args: [
5365 AccountId
5366 ],
5367 docs: [
5368 An [account] has been unlocked successfully.
5369 ]
5370 },
5371 {
5372 name: Blacklisted,
5373 args: [
5374 Hash
5375 ],
5376 docs: [
5377 A proposal [hash] has been blacklisted permanently.
5378 ]
5379 }
5380 ],
5381 constants: [
5382 {
5383 name: EnactmentPeriod,
5384 type: BlockNumber,
5385 value: 0x00e10000,
5386 docs: [
5387 The minimum period of locking and the period between a proposal being approved and enacted.,
5388 ,
5389 It should generally be a little more than the unstake period to ensure that,
5390 voting stakers have an opportunity to remove themselves from the system in the case where,
5391 they are on the losing side of a vote.
5392 ]
5393 },
5394 {
5395 name: LaunchPeriod,
5396 type: BlockNumber,
5397 value: 0xe0c40000,
5398 docs: [
5399 How often (in blocks) new public referenda are launched.
5400 ]
5401 },
5402 {
5403 name: VotingPeriod,
5404 type: BlockNumber,
5405 value: 0xe0c40000,
5406 docs: [
5407 How often (in blocks) to check for new votes.
5408 ]
5409 },
5410 {
5411 name: MinimumDeposit,
5412 type: BalanceOf,
5413 value: 0x00407a10f35a00000000000000000000,
5414 docs: [
5415 The minimum amount to be used as a deposit for a public referendum proposal.
5416 ]
5417 },
5418 {
5419 name: FastTrackVotingPeriod,
5420 type: BlockNumber,
5421 value: 0x84030000,
5422 docs: [
5423 Minimum voting period allowed for a fast-track referendum.
5424 ]
5425 },
5426 {
5427 name: CooloffPeriod,
5428 type: BlockNumber,
5429 value: 0xe0c40000,
5430 docs: [
5431 Period in blocks where an external proposal may not be re-submitted after being vetoed.
5432 ]
5433 },
5434 {
5435 name: PreimageByteDeposit,
5436 type: BalanceOf,
5437 value: 0x00e40b54020000000000000000000000,
5438 docs: [
5439 The amount of balance that must be deposited per byte of preimage stored.
5440 ]
5441 },
5442 {
5443 name: MaxVotes,
5444 type: u32,
5445 value: 0x64000000,
5446 docs: [
5447 The maximum number of votes for an account.,
5448 ,
5449 Also used to compute weight, an overly big value can,
5450 lead to extrinsic with very big weight: see `delegate` for instance.
5451 ]
5452 }
5453 ],
5454 errors: [
5455 {
5456 name: ValueLow,
5457 docs: [
5458 Value too low
5459 ]
5460 },
5461 {
5462 name: ProposalMissing,
5463 docs: [
5464 Proposal does not exist
5465 ]
5466 },
5467 {
5468 name: BadIndex,
5469 docs: [
5470 Unknown index
5471 ]
5472 },
5473 {
5474 name: AlreadyCanceled,
5475 docs: [
5476 Cannot cancel the same proposal twice
5477 ]
5478 },
5479 {
5480 name: DuplicateProposal,
5481 docs: [
5482 Proposal already made
5483 ]
5484 },
5485 {
5486 name: ProposalBlacklisted,
5487 docs: [
5488 Proposal still blacklisted
5489 ]
5490 },
5491 {
5492 name: NotSimpleMajority,
5493 docs: [
5494 Next external proposal not simple majority
5495 ]
5496 },
5497 {
5498 name: InvalidHash,
5499 docs: [
5500 Invalid hash
5501 ]
5502 },
5503 {
5504 name: NoProposal,
5505 docs: [
5506 No external proposal
5507 ]
5508 },
5509 {
5510 name: AlreadyVetoed,
5511 docs: [
5512 Identity may not veto a proposal twice
5513 ]
5514 },
5515 {
5516 name: NotDelegated,
5517 docs: [
5518 Not delegated
5519 ]
5520 },
5521 {
5522 name: DuplicatePreimage,
5523 docs: [
5524 Preimage already noted
5525 ]
5526 },
5527 {
5528 name: NotImminent,
5529 docs: [
5530 Not imminent
5531 ]
5532 },
5533 {
5534 name: TooEarly,
5535 docs: [
5536 Too early
5537 ]
5538 },
5539 {
5540 name: Imminent,
5541 docs: [
5542 Imminent
5543 ]
5544 },
5545 {
5546 name: PreimageMissing,
5547 docs: [
5548 Preimage not found
5549 ]
5550 },
5551 {
5552 name: ReferendumInvalid,
5553 docs: [
5554 Vote given for invalid referendum
5555 ]
5556 },
5557 {
5558 name: PreimageInvalid,
5559 docs: [
5560 Invalid preimage
5561 ]
5562 },
5563 {
5564 name: NoneWaiting,
5565 docs: [
5566 No proposals waiting
5567 ]
5568 },
5569 {
5570 name: NotLocked,
5571 docs: [
5572 The target account does not have a lock.
5573 ]
5574 },
5575 {
5576 name: NotExpired,
5577 docs: [
5578 The lock on the account to be unlocked has not yet expired.
5579 ]
5580 },
5581 {
5582 name: NotVoter,
5583 docs: [
5584 The given account did not vote on the referendum.
5585 ]
5586 },
5587 {
5588 name: NoPermission,
5589 docs: [
5590 The actor has no permission to conduct the action.
5591 ]
5592 },
5593 {
5594 name: AlreadyDelegating,
5595 docs: [
5596 The account is already delegating.
5597 ]
5598 },
5599 {
5600 name: InsufficientFunds,
5601 docs: [
5602 Too high a balance was provided that the account cannot afford.
5603 ]
5604 },
5605 {
5606 name: NotDelegating,
5607 docs: [
5608 The account is not currently delegating.
5609 ]
5610 },
5611 {
5612 name: VotesExist,
5613 docs: [
5614 The account currently has votes attached to it and the operation cannot succeed until,
5615 these are removed, either through `unvote` or `reap_vote`.
5616 ]
5617 },
5618 {
5619 name: InstantNotAllowed,
5620 docs: [
5621 The instant referendum origin is currently disallowed.
5622 ]
5623 },
5624 {
5625 name: Nonsense,
5626 docs: [
5627 Delegation to oneself makes no sense.
5628 ]
5629 },
5630 {
5631 name: WrongUpperBound,
5632 docs: [
5633 Invalid upper bound.
5634 ]
5635 },
5636 {
5637 name: MaxVotesReached,
5638 docs: [
5639 Maximum number of votes reached.
5640 ]
5641 },
5642 {
5643 name: InvalidWitness,
5644 docs: [
5645 The provided witness data is wrong.
5646 ]
5647 },
5648 {
5649 name: TooManyProposals,
5650 docs: [
5651 Maximum number of proposals reached.
5652 ]
5653 }
5654 ],
5655 index: 61
5656 },
5657 {
5658 name: Council,
5659 storage: {
5660 prefix: Instance1Collective,
5661 items: [
5662 {
5663 name: Proposals,
5664 modifier: Default,
5665 type: {
5666 Plain: Vec<Hash>
5667 },
5668 fallback: 0x00,
5669 docs: [
5670 The hashes of the active proposals.
5671 ]
5672 },
5673 {
5674 name: ProposalOf,
5675 modifier: Optional,
5676 type: {
5677 Map: {
5678 hasher: Identity,
5679 key: Hash,
5680 value: Proposal,
5681 linked: false
5682 }
5683 },
5684 fallback: 0x00,
5685 docs: [
5686 Actual proposal for a given hash, if it's current.
5687 ]
5688 },
5689 {
5690 name: Voting,
5691 modifier: Optional,
5692 type: {
5693 Map: {
5694 hasher: Identity,
5695 key: Hash,
5696 value: Votes,
5697 linked: false
5698 }
5699 },
5700 fallback: 0x00,
5701 docs: [
5702 Votes on a given proposal, if it is ongoing.
5703 ]
5704 },
5705 {
5706 name: ProposalCount,
5707 modifier: Default,
5708 type: {
5709 Plain: u32
5710 },
5711 fallback: 0x00000000,
5712 docs: [
5713 Proposals so far.
5714 ]
5715 },
5716 {
5717 name: Members,
5718 modifier: Default,
5719 type: {
5720 Plain: Vec<AccountId>
5721 },
5722 fallback: 0x00,
5723 docs: [
5724 The current members of the collective. This is stored sorted (just by value).
5725 ]
5726 },
5727 {
5728 name: Prime,
5729 modifier: Optional,
5730 type: {
5731 Plain: AccountId
5732 },
5733 fallback: 0x00,
5734 docs: [
5735 The prime member that helps determine the default vote behavior in case of absentations.
5736 ]
5737 }
5738 ]
5739 },
5740 calls: [
5741 {
5742 name: set_members,
5743 args: [
5744 {
5745 name: new_members,
5746 type: Vec<AccountId>
5747 },
5748 {
5749 name: prime,
5750 type: Option<AccountId>
5751 },
5752 {
5753 name: old_count,
5754 type: MemberCount
5755 }
5756 ],
5757 docs: [
5758 Set the collective's membership.,
5759 ,
5760 - `new_members`: The new member list. Be nice to the chain and provide it sorted.,
5761 - `prime`: The prime member whose vote sets the default.,
5762 - `old_count`: The upper bound for the previous number of members in storage.,
5763 Used for weight estimation.,
5764 ,
5765 Requires root origin.,
5766 ,
5767 NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but,
5768 the weight estimations rely on it to estimate dispatchable weight.,
5769 ,
5770 # <weight>,
5771 ## Weight,
5772 - `O(MP + N)` where:,
5773 - `M` old-members-count (code- and governance-bounded),
5774 - `N` new-members-count (code- and governance-bounded),
5775 - `P` proposals-count (code-bounded),
5776 - DB:,
5777 - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members,
5778 - 1 storage read (codec `O(P)`) for reading the proposals,
5779 - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal,
5780 - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one,
5781 # </weight>
5782 ]
5783 },
5784 {
5785 name: execute,
5786 args: [
5787 {
5788 name: proposal,
5789 type: Proposal
5790 },
5791 {
5792 name: length_bound,
5793 type: Compact<u32>
5794 }
5795 ],
5796 docs: [
5797 Dispatch a proposal from a member using the `Member` origin.,
5798 ,
5799 Origin must be a member of the collective.,
5800 ,
5801 # <weight>,
5802 ## Weight,
5803 - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal`,
5804 - DB: 1 read (codec `O(M)`) + DB access of `proposal`,
5805 - 1 event,
5806 # </weight>
5807 ]
5808 },
5809 {
5810 name: propose,
5811 args: [
5812 {
5813 name: threshold,
5814 type: Compact<MemberCount>
5815 },
5816 {
5817 name: proposal,
5818 type: Proposal
5819 },
5820 {
5821 name: length_bound,
5822 type: Compact<u32>
5823 }
5824 ],
5825 docs: [
5826 Add a new proposal to either be voted on or executed directly.,
5827 ,
5828 Requires the sender to be member.,
5829 ,
5830 `threshold` determines whether `proposal` is executed directly (`threshold < 2`),
5831 or put up for voting.,
5832 ,
5833 # <weight>,
5834 ## Weight,
5835 - `O(B + M + P1)` or `O(B + M + P2)` where:,
5836 - `B` is `proposal` size in bytes (length-fee-bounded),
5837 - `M` is members-count (code- and governance-bounded),
5838 - branching is influenced by `threshold` where:,
5839 - `P1` is proposal execution complexity (`threshold < 2`),
5840 - `P2` is proposals-count (code-bounded) (`threshold >= 2`),
5841 - DB:,
5842 - 1 storage read `is_member` (codec `O(M)`),
5843 - 1 storage read `ProposalOf::contains_key` (codec `O(1)`),
5844 - DB accesses influenced by `threshold`:,
5845 - EITHER storage accesses done by `proposal` (`threshold < 2`),
5846 - OR proposal insertion (`threshold <= 2`),
5847 - 1 storage mutation `Proposals` (codec `O(P2)`),
5848 - 1 storage mutation `ProposalCount` (codec `O(1)`),
5849 - 1 storage write `ProposalOf` (codec `O(B)`),
5850 - 1 storage write `Voting` (codec `O(M)`),
5851 - 1 event,
5852 # </weight>
5853 ]
5854 },
5855 {
5856 name: vote,
5857 args: [
5858 {
5859 name: proposal,
5860 type: Hash
5861 },
5862 {
5863 name: index,
5864 type: Compact<ProposalIndex>
5865 },
5866 {
5867 name: approve,
5868 type: bool
5869 }
5870 ],
5871 docs: [
5872 Add an aye or nay vote for the sender to the given proposal.,
5873 ,
5874 Requires the sender to be a member.,
5875 ,
5876 Transaction fees will be waived if the member is voting on any particular proposal,
5877 for the first time and the call is successful. Subsequent vote changes will charge a fee.,
5878 # <weight>,
5879 ## Weight,
5880 - `O(M)` where `M` is members-count (code- and governance-bounded),
5881 - DB:,
5882 - 1 storage read `Members` (codec `O(M)`),
5883 - 1 storage mutation `Voting` (codec `O(M)`),
5884 - 1 event,
5885 # </weight>
5886 ]
5887 },
5888 {
5889 name: close,
5890 args: [
5891 {
5892 name: proposal_hash,
5893 type: Hash
5894 },
5895 {
5896 name: index,
5897 type: Compact<ProposalIndex>
5898 },
5899 {
5900 name: proposal_weight_bound,
5901 type: Compact<Weight>
5902 },
5903 {
5904 name: length_bound,
5905 type: Compact<u32>
5906 }
5907 ],
5908 docs: [
5909 Close a vote that is either approved, disapproved or whose voting period has ended.,
5910 ,
5911 May be called by any signed account in order to finish voting and close the proposal.,
5912 ,
5913 If called before the end of the voting period it will only close the vote if it is,
5914 has enough votes to be approved or disapproved.,
5915 ,
5916 If called after the end of the voting period abstentions are counted as rejections,
5917 unless there is a prime member set and the prime member cast an approval.,
5918 ,
5919 If the close operation completes successfully with disapproval, the transaction fee will,
5920 be waived. Otherwise execution of the approved operation will be charged to the caller.,
5921 ,
5922 + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal.,
5923 + `length_bound`: The upper bound for the length of the proposal in storage. Checked via,
5924 `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.,
5925 ,
5926 # <weight>,
5927 ## Weight,
5928 - `O(B + M + P1 + P2)` where:,
5929 - `B` is `proposal` size in bytes (length-fee-bounded),
5930 - `M` is members-count (code- and governance-bounded),
5931 - `P1` is the complexity of `proposal` preimage.,
5932 - `P2` is proposal-count (code-bounded),
5933 - DB:,
5934 - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`),
5935 - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`),
5936 - any mutations done while executing `proposal` (`P1`),
5937 - up to 3 events,
5938 # </weight>
5939 ]
5940 },
5941 {
5942 name: disapprove_proposal,
5943 args: [
5944 {
5945 name: proposal_hash,
5946 type: Hash
5947 }
5948 ],
5949 docs: [
5950 Disapprove a proposal, close, and remove it from the system, regardless of its current state.,
5951 ,
5952 Must be called by the Root origin.,
5953 ,
5954 Parameters:,
5955 * `proposal_hash`: The hash of the proposal that should be disapproved.,
5956 ,
5957 # <weight>,
5958 Complexity: O(P) where P is the number of max proposals,
5959 DB Weight:,
5960 * Reads: Proposals,
5961 * Writes: Voting, Proposals, ProposalOf,
5962 # </weight>
5963 ]
5964 }
5965 ],
5966 events: [
5967 {
5968 name: Proposed,
5969 args: [
5970 AccountId,
5971 ProposalIndex,
5972 Hash,
5973 MemberCount
5974 ],
5975 docs: [
5976 A motion (given hash) has been proposed (by given account) with a threshold (given,
5977 `MemberCount`).,
5978 [account, proposal_index, proposal_hash, threshold]
5979 ]
5980 },
5981 {
5982 name: Voted,
5983 args: [
5984 AccountId,
5985 Hash,
5986 bool,
5987 MemberCount,
5988 MemberCount
5989 ],
5990 docs: [
5991 A motion (given hash) has been voted on by given account, leaving,
5992 a tally (yes votes and no votes given respectively as `MemberCount`).,
5993 [account, proposal_hash, voted, yes, no]
5994 ]
5995 },
5996 {
5997 name: Approved,
5998 args: [
5999 Hash
6000 ],
6001 docs: [
6002 A motion was approved by the required threshold.,
6003 [proposal_hash]
6004 ]
6005 },
6006 {
6007 name: Disapproved,
6008 args: [
6009 Hash
6010 ],
6011 docs: [
6012 A motion was not approved by the required threshold.,
6013 [proposal_hash]
6014 ]
6015 },
6016 {
6017 name: Executed,
6018 args: [
6019 Hash,
6020 DispatchResult
6021 ],
6022 docs: [
6023 A motion was executed; result will be `Ok` if it returned without error.,
6024 [proposal_hash, result]
6025 ]
6026 },
6027 {
6028 name: MemberExecuted,
6029 args: [
6030 Hash,
6031 DispatchResult
6032 ],
6033 docs: [
6034 A single member did some action; result will be `Ok` if it returned without error.,
6035 [proposal_hash, result]
6036 ]
6037 },
6038 {
6039 name: Closed,
6040 args: [
6041 Hash,
6042 MemberCount,
6043 MemberCount
6044 ],
6045 docs: [
6046 A proposal was closed because its threshold was reached or after its duration was up.,
6047 [proposal_hash, yes, no]
6048 ]
6049 }
6050 ],
6051 constants: [],
6052 errors: [
6053 {
6054 name: NotMember,
6055 docs: [
6056 Account is not a member
6057 ]
6058 },
6059 {
6060 name: DuplicateProposal,
6061 docs: [
6062 Duplicate proposals not allowed
6063 ]
6064 },
6065 {
6066 name: ProposalMissing,
6067 docs: [
6068 Proposal must exist
6069 ]
6070 },
6071 {
6072 name: WrongIndex,
6073 docs: [
6074 Mismatched index
6075 ]
6076 },
6077 {
6078 name: DuplicateVote,
6079 docs: [
6080 Duplicate vote ignored
6081 ]
6082 },
6083 {
6084 name: AlreadyInitialized,
6085 docs: [
6086 Members are already initialized!
6087 ]
6088 },
6089 {
6090 name: TooEarly,
6091 docs: [
6092 The close call was made too early, before the end of the voting.
6093 ]
6094 },
6095 {
6096 name: TooManyProposals,
6097 docs: [
6098 There can only be a maximum of `MaxProposals` active proposals.
6099 ]
6100 },
6101 {
6102 name: WrongProposalWeight,
6103 docs: [
6104 The given weight bound for the proposal was too low.
6105 ]
6106 },
6107 {
6108 name: WrongProposalLength,
6109 docs: [
6110 The given length bound for the proposal was too low.
6111 ]
6112 }
6113 ],
6114 index: 62
6115 },
6116 {
6117 name: Treasury,
6118 storage: {
6119 prefix: Treasury,
6120 items: [
6121 {
6122 name: ProposalCount,
6123 modifier: Default,
6124 type: {
6125 Plain: ProposalIndex
6126 },
6127 fallback: 0x00000000,
6128 docs: [
6129 Number of proposals that have been made.
6130 ]
6131 },
6132 {
6133 name: Proposals,
6134 modifier: Optional,
6135 type: {
6136 Map: {
6137 hasher: Twox64Concat,
6138 key: ProposalIndex,
6139 value: Proposal,
6140 linked: false
6141 }
6142 },
6143 fallback: 0x00,
6144 docs: [
6145 Proposals that have been made.
6146 ]
6147 },
6148 {
6149 name: Approvals,
6150 modifier: Default,
6151 type: {
6152 Plain: Vec<ProposalIndex>
6153 },
6154 fallback: 0x00,
6155 docs: [
6156 Proposal indices that have been approved but not yet awarded.
6157 ]
6158 }
6159 ]
6160 },
6161 calls: [
6162 {
6163 name: propose_spend,
6164 args: [
6165 {
6166 name: value,
6167 type: Compact<BalanceOf>
6168 },
6169 {
6170 name: beneficiary,
6171 type: LookupSource
6172 }
6173 ],
6174 docs: [
6175 Put forward a suggestion for spending. A deposit proportional to the value,
6176 is reserved and slashed if the proposal is rejected. It is returned once the,
6177 proposal is awarded.,
6178 ,
6179 # <weight>,
6180 - Complexity: O(1),
6181 - DbReads: `ProposalCount`, `origin account`,
6182 - DbWrites: `ProposalCount`, `Proposals`, `origin account`,
6183 # </weight>
6184 ]
6185 },
6186 {
6187 name: reject_proposal,
6188 args: [
6189 {
6190 name: proposal_id,
6191 type: Compact<ProposalIndex>
6192 }
6193 ],
6194 docs: [
6195 Reject a proposed spend. The original deposit will be slashed.,
6196 ,
6197 May only be called from `T::RejectOrigin`.,
6198 ,
6199 # <weight>,
6200 - Complexity: O(1),
6201 - DbReads: `Proposals`, `rejected proposer account`,
6202 - DbWrites: `Proposals`, `rejected proposer account`,
6203 # </weight>
6204 ]
6205 },
6206 {
6207 name: approve_proposal,
6208 args: [
6209 {
6210 name: proposal_id,
6211 type: Compact<ProposalIndex>
6212 }
6213 ],
6214 docs: [
6215 Approve a proposal. At a later time, the proposal will be allocated to the beneficiary,
6216 and the original deposit will be returned.,
6217 ,
6218 May only be called from `T::ApproveOrigin`.,
6219 ,
6220 # <weight>,
6221 - Complexity: O(1).,
6222 - DbReads: `Proposals`, `Approvals`,
6223 - DbWrite: `Approvals`,
6224 # </weight>
6225 ]
6226 }
6227 ],
6228 events: [
6229 {
6230 name: Proposed,
6231 args: [
6232 ProposalIndex
6233 ],
6234 docs: [
6235 New proposal. [proposal_index]
6236 ]
6237 },
6238 {
6239 name: Spending,
6240 args: [
6241 Balance
6242 ],
6243 docs: [
6244 We have ended a spend period and will now allocate funds. [budget_remaining]
6245 ]
6246 },
6247 {
6248 name: Awarded,
6249 args: [
6250 ProposalIndex,
6251 Balance,
6252 AccountId
6253 ],
6254 docs: [
6255 Some funds have been allocated. [proposal_index, award, beneficiary]
6256 ]
6257 },
6258 {
6259 name: Rejected,
6260 args: [
6261 ProposalIndex,
6262 Balance
6263 ],
6264 docs: [
6265 A proposal was rejected; funds were slashed. [proposal_index, slashed]
6266 ]
6267 },
6268 {
6269 name: Burnt,
6270 args: [
6271 Balance
6272 ],
6273 docs: [
6274 Some of our funds have been burnt. [burn]
6275 ]
6276 },
6277 {
6278 name: Rollover,
6279 args: [
6280 Balance
6281 ],
6282 docs: [
6283 Spending has finished; this is the amount that rolls over until next spend.,
6284 [budget_remaining]
6285 ]
6286 },
6287 {
6288 name: Deposit,
6289 args: [
6290 Balance
6291 ],
6292 docs: [
6293 Some funds have been deposited. [deposit]
6294 ]
6295 }
6296 ],
6297 constants: [
6298 {
6299 name: ProposalBond,
6300 type: Permill,
6301 value: 0x50c30000,
6302 docs: [
6303 Fraction of a proposal's value that should be bonded in order to place the proposal.,
6304 An accepted proposal gets these back. A rejected proposal does not.
6305 ]
6306 },
6307 {
6308 name: ProposalBondMinimum,
6309 type: BalanceOf,
6310 value: 0x0010a5d4e80000000000000000000000,
6311 docs: [
6312 Minimum amount of funds that should be placed in a deposit for making a proposal.
6313 ]
6314 },
6315 {
6316 name: SpendPeriod,
6317 type: BlockNumber,
6318 value: 0x201c0000,
6319 docs: [
6320 Period between successive spends.
6321 ]
6322 },
6323 {
6324 name: Burn,
6325 type: Permill,
6326 value: 0x00000000,
6327 docs: [
6328 Percentage of spare funds (if any) that are burnt per spend period.
6329 ]
6330 },
6331 {
6332 name: PalletId,
6333 type: PalletId,
6334 value: py/trsry,
6335 docs: [
6336 The treasury's module id, used for deriving its sovereign account ID.
6337 ]
6338 }
6339 ],
6340 errors: [
6341 {
6342 name: InsufficientProposersBalance,
6343 docs: [
6344 Proposer's balance is too low.
6345 ]
6346 },
6347 {
6348 name: InvalidIndex,
6349 docs: [
6350 No proposal or bounty at that index.
6351 ]
6352 },
6353 {
6354 name: TooManyApprovals,
6355 docs: [
6356 Too many approvals in the queue.
6357 ]
6358 }
6359 ],
6360 index: 63
6361 },
6362 {
6363 name: Bounties,
6364 storage: {
6365 prefix: Treasury,
6366 items: [
6367 {
6368 name: BountyCount,
6369 modifier: Default,
6370 type: {
6371 Plain: BountyIndex
6372 },
6373 fallback: 0x00000000,
6374 docs: [
6375 Number of bounty proposals that have been made.
6376 ]
6377 },
6378 {
6379 name: Bounties,
6380 modifier: Optional,
6381 type: {
6382 Map: {
6383 hasher: Twox64Concat,
6384 key: BountyIndex,
6385 value: Bounty,
6386 linked: false
6387 }
6388 },
6389 fallback: 0x00,
6390 docs: [
6391 Bounties that have been made.
6392 ]
6393 },
6394 {
6395 name: BountyDescriptions,
6396 modifier: Optional,
6397 type: {
6398 Map: {
6399 hasher: Twox64Concat,
6400 key: BountyIndex,
6401 value: Bytes,
6402 linked: false
6403 }
6404 },
6405 fallback: 0x00,
6406 docs: [
6407 The description of each bounty.
6408 ]
6409 },
6410 {
6411 name: BountyApprovals,
6412 modifier: Default,
6413 type: {
6414 Plain: Vec<BountyIndex>
6415 },
6416 fallback: 0x00,
6417 docs: [
6418 Bounty indices that have been approved but not yet funded.
6419 ]
6420 }
6421 ]
6422 },
6423 calls: [
6424 {
6425 name: propose_bounty,
6426 args: [
6427 {
6428 name: value,
6429 type: Compact<BalanceOf>
6430 },
6431 {
6432 name: description,
6433 type: Bytes
6434 }
6435 ],
6436 docs: [
6437 Propose a new bounty.,
6438 ,
6439 The dispatch origin for this call must be _Signed_.,
6440 ,
6441 Payment: `TipReportDepositBase` will be reserved from the origin account, as well as,
6442 `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval,,
6443 or slashed when rejected.,
6444 ,
6445 - `curator`: The curator account whom will manage this bounty.,
6446 - `fee`: The curator fee.,
6447 - `value`: The total payment amount of this bounty, curator fee included.,
6448 - `description`: The description of this bounty.
6449 ]
6450 },
6451 {
6452 name: approve_bounty,
6453 args: [
6454 {
6455 name: bounty_id,
6456 type: Compact<BountyIndex>
6457 }
6458 ],
6459 docs: [
6460 Approve a bounty proposal. At a later time, the bounty will be funded and become active,
6461 and the original deposit will be returned.,
6462 ,
6463 May only be called from `T::ApproveOrigin`.,
6464 ,
6465 # <weight>,
6466 - O(1).,
6467 # </weight>
6468 ]
6469 },
6470 {
6471 name: propose_curator,
6472 args: [
6473 {
6474 name: bounty_id,
6475 type: Compact<BountyIndex>
6476 },
6477 {
6478 name: curator,
6479 type: LookupSource
6480 },
6481 {
6482 name: fee,
6483 type: Compact<BalanceOf>
6484 }
6485 ],
6486 docs: [
6487 Assign a curator to a funded bounty.,
6488 ,
6489 May only be called from `T::ApproveOrigin`.,
6490 ,
6491 # <weight>,
6492 - O(1).,
6493 # </weight>
6494 ]
6495 },
6496 {
6497 name: unassign_curator,
6498 args: [
6499 {
6500 name: bounty_id,
6501 type: Compact<BountyIndex>
6502 }
6503 ],
6504 docs: [
6505 Unassign curator from a bounty.,
6506 ,
6507 This function can only be called by the `RejectOrigin` a signed origin.,
6508 ,
6509 If this function is called by the `RejectOrigin`, we assume that the curator is malicious,
6510 or inactive. As a result, we will slash the curator when possible.,
6511 ,
6512 If the origin is the curator, we take this as a sign they are unable to do their job and,
6513 they willingly give up. We could slash them, but for now we allow them to recover their,
6514 deposit and exit without issue. (We may want to change this if it is abused.),
6515 ,
6516 Finally, the origin can be anyone if and only if the curator is inactive. This allows,
6517 anyone in the community to call out that a curator is not doing their due diligence, and,
6518 we should pick a new curator. In this case the curator should also be slashed.,
6519 ,
6520 # <weight>,
6521 - O(1).,
6522 # </weight>
6523 ]
6524 },
6525 {
6526 name: accept_curator,
6527 args: [
6528 {
6529 name: bounty_id,
6530 type: Compact<BountyIndex>
6531 }
6532 ],
6533 docs: [
6534 Accept the curator role for a bounty.,
6535 A deposit will be reserved from curator and refund upon successful payout.,
6536 ,
6537 May only be called from the curator.,
6538 ,
6539 # <weight>,
6540 - O(1).,
6541 # </weight>
6542 ]
6543 },
6544 {
6545 name: award_bounty,
6546 args: [
6547 {
6548 name: bounty_id,
6549 type: Compact<BountyIndex>
6550 },
6551 {
6552 name: beneficiary,
6553 type: LookupSource
6554 }
6555 ],
6556 docs: [
6557 Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay.,
6558 ,
6559 The dispatch origin for this call must be the curator of this bounty.,
6560 ,
6561 - `bounty_id`: Bounty ID to award.,
6562 - `beneficiary`: The beneficiary account whom will receive the payout.,
6563 ,
6564 # <weight>,
6565 - O(1).,
6566 # </weight>
6567 ]
6568 },
6569 {
6570 name: claim_bounty,
6571 args: [
6572 {
6573 name: bounty_id,
6574 type: Compact<BountyIndex>
6575 }
6576 ],
6577 docs: [
6578 Claim the payout from an awarded bounty after payout delay.,
6579 ,
6580 The dispatch origin for this call must be the beneficiary of this bounty.,
6581 ,
6582 - `bounty_id`: Bounty ID to claim.,
6583 ,
6584 # <weight>,
6585 - O(1).,
6586 # </weight>
6587 ]
6588 },
6589 {
6590 name: close_bounty,
6591 args: [
6592 {
6593 name: bounty_id,
6594 type: Compact<BountyIndex>
6595 }
6596 ],
6597 docs: [
6598 Cancel a proposed or active bounty. All the funds will be sent to treasury and,
6599 the curator deposit will be unreserved if possible.,
6600 ,
6601 Only `T::RejectOrigin` is able to cancel a bounty.,
6602 ,
6603 - `bounty_id`: Bounty ID to cancel.,
6604 ,
6605 # <weight>,
6606 - O(1).,
6607 # </weight>
6608 ]
6609 },
6610 {
6611 name: extend_bounty_expiry,
6612 args: [
6613 {
6614 name: bounty_id,
6615 type: Compact<BountyIndex>
6616 },
6617 {
6618 name: _remark,
6619 type: Bytes
6620 }
6621 ],
6622 docs: [
6623 Extend the expiry time of an active bounty.,
6624 ,
6625 The dispatch origin for this call must be the curator of this bounty.,
6626 ,
6627 - `bounty_id`: Bounty ID to extend.,
6628 - `remark`: additional information.,
6629 ,
6630 # <weight>,
6631 - O(1).,
6632 # </weight>
6633 ]
6634 }
6635 ],
6636 events: [
6637 {
6638 name: BountyProposed,
6639 args: [
6640 BountyIndex
6641 ],
6642 docs: [
6643 New bounty proposal. [index]
6644 ]
6645 },
6646 {
6647 name: BountyRejected,
6648 args: [
6649 BountyIndex,
6650 Balance
6651 ],
6652 docs: [
6653 A bounty proposal was rejected; funds were slashed. [index, bond]
6654 ]
6655 },
6656 {
6657 name: BountyBecameActive,
6658 args: [
6659 BountyIndex
6660 ],
6661 docs: [
6662 A bounty proposal is funded and became active. [index]
6663 ]
6664 },
6665 {
6666 name: BountyAwarded,
6667 args: [
6668 BountyIndex,
6669 AccountId
6670 ],
6671 docs: [
6672 A bounty is awarded to a beneficiary. [index, beneficiary]
6673 ]
6674 },
6675 {
6676 name: BountyClaimed,
6677 args: [
6678 BountyIndex,
6679 Balance,
6680 AccountId
6681 ],
6682 docs: [
6683 A bounty is claimed by beneficiary. [index, payout, beneficiary]
6684 ]
6685 },
6686 {
6687 name: BountyCanceled,
6688 args: [
6689 BountyIndex
6690 ],
6691 docs: [
6692 A bounty is cancelled. [index]
6693 ]
6694 },
6695 {
6696 name: BountyExtended,
6697 args: [
6698 BountyIndex
6699 ],
6700 docs: [
6701 A bounty expiry is extended. [index]
6702 ]
6703 }
6704 ],
6705 constants: [
6706 {
6707 name: DataDepositPerByte,
6708 type: BalanceOf,
6709 value: 0x00e40b54020000000000000000000000,
6710 docs: [
6711 The amount held on deposit per byte within bounty description.
6712 ]
6713 },
6714 {
6715 name: BountyDepositBase,
6716 type: BalanceOf,
6717 value: 0x0010a5d4e80000000000000000000000,
6718 docs: [
6719 The amount held on deposit for placing a bounty proposal.
6720 ]
6721 },
6722 {
6723 name: BountyDepositPayoutDelay,
6724 type: BlockNumber,
6725 value: 0x201c0000,
6726 docs: [
6727 The delay period for which a bounty beneficiary need to wait before claim the payout.
6728 ]
6729 },
6730 {
6731 name: BountyUpdatePeriod,
6732 type: BlockNumber,
6733 value: 0xc0890100,
6734 docs: [
6735 Bounty duration in blocks.
6736 ]
6737 },
6738 {
6739 name: BountyCuratorDeposit,
6740 type: Permill,
6741 value: 0x20a10700,
6742 docs: [
6743 Percentage of the curator fee that will be reserved upfront as deposit for bounty curator.
6744 ]
6745 },
6746 {
6747 name: BountyValueMinimum,
6748 type: BalanceOf,
6749 value: 0x005039278c0400000000000000000000,
6750 docs: [
6751 Minimum value for a bounty.
6752 ]
6753 },
6754 {
6755 name: MaximumReasonLength,
6756 type: u32,
6757 value: 0x00400000,
6758 docs: [
6759 Maximum acceptable reason length.
6760 ]
6761 }
6762 ],
6763 errors: [
6764 {
6765 name: InsufficientProposersBalance,
6766 docs: [
6767 Proposer's balance is too low.
6768 ]
6769 },
6770 {
6771 name: InvalidIndex,
6772 docs: [
6773 No proposal or bounty at that index.
6774 ]
6775 },
6776 {
6777 name: ReasonTooBig,
6778 docs: [
6779 The reason given is just too big.
6780 ]
6781 },
6782 {
6783 name: UnexpectedStatus,
6784 docs: [
6785 The bounty status is unexpected.
6786 ]
6787 },
6788 {
6789 name: RequireCurator,
6790 docs: [
6791 Require bounty curator.
6792 ]
6793 },
6794 {
6795 name: InvalidValue,
6796 docs: [
6797 Invalid bounty value.
6798 ]
6799 },
6800 {
6801 name: InvalidFee,
6802 docs: [
6803 Invalid bounty fee.
6804 ]
6805 },
6806 {
6807 name: PendingPayout,
6808 docs: [
6809 A bounty payout is pending.,
6810 To cancel the bounty, you must unassign and slash the curator.
6811 ]
6812 },
6813 {
6814 name: Premature,
6815 docs: [
6816 The bounties cannot be claimed/closed because it's still in the countdown period.
6817 ]
6818 }
6819 ],
6820 index: 64
6821 },
6822 {
6823 name: Lottery,
6824 storage: {
6825 prefix: Lottery,
6826 items: [
6827 {
6828 name: LotteryIndex,
6829 modifier: Default,
6830 type: {
6831 Plain: u32
6832 },
6833 fallback: 0x00000000,
6834 docs: []
6835 },
6836 {
6837 name: Lottery,
6838 modifier: Optional,
6839 type: {
6840 Plain: LotteryConfig
6841 },
6842 fallback: 0x00,
6843 docs: [
6844 The configuration for the current lottery.
6845 ]
6846 },
6847 {
6848 name: Participants,
6849 modifier: Default,
6850 type: {
6851 Map: {
6852 hasher: Twox64Concat,
6853 key: AccountId,
6854 value: (u32,Vec<CallIndex>),
6855 linked: false
6856 }
6857 },
6858 fallback: 0x0000000000,
6859 docs: [
6860 Users who have purchased a ticket. (Lottery Index, Tickets Purchased)
6861 ]
6862 },
6863 {
6864 name: TicketsCount,
6865 modifier: Default,
6866 type: {
6867 Plain: u32
6868 },
6869 fallback: 0x00000000,
6870 docs: [
6871 Total number of tickets sold.
6872 ]
6873 },
6874 {
6875 name: Tickets,
6876 modifier: Optional,
6877 type: {
6878 Map: {
6879 hasher: Twox64Concat,
6880 key: u32,
6881 value: AccountId,
6882 linked: false
6883 }
6884 },
6885 fallback: 0x00,
6886 docs: [
6887 Each ticket's owner.,
6888 ,
6889 May have residual storage from previous lotteries. Use `TicketsCount` to see which ones,
6890 are actually valid ticket mappings.
6891 ]
6892 },
6893 {
6894 name: CallIndices,
6895 modifier: Default,
6896 type: {
6897 Plain: Vec<CallIndex>
6898 },
6899 fallback: 0x00,
6900 docs: [
6901 The calls stored in this pallet to be used in an active lottery if configured,
6902 by `Config::ValidateCall`.
6903 ]
6904 }
6905 ]
6906 },
6907 calls: [
6908 {
6909 name: buy_ticket,
6910 args: [
6911 {
6912 name: call,
6913 type: Call
6914 }
6915 ],
6916 docs: [
6917 Buy a ticket to enter the lottery.,
6918 ,
6919 This extrinsic acts as a passthrough function for `call`. In all,
6920 situations where `call` alone would succeed, this extrinsic should,
6921 succeed.,
6922 ,
6923 If `call` is successful, then we will attempt to purchase a ticket,,
6924 which may fail silently. To detect success of a ticket purchase, you,
6925 should listen for the `TicketBought` event.,
6926 ,
6927 This extrinsic must be called by a signed origin.
6928 ]
6929 },
6930 {
6931 name: set_calls,
6932 args: [
6933 {
6934 name: calls,
6935 type: Vec<Call>
6936 }
6937 ],
6938 docs: [
6939 Set calls in storage which can be used to purchase a lottery ticket.,
6940 ,
6941 This function only matters if you use the `ValidateCall` implementation,
6942 provided by this pallet, which uses storage to determine the valid calls.,
6943 ,
6944 This extrinsic must be called by the Manager origin.
6945 ]
6946 },
6947 {
6948 name: start_lottery,
6949 args: [
6950 {
6951 name: price,
6952 type: BalanceOf
6953 },
6954 {
6955 name: length,
6956 type: BlockNumber
6957 },
6958 {
6959 name: delay,
6960 type: BlockNumber
6961 },
6962 {
6963 name: repeat,
6964 type: bool
6965 }
6966 ],
6967 docs: [
6968 Start a lottery using the provided configuration.,
6969 ,
6970 This extrinsic must be called by the `ManagerOrigin`.,
6971 ,
6972 Parameters:,
6973 ,
6974 * `price`: The cost of a single ticket.,
6975 * `length`: How long the lottery should run for starting at the current block.,
6976 * `delay`: How long after the lottery end we should wait before picking a winner.,
6977 * `repeat`: If the lottery should repeat when completed.
6978 ]
6979 },
6980 {
6981 name: stop_repeat,
6982 args: [],
6983 docs: [
6984 If a lottery is repeating, you can use this to stop the repeat.,
6985 The lottery will continue to run to completion.,
6986 ,
6987 This extrinsic must be called by the `ManagerOrigin`.
6988 ]
6989 }
6990 ],
6991 events: [
6992 {
6993 name: LotteryStarted,
6994 args: [],
6995 docs: [
6996 A lottery has been started!
6997 ]
6998 },
6999 {
7000 name: CallsUpdated,
7001 args: [],
7002 docs: [
7003 A new set of calls have been set!
7004 ]
7005 },
7006 {
7007 name: Winner,
7008 args: [
7009 AccountId,
7010 Balance
7011 ],
7012 docs: [
7013 A winner has been chosen!
7014 ]
7015 },
7016 {
7017 name: TicketBought,
7018 args: [
7019 AccountId,
7020 CallIndex
7021 ],
7022 docs: [
7023 A ticket has been bought!
7024 ]
7025 }
7026 ],
7027 constants: [
7028 {
7029 name: PalletId,
7030 type: PalletId,
7031 value: py/lotto,
7032 docs: [
7033 The Lottery's pallet id
7034 ]
7035 },
7036 {
7037 name: MaxCalls,
7038 type: u32,
7039 value: 0x0a000000,
7040 docs: [
7041 The max number of calls available in a single lottery.
7042 ]
7043 }
7044 ],
7045 errors: [
7046 {
7047 name: NotConfigured,
7048 docs: [
7049 A lottery has not been configured.
7050 ]
7051 },
7052 {
7053 name: InProgress,
7054 docs: [
7055 A lottery is already in progress.
7056 ]
7057 },
7058 {
7059 name: AlreadyEnded,
7060 docs: [
7061 A lottery has already ended.
7062 ]
7063 },
7064 {
7065 name: InvalidCall,
7066 docs: [
7067 The call is not valid for an open lottery.
7068 ]
7069 },
7070 {
7071 name: AlreadyParticipating,
7072 docs: [
7073 You are already participating in the lottery with this call.
7074 ]
7075 },
7076 {
7077 name: TooManyCalls,
7078 docs: [
7079 Too many calls for a single lottery.
7080 ]
7081 },
7082 {
7083 name: EncodingFailed,
7084 docs: [
7085 Failed to encode calls
7086 ]
7087 }
7088 ],
7089 index: 65
7090 },
7091 {
7092 name: TechnicalCommittee,
7093 storage: {
7094 prefix: Instance2Collective,
7095 items: [
7096 {
7097 name: Proposals,
7098 modifier: Default,
7099 type: {
7100 Plain: Vec<Hash>
7101 },
7102 fallback: 0x00,
7103 docs: [
7104 The hashes of the active proposals.
7105 ]
7106 },
7107 {
7108 name: ProposalOf,
7109 modifier: Optional,
7110 type: {
7111 Map: {
7112 hasher: Identity,
7113 key: Hash,
7114 value: Proposal,
7115 linked: false
7116 }
7117 },
7118 fallback: 0x00,
7119 docs: [
7120 Actual proposal for a given hash, if it's current.
7121 ]
7122 },
7123 {
7124 name: Voting,
7125 modifier: Optional,
7126 type: {
7127 Map: {
7128 hasher: Identity,
7129 key: Hash,
7130 value: Votes,
7131 linked: false
7132 }
7133 },
7134 fallback: 0x00,
7135 docs: [
7136 Votes on a given proposal, if it is ongoing.
7137 ]
7138 },
7139 {
7140 name: ProposalCount,
7141 modifier: Default,
7142 type: {
7143 Plain: u32
7144 },
7145 fallback: 0x00000000,
7146 docs: [
7147 Proposals so far.
7148 ]
7149 },
7150 {
7151 name: Members,
7152 modifier: Default,
7153 type: {
7154 Plain: Vec<AccountId>
7155 },
7156 fallback: 0x00,
7157 docs: [
7158 The current members of the collective. This is stored sorted (just by value).
7159 ]
7160 },
7161 {
7162 name: Prime,
7163 modifier: Optional,
7164 type: {
7165 Plain: AccountId
7166 },
7167 fallback: 0x00,
7168 docs: [
7169 The prime member that helps determine the default vote behavior in case of absentations.
7170 ]
7171 }
7172 ]
7173 },
7174 calls: [
7175 {
7176 name: set_members,
7177 args: [
7178 {
7179 name: new_members,
7180 type: Vec<AccountId>
7181 },
7182 {
7183 name: prime,
7184 type: Option<AccountId>
7185 },
7186 {
7187 name: old_count,
7188 type: MemberCount
7189 }
7190 ],
7191 docs: [
7192 Set the collective's membership.,
7193 ,
7194 - `new_members`: The new member list. Be nice to the chain and provide it sorted.,
7195 - `prime`: The prime member whose vote sets the default.,
7196 - `old_count`: The upper bound for the previous number of members in storage.,
7197 Used for weight estimation.,
7198 ,
7199 Requires root origin.,
7200 ,
7201 NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but,
7202 the weight estimations rely on it to estimate dispatchable weight.,
7203 ,
7204 # <weight>,
7205 ## Weight,
7206 - `O(MP + N)` where:,
7207 - `M` old-members-count (code- and governance-bounded),
7208 - `N` new-members-count (code- and governance-bounded),
7209 - `P` proposals-count (code-bounded),
7210 - DB:,
7211 - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members,
7212 - 1 storage read (codec `O(P)`) for reading the proposals,
7213 - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal,
7214 - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one,
7215 # </weight>
7216 ]
7217 },
7218 {
7219 name: execute,
7220 args: [
7221 {
7222 name: proposal,
7223 type: Proposal
7224 },
7225 {
7226 name: length_bound,
7227 type: Compact<u32>
7228 }
7229 ],
7230 docs: [
7231 Dispatch a proposal from a member using the `Member` origin.,
7232 ,
7233 Origin must be a member of the collective.,
7234 ,
7235 # <weight>,
7236 ## Weight,
7237 - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal`,
7238 - DB: 1 read (codec `O(M)`) + DB access of `proposal`,
7239 - 1 event,
7240 # </weight>
7241 ]
7242 },
7243 {
7244 name: propose,
7245 args: [
7246 {
7247 name: threshold,
7248 type: Compact<MemberCount>
7249 },
7250 {
7251 name: proposal,
7252 type: Proposal
7253 },
7254 {
7255 name: length_bound,
7256 type: Compact<u32>
7257 }
7258 ],
7259 docs: [
7260 Add a new proposal to either be voted on or executed directly.,
7261 ,
7262 Requires the sender to be member.,
7263 ,
7264 `threshold` determines whether `proposal` is executed directly (`threshold < 2`),
7265 or put up for voting.,
7266 ,
7267 # <weight>,
7268 ## Weight,
7269 - `O(B + M + P1)` or `O(B + M + P2)` where:,
7270 - `B` is `proposal` size in bytes (length-fee-bounded),
7271 - `M` is members-count (code- and governance-bounded),
7272 - branching is influenced by `threshold` where:,
7273 - `P1` is proposal execution complexity (`threshold < 2`),
7274 - `P2` is proposals-count (code-bounded) (`threshold >= 2`),
7275 - DB:,
7276 - 1 storage read `is_member` (codec `O(M)`),
7277 - 1 storage read `ProposalOf::contains_key` (codec `O(1)`),
7278 - DB accesses influenced by `threshold`:,
7279 - EITHER storage accesses done by `proposal` (`threshold < 2`),
7280 - OR proposal insertion (`threshold <= 2`),
7281 - 1 storage mutation `Proposals` (codec `O(P2)`),
7282 - 1 storage mutation `ProposalCount` (codec `O(1)`),
7283 - 1 storage write `ProposalOf` (codec `O(B)`),
7284 - 1 storage write `Voting` (codec `O(M)`),
7285 - 1 event,
7286 # </weight>
7287 ]
7288 },
7289 {
7290 name: vote,
7291 args: [
7292 {
7293 name: proposal,
7294 type: Hash
7295 },
7296 {
7297 name: index,
7298 type: Compact<ProposalIndex>
7299 },
7300 {
7301 name: approve,
7302 type: bool
7303 }
7304 ],
7305 docs: [
7306 Add an aye or nay vote for the sender to the given proposal.,
7307 ,
7308 Requires the sender to be a member.,
7309 ,
7310 Transaction fees will be waived if the member is voting on any particular proposal,
7311 for the first time and the call is successful. Subsequent vote changes will charge a fee.,
7312 # <weight>,
7313 ## Weight,
7314 - `O(M)` where `M` is members-count (code- and governance-bounded),
7315 - DB:,
7316 - 1 storage read `Members` (codec `O(M)`),
7317 - 1 storage mutation `Voting` (codec `O(M)`),
7318 - 1 event,
7319 # </weight>
7320 ]
7321 },
7322 {
7323 name: close,
7324 args: [
7325 {
7326 name: proposal_hash,
7327 type: Hash
7328 },
7329 {
7330 name: index,
7331 type: Compact<ProposalIndex>
7332 },
7333 {
7334 name: proposal_weight_bound,
7335 type: Compact<Weight>
7336 },
7337 {
7338 name: length_bound,
7339 type: Compact<u32>
7340 }
7341 ],
7342 docs: [
7343 Close a vote that is either approved, disapproved or whose voting period has ended.,
7344 ,
7345 May be called by any signed account in order to finish voting and close the proposal.,
7346 ,
7347 If called before the end of the voting period it will only close the vote if it is,
7348 has enough votes to be approved or disapproved.,
7349 ,
7350 If called after the end of the voting period abstentions are counted as rejections,
7351 unless there is a prime member set and the prime member cast an approval.,
7352 ,
7353 If the close operation completes successfully with disapproval, the transaction fee will,
7354 be waived. Otherwise execution of the approved operation will be charged to the caller.,
7355 ,
7356 + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal.,
7357 + `length_bound`: The upper bound for the length of the proposal in storage. Checked via,
7358 `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.,
7359 ,
7360 # <weight>,
7361 ## Weight,
7362 - `O(B + M + P1 + P2)` where:,
7363 - `B` is `proposal` size in bytes (length-fee-bounded),
7364 - `M` is members-count (code- and governance-bounded),
7365 - `P1` is the complexity of `proposal` preimage.,
7366 - `P2` is proposal-count (code-bounded),
7367 - DB:,
7368 - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`),
7369 - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`),
7370 - any mutations done while executing `proposal` (`P1`),
7371 - up to 3 events,
7372 # </weight>
7373 ]
7374 },
7375 {
7376 name: disapprove_proposal,
7377 args: [
7378 {
7379 name: proposal_hash,
7380 type: Hash
7381 }
7382 ],
7383 docs: [
7384 Disapprove a proposal, close, and remove it from the system, regardless of its current state.,
7385 ,
7386 Must be called by the Root origin.,
7387 ,
7388 Parameters:,
7389 * `proposal_hash`: The hash of the proposal that should be disapproved.,
7390 ,
7391 # <weight>,
7392 Complexity: O(P) where P is the number of max proposals,
7393 DB Weight:,
7394 * Reads: Proposals,
7395 * Writes: Voting, Proposals, ProposalOf,
7396 # </weight>
7397 ]
7398 }
7399 ],
7400 events: [
7401 {
7402 name: Proposed,
7403 args: [
7404 AccountId,
7405 ProposalIndex,
7406 Hash,
7407 MemberCount
7408 ],
7409 docs: [
7410 A motion (given hash) has been proposed (by given account) with a threshold (given,
7411 `MemberCount`).,
7412 [account, proposal_index, proposal_hash, threshold]
7413 ]
7414 },
7415 {
7416 name: Voted,
7417 args: [
7418 AccountId,
7419 Hash,
7420 bool,
7421 MemberCount,
7422 MemberCount
7423 ],
7424 docs: [
7425 A motion (given hash) has been voted on by given account, leaving,
7426 a tally (yes votes and no votes given respectively as `MemberCount`).,
7427 [account, proposal_hash, voted, yes, no]
7428 ]
7429 },
7430 {
7431 name: Approved,
7432 args: [
7433 Hash
7434 ],
7435 docs: [
7436 A motion was approved by the required threshold.,
7437 [proposal_hash]
7438 ]
7439 },
7440 {
7441 name: Disapproved,
7442 args: [
7443 Hash
7444 ],
7445 docs: [
7446 A motion was not approved by the required threshold.,
7447 [proposal_hash]
7448 ]
7449 },
7450 {
7451 name: Executed,
7452 args: [
7453 Hash,
7454 DispatchResult
7455 ],
7456 docs: [
7457 A motion was executed; result will be `Ok` if it returned without error.,
7458 [proposal_hash, result]
7459 ]
7460 },
7461 {
7462 name: MemberExecuted,
7463 args: [
7464 Hash,
7465 DispatchResult
7466 ],
7467 docs: [
7468 A single member did some action; result will be `Ok` if it returned without error.,
7469 [proposal_hash, result]
7470 ]
7471 },
7472 {
7473 name: Closed,
7474 args: [
7475 Hash,
7476 MemberCount,
7477 MemberCount
7478 ],
7479 docs: [
7480 A proposal was closed because its threshold was reached or after its duration was up.,
7481 [proposal_hash, yes, no]
7482 ]
7483 }
7484 ],
7485 constants: [],
7486 errors: [
7487 {
7488 name: NotMember,
7489 docs: [
7490 Account is not a member
7491 ]
7492 },
7493 {
7494 name: DuplicateProposal,
7495 docs: [
7496 Duplicate proposals not allowed
7497 ]
7498 },
7499 {
7500 name: ProposalMissing,
7501 docs: [
7502 Proposal must exist
7503 ]
7504 },
7505 {
7506 name: WrongIndex,
7507 docs: [
7508 Mismatched index
7509 ]
7510 },
7511 {
7512 name: DuplicateVote,
7513 docs: [
7514 Duplicate vote ignored
7515 ]
7516 },
7517 {
7518 name: AlreadyInitialized,
7519 docs: [
7520 Members are already initialized!
7521 ]
7522 },
7523 {
7524 name: TooEarly,
7525 docs: [
7526 The close call was made too early, before the end of the voting.
7527 ]
7528 },
7529 {
7530 name: TooManyProposals,
7531 docs: [
7532 There can only be a maximum of `MaxProposals` active proposals.
7533 ]
7534 },
7535 {
7536 name: WrongProposalWeight,
7537 docs: [
7538 The given weight bound for the proposal was too low.
7539 ]
7540 },
7541 {
7542 name: WrongProposalLength,
7543 docs: [
7544 The given length bound for the proposal was too low.
7545 ]
7546 }
7547 ],
7548 index: 66
7549 },
7550 {
7551 name: TechnicalMembership,
7552 storage: {
7553 prefix: Instance1Membership,
7554 items: [
7555 {
7556 name: Members,
7557 modifier: Default,
7558 type: {
7559 Plain: Vec<AccountId>
7560 },
7561 fallback: 0x00,
7562 docs: [
7563 The current membership, stored as an ordered Vec.
7564 ]
7565 },
7566 {
7567 name: Prime,
7568 modifier: Optional,
7569 type: {
7570 Plain: AccountId
7571 },
7572 fallback: 0x00,
7573 docs: [
7574 The current prime member, if one exists.
7575 ]
7576 }
7577 ]
7578 },
7579 calls: [
7580 {
7581 name: add_member,
7582 args: [
7583 {
7584 name: who,
7585 type: AccountId
7586 }
7587 ],
7588 docs: [
7589 Add a member `who` to the set.,
7590 ,
7591 May only be called from `T::AddOrigin`.
7592 ]
7593 },
7594 {
7595 name: remove_member,
7596 args: [
7597 {
7598 name: who,
7599 type: AccountId
7600 }
7601 ],
7602 docs: [
7603 Remove a member `who` from the set.,
7604 ,
7605 May only be called from `T::RemoveOrigin`.
7606 ]
7607 },
7608 {
7609 name: swap_member,
7610 args: [
7611 {
7612 name: remove,
7613 type: AccountId
7614 },
7615 {
7616 name: add,
7617 type: AccountId
7618 }
7619 ],
7620 docs: [
7621 Swap out one member `remove` for another `add`.,
7622 ,
7623 May only be called from `T::SwapOrigin`.,
7624 ,
7625 Prime membership is *not* passed from `remove` to `add`, if extant.
7626 ]
7627 },
7628 {
7629 name: reset_members,
7630 args: [
7631 {
7632 name: members,
7633 type: Vec<AccountId>
7634 }
7635 ],
7636 docs: [
7637 Change the membership to a new set, disregarding the existing membership. Be nice and,
7638 pass `members` pre-sorted.,
7639 ,
7640 May only be called from `T::ResetOrigin`.
7641 ]
7642 },
7643 {
7644 name: change_key,
7645 args: [
7646 {
7647 name: new,
7648 type: AccountId
7649 }
7650 ],
7651 docs: [
7652 Swap out the sending member for some other key `new`.,
7653 ,
7654 May only be called from `Signed` origin of a current member.,
7655 ,
7656 Prime membership is passed from the origin account to `new`, if extant.
7657 ]
7658 },
7659 {
7660 name: set_prime,
7661 args: [
7662 {
7663 name: who,
7664 type: AccountId
7665 }
7666 ],
7667 docs: [
7668 Set the prime member. Must be a current member.,
7669 ,
7670 May only be called from `T::PrimeOrigin`.
7671 ]
7672 },
7673 {
7674 name: clear_prime,
7675 args: [],
7676 docs: [
7677 Remove the prime member if it exists.,
7678 ,
7679 May only be called from `T::PrimeOrigin`.
7680 ]
7681 }
7682 ],
7683 events: [
7684 {
7685 name: MemberAdded,
7686 args: [],
7687 docs: [
7688 The given member was added; see the transaction for who.
7689 ]
7690 },
7691 {
7692 name: MemberRemoved,
7693 args: [],
7694 docs: [
7695 The given member was removed; see the transaction for who.
7696 ]
7697 },
7698 {
7699 name: MembersSwapped,
7700 args: [],
7701 docs: [
7702 Two members were swapped; see the transaction for who.
7703 ]
7704 },
7705 {
7706 name: MembersReset,
7707 args: [],
7708 docs: [
7709 The membership was reset; see the transaction for who the new set is.
7710 ]
7711 },
7712 {
7713 name: KeyChanged,
7714 args: [],
7715 docs: [
7716 One of the members' keys changed.
7717 ]
7718 },
7719 {
7720 name: Dummy,
7721 args: [
7722 PhantomData
7723 ],
7724 docs: [
7725 Phantom member, never used.
7726 ]
7727 }
7728 ],
7729 constants: [],
7730 errors: [
7731 {
7732 name: AlreadyMember,
7733 docs: [
7734 Already a member.
7735 ]
7736 },
7737 {
7738 name: NotMember,
7739 docs: [
7740 Not a member.
7741 ]
7742 }
7743 ],
7744 index: 67
7745 },
7746 {
7747 name: ChainBridge,
7748 storage: {
7749 prefix: ChainBridge,
7750 items: [
7751 {
7752 name: ChainNonces,
7753 modifier: Optional,
7754 type: {
7755 Map: {
7756 hasher: Blake2_256,
7757 key: ChainId,
7758 value: DepositNonce,
7759 linked: false
7760 }
7761 },
7762 fallback: 0x00,
7763 docs: [
7764 All whitelisted chains and their respective transaction counts
7765 ]
7766 },
7767 {
7768 name: RelayerThreshold,
7769 modifier: Default,
7770 type: {
7771 Plain: u32
7772 },
7773 fallback: 0x01000000,
7774 docs: [
7775 Number of votes required for a proposal to execute
7776 ]
7777 },
7778 {
7779 name: Relayers,
7780 modifier: Default,
7781 type: {
7782 Map: {
7783 hasher: Blake2_256,
7784 key: AccountId,
7785 value: bool,
7786 linked: false
7787 }
7788 },
7789 fallback: 0x00,
7790 docs: [
7791 Tracks current relayer set
7792 ]
7793 },
7794 {
7795 name: RelayerCount,
7796 modifier: Default,
7797 type: {
7798 Plain: u32
7799 },
7800 fallback: 0x00000000,
7801 docs: [
7802 Number of relayers in set
7803 ]
7804 },
7805 {
7806 name: Votes,
7807 modifier: Optional,
7808 type: {
7809 DoubleMap: {
7810 hasher: Blake2_256,
7811 key1: ChainId,
7812 key2: (DepositNonce,Proposal),
7813 value: ProposalVotes,
7814 key2Hasher: Blake2_256
7815 }
7816 },
7817 fallback: 0x00,
7818 docs: [
7819 All known proposals.,
7820 The key is the hash of the call and the deposit ID, to ensure it's unique.
7821 ]
7822 },
7823 {
7824 name: Resources,
7825 modifier: Optional,
7826 type: {
7827 Map: {
7828 hasher: Blake2_256,
7829 key: ResourceId,
7830 value: Bytes,
7831 linked: false
7832 }
7833 },
7834 fallback: 0x00,
7835 docs: [
7836 Utilized by the bridge software to map resource IDs to actual methods
7837 ]
7838 }
7839 ]
7840 },
7841 calls: [
7842 {
7843 name: set_threshold,
7844 args: [
7845 {
7846 name: threshold,
7847 type: u32
7848 }
7849 ],
7850 docs: [
7851 Sets the vote threshold for proposals.,
7852 ,
7853 This threshold is used to determine how many votes are required,
7854 before a proposal is executed.,
7855 ,
7856 # <weight>,
7857 - O(1) lookup and insert,
7858 # </weight>
7859 ]
7860 },
7861 {
7862 name: set_resource,
7863 args: [
7864 {
7865 name: id,
7866 type: ResourceId
7867 },
7868 {
7869 name: method,
7870 type: Bytes
7871 }
7872 ],
7873 docs: [
7874 Stores a method name on chain under an associated resource ID.,
7875 ,
7876 # <weight>,
7877 - O(1) write,
7878 # </weight>
7879 ]
7880 },
7881 {
7882 name: remove_resource,
7883 args: [
7884 {
7885 name: id,
7886 type: ResourceId
7887 }
7888 ],
7889 docs: [
7890 Removes a resource ID from the resource mapping.,
7891 ,
7892 After this call, bridge transfers with the associated resource ID will,
7893 be rejected.,
7894 ,
7895 # <weight>,
7896 - O(1) removal,
7897 # </weight>
7898 ]
7899 },
7900 {
7901 name: whitelist_chain,
7902 args: [
7903 {
7904 name: id,
7905 type: ChainId
7906 }
7907 ],
7908 docs: [
7909 Enables a chain ID as a source or destination for a bridge transfer.,
7910 ,
7911 # <weight>,
7912 - O(1) lookup and insert,
7913 # </weight>
7914 ]
7915 },
7916 {
7917 name: add_relayer,
7918 args: [
7919 {
7920 name: v,
7921 type: AccountId
7922 }
7923 ],
7924 docs: [
7925 Adds a new relayer to the relayer set.,
7926 ,
7927 # <weight>,
7928 - O(1) lookup and insert,
7929 # </weight>
7930 ]
7931 },
7932 {
7933 name: remove_relayer,
7934 args: [
7935 {
7936 name: v,
7937 type: AccountId
7938 }
7939 ],
7940 docs: [
7941 Removes an existing relayer from the set.,
7942 ,
7943 # <weight>,
7944 - O(1) lookup and removal,
7945 # </weight>
7946 ]
7947 },
7948 {
7949 name: acknowledge_proposal,
7950 args: [
7951 {
7952 name: nonce,
7953 type: DepositNonce
7954 },
7955 {
7956 name: src_id,
7957 type: ChainId
7958 },
7959 {
7960 name: r_id,
7961 type: ResourceId
7962 },
7963 {
7964 name: call,
7965 type: Proposal
7966 }
7967 ],
7968 docs: [
7969 Commits a vote in favour of the provided proposal.,
7970 ,
7971 If a proposal with the given nonce and source chain ID does not already exist, it will,
7972 be created with an initial vote in favour from the caller.,
7973 ,
7974 # <weight>,
7975 - weight of proposed call, regardless of whether execution is performed,
7976 # </weight>
7977 ]
7978 },
7979 {
7980 name: reject_proposal,
7981 args: [
7982 {
7983 name: nonce,
7984 type: DepositNonce
7985 },
7986 {
7987 name: src_id,
7988 type: ChainId
7989 },
7990 {
7991 name: r_id,
7992 type: ResourceId
7993 },
7994 {
7995 name: call,
7996 type: Proposal
7997 }
7998 ],
7999 docs: [
8000 Commits a vote against a provided proposal.,
8001 ,
8002 # <weight>,
8003 - Fixed, since execution of proposal should not be included,
8004 # </weight>
8005 ]
8006 },
8007 {
8008 name: eval_vote_state,
8009 args: [
8010 {
8011 name: nonce,
8012 type: DepositNonce
8013 },
8014 {
8015 name: src_id,
8016 type: ChainId
8017 },
8018 {
8019 name: prop,
8020 type: Proposal
8021 }
8022 ],
8023 docs: [
8024 Evaluate the state of a proposal given the current vote threshold.,
8025 ,
8026 A proposal with enough votes will be either executed or cancelled, and the status,
8027 will be updated accordingly.,
8028 ,
8029 # <weight>,
8030 - weight of proposed call, regardless of whether execution is performed,
8031 # </weight>
8032 ]
8033 }
8034 ],
8035 events: [
8036 {
8037 name: RelayerThresholdChanged,
8038 args: [
8039 u32
8040 ],
8041 docs: [
8042 Vote threshold has changed (new_threshold)
8043 ]
8044 },
8045 {
8046 name: ChainWhitelisted,
8047 args: [
8048 ChainId
8049 ],
8050 docs: [
8051 Chain now available for transfers (chain_id)
8052 ]
8053 },
8054 {
8055 name: RelayerAdded,
8056 args: [
8057 AccountId
8058 ],
8059 docs: [
8060 Relayer added to set
8061 ]
8062 },
8063 {
8064 name: RelayerRemoved,
8065 args: [
8066 AccountId
8067 ],
8068 docs: [
8069 Relayer removed from set
8070 ]
8071 },
8072 {
8073 name: FungibleTransfer,
8074 args: [
8075 ChainId,
8076 DepositNonce,
8077 ResourceId,
8078 U256,
8079 Bytes
8080 ],
8081 docs: [
8082 FunglibleTransfer is for relaying fungibles (dest_id, nonce, resource_id, amount, recipient, metadata)
8083 ]
8084 },
8085 {
8086 name: NonFungibleTransfer,
8087 args: [
8088 ChainId,
8089 DepositNonce,
8090 ResourceId,
8091 Bytes,
8092 Bytes,
8093 Bytes
8094 ],
8095 docs: [
8096 NonFungibleTransfer is for relaying NFTS (dest_id, nonce, resource_id, token_id, recipient, metadata)
8097 ]
8098 },
8099 {
8100 name: GenericTransfer,
8101 args: [
8102 ChainId,
8103 DepositNonce,
8104 ResourceId,
8105 Bytes
8106 ],
8107 docs: [
8108 GenericTransfer is for a generic data payload (dest_id, nonce, resource_id, metadata)
8109 ]
8110 },
8111 {
8112 name: VoteFor,
8113 args: [
8114 ChainId,
8115 DepositNonce,
8116 AccountId
8117 ],
8118 docs: [
8119 Vote submitted in favour of proposal
8120 ]
8121 },
8122 {
8123 name: VoteAgainst,
8124 args: [
8125 ChainId,
8126 DepositNonce,
8127 AccountId
8128 ],
8129 docs: [
8130 Vot submitted against proposal
8131 ]
8132 },
8133 {
8134 name: ProposalApproved,
8135 args: [
8136 ChainId,
8137 DepositNonce
8138 ],
8139 docs: [
8140 Voting successful for a proposal
8141 ]
8142 },
8143 {
8144 name: ProposalRejected,
8145 args: [
8146 ChainId,
8147 DepositNonce
8148 ],
8149 docs: [
8150 Voting rejected a proposal
8151 ]
8152 },
8153 {
8154 name: ProposalSucceeded,
8155 args: [
8156 ChainId,
8157 DepositNonce
8158 ],
8159 docs: [
8160 Execution of call succeeded
8161 ]
8162 },
8163 {
8164 name: ProposalFailed,
8165 args: [
8166 ChainId,
8167 DepositNonce
8168 ],
8169 docs: [
8170 Execution of call failed
8171 ]
8172 }
8173 ],
8174 constants: [
8175 {
8176 name: ChainIdentity,
8177 type: ChainId,
8178 value: 0x01,
8179 docs: []
8180 },
8181 {
8182 name: ProposalLifetime,
8183 type: BlockNumber,
8184 value: 0x32000000,
8185 docs: []
8186 },
8187 {
8188 name: BridgeAccountId,
8189 type: AccountId,
8190 value: 0x6d6f646c7068616c612f62670000000000000000000000000000000000000000,
8191 docs: []
8192 }
8193 ],
8194 errors: [
8195 {
8196 name: ThresholdNotSet,
8197 docs: [
8198 Relayer threshold not set
8199 ]
8200 },
8201 {
8202 name: InvalidChainId,
8203 docs: [
8204 Provided chain Id is not valid
8205 ]
8206 },
8207 {
8208 name: InvalidThreshold,
8209 docs: [
8210 Relayer threshold cannot be 0
8211 ]
8212 },
8213 {
8214 name: ChainNotWhitelisted,
8215 docs: [
8216 Interactions with this chain is not permitted
8217 ]
8218 },
8219 {
8220 name: ChainAlreadyWhitelisted,
8221 docs: [
8222 Chain has already been enabled
8223 ]
8224 },
8225 {
8226 name: ResourceDoesNotExist,
8227 docs: [
8228 Resource ID provided isn't mapped to anything
8229 ]
8230 },
8231 {
8232 name: RelayerAlreadyExists,
8233 docs: [
8234 Relayer already in set
8235 ]
8236 },
8237 {
8238 name: RelayerInvalid,
8239 docs: [
8240 Provided accountId is not a relayer
8241 ]
8242 },
8243 {
8244 name: MustBeRelayer,
8245 docs: [
8246 Protected operation, must be performed by relayer
8247 ]
8248 },
8249 {
8250 name: RelayerAlreadyVoted,
8251 docs: [
8252 Relayer has already submitted some vote for this proposal
8253 ]
8254 },
8255 {
8256 name: ProposalAlreadyExists,
8257 docs: [
8258 A proposal with these parameters has already been submitted
8259 ]
8260 },
8261 {
8262 name: ProposalDoesNotExist,
8263 docs: [
8264 No proposal with the ID was found
8265 ]
8266 },
8267 {
8268 name: ProposalNotComplete,
8269 docs: [
8270 Cannot complete proposal, needs more votes
8271 ]
8272 },
8273 {
8274 name: ProposalAlreadyComplete,
8275 docs: [
8276 Proposal has either failed or succeeded
8277 ]
8278 },
8279 {
8280 name: ProposalExpired,
8281 docs: [
8282 Lifetime of proposal has been exceeded
8283 ]
8284 }
8285 ],
8286 index: 80
8287 },
8288 {
8289 name: BridgeTransfer,
8290 storage: {
8291 prefix: BridgeTransfer,
8292 items: [
8293 {
8294 name: BridgeFee,
8295 modifier: Default,
8296 type: {
8297 Map: {
8298 hasher: Blake2_256,
8299 key: ChainId,
8300 value: (BalanceOf,u32),
8301 linked: false
8302 }
8303 },
8304 fallback: 0x0000000000000000000000000000000000000000,
8305 docs: []
8306 }
8307 ]
8308 },
8309 calls: [
8310 {
8311 name: sudo_change_fee,
8312 args: [
8313 {
8314 name: min_fee,
8315 type: BalanceOf
8316 },
8317 {
8318 name: fee_scale,
8319 type: u32
8320 },
8321 {
8322 name: dest_id,
8323 type: ChainId
8324 }
8325 ],
8326 docs: [
8327 Change extra bridge transfer fee that user should pay
8328 ]
8329 },
8330 {
8331 name: transfer_native,
8332 args: [
8333 {
8334 name: amount,
8335 type: BalanceOf
8336 },
8337 {
8338 name: recipient,
8339 type: Bytes
8340 },
8341 {
8342 name: dest_id,
8343 type: ChainId
8344 }
8345 ],
8346 docs: [
8347 Transfers some amount of the native token to some recipient on a (whitelisted) destination chain.
8348 ]
8349 },
8350 {
8351 name: transfer,
8352 args: [
8353 {
8354 name: to,
8355 type: AccountId
8356 },
8357 {
8358 name: amount,
8359 type: BalanceOf
8360 },
8361 {
8362 name: _rid,
8363 type: ResourceId
8364 }
8365 ],
8366 docs: [
8367 Executes a simple currency transfer using the bridge account as the source
8368 ]
8369 }
8370 ],
8371 events: [
8372 {
8373 name: FeeUpdated,
8374 args: [
8375 ChainId,
8376 Balance,
8377 u32
8378 ],
8379 docs: [
8380 [chainId, min_fee, fee_scale]
8381 ]
8382 }
8383 ],
8384 constants: [],
8385 errors: [
8386 {
8387 name: InvalidTransfer,
8388 docs: []
8389 },
8390 {
8391 name: InvalidCommand,
8392 docs: []
8393 },
8394 {
8395 name: InvalidPayload,
8396 docs: []
8397 },
8398 {
8399 name: InvalidFeeOption,
8400 docs: []
8401 },
8402 {
8403 name: FeeOptionsMissiing,
8404 docs: []
8405 }
8406 ],
8407 index: 81
8408 },
8409 {
8410 name: Sudo,
8411 storage: {
8412 prefix: Sudo,
8413 items: [
8414 {
8415 name: Key,
8416 modifier: Default,
8417 type: {
8418 Plain: AccountId
8419 },
8420 fallback: 0x0000000000000000000000000000000000000000000000000000000000000000,
8421 docs: [
8422 The `AccountId` of the sudo key.
8423 ]
8424 }
8425 ]
8426 },
8427 calls: [
8428 {
8429 name: sudo,
8430 args: [
8431 {
8432 name: call,
8433 type: Call
8434 }
8435 ],
8436 docs: [
8437 Authenticates the sudo key and dispatches a function call with `Root` origin.,
8438 ,
8439 The dispatch origin for this call must be _Signed_.,
8440 ,
8441 # <weight>,
8442 - O(1).,
8443 - Limited storage reads.,
8444 - One DB write (event).,
8445 - Weight of derivative `call` execution + 10,000.,
8446 # </weight>
8447 ]
8448 },
8449 {
8450 name: sudo_unchecked_weight,
8451 args: [
8452 {
8453 name: call,
8454 type: Call
8455 },
8456 {
8457 name: _weight,
8458 type: Weight
8459 }
8460 ],
8461 docs: [
8462 Authenticates the sudo key and dispatches a function call with `Root` origin.,
8463 This function does not check the weight of the call, and instead allows the,
8464 Sudo user to specify the weight of the call.,
8465 ,
8466 The dispatch origin for this call must be _Signed_.,
8467 ,
8468 # <weight>,
8469 - O(1).,
8470 - The weight of this call is defined by the caller.,
8471 # </weight>
8472 ]
8473 },
8474 {
8475 name: set_key,
8476 args: [
8477 {
8478 name: new,
8479 type: LookupSource
8480 }
8481 ],
8482 docs: [
8483 Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.,
8484 ,
8485 The dispatch origin for this call must be _Signed_.,
8486 ,
8487 # <weight>,
8488 - O(1).,
8489 - Limited storage reads.,
8490 - One DB change.,
8491 # </weight>
8492 ]
8493 },
8494 {
8495 name: sudo_as,
8496 args: [
8497 {
8498 name: who,
8499 type: LookupSource
8500 },
8501 {
8502 name: call,
8503 type: Call
8504 }
8505 ],
8506 docs: [
8507 Authenticates the sudo key and dispatches a function call with `Signed` origin from,
8508 a given account.,
8509 ,
8510 The dispatch origin for this call must be _Signed_.,
8511 ,
8512 # <weight>,
8513 - O(1).,
8514 - Limited storage reads.,
8515 - One DB write (event).,
8516 - Weight of derivative `call` execution + 10,000.,
8517 # </weight>
8518 ]
8519 }
8520 ],
8521 events: [
8522 {
8523 name: Sudid,
8524 args: [
8525 DispatchResult
8526 ],
8527 docs: [
8528 A sudo just took place. [result]
8529 ]
8530 },
8531 {
8532 name: KeyChanged,
8533 args: [
8534 AccountId
8535 ],
8536 docs: [
8537 The [sudoer] just switched identity; the old key is supplied.
8538 ]
8539 },
8540 {
8541 name: SudoAsDone,
8542 args: [
8543 DispatchResult
8544 ],
8545 docs: [
8546 A sudo just took place. [result]
8547 ]
8548 }
8549 ],
8550 constants: [],
8551 errors: [
8552 {
8553 name: RequireSudo,
8554 docs: [
8555 Sender must be the Sudo account
8556 ]
8557 }
8558 ],
8559 index: 99
8560 }
8561 ],
8562 extrinsic: {
8563 version: 4,
8564 signedExtensions: [
8565 CheckSpecVersion,
8566 CheckTxVersion,
8567 CheckGenesis,
8568 CheckMortality,
8569 CheckNonce,
8570 CheckWeight,
8571 ChargeTransactionPayment
8572 ]
8573 }
8574 }
8575 }
8576}