-
Notifications
You must be signed in to change notification settings - Fork 7
/
v38.ts
78 lines (73 loc) · 1.75 KB
/
v38.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import { RegistryTypes, OverrideModuleType } from '@polkadot/types/types';
const types: RegistryTypes = {
// old EDG types
'ProposalRecord': {
'index': 'u32',
'author': 'AccountId',
'stage': 'VoteStage',
'transition_time': 'u32',
'title': 'Text',
'contents': 'Text',
'vote_id': 'u64'
},
'ProposalContents': 'Bytes',
'ProposalTitle': 'Bytes',
'Balance2': 'u128',
'VoteStage': {
'_enum': [
'PreVoting',
'Commit',
'Voting',
'Completed'
]
},
'VoteType': {
'_enum': [
'Binary',
'MultiOption',
'RankedChoice'
]
},
'TallyType': {
'_enum': [
'OnePerson',
'OneCoin'
]
},
'VoteOutcome': '[u8; 32]',
'VotingTally': 'Option<Vec<(VoteOutcome, u128)>>',
'VoteData': {
'initiator': 'AccountId',
'stage': 'VoteStage',
'vote_type': 'VoteType',
'tally_type': 'TallyType',
'is_commit_reveal': 'bool'
},
'Commitments': 'Vec<(AccountId, VoteOutcome)>',
'Reveals': 'Vec<(AccountId, Vec<VoteOutcome>)>',
'VoteRecord': {
'id': 'u64',
'commitments': 'Commitments',
'reveals': 'Reveals',
'data': 'VoteData',
'outcomes': 'Vec<VoteOutcome>'
},
// aliases that don't do well as part of interfaces
'voting::VoteType': 'VoteType',
'voting::TallyType': 'TallyType',
'voting::Tally': 'VotingTally',
// overrides
CompactAssignments: 'CompactAssignmentsTo257',
ContractExecResult: 'ContractExecResultTo255',
RewardDestination: 'RewardDestinationTo257',
RefCount: 'u32',
AccountInfo: 'AccountInfoWithRefCount',
Address: 'IndicesLookupSource',
LookupSource: 'IndicesLookupSource',
};
const typesAlias: Record<string, OverrideModuleType> = {
voting: { Tally: 'VotingTally' },
}
export default {
types, typesAlias
};