UNPKG

4.43 kBJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, '__esModule', { value: true });
4
5function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
7var path = _interopDefault(require('path'));
8
9const decimals = 8;
10var abi = {
11 functions: [{
12 name: 'deploy',
13 returnType: {
14 type: 'Boolean'
15 }
16 }, {
17 name: 'circulation',
18 constant: true,
19 returnType: {
20 type: 'Integer',
21 decimals
22 }
23 }, {
24 name: 'mintTokens',
25 returnType: {
26 type: 'Boolean'
27 }
28 }, {
29 name: 'crowdsaleRegister',
30 parameters: [{
31 name: 'addresses',
32 type: 'Array',
33 value: {
34 type: 'Hash160'
35 }
36 }],
37 returnType: {
38 type: 'Integer',
39 decimals: 0
40 }
41 }, {
42 name: 'crowdsaleStatus',
43 parameters: [{
44 name: 'address',
45 type: 'Hash160'
46 }],
47 returnType: {
48 type: 'Boolean'
49 }
50 }, {
51 name: 'crowdsaleAvailable',
52 constant: true,
53 returnType: {
54 type: 'Integer',
55 decimals
56 }
57 }, {
58 name: 'name',
59 constant: true,
60 returnType: {
61 type: 'String'
62 }
63 }, {
64 name: 'decimals',
65 constant: true,
66 returnType: {
67 type: 'Integer',
68 decimals: 0
69 }
70 }, {
71 name: 'symbol',
72 constant: true,
73 returnType: {
74 type: 'String'
75 }
76 }, {
77 name: 'totalSupply',
78 constant: true,
79 returnType: {
80 type: 'Integer',
81 decimals
82 }
83 }, {
84 name: 'balanceOf',
85 parameters: [{
86 name: 'account',
87 type: 'Hash160'
88 }],
89 returnType: {
90 type: 'Integer',
91 decimals
92 }
93 }, {
94 name: 'transfer',
95 parameters: [{
96 name: 'from',
97 type: 'Hash160'
98 }, {
99 name: 'to',
100 type: 'Hash160'
101 }, {
102 name: 'amount',
103 type: 'Integer',
104 decimals
105 }],
106 returnType: {
107 type: 'Boolean'
108 }
109 }, {
110 name: 'transferFrom',
111 parameters: [{
112 name: 'from',
113 type: 'Hash160'
114 }, {
115 name: 'to',
116 type: 'Hash160'
117 }, {
118 name: 'amount',
119 type: 'Integer',
120 decimals
121 }],
122 returnType: {
123 type: 'Boolean'
124 }
125 }, {
126 name: 'approve',
127 parameters: [{
128 name: 'owner',
129 type: 'Hash160'
130 }, {
131 name: 'spender',
132 type: 'Hash160'
133 }, {
134 name: 'amount',
135 type: 'Integer',
136 decimals
137 }],
138 returnType: {
139 type: 'Boolean'
140 }
141 }, {
142 name: 'allowance',
143 constant: true,
144 parameters: [{
145 name: 'owner',
146 type: 'Hash160'
147 }, {
148 name: 'spender',
149 type: 'Hash160'
150 }],
151 returnType: {
152 type: 'Integer',
153 decimals
154 }
155 }],
156 events: [{
157 name: 'transfer',
158 parameters: [{
159 name: 'from',
160 type: 'Hash160'
161 }, {
162 name: 'to',
163 type: 'Hash160'
164 }, {
165 name: 'amount',
166 type: 'Integer',
167 decimals
168 }]
169 }, {
170 name: 'approve',
171 parameters: [{
172 name: 'from',
173 type: 'Hash160'
174 }, {
175 name: 'to',
176 type: 'Hash160'
177 }, {
178 name: 'amount',
179 type: 'Integer',
180 decimals
181 }]
182 }, {
183 name: 'refund',
184 parameters: [{
185 name: 'to',
186 type: 'Hash160'
187 }, {
188 name: 'amount',
189 type: 'Integer',
190 decimals: 8
191 }]
192 }, {
193 name: 'kycRegistration',
194 parameters: [{
195 name: 'address',
196 type: 'Hash160'
197 }]
198 }]
199};
200
201const preCompile = path.resolve(__dirname, 'bin', 'pre-compile');
202const postCreate = path.resolve(__dirname, 'bin', 'post-create');
203var index = {
204 contract: {
205 targetDir: 'contracts',
206 defaultLanguage: 'python',
207 languages: {
208 python: {
209 rootDir: path.resolve(__dirname, '..', 'contracts', 'python'),
210 contracts: [{
211 file: 'ico.py',
212 resourceName: 'ico',
213 target: 'deploy',
214 name: 'NEO-ONE Sale',
215 codeVersion: '1.0.0',
216 properties: {
217 storage: true
218 },
219 abi
220 }]
221 }
222 }
223 },
224 wallets: {
225 owner: {
226 wif: 'L1QqQJnpBwbsPGAuutuzPTac8piqvbR1HRjrY5qHup48TBCBFe4g'
227 },
228 kyc0: {
229 neo: 100
230 },
231 kyc1: {
232 neo: 1000
233 },
234 kyc2: {
235 neo: 50
236 },
237 noKYC0: {
238 neo: 500
239 }
240 },
241 hooks: {
242 preCompile,
243 postCreate
244 },
245 configPath: path.join('src', 'neo-one.json'),
246 templateDir: path.resolve(__dirname, '..', 'template')
247};
248
249exports.default = index;
250//# sourceMappingURL=index.js.map