Introduce OriginCaller (& apply to Scheduler) (#2692)

* Introduce OriginCaller (& apply to Scheduler)

* RawOrigin

* Create OriginCaller type dynamically

* Update packages/metadata/src/Metadata/v12/toLatest.ts
This commit is contained in:
Jaco Greeff
2020-10-08 13:27:50 +02:00
committed by GitHub
parent 2faf68c4d2
commit 8b54a22914
5 changed files with 64 additions and 1 deletions
@@ -9,6 +9,12 @@ import { Definitions } from '../../types';
export default {
rpc: {},
types: {
CollectiveOrigin: {
_enum: {
Members: '(MemberCount, MemberCount)',
Member: 'AccountId'
}
},
MemberCount: 'u32',
ProposalIndex: 'u32',
VotesTo230: {
@@ -84,6 +84,13 @@ export default {
Moment: 'u64',
OpaqueCall: 'Bytes',
Origin: 'DoNotConstruct<Origin>',
OriginCaller: {
_enum: {
// this should be dynamically built from the actual modules, based on index
System: 'SystemOrigin'
}
},
PalletsOrigin: 'OriginCaller',
PalletVersion: {
major: 'u16',
minor: 'u8',
@@ -14,6 +14,13 @@ export default {
SchedulePeriod: 'Period',
SchedulePriority: 'Priority',
Scheduled: {
maybeId: 'Option<Bytes>',
priority: 'SchedulePriority',
call: 'Call',
maybePeriodic: 'Option<SchedulePeriod>',
origin: 'PalletsOrigin'
},
ScheduledTo254: {
maybeId: 'Option<Bytes>',
priority: 'SchedulePriority',
call: 'Call',
@@ -270,8 +270,16 @@ export default {
Initialization: 'Null'
}
},
RawOrigin: {
_enum: {
Root: 'Null',
Signed: 'AccountId',
None: 'Null'
}
},
RefCount: 'u32',
RefCountTo259: 'u8',
SystemOrigin: 'RawOrigin',
TransactionValidityError: {
_enum: {
Invalid: 'InvalidTransaction',