1 | {
|
2 | "contractName": "MetaCoin",
|
3 | "abi": [
|
4 | {
|
5 | "inputs": [
|
6 | {
|
7 | "name": "addr",
|
8 | "type": "address"
|
9 | }
|
10 | ],
|
11 | "name": "getBalanceInEth",
|
12 | "outputs": [
|
13 | {
|
14 | "name": "",
|
15 | "type": "uint256"
|
16 | }
|
17 | ],
|
18 | "stateMutability": "nonpayable",
|
19 | "type": "function"
|
20 | },
|
21 | {
|
22 | "inputs": [
|
23 | {
|
24 | "name": "receiver",
|
25 | "type": "address"
|
26 | },
|
27 | {
|
28 | "name": "amount",
|
29 | "type": "uint256"
|
30 | }
|
31 | ],
|
32 | "name": "sendCoin",
|
33 | "outputs": [
|
34 | {
|
35 | "name": "sufficient",
|
36 | "type": "bool"
|
37 | }
|
38 | ],
|
39 | "stateMutability": "nonpayable",
|
40 | "type": "function"
|
41 | },
|
42 | {
|
43 | "inputs": [
|
44 | {
|
45 | "name": "addr",
|
46 | "type": "address"
|
47 | }
|
48 | ],
|
49 | "name": "getBalance",
|
50 | "outputs": [
|
51 | {
|
52 | "name": "",
|
53 | "type": "uint256"
|
54 | }
|
55 | ],
|
56 | "stateMutability": "nonpayable",
|
57 | "type": "function"
|
58 | },
|
59 | {
|
60 | "inputs": [],
|
61 | "stateMutability": "nonpayable",
|
62 | "type": "constructor"
|
63 | },
|
64 | {
|
65 | "anonymous": false,
|
66 | "inputs": [
|
67 | {
|
68 | "indexed": true,
|
69 | "name": "_from",
|
70 | "type": "address"
|
71 | },
|
72 | {
|
73 | "indexed": true,
|
74 | "name": "_to",
|
75 | "type": "address"
|
76 | },
|
77 | {
|
78 | "indexed": false,
|
79 | "name": "_value",
|
80 | "type": "uint256"
|
81 | }
|
82 | ],
|
83 | "name": "Transfer",
|
84 | "type": "event"
|
85 | }
|
86 | ],
|
87 | "bytecode": "0x6060604052341561000c57fe5b5b600160a060020a033216600090815260208190526040902061271090555b5b6102308061003b6000396000f300606060405263ffffffff60e060020a6000350416637bd703e8811461003757806390b98a1114610065578063f8b2cb4f14610098575bfe5b341561003f57fe5b610053600160a060020a03600435166100c6565b60408051918252519081900360200190f35b341561006d57fe5b610084600160a060020a036004351660243561014d565b604080519115158252519081900360200190f35b34156100a057fe5b610053600160a060020a03600435166101e5565b60408051918252519081900360200190f35b600073__ConvertLib____________________________6396e4ee3d6100eb846101e5565b60026000604051602001526040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b151561013057fe5b6102c65a03f4151561013e57fe5b5050604051519150505b919050565b600160a060020a03331660009081526020819052604081205482901015610176575060006101df565b600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b92915050565b600160a060020a0381166000908152602081905260409020545b9190505600a165627a7a72305820f596963383bc39946413f0f0b34aee51796e6ae4b1b68b334f880b30a36ec6730029",
|
88 | "deployedBytecode": "0x606060405263ffffffff60e060020a6000350416637bd703e8811461003757806390b98a1114610065578063f8b2cb4f14610098575bfe5b341561003f57fe5b610053600160a060020a03600435166100c6565b60408051918252519081900360200190f35b341561006d57fe5b610084600160a060020a036004351660243561014d565b604080519115158252519081900360200190f35b34156100a057fe5b610053600160a060020a03600435166101e5565b60408051918252519081900360200190f35b600073__ConvertLib____________________________6396e4ee3d6100eb846101e5565b60026000604051602001526040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b151561013057fe5b6102c65a03f4151561013e57fe5b5050604051519150505b919050565b600160a060020a03331660009081526020819052604081205482901015610176575060006101df565b600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b92915050565b600160a060020a0381166000908152602081905260409020545b9190505600a165627a7a72305820f596963383bc39946413f0f0b34aee51796e6ae4b1b68b334f880b30a36ec6730029",
|
89 | "sourceMap": "315:637:1:-;;;452:55;;;;;;;-1:-1:-1;;;;;485:9:1;476:19;:8;:19;;;;;;;;;;498:5;476:27;;452:55;315:637;;;;;;;",
|
90 | "source": "pragma solidity ^0.4.4;\n\nimport \"./ConvertLib.sol\";\n\n// This is just a simple example of a coin-like contract.\n// It is not standards compatible and cannot be expected to talk to other\n// coin/token contracts. If you want to create a standards-compliant\n// token, see: https://github.com/ConsenSys/Tokens. Cheers!\n\ncontract MetaCoin {\n\tmapping (address => uint) balances;\n\n\tevent Transfer(address indexed _from, address indexed _to, uint256 _value);\n\n\tfunction MetaCoin() {\n\t\tbalances[tx.origin] = 10000;\n\t}\n\n\tfunction sendCoin(address receiver, uint amount) returns(bool sufficient) {\n\t\tif (balances[msg.sender] < amount) return false;\n\t\tbalances[msg.sender] -= amount;\n\t\tbalances[receiver] += amount;\n\t\tTransfer(msg.sender, receiver, amount);\n\t\treturn true;\n\t}\n\n\tfunction getBalanceInEth(address addr) returns(uint){\n\t\treturn ConvertLib.convert(getBalance(addr),2);\n\t}\n\n\tfunction getBalance(address addr) returns(uint) {\n\t\treturn balances[addr];\n\t}\n}\n",
|
91 | "sourcePath": "/Users/gnidan/tmp/metacoin/contracts/MetaCoin.sol",
|
92 | "ast": {
|
93 | "children": [
|
94 | {
|
95 | "attributes": {
|
96 | "literals": [
|
97 | "solidity",
|
98 | "^",
|
99 | "0.4",
|
100 | ".4"
|
101 | ]
|
102 | },
|
103 | "id": 18,
|
104 | "name": "PragmaDirective",
|
105 | "src": "0:23:1"
|
106 | },
|
107 | {
|
108 | "attributes": {
|
109 | "file": "./ConvertLib.sol"
|
110 | },
|
111 | "id": 19,
|
112 | "name": "ImportDirective",
|
113 | "src": "25:26:1"
|
114 | },
|
115 | {
|
116 | "attributes": {
|
117 | "fullyImplemented": true,
|
118 | "isLibrary": false,
|
119 | "linearizedBaseContracts": [
|
120 | 112
|
121 | ],
|
122 | "name": "MetaCoin"
|
123 | },
|
124 | "children": [
|
125 | {
|
126 | "attributes": {
|
127 | "constant": false,
|
128 | "name": "balances",
|
129 | "storageLocation": "default",
|
130 | "type": "mapping(address => uint256)",
|
131 | "visibility": "internal"
|
132 | },
|
133 | "children": [
|
134 | {
|
135 | "children": [
|
136 | {
|
137 | "attributes": {
|
138 | "name": "address"
|
139 | },
|
140 | "id": 20,
|
141 | "name": "ElementaryTypeName",
|
142 | "src": "345:7:1"
|
143 | },
|
144 | {
|
145 | "attributes": {
|
146 | "name": "uint"
|
147 | },
|
148 | "id": 21,
|
149 | "name": "ElementaryTypeName",
|
150 | "src": "356:4:1"
|
151 | }
|
152 | ],
|
153 | "id": 22,
|
154 | "name": "Mapping",
|
155 | "src": "336:25:1"
|
156 | }
|
157 | ],
|
158 | "id": 23,
|
159 | "name": "VariableDeclaration",
|
160 | "src": "336:34:1"
|
161 | },
|
162 | {
|
163 | "attributes": {
|
164 | "name": "Transfer"
|
165 | },
|
166 | "children": [
|
167 | {
|
168 | "children": [
|
169 | {
|
170 | "attributes": {
|
171 | "constant": false,
|
172 | "indexed": true,
|
173 | "name": "_from",
|
174 | "storageLocation": "default",
|
175 | "type": "address",
|
176 | "visibility": "internal"
|
177 | },
|
178 | "children": [
|
179 | {
|
180 | "attributes": {
|
181 | "name": "address"
|
182 | },
|
183 | "id": 24,
|
184 | "name": "ElementaryTypeName",
|
185 | "src": "389:7:1"
|
186 | }
|
187 | ],
|
188 | "id": 25,
|
189 | "name": "VariableDeclaration",
|
190 | "src": "389:21:1"
|
191 | },
|
192 | {
|
193 | "attributes": {
|
194 | "constant": false,
|
195 | "indexed": true,
|
196 | "name": "_to",
|
197 | "storageLocation": "default",
|
198 | "type": "address",
|
199 | "visibility": "internal"
|
200 | },
|
201 | "children": [
|
202 | {
|
203 | "attributes": {
|
204 | "name": "address"
|
205 | },
|
206 | "id": 26,
|
207 | "name": "ElementaryTypeName",
|
208 | "src": "412:7:1"
|
209 | }
|
210 | ],
|
211 | "id": 27,
|
212 | "name": "VariableDeclaration",
|
213 | "src": "412:19:1"
|
214 | },
|
215 | {
|
216 | "attributes": {
|
217 | "constant": false,
|
218 | "indexed": false,
|
219 | "name": "_value",
|
220 | "storageLocation": "default",
|
221 | "type": "uint256",
|
222 | "visibility": "internal"
|
223 | },
|
224 | "children": [
|
225 | {
|
226 | "attributes": {
|
227 | "name": "uint256"
|
228 | },
|
229 | "id": 28,
|
230 | "name": "ElementaryTypeName",
|
231 | "src": "433:7:1"
|
232 | }
|
233 | ],
|
234 | "id": 29,
|
235 | "name": "VariableDeclaration",
|
236 | "src": "433:14:1"
|
237 | }
|
238 | ],
|
239 | "id": 30,
|
240 | "name": "ParameterList",
|
241 | "src": "388:60:1"
|
242 | }
|
243 | ],
|
244 | "id": 31,
|
245 | "name": "EventDefinition",
|
246 | "src": "374:75:1"
|
247 | },
|
248 | {
|
249 | "attributes": {
|
250 | "constant": false,
|
251 | "name": "MetaCoin",
|
252 | "payable": false,
|
253 | "visibility": "public"
|
254 | },
|
255 | "children": [
|
256 | {
|
257 | "children": [],
|
258 | "id": 32,
|
259 | "name": "ParameterList",
|
260 | "src": "469:2:1"
|
261 | },
|
262 | {
|
263 | "children": [],
|
264 | "id": 33,
|
265 | "name": "ParameterList",
|
266 | "src": "472:0:1"
|
267 | },
|
268 | {
|
269 | "children": [
|
270 | {
|
271 | "children": [
|
272 | {
|
273 | "attributes": {
|
274 | "operator": "=",
|
275 | "type": "uint256"
|
276 | },
|
277 | "children": [
|
278 | {
|
279 | "attributes": {
|
280 | "type": "uint256"
|
281 | },
|
282 | "children": [
|
283 | {
|
284 | "attributes": {
|
285 | "type": "mapping(address => uint256)",
|
286 | "value": "balances"
|
287 | },
|
288 | "id": 34,
|
289 | "name": "Identifier",
|
290 | "src": "476:8:1"
|
291 | },
|
292 | {
|
293 | "attributes": {
|
294 | "member_name": "origin",
|
295 | "type": "address"
|
296 | },
|
297 | "children": [
|
298 | {
|
299 | "attributes": {
|
300 | "type": "tx",
|
301 | "value": "tx"
|
302 | },
|
303 | "id": 35,
|
304 | "name": "Identifier",
|
305 | "src": "485:2:1"
|
306 | }
|
307 | ],
|
308 | "id": 36,
|
309 | "name": "MemberAccess",
|
310 | "src": "485:9:1"
|
311 | }
|
312 | ],
|
313 | "id": 37,
|
314 | "name": "IndexAccess",
|
315 | "src": "476:19:1"
|
316 | },
|
317 | {
|
318 | "attributes": {
|
319 | "hexvalue": "3130303030",
|
320 | "subdenomination": null,
|
321 | "token": null,
|
322 | "type": "int_const 10000",
|
323 | "value": "10000"
|
324 | },
|
325 | "id": 38,
|
326 | "name": "Literal",
|
327 | "src": "498:5:1"
|
328 | }
|
329 | ],
|
330 | "id": 39,
|
331 | "name": "Assignment",
|
332 | "src": "476:27:1"
|
333 | }
|
334 | ],
|
335 | "id": 40,
|
336 | "name": "ExpressionStatement",
|
337 | "src": "476:27:1"
|
338 | }
|
339 | ],
|
340 | "id": 41,
|
341 | "name": "Block",
|
342 | "src": "472:35:1"
|
343 | }
|
344 | ],
|
345 | "id": 42,
|
346 | "name": "FunctionDefinition",
|
347 | "src": "452:55:1"
|
348 | },
|
349 | {
|
350 | "attributes": {
|
351 | "constant": false,
|
352 | "name": "sendCoin",
|
353 | "payable": false,
|
354 | "visibility": "public"
|
355 | },
|
356 | "children": [
|
357 | {
|
358 | "children": [
|
359 | {
|
360 | "attributes": {
|
361 | "constant": false,
|
362 | "name": "receiver",
|
363 | "storageLocation": "default",
|
364 | "type": "address",
|
365 | "visibility": "internal"
|
366 | },
|
367 | "children": [
|
368 | {
|
369 | "attributes": {
|
370 | "name": "address"
|
371 | },
|
372 | "id": 43,
|
373 | "name": "ElementaryTypeName",
|
374 | "src": "528:7:1"
|
375 | }
|
376 | ],
|
377 | "id": 44,
|
378 | "name": "VariableDeclaration",
|
379 | "src": "528:16:1"
|
380 | },
|
381 | {
|
382 | "attributes": {
|
383 | "constant": false,
|
384 | "name": "amount",
|
385 | "storageLocation": "default",
|
386 | "type": "uint256",
|
387 | "visibility": "internal"
|
388 | },
|
389 | "children": [
|
390 | {
|
391 | "attributes": {
|
392 | "name": "uint"
|
393 | },
|
394 | "id": 45,
|
395 | "name": "ElementaryTypeName",
|
396 | "src": "546:4:1"
|
397 | }
|
398 | ],
|
399 | "id": 46,
|
400 | "name": "VariableDeclaration",
|
401 | "src": "546:11:1"
|
402 | }
|
403 | ],
|
404 | "id": 47,
|
405 | "name": "ParameterList",
|
406 | "src": "527:31:1"
|
407 | },
|
408 | {
|
409 | "children": [
|
410 | {
|
411 | "attributes": {
|
412 | "constant": false,
|
413 | "name": "sufficient",
|
414 | "storageLocation": "default",
|
415 | "type": "bool",
|
416 | "visibility": "internal"
|
417 | },
|
418 | "children": [
|
419 | {
|
420 | "attributes": {
|
421 | "name": "bool"
|
422 | },
|
423 | "id": 48,
|
424 | "name": "ElementaryTypeName",
|
425 | "src": "567:4:1"
|
426 | }
|
427 | ],
|
428 | "id": 49,
|
429 | "name": "VariableDeclaration",
|
430 | "src": "567:15:1"
|
431 | }
|
432 | ],
|
433 | "id": 50,
|
434 | "name": "ParameterList",
|
435 | "src": "566:17:1"
|
436 | },
|
437 | {
|
438 | "children": [
|
439 | {
|
440 | "children": [
|
441 | {
|
442 | "attributes": {
|
443 | "operator": "<",
|
444 | "type": "bool"
|
445 | },
|
446 | "children": [
|
447 | {
|
448 | "attributes": {
|
449 | "type": "uint256"
|
450 | },
|
451 | "children": [
|
452 | {
|
453 | "attributes": {
|
454 | "type": "mapping(address => uint256)",
|
455 | "value": "balances"
|
456 | },
|
457 | "id": 51,
|
458 | "name": "Identifier",
|
459 | "src": "592:8:1"
|
460 | },
|
461 | {
|
462 | "attributes": {
|
463 | "member_name": "sender",
|
464 | "type": "address"
|
465 | },
|
466 | "children": [
|
467 | {
|
468 | "attributes": {
|
469 | "type": "msg",
|
470 | "value": "msg"
|
471 | },
|
472 | "id": 52,
|
473 | "name": "Identifier",
|
474 | "src": "601:3:1"
|
475 | }
|
476 | ],
|
477 | "id": 53,
|
478 | "name": "MemberAccess",
|
479 | "src": "601:10:1"
|
480 | }
|
481 | ],
|
482 | "id": 54,
|
483 | "name": "IndexAccess",
|
484 | "src": "592:20:1"
|
485 | },
|
486 | {
|
487 | "attributes": {
|
488 | "type": "uint256",
|
489 | "value": "amount"
|
490 | },
|
491 | "id": 55,
|
492 | "name": "Identifier",
|
493 | "src": "615:6:1"
|
494 | }
|
495 | ],
|
496 | "id": 56,
|
497 | "name": "BinaryOperation",
|
498 | "src": "592:29:1"
|
499 | },
|
500 | {
|
501 | "children": [
|
502 | {
|
503 | "attributes": {
|
504 | "hexvalue": "66616c7365",
|
505 | "subdenomination": null,
|
506 | "token": "false",
|
507 | "type": "bool",
|
508 | "value": "false"
|
509 | },
|
510 | "id": 57,
|
511 | "name": "Literal",
|
512 | "src": "630:5:1"
|
513 | }
|
514 | ],
|
515 | "id": 58,
|
516 | "name": "Return",
|
517 | "src": "623:12:1"
|
518 | }
|
519 | ],
|
520 | "id": 59,
|
521 | "name": "IfStatement",
|
522 | "src": "588:47:1"
|
523 | },
|
524 | {
|
525 | "children": [
|
526 | {
|
527 | "attributes": {
|
528 | "operator": "-=",
|
529 | "type": "uint256"
|
530 | },
|
531 | "children": [
|
532 | {
|
533 | "attributes": {
|
534 | "type": "uint256"
|
535 | },
|
536 | "children": [
|
537 | {
|
538 | "attributes": {
|
539 | "type": "mapping(address => uint256)",
|
540 | "value": "balances"
|
541 | },
|
542 | "id": 60,
|
543 | "name": "Identifier",
|
544 | "src": "639:8:1"
|
545 | },
|
546 | {
|
547 | "attributes": {
|
548 | "member_name": "sender",
|
549 | "type": "address"
|
550 | },
|
551 | "children": [
|
552 | {
|
553 | "attributes": {
|
554 | "type": "msg",
|
555 | "value": "msg"
|
556 | },
|
557 | "id": 61,
|
558 | "name": "Identifier",
|
559 | "src": "648:3:1"
|
560 | }
|
561 | ],
|
562 | "id": 62,
|
563 | "name": "MemberAccess",
|
564 | "src": "648:10:1"
|
565 | }
|
566 | ],
|
567 | "id": 63,
|
568 | "name": "IndexAccess",
|
569 | "src": "639:20:1"
|
570 | },
|
571 | {
|
572 | "attributes": {
|
573 | "type": "uint256",
|
574 | "value": "amount"
|
575 | },
|
576 | "id": 64,
|
577 | "name": "Identifier",
|
578 | "src": "663:6:1"
|
579 | }
|
580 | ],
|
581 | "id": 65,
|
582 | "name": "Assignment",
|
583 | "src": "639:30:1"
|
584 | }
|
585 | ],
|
586 | "id": 66,
|
587 | "name": "ExpressionStatement",
|
588 | "src": "639:30:1"
|
589 | },
|
590 | {
|
591 | "children": [
|
592 | {
|
593 | "attributes": {
|
594 | "operator": "+=",
|
595 | "type": "uint256"
|
596 | },
|
597 | "children": [
|
598 | {
|
599 | "attributes": {
|
600 | "type": "uint256"
|
601 | },
|
602 | "children": [
|
603 | {
|
604 | "attributes": {
|
605 | "type": "mapping(address => uint256)",
|
606 | "value": "balances"
|
607 | },
|
608 | "id": 67,
|
609 | "name": "Identifier",
|
610 | "src": "673:8:1"
|
611 | },
|
612 | {
|
613 | "attributes": {
|
614 | "type": "address",
|
615 | "value": "receiver"
|
616 | },
|
617 | "id": 68,
|
618 | "name": "Identifier",
|
619 | "src": "682:8:1"
|
620 | }
|
621 | ],
|
622 | "id": 69,
|
623 | "name": "IndexAccess",
|
624 | "src": "673:18:1"
|
625 | },
|
626 | {
|
627 | "attributes": {
|
628 | "type": "uint256",
|
629 | "value": "amount"
|
630 | },
|
631 | "id": 70,
|
632 | "name": "Identifier",
|
633 | "src": "695:6:1"
|
634 | }
|
635 | ],
|
636 | "id": 71,
|
637 | "name": "Assignment",
|
638 | "src": "673:28:1"
|
639 | }
|
640 | ],
|
641 | "id": 72,
|
642 | "name": "ExpressionStatement",
|
643 | "src": "673:28:1"
|
644 | },
|
645 | {
|
646 | "children": [
|
647 | {
|
648 | "attributes": {
|
649 | "type": "tuple()",
|
650 | "type_conversion": false
|
651 | },
|
652 | "children": [
|
653 | {
|
654 | "attributes": {
|
655 | "type": "function (address,address,uint256) constant",
|
656 | "value": "Transfer"
|
657 | },
|
658 | "id": 73,
|
659 | "name": "Identifier",
|
660 | "src": "705:8:1"
|
661 | },
|
662 | {
|
663 | "attributes": {
|
664 | "member_name": "sender",
|
665 | "type": "address"
|
666 | },
|
667 | "children": [
|
668 | {
|
669 | "attributes": {
|
670 | "type": "msg",
|
671 | "value": "msg"
|
672 | },
|
673 | "id": 74,
|
674 | "name": "Identifier",
|
675 | "src": "714:3:1"
|
676 | }
|
677 | ],
|
678 | "id": 75,
|
679 | "name": "MemberAccess",
|
680 | "src": "714:10:1"
|
681 | },
|
682 | {
|
683 | "attributes": {
|
684 | "type": "address",
|
685 | "value": "receiver"
|
686 | },
|
687 | "id": 76,
|
688 | "name": "Identifier",
|
689 | "src": "726:8:1"
|
690 | },
|
691 | {
|
692 | "attributes": {
|
693 | "type": "uint256",
|
694 | "value": "amount"
|
695 | },
|
696 | "id": 77,
|
697 | "name": "Identifier",
|
698 | "src": "736:6:1"
|
699 | }
|
700 | ],
|
701 | "id": 78,
|
702 | "name": "FunctionCall",
|
703 | "src": "705:38:1"
|
704 | }
|
705 | ],
|
706 | "id": 79,
|
707 | "name": "ExpressionStatement",
|
708 | "src": "705:38:1"
|
709 | },
|
710 | {
|
711 | "children": [
|
712 | {
|
713 | "attributes": {
|
714 | "hexvalue": "74727565",
|
715 | "subdenomination": null,
|
716 | "token": "true",
|
717 | "type": "bool",
|
718 | "value": "true"
|
719 | },
|
720 | "id": 80,
|
721 | "name": "Literal",
|
722 | "src": "754:4:1"
|
723 | }
|
724 | ],
|
725 | "id": 81,
|
726 | "name": "Return",
|
727 | "src": "747:11:1"
|
728 | }
|
729 | ],
|
730 | "id": 82,
|
731 | "name": "Block",
|
732 | "src": "584:178:1"
|
733 | }
|
734 | ],
|
735 | "id": 83,
|
736 | "name": "FunctionDefinition",
|
737 | "src": "510:252:1"
|
738 | },
|
739 | {
|
740 | "attributes": {
|
741 | "constant": false,
|
742 | "name": "getBalanceInEth",
|
743 | "payable": false,
|
744 | "visibility": "public"
|
745 | },
|
746 | "children": [
|
747 | {
|
748 | "children": [
|
749 | {
|
750 | "attributes": {
|
751 | "constant": false,
|
752 | "name": "addr",
|
753 | "storageLocation": "default",
|
754 | "type": "address",
|
755 | "visibility": "internal"
|
756 | },
|
757 | "children": [
|
758 | {
|
759 | "attributes": {
|
760 | "name": "address"
|
761 | },
|
762 | "id": 84,
|
763 | "name": "ElementaryTypeName",
|
764 | "src": "790:7:1"
|
765 | }
|
766 | ],
|
767 | "id": 85,
|
768 | "name": "VariableDeclaration",
|
769 | "src": "790:12:1"
|
770 | }
|
771 | ],
|
772 | "id": 86,
|
773 | "name": "ParameterList",
|
774 | "src": "789:14:1"
|
775 | },
|
776 | {
|
777 | "children": [
|
778 | {
|
779 | "attributes": {
|
780 | "constant": false,
|
781 | "name": "",
|
782 | "storageLocation": "default",
|
783 | "type": "uint256",
|
784 | "visibility": "internal"
|
785 | },
|
786 | "children": [
|
787 | {
|
788 | "attributes": {
|
789 | "name": "uint"
|
790 | },
|
791 | "id": 87,
|
792 | "name": "ElementaryTypeName",
|
793 | "src": "812:4:1"
|
794 | }
|
795 | ],
|
796 | "id": 88,
|
797 | "name": "VariableDeclaration",
|
798 | "src": "812:4:1"
|
799 | }
|
800 | ],
|
801 | "id": 89,
|
802 | "name": "ParameterList",
|
803 | "src": "811:6:1"
|
804 | },
|
805 | {
|
806 | "children": [
|
807 | {
|
808 | "children": [
|
809 | {
|
810 | "attributes": {
|
811 | "type": "uint256",
|
812 | "type_conversion": false
|
813 | },
|
814 | "children": [
|
815 | {
|
816 | "attributes": {
|
817 | "member_name": "convert",
|
818 | "type": "function (uint256,uint256) returns (uint256)"
|
819 | },
|
820 | "children": [
|
821 | {
|
822 | "attributes": {
|
823 | "type": "type(library ConvertLib)",
|
824 | "value": "ConvertLib"
|
825 | },
|
826 | "id": 90,
|
827 | "name": "Identifier",
|
828 | "src": "828:10:1"
|
829 | }
|
830 | ],
|
831 | "id": 91,
|
832 | "name": "MemberAccess",
|
833 | "src": "828:18:1"
|
834 | },
|
835 | {
|
836 | "attributes": {
|
837 | "type": "uint256",
|
838 | "type_conversion": false
|
839 | },
|
840 | "children": [
|
841 | {
|
842 | "attributes": {
|
843 | "type": "function (address) returns (uint256)",
|
844 | "value": "getBalance"
|
845 | },
|
846 | "id": 92,
|
847 | "name": "Identifier",
|
848 | "src": "847:10:1"
|
849 | },
|
850 | {
|
851 | "attributes": {
|
852 | "type": "address",
|
853 | "value": "addr"
|
854 | },
|
855 | "id": 93,
|
856 | "name": "Identifier",
|
857 | "src": "858:4:1"
|
858 | }
|
859 | ],
|
860 | "id": 94,
|
861 | "name": "FunctionCall",
|
862 | "src": "847:16:1"
|
863 | },
|
864 | {
|
865 | "attributes": {
|
866 | "hexvalue": "32",
|
867 | "subdenomination": null,
|
868 | "token": null,
|
869 | "type": "int_const 2",
|
870 | "value": "2"
|
871 | },
|
872 | "id": 95,
|
873 | "name": "Literal",
|
874 | "src": "864:1:1"
|
875 | }
|
876 | ],
|
877 | "id": 96,
|
878 | "name": "FunctionCall",
|
879 | "src": "828:38:1"
|
880 | }
|
881 | ],
|
882 | "id": 97,
|
883 | "name": "Return",
|
884 | "src": "821:45:1"
|
885 | }
|
886 | ],
|
887 | "id": 98,
|
888 | "name": "Block",
|
889 | "src": "817:53:1"
|
890 | }
|
891 | ],
|
892 | "id": 99,
|
893 | "name": "FunctionDefinition",
|
894 | "src": "765:105:1"
|
895 | },
|
896 | {
|
897 | "attributes": {
|
898 | "constant": false,
|
899 | "name": "getBalance",
|
900 | "payable": false,
|
901 | "visibility": "public"
|
902 | },
|
903 | "children": [
|
904 | {
|
905 | "children": [
|
906 | {
|
907 | "attributes": {
|
908 | "constant": false,
|
909 | "name": "addr",
|
910 | "storageLocation": "default",
|
911 | "type": "address",
|
912 | "visibility": "internal"
|
913 | },
|
914 | "children": [
|
915 | {
|
916 | "attributes": {
|
917 | "name": "address"
|
918 | },
|
919 | "id": 100,
|
920 | "name": "ElementaryTypeName",
|
921 | "src": "893:7:1"
|
922 | }
|
923 | ],
|
924 | "id": 101,
|
925 | "name": "VariableDeclaration",
|
926 | "src": "893:12:1"
|
927 | }
|
928 | ],
|
929 | "id": 102,
|
930 | "name": "ParameterList",
|
931 | "src": "892:14:1"
|
932 | },
|
933 | {
|
934 | "children": [
|
935 | {
|
936 | "attributes": {
|
937 | "constant": false,
|
938 | "name": "",
|
939 | "storageLocation": "default",
|
940 | "type": "uint256",
|
941 | "visibility": "internal"
|
942 | },
|
943 | "children": [
|
944 | {
|
945 | "attributes": {
|
946 | "name": "uint"
|
947 | },
|
948 | "id": 103,
|
949 | "name": "ElementaryTypeName",
|
950 | "src": "915:4:1"
|
951 | }
|
952 | ],
|
953 | "id": 104,
|
954 | "name": "VariableDeclaration",
|
955 | "src": "915:4:1"
|
956 | }
|
957 | ],
|
958 | "id": 105,
|
959 | "name": "ParameterList",
|
960 | "src": "914:6:1"
|
961 | },
|
962 | {
|
963 | "children": [
|
964 | {
|
965 | "children": [
|
966 | {
|
967 | "attributes": {
|
968 | "type": "uint256"
|
969 | },
|
970 | "children": [
|
971 | {
|
972 | "attributes": {
|
973 | "type": "mapping(address => uint256)",
|
974 | "value": "balances"
|
975 | },
|
976 | "id": 106,
|
977 | "name": "Identifier",
|
978 | "src": "932:8:1"
|
979 | },
|
980 | {
|
981 | "attributes": {
|
982 | "type": "address",
|
983 | "value": "addr"
|
984 | },
|
985 | "id": 107,
|
986 | "name": "Identifier",
|
987 | "src": "941:4:1"
|
988 | }
|
989 | ],
|
990 | "id": 108,
|
991 | "name": "IndexAccess",
|
992 | "src": "932:14:1"
|
993 | }
|
994 | ],
|
995 | "id": 109,
|
996 | "name": "Return",
|
997 | "src": "925:21:1"
|
998 | }
|
999 | ],
|
1000 | "id": 110,
|
1001 | "name": "Block",
|
1002 | "src": "921:29:1"
|
1003 | }
|
1004 | ],
|
1005 | "id": 111,
|
1006 | "name": "FunctionDefinition",
|
1007 | "src": "873:77:1"
|
1008 | }
|
1009 | ],
|
1010 | "id": 112,
|
1011 | "name": "ContractDefinition",
|
1012 | "src": "315:637:1"
|
1013 | }
|
1014 | ],
|
1015 | "name": "SourceUnit"
|
1016 | },
|
1017 | "networks": {
|
1018 | "1494889277189": {
|
1019 | "address": "0x657b316c4c7df70999a69c2475e59152f87a04aa",
|
1020 | "links": {
|
1021 | "ConvertLib": {
|
1022 | "address": "0x7bcc63d45790e23f6e9bc3514e1ab5af649302d0",
|
1023 | "events": {
|
1024 | "0xa163a6249e860c278ef4049759a7f7c7e8c141d30fd634fda9b5a6a95d111a30": {
|
1025 | "anonymous": false,
|
1026 | "inputs": [],
|
1027 | "name": "Test",
|
1028 | "type": "event"
|
1029 | }
|
1030 | }
|
1031 | }
|
1032 | }
|
1033 | }
|
1034 | },
|
1035 | "updatedAt": "2017-05-15T20:46:00Z",
|
1036 | "schemaVersion": "0.0.5"
|
1037 | }
|