forked from polkadot-js/apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
crust.ts
85 lines (81 loc) · 2.28 KB
/
crust.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
// Copyright 2017-2021 @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: {
Address: 'AccountId',
AddressInfo: 'Vec<u8>',
ETHAddress: 'Vec<u8>',
EthereumTxHash: 'H256',
FileAlias: 'Vec<u8>',
FileInfo: {
file_size: 'u64',
expired_on: 'BlockNumber',
claimed_at: 'BlockNumber',
amount: 'Balance',
expected_replica_count: 'u32',
reported_replica_count: 'u32',
replicas: 'Vec<Replica<AccountId>>'
},
Guarantee: {
targets: 'Vec<IndividualExposure<AccountId, Balance>>',
total: 'Compact<Balance>',
submitted_in: 'EraIndex',
suppressed: 'bool'
},
IASSig: 'Vec<u8>',
Identity: {
anchor: 'SworkerAnchor',
punishment_deadline: 'u64',
group: 'Option<AccountId>'
},
ISVBody: 'Vec<u8>',
LookupSource: 'AccountId',
MerchantLedger: {
reward: 'Balance',
pledge: 'Balance'
},
MerkleRoot: 'Vec<u8>',
ReportSlot: 'u64',
Replica: {
who: 'AccountId',
valid_at: 'BlockNumber',
anchor: 'SworkerAnchor',
is_reported: 'bool'
},
PKInfo: {
code: 'SworkerCode',
anchor: 'Option<SworkerAnchor>'
},
Status: {
_enum: ['Free', 'Reserved']
},
SworkerAnchor: 'Vec<u8>',
SworkerCert: 'Vec<u8>',
SworkerCode: 'Vec<u8>',
SworkerPubKey: 'Vec<u8>',
SworkerSignature: 'Vec<u8>',
UsedInfo: {
used_size: 'u64',
reported_group_count: 'u32',
groups: 'BTreeMap<SworkerAnchor, bool>'
},
WorkReport: {
report_slot: 'u64',
used: 'u64',
free: 'u64',
reported_files_size: 'u64',
reported_srd_root: 'MerkleRoot',
reported_files_root: 'MerkleRoot'
}
}
}
]
};
export default definitions;