forked from polkadot-js/apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
automata.ts
130 lines (126 loc) · 3.32 KB
/
automata.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// Copyright 2017-2023 @polkadot/apps-config authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { OverrideBundleDefinition } from '@polkadot/types/types';
// structs need to be in order
/* eslint-disable sort-keys */
const definitions: OverrideBundleDefinition = {
types: [
{
// on all versions
minmax: [0, undefined],
types: {
ResourceId: '[u8; 32]',
DepositNonce: 'u64',
ProposalStatus: {
_enum: [
'Initiated',
'Approved',
'Rejected'
]
},
ProposalVotes: {
votes_for: 'Vec<AccountId>',
votes_against: 'Vec<AccountId>',
status: 'ProposalStatus'
},
BridgeTokenId: 'U256',
BridgeChainId: 'u8',
VestingPlan: {
start_time: 'u64',
cliff_duration: 'u64',
total_duration: 'u64',
interval: 'u64',
initial_amount: 'Balance',
total_amount: 'Balance',
vesting_during_cliff: 'bool'
},
ProposalId: 'u32',
ProjectId: 'u32',
ChainIndex: 'u32',
Protocol: {
_enum: ['Solidity', 'Substrate']
},
Chain: {
_protocol: 'Protocol'
},
CrossChainAccount: {
_enum: {
Solidity: 'H160',
Substrate: 'AccountId'
}
},
IpfsHash: 'Text',
SolidityStrategy: {
_enum: {
ERC20Balance: 'H160'
}
},
SubstrateStrategy: {
_enum: ['NativeBalance']
},
Strategy: {
_enum: {
Solidity: 'SolidityStrategy',
Substrate: 'SubstrateStrategy'
}
},
Workspace: {
_chain: 'ChainIndex',
strategies: 'Vec<Strategy>'
},
UserGroup: {
owner: 'CrossChainAccount',
admins: 'Vec<CrossChainAccount>',
maintainers: 'Vec<CrossChainAccount>',
proposers: 'Option<Vec<CrossChainAccount>>'
},
Project: {
usergroup: 'UserGroup',
data: 'IpfsHash',
workspaces: 'Vec<Workspace>'
},
VotingFormat: {
_enum: ['SingleChoice', 'SplitVote']
},
OptionIndex: 'u8',
PrivacyLevel: {
_enum: {
Opaque: 'u8',
Rank: 'Null',
Private: 'Null',
Public: 'Null',
Mixed: 'Null'
}
},
VotingPower: 'U256',
DAOProposalState: {
finalized: 'bool',
snapshots: 'Vec<Option<U256>>',
blacklisted: 'bool',
votes: 'Vec<VotingPower>',
pub_voters: 'Option<IpfsHash>',
updates: 'u32'
},
DAOProposal: {
_author: 'CrossChainAccount',
_voting_format: 'VotingFormat',
_option_count: 'OptionIndex',
_data: 'IpfsHash',
_privacy: 'PrivacyLevel',
_start: 'u64',
_end: 'u64',
_frequency: 'Option<u64>',
_workspaces: 'Vec<Workspace>',
state: 'DAOProposalState'
},
VoteUpdate: {
project: 'ProjectId',
proposal: 'ProposalId',
votes: 'Vec<VotingPower>',
pub_voters: 'Option<IpfsHash>'
}
}
}
]
};
export default definitions;