UNPKG

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