1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const BigNumber_1 = require("./utils/BigNumber");
|
4 |
|
5 |
|
6 |
|
7 | const AddressZero = '0x6600000000000000000000000000000000000000';
|
8 | exports.AddressZero = AddressZero;
|
9 |
|
10 |
|
11 |
|
12 | const HashZero = '0x0000000000000000000000000000000000000000000000000000000000000000';
|
13 | exports.HashZero = HashZero;
|
14 |
|
15 |
|
16 |
|
17 | const NegativeOne = BigNumber_1.bigNumberify(-1);
|
18 | exports.NegativeOne = NegativeOne;
|
19 |
|
20 |
|
21 |
|
22 | const Zero = BigNumber_1.bigNumberify(0);
|
23 | exports.Zero = Zero;
|
24 |
|
25 |
|
26 |
|
27 | const One = BigNumber_1.bigNumberify(1);
|
28 | exports.One = One;
|
29 |
|
30 |
|
31 |
|
32 | const Two = BigNumber_1.bigNumberify(2);
|
33 | exports.Two = Two;
|
34 |
|
35 |
|
36 |
|
37 | const MaxUint256 = BigNumber_1.bigNumberify('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff');
|
38 | exports.MaxUint256 = MaxUint256;
|
39 |
|
40 |
|
41 |
|
42 | const DefaultAsset = '000000000000000000000000';
|
43 | exports.DefaultAsset = DefaultAsset;
|
44 |
|
45 |
|
46 |
|
47 | const COMPILE_ERROR_TYPE = {
|
48 | JSONError: 'JSONError',
|
49 | IOError: 'IOError',
|
50 | ParserError: 'ParserError',
|
51 | DocstringParsingError: 'DocstringParsingError',
|
52 | SyntaxError: 'SyntaxError',
|
53 | DeclarationError: 'DeclarationError',
|
54 | TypeError: 'TypeError',
|
55 | UnimplementedFeatureError: 'UnimplementedFeatureError',
|
56 | InternalCompilerError: 'InternalCompilerError',
|
57 | Exception: 'Exception',
|
58 | CompilerError: 'CompilerError',
|
59 | FatalError: 'FatalError',
|
60 | Warning: 'Warning'
|
61 | };
|
62 | exports.COMPILE_ERROR_TYPE = COMPILE_ERROR_TYPE;
|
63 |
|
64 |
|
65 |
|
66 | const TRANSACTION = {
|
67 | |
68 |
|
69 |
|
70 | CONTRACT_TYPE: {
|
71 | |
72 |
|
73 |
|
74 | CREATE: 'create',
|
75 | |
76 |
|
77 |
|
78 | CALL: 'call',
|
79 | |
80 |
|
81 |
|
82 | TEMPLATE: 'template',
|
83 | |
84 |
|
85 |
|
86 | VOTE: 'vote'
|
87 | },
|
88 | |
89 |
|
90 |
|
91 | DEFAULT_VERSION: 1,
|
92 | |
93 |
|
94 |
|
95 | DEFAULT_LOCK_TIME: 0
|
96 | };
|
97 | exports.TRANSACTION = TRANSACTION;
|
98 |
|
99 |
|
100 |
|
101 | const ASSET_TYPE = {
|
102 | |
103 |
|
104 |
|
105 | DEVIDABLE: 0,
|
106 | |
107 |
|
108 |
|
109 | UNDEVIDABLE: 1
|
110 | };
|
111 | exports.ASSET_TYPE = ASSET_TYPE;
|
112 |
|
113 |
|
114 |
|
115 | const DEFAULT_ORGANIZATION_ID = 0;
|
116 | exports.DEFAULT_ORGANIZATION_ID = DEFAULT_ORGANIZATION_ID;
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 | const ADDRESS_LENGTH = 21;
|
124 | exports.ADDRESS_LENGTH = ADDRESS_LENGTH;
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 | const ASSETS_LENGTH = 12;
|
133 | exports.ASSETS_LENGTH = ASSETS_LENGTH;
|
134 |
|
135 |
|
136 |
|
137 |
|
138 | const GENESIS_CONTRACT = {
|
139 | MIN: 100,
|
140 | MAX: 999
|
141 | };
|
142 | exports.GENESIS_CONTRACT = GENESIS_CONTRACT;
|
143 |
|
144 |
|
145 |
|
146 |
|
147 |
|
148 |
|
149 | const MethodType = {
|
150 | View: 'view',
|
151 | Pure: 'pure',
|
152 | Constructor: 'constructor'
|
153 | };
|
154 | exports.MethodType = MethodType;
|
155 |
|
156 |
|
157 |
|
158 | const SYSTEM_CONTRACT_ADDRESS = {
|
159 | |
160 |
|
161 |
|
162 | GenesisOrganization: '0x630000000000000000000000000000000000000064',
|
163 | |
164 |
|
165 |
|
166 | Schedule: '0x630000000000000000000000000000000000000069',
|
167 | |
168 |
|
169 |
|
170 | ConsensusManagement: '0x630000000000000000000000000000000000000068',
|
171 | |
172 |
|
173 |
|
174 | RegistryCenter: '0x630000000000000000000000000000000000000065',
|
175 | |
176 |
|
177 |
|
178 | TemplateWarehouse: '0x630000000000000000000000000000000000000067',
|
179 | |
180 |
|
181 |
|
182 | ValidatorCommittee: '0x630000000000000000000000000000000000000066'
|
183 | };
|
184 | exports.SYSTEM_CONTRACT_ADDRESS = SYSTEM_CONTRACT_ADDRESS;
|
185 |
|
186 |
|
187 |
|
188 | const DefaultFee = {
|
189 | amount: 21000,
|
190 | asset: '000000000000000000000000'
|
191 | };
|
192 | exports.DefaultFee = DefaultFee;
|
193 |
|
194 |
|
195 |
|
196 | const GasAmplifier = 1.2;
|
197 | exports.GasAmplifier = GasAmplifier;
|
198 |
|
199 |
|
200 |
|
201 | const FeeAmplifier = 1.2;
|
202 | exports.FeeAmplifier = FeeAmplifier;
|
203 |
|
204 |
|
205 |
|
206 | const MinGasLimit = 21000;
|
207 | exports.MinGasLimit = MinGasLimit;
|
208 |
|
209 |
|
210 |
|
211 | const DefaultCategory = 1;
|
212 | exports.DefaultCategory = DefaultCategory;
|
213 |
|
214 |
|
215 |
|
216 | const DefaultGasPrice = 0.02;
|
217 | exports.DefaultGasPrice = DefaultGasPrice;
|
218 |
|
\ | No newline at end of file |