-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathcontracts.h
More file actions
54 lines (48 loc) · 2.21 KB
/
contracts.h
File metadata and controls
54 lines (48 loc) · 2.21 KB
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
#include <stdint.h>
// Change this number when new contracts are added, also add new indices to functions in contracts.cpp and to
// shareholderProposalSupportPerContract below
#define CONTRACT_COUNT 24
enum {
NoShareholderProposalSupported,
DefaultYesNoSingleVarShareholderProposalSupported,
V1ScalarSingleVarShareholderProposalSupported,
};
const int shareholderProposalSupportPerContract[] = {
NoShareholderProposalSupported, // 0: no contract
NoShareholderProposalSupported, // 1: QX
NoShareholderProposalSupported, // 2: QUOTTERY
NoShareholderProposalSupported, // 3: RANDOM
DefaultYesNoSingleVarShareholderProposalSupported, // 4: QUTIL
NoShareholderProposalSupported, // 5: MLM
NoShareholderProposalSupported, // 6: GQMPROP
NoShareholderProposalSupported, // 7: SWATCH
NoShareholderProposalSupported, // 8: CCF
NoShareholderProposalSupported, // 9: QEARN
NoShareholderProposalSupported, // 10: QVAULT
NoShareholderProposalSupported, // 11: MSVAULT
NoShareholderProposalSupported, // 12: QBAY
NoShareholderProposalSupported, // 13: QSWAP
NoShareholderProposalSupported, // 14: NOST
NoShareholderProposalSupported, // 15: QDRAW
NoShareholderProposalSupported, // 16: RL
NoShareholderProposalSupported, // 17: QBOND
NoShareholderProposalSupported, // 18: QIP
NoShareholderProposalSupported, // 19: QRAFFLE
NoShareholderProposalSupported, // 20: QRWA
NoShareholderProposalSupported, // 21: QRP
NoShareholderProposalSupported, // 22: QTF
NoShareholderProposalSupported, // 23: QDUEL
NoShareholderProposalSupported, // 24: PULSE
// add new contracts here
DefaultYesNoSingleVarShareholderProposalSupported, // N+1: TESTEXA
V1ScalarSingleVarShareholderProposalSupported, // N+2: TESTEXB
NoShareholderProposalSupported, // N+3: TESTEXC
NoShareholderProposalSupported, // N+4: TESTEXD
};
#define TESTEXA_CONTRACT_INDEX (CONTRACT_COUNT + 1)
#define TESTEXB_CONTRACT_INDEX (CONTRACT_COUNT + 2)
#define TESTEXC_CONTRACT_INDEX (CONTRACT_COUNT + 3)
#define TESTEXD_CONTRACT_INDEX (CONTRACT_COUNT + 4)
extern bool g_enableTestContracts;
uint32_t getContractIndex(const char* str, bool enableTestContracts = g_enableTestContracts);
const char* getContractName(uint32_t contractIndex, bool enableTestContracts = g_enableTestContracts);