├── .gitignore ├── README.md ├── bs-config.json ├── build └── contracts │ ├── CryptArtifacts.json │ ├── Migrations.json │ ├── Ownable.json │ ├── ProofOfExistence1.json │ └── ProofOfExistence2.json ├── contracts ├── CryptArtifacts.sol └── Migrations.sol ├── cryptoArt.code-workspace ├── info ├── migrations ├── 1_initial_migration.js └── 2_deploy_contracts.js ├── package-lock.json ├── package.json ├── truffle-config.js └── truffle.js /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | node_modules/ 3 | .vscode/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Artifacts Generator 2 | Solidity DApp to generate, store and trading artifacts. Also possible to create one artifact based on other two artifacts to produce unique artifacts. 3 | -------------------------------------------------------------------------------- /bs-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "server": { 3 | "baseDir": ["./src", "./build/contracts"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /build/contracts/Migrations.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractName": "Migrations", 3 | "abi": [ 4 | { 5 | "constant": false, 6 | "inputs": [ 7 | { 8 | "name": "new_address", 9 | "type": "address" 10 | } 11 | ], 12 | "name": "upgrade", 13 | "outputs": [], 14 | "payable": false, 15 | "stateMutability": "nonpayable", 16 | "type": "function" 17 | }, 18 | { 19 | "constant": true, 20 | "inputs": [], 21 | "name": "last_completed_migration", 22 | "outputs": [ 23 | { 24 | "name": "", 25 | "type": "uint256" 26 | } 27 | ], 28 | "payable": false, 29 | "stateMutability": "view", 30 | "type": "function" 31 | }, 32 | { 33 | "constant": true, 34 | "inputs": [], 35 | "name": "owner", 36 | "outputs": [ 37 | { 38 | "name": "", 39 | "type": "address" 40 | } 41 | ], 42 | "payable": false, 43 | "stateMutability": "view", 44 | "type": "function" 45 | }, 46 | { 47 | "constant": false, 48 | "inputs": [ 49 | { 50 | "name": "completed", 51 | "type": "uint256" 52 | } 53 | ], 54 | "name": "setCompleted", 55 | "outputs": [], 56 | "payable": false, 57 | "stateMutability": "nonpayable", 58 | "type": "function" 59 | }, 60 | { 61 | "inputs": [], 62 | "payable": false, 63 | "stateMutability": "nonpayable", 64 | "type": "constructor" 65 | } 66 | ], 67 | "bytecode": "0x6060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102e58061005e6000396000f300606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100a05780638da5cb5b146100c9578063fdacd5761461011e575b600080fd5b341561007257600080fd5b61009e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610141565b005b34156100ab57600080fd5b6100b3610229565b6040518082815260200191505060405180910390f35b34156100d457600080fd5b6100dc61022f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012957600080fd5b61013f6004808035906020019091905050610254565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561019e57600080fd5b8190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b151561021157600080fd5b6102c65a03f1151561022257600080fd5b5050505050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156102af57600080fd5b80600181905550505600a165627a7a72305820e34351c0bb51339db1d308b3d43a0d4b605e47e6b335f6b433b0e5bfa051eab50029", 68 | "deployedBytecode": "0x606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100a05780638da5cb5b146100c9578063fdacd5761461011e575b600080fd5b341561007257600080fd5b61009e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610141565b005b34156100ab57600080fd5b6100b3610229565b6040518082815260200191505060405180910390f35b34156100d457600080fd5b6100dc61022f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012957600080fd5b61013f6004808035906020019091905050610254565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561019e57600080fd5b8190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b151561021157600080fd5b6102c65a03f1151561022257600080fd5b5050505050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156102af57600080fd5b80600181905550505600a165627a7a72305820e34351c0bb51339db1d308b3d43a0d4b605e47e6b335f6b433b0e5bfa051eab50029", 69 | "sourceMap": "26:497:1:-;;;187:58;;;;;;;;230:10;222:5;;:18;;;;;;;;;;;;;;;;;;26:497;;;;;;", 70 | "deployedSourceMap": "26:497:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;356:165;;;;;;;;;;;;;;;;;;;;;;;;;;;;74:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;249:103;;;;;;;;;;;;;;;;;;;;;;;;;;356:165;418:19;165:5;;;;;;;;;;;151:19;;:10;:19;;;143:28;;;;;;;;451:11;418:45;;469:8;:21;;;491:24;;469:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;356:165;;:::o;74:36::-;;;;:::o;50:20::-;;;;;;;;;;;;;:::o;249:103::-;165:5;;;;;;;;;;;151:19;;:10;:19;;;143:28;;;;;;;;338:9;311:24;:36;;;;249:103;:::o", 71 | "source": "pragma solidity ^0.4.17;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n require(msg.sender == owner);\n _;\n }\n\n function Migrations() public {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n", 72 | "sourcePath": "/opt/storage/albert/Projects/cryptoArt/contracts/Migrations.sol", 73 | "ast": { 74 | "attributes": { 75 | "absolutePath": "/opt/storage/albert/Projects/cryptoArt/contracts/Migrations.sol", 76 | "exportedSymbols": { 77 | "Migrations": [ 78 | 172 79 | ] 80 | } 81 | }, 82 | "children": [ 83 | { 84 | "attributes": { 85 | "literals": [ 86 | "solidity", 87 | "^", 88 | "0.4", 89 | ".17" 90 | ] 91 | }, 92 | "id": 115, 93 | "name": "PragmaDirective", 94 | "src": "0:24:1" 95 | }, 96 | { 97 | "attributes": { 98 | "baseContracts": [ 99 | null 100 | ], 101 | "contractDependencies": [ 102 | null 103 | ], 104 | "contractKind": "contract", 105 | "documentation": null, 106 | "fullyImplemented": true, 107 | "linearizedBaseContracts": [ 108 | 172 109 | ], 110 | "name": "Migrations", 111 | "scope": 173 112 | }, 113 | "children": [ 114 | { 115 | "attributes": { 116 | "constant": false, 117 | "name": "owner", 118 | "scope": 172, 119 | "stateVariable": true, 120 | "storageLocation": "default", 121 | "type": "address", 122 | "value": null, 123 | "visibility": "public" 124 | }, 125 | "children": [ 126 | { 127 | "attributes": { 128 | "name": "address", 129 | "type": "address" 130 | }, 131 | "id": 116, 132 | "name": "ElementaryTypeName", 133 | "src": "50:7:1" 134 | } 135 | ], 136 | "id": 117, 137 | "name": "VariableDeclaration", 138 | "src": "50:20:1" 139 | }, 140 | { 141 | "attributes": { 142 | "constant": false, 143 | "name": "last_completed_migration", 144 | "scope": 172, 145 | "stateVariable": true, 146 | "storageLocation": "default", 147 | "type": "uint256", 148 | "value": null, 149 | "visibility": "public" 150 | }, 151 | "children": [ 152 | { 153 | "attributes": { 154 | "name": "uint", 155 | "type": "uint256" 156 | }, 157 | "id": 118, 158 | "name": "ElementaryTypeName", 159 | "src": "74:4:1" 160 | } 161 | ], 162 | "id": 119, 163 | "name": "VariableDeclaration", 164 | "src": "74:36:1" 165 | }, 166 | { 167 | "attributes": { 168 | "name": "restricted", 169 | "visibility": "internal" 170 | }, 171 | "children": [ 172 | { 173 | "attributes": { 174 | "parameters": [ 175 | null 176 | ] 177 | }, 178 | "children": [], 179 | "id": 120, 180 | "name": "ParameterList", 181 | "src": "134:2:1" 182 | }, 183 | { 184 | "children": [ 185 | { 186 | "children": [ 187 | { 188 | "attributes": { 189 | "argumentTypes": null, 190 | "isConstant": false, 191 | "isLValue": false, 192 | "isPure": false, 193 | "isStructConstructorCall": false, 194 | "lValueRequested": false, 195 | "names": [ 196 | null 197 | ], 198 | "type": "tuple()", 199 | "type_conversion": false 200 | }, 201 | "children": [ 202 | { 203 | "attributes": { 204 | "argumentTypes": [ 205 | { 206 | "typeIdentifier": "t_bool", 207 | "typeString": "bool" 208 | } 209 | ], 210 | "overloadedDeclarations": [ 211 | null 212 | ], 213 | "referencedDeclaration": 243, 214 | "type": "function (bool) pure", 215 | "value": "require" 216 | }, 217 | "id": 121, 218 | "name": "Identifier", 219 | "src": "143:7:1" 220 | }, 221 | { 222 | "attributes": { 223 | "argumentTypes": null, 224 | "commonType": { 225 | "typeIdentifier": "t_address", 226 | "typeString": "address" 227 | }, 228 | "isConstant": false, 229 | "isLValue": false, 230 | "isPure": false, 231 | "lValueRequested": false, 232 | "operator": "==", 233 | "type": "bool" 234 | }, 235 | "children": [ 236 | { 237 | "attributes": { 238 | "argumentTypes": null, 239 | "isConstant": false, 240 | "isLValue": false, 241 | "isPure": false, 242 | "lValueRequested": false, 243 | "member_name": "sender", 244 | "referencedDeclaration": null, 245 | "type": "address" 246 | }, 247 | "children": [ 248 | { 249 | "attributes": { 250 | "argumentTypes": null, 251 | "overloadedDeclarations": [ 252 | null 253 | ], 254 | "referencedDeclaration": 240, 255 | "type": "msg", 256 | "value": "msg" 257 | }, 258 | "id": 122, 259 | "name": "Identifier", 260 | "src": "151:3:1" 261 | } 262 | ], 263 | "id": 123, 264 | "name": "MemberAccess", 265 | "src": "151:10:1" 266 | }, 267 | { 268 | "attributes": { 269 | "argumentTypes": null, 270 | "overloadedDeclarations": [ 271 | null 272 | ], 273 | "referencedDeclaration": 117, 274 | "type": "address", 275 | "value": "owner" 276 | }, 277 | "id": 124, 278 | "name": "Identifier", 279 | "src": "165:5:1" 280 | } 281 | ], 282 | "id": 125, 283 | "name": "BinaryOperation", 284 | "src": "151:19:1" 285 | } 286 | ], 287 | "id": 126, 288 | "name": "FunctionCall", 289 | "src": "143:28:1" 290 | } 291 | ], 292 | "id": 127, 293 | "name": "ExpressionStatement", 294 | "src": "143:28:1" 295 | }, 296 | { 297 | "id": 128, 298 | "name": "PlaceholderStatement", 299 | "src": "177:1:1" 300 | } 301 | ], 302 | "id": 129, 303 | "name": "Block", 304 | "src": "137:46:1" 305 | } 306 | ], 307 | "id": 130, 308 | "name": "ModifierDefinition", 309 | "src": "115:68:1" 310 | }, 311 | { 312 | "attributes": { 313 | "constant": false, 314 | "implemented": true, 315 | "isConstructor": true, 316 | "modifiers": [ 317 | null 318 | ], 319 | "name": "Migrations", 320 | "payable": false, 321 | "scope": 172, 322 | "stateMutability": "nonpayable", 323 | "superFunction": null, 324 | "visibility": "public" 325 | }, 326 | "children": [ 327 | { 328 | "attributes": { 329 | "parameters": [ 330 | null 331 | ] 332 | }, 333 | "children": [], 334 | "id": 131, 335 | "name": "ParameterList", 336 | "src": "206:2:1" 337 | }, 338 | { 339 | "attributes": { 340 | "parameters": [ 341 | null 342 | ] 343 | }, 344 | "children": [], 345 | "id": 132, 346 | "name": "ParameterList", 347 | "src": "216:0:1" 348 | }, 349 | { 350 | "children": [ 351 | { 352 | "children": [ 353 | { 354 | "attributes": { 355 | "argumentTypes": null, 356 | "isConstant": false, 357 | "isLValue": false, 358 | "isPure": false, 359 | "lValueRequested": false, 360 | "operator": "=", 361 | "type": "address" 362 | }, 363 | "children": [ 364 | { 365 | "attributes": { 366 | "argumentTypes": null, 367 | "overloadedDeclarations": [ 368 | null 369 | ], 370 | "referencedDeclaration": 117, 371 | "type": "address", 372 | "value": "owner" 373 | }, 374 | "id": 133, 375 | "name": "Identifier", 376 | "src": "222:5:1" 377 | }, 378 | { 379 | "attributes": { 380 | "argumentTypes": null, 381 | "isConstant": false, 382 | "isLValue": false, 383 | "isPure": false, 384 | "lValueRequested": false, 385 | "member_name": "sender", 386 | "referencedDeclaration": null, 387 | "type": "address" 388 | }, 389 | "children": [ 390 | { 391 | "attributes": { 392 | "argumentTypes": null, 393 | "overloadedDeclarations": [ 394 | null 395 | ], 396 | "referencedDeclaration": 240, 397 | "type": "msg", 398 | "value": "msg" 399 | }, 400 | "id": 134, 401 | "name": "Identifier", 402 | "src": "230:3:1" 403 | } 404 | ], 405 | "id": 135, 406 | "name": "MemberAccess", 407 | "src": "230:10:1" 408 | } 409 | ], 410 | "id": 136, 411 | "name": "Assignment", 412 | "src": "222:18:1" 413 | } 414 | ], 415 | "id": 137, 416 | "name": "ExpressionStatement", 417 | "src": "222:18:1" 418 | } 419 | ], 420 | "id": 138, 421 | "name": "Block", 422 | "src": "216:29:1" 423 | } 424 | ], 425 | "id": 139, 426 | "name": "FunctionDefinition", 427 | "src": "187:58:1" 428 | }, 429 | { 430 | "attributes": { 431 | "constant": false, 432 | "implemented": true, 433 | "isConstructor": false, 434 | "name": "setCompleted", 435 | "payable": false, 436 | "scope": 172, 437 | "stateMutability": "nonpayable", 438 | "superFunction": null, 439 | "visibility": "public" 440 | }, 441 | "children": [ 442 | { 443 | "children": [ 444 | { 445 | "attributes": { 446 | "constant": false, 447 | "name": "completed", 448 | "scope": 151, 449 | "stateVariable": false, 450 | "storageLocation": "default", 451 | "type": "uint256", 452 | "value": null, 453 | "visibility": "internal" 454 | }, 455 | "children": [ 456 | { 457 | "attributes": { 458 | "name": "uint", 459 | "type": "uint256" 460 | }, 461 | "id": 140, 462 | "name": "ElementaryTypeName", 463 | "src": "271:4:1" 464 | } 465 | ], 466 | "id": 141, 467 | "name": "VariableDeclaration", 468 | "src": "271:14:1" 469 | } 470 | ], 471 | "id": 142, 472 | "name": "ParameterList", 473 | "src": "270:16:1" 474 | }, 475 | { 476 | "attributes": { 477 | "parameters": [ 478 | null 479 | ] 480 | }, 481 | "children": [], 482 | "id": 145, 483 | "name": "ParameterList", 484 | "src": "305:0:1" 485 | }, 486 | { 487 | "attributes": { 488 | "arguments": [ 489 | null 490 | ] 491 | }, 492 | "children": [ 493 | { 494 | "attributes": { 495 | "argumentTypes": null, 496 | "overloadedDeclarations": [ 497 | null 498 | ], 499 | "referencedDeclaration": 130, 500 | "type": "modifier ()", 501 | "value": "restricted" 502 | }, 503 | "id": 143, 504 | "name": "Identifier", 505 | "src": "294:10:1" 506 | } 507 | ], 508 | "id": 144, 509 | "name": "ModifierInvocation", 510 | "src": "294:10:1" 511 | }, 512 | { 513 | "children": [ 514 | { 515 | "children": [ 516 | { 517 | "attributes": { 518 | "argumentTypes": null, 519 | "isConstant": false, 520 | "isLValue": false, 521 | "isPure": false, 522 | "lValueRequested": false, 523 | "operator": "=", 524 | "type": "uint256" 525 | }, 526 | "children": [ 527 | { 528 | "attributes": { 529 | "argumentTypes": null, 530 | "overloadedDeclarations": [ 531 | null 532 | ], 533 | "referencedDeclaration": 119, 534 | "type": "uint256", 535 | "value": "last_completed_migration" 536 | }, 537 | "id": 146, 538 | "name": "Identifier", 539 | "src": "311:24:1" 540 | }, 541 | { 542 | "attributes": { 543 | "argumentTypes": null, 544 | "overloadedDeclarations": [ 545 | null 546 | ], 547 | "referencedDeclaration": 141, 548 | "type": "uint256", 549 | "value": "completed" 550 | }, 551 | "id": 147, 552 | "name": "Identifier", 553 | "src": "338:9:1" 554 | } 555 | ], 556 | "id": 148, 557 | "name": "Assignment", 558 | "src": "311:36:1" 559 | } 560 | ], 561 | "id": 149, 562 | "name": "ExpressionStatement", 563 | "src": "311:36:1" 564 | } 565 | ], 566 | "id": 150, 567 | "name": "Block", 568 | "src": "305:47:1" 569 | } 570 | ], 571 | "id": 151, 572 | "name": "FunctionDefinition", 573 | "src": "249:103:1" 574 | }, 575 | { 576 | "attributes": { 577 | "constant": false, 578 | "implemented": true, 579 | "isConstructor": false, 580 | "name": "upgrade", 581 | "payable": false, 582 | "scope": 172, 583 | "stateMutability": "nonpayable", 584 | "superFunction": null, 585 | "visibility": "public" 586 | }, 587 | "children": [ 588 | { 589 | "children": [ 590 | { 591 | "attributes": { 592 | "constant": false, 593 | "name": "new_address", 594 | "scope": 171, 595 | "stateVariable": false, 596 | "storageLocation": "default", 597 | "type": "address", 598 | "value": null, 599 | "visibility": "internal" 600 | }, 601 | "children": [ 602 | { 603 | "attributes": { 604 | "name": "address", 605 | "type": "address" 606 | }, 607 | "id": 152, 608 | "name": "ElementaryTypeName", 609 | "src": "373:7:1" 610 | } 611 | ], 612 | "id": 153, 613 | "name": "VariableDeclaration", 614 | "src": "373:19:1" 615 | } 616 | ], 617 | "id": 154, 618 | "name": "ParameterList", 619 | "src": "372:21:1" 620 | }, 621 | { 622 | "attributes": { 623 | "parameters": [ 624 | null 625 | ] 626 | }, 627 | "children": [], 628 | "id": 157, 629 | "name": "ParameterList", 630 | "src": "412:0:1" 631 | }, 632 | { 633 | "attributes": { 634 | "arguments": [ 635 | null 636 | ] 637 | }, 638 | "children": [ 639 | { 640 | "attributes": { 641 | "argumentTypes": null, 642 | "overloadedDeclarations": [ 643 | null 644 | ], 645 | "referencedDeclaration": 130, 646 | "type": "modifier ()", 647 | "value": "restricted" 648 | }, 649 | "id": 155, 650 | "name": "Identifier", 651 | "src": "401:10:1" 652 | } 653 | ], 654 | "id": 156, 655 | "name": "ModifierInvocation", 656 | "src": "401:10:1" 657 | }, 658 | { 659 | "children": [ 660 | { 661 | "attributes": { 662 | "assignments": [ 663 | 159 664 | ] 665 | }, 666 | "children": [ 667 | { 668 | "attributes": { 669 | "constant": false, 670 | "name": "upgraded", 671 | "scope": 171, 672 | "stateVariable": false, 673 | "storageLocation": "default", 674 | "type": "contract Migrations", 675 | "value": null, 676 | "visibility": "internal" 677 | }, 678 | "children": [ 679 | { 680 | "attributes": { 681 | "contractScope": null, 682 | "name": "Migrations", 683 | "referencedDeclaration": 172, 684 | "type": "contract Migrations" 685 | }, 686 | "id": 158, 687 | "name": "UserDefinedTypeName", 688 | "src": "418:10:1" 689 | } 690 | ], 691 | "id": 159, 692 | "name": "VariableDeclaration", 693 | "src": "418:19:1" 694 | }, 695 | { 696 | "attributes": { 697 | "argumentTypes": null, 698 | "isConstant": false, 699 | "isLValue": false, 700 | "isPure": false, 701 | "isStructConstructorCall": false, 702 | "lValueRequested": false, 703 | "names": [ 704 | null 705 | ], 706 | "type": "contract Migrations", 707 | "type_conversion": true 708 | }, 709 | "children": [ 710 | { 711 | "attributes": { 712 | "argumentTypes": [ 713 | { 714 | "typeIdentifier": "t_address", 715 | "typeString": "address" 716 | } 717 | ], 718 | "overloadedDeclarations": [ 719 | null 720 | ], 721 | "referencedDeclaration": 172, 722 | "type": "type(contract Migrations)", 723 | "value": "Migrations" 724 | }, 725 | "id": 160, 726 | "name": "Identifier", 727 | "src": "440:10:1" 728 | }, 729 | { 730 | "attributes": { 731 | "argumentTypes": null, 732 | "overloadedDeclarations": [ 733 | null 734 | ], 735 | "referencedDeclaration": 153, 736 | "type": "address", 737 | "value": "new_address" 738 | }, 739 | "id": 161, 740 | "name": "Identifier", 741 | "src": "451:11:1" 742 | } 743 | ], 744 | "id": 162, 745 | "name": "FunctionCall", 746 | "src": "440:23:1" 747 | } 748 | ], 749 | "id": 163, 750 | "name": "VariableDeclarationStatement", 751 | "src": "418:45:1" 752 | }, 753 | { 754 | "children": [ 755 | { 756 | "attributes": { 757 | "argumentTypes": null, 758 | "isConstant": false, 759 | "isLValue": false, 760 | "isPure": false, 761 | "isStructConstructorCall": false, 762 | "lValueRequested": false, 763 | "names": [ 764 | null 765 | ], 766 | "type": "tuple()", 767 | "type_conversion": false 768 | }, 769 | "children": [ 770 | { 771 | "attributes": { 772 | "argumentTypes": [ 773 | { 774 | "typeIdentifier": "t_uint256", 775 | "typeString": "uint256" 776 | } 777 | ], 778 | "isConstant": false, 779 | "isLValue": false, 780 | "isPure": false, 781 | "lValueRequested": false, 782 | "member_name": "setCompleted", 783 | "referencedDeclaration": 151, 784 | "type": "function (uint256) external" 785 | }, 786 | "children": [ 787 | { 788 | "attributes": { 789 | "argumentTypes": null, 790 | "overloadedDeclarations": [ 791 | null 792 | ], 793 | "referencedDeclaration": 159, 794 | "type": "contract Migrations", 795 | "value": "upgraded" 796 | }, 797 | "id": 164, 798 | "name": "Identifier", 799 | "src": "469:8:1" 800 | } 801 | ], 802 | "id": 166, 803 | "name": "MemberAccess", 804 | "src": "469:21:1" 805 | }, 806 | { 807 | "attributes": { 808 | "argumentTypes": null, 809 | "overloadedDeclarations": [ 810 | null 811 | ], 812 | "referencedDeclaration": 119, 813 | "type": "uint256", 814 | "value": "last_completed_migration" 815 | }, 816 | "id": 167, 817 | "name": "Identifier", 818 | "src": "491:24:1" 819 | } 820 | ], 821 | "id": 168, 822 | "name": "FunctionCall", 823 | "src": "469:47:1" 824 | } 825 | ], 826 | "id": 169, 827 | "name": "ExpressionStatement", 828 | "src": "469:47:1" 829 | } 830 | ], 831 | "id": 170, 832 | "name": "Block", 833 | "src": "412:109:1" 834 | } 835 | ], 836 | "id": 171, 837 | "name": "FunctionDefinition", 838 | "src": "356:165:1" 839 | } 840 | ], 841 | "id": 172, 842 | "name": "ContractDefinition", 843 | "src": "26:497:1" 844 | } 845 | ], 846 | "id": 173, 847 | "name": "SourceUnit", 848 | "src": "0:524:1" 849 | }, 850 | "compiler": { 851 | "name": "solc", 852 | "version": "0.4.18+commit.9cf6e910.Emscripten.clang" 853 | }, 854 | "networks": { 855 | "5777": { 856 | "events": {}, 857 | "links": {}, 858 | "address": "0x38cf23c52bb4b13f051aec09580a2de845a7fa35" 859 | }, 860 | "1517239606305": { 861 | "events": {}, 862 | "links": {}, 863 | "address": "0x36276288627eb110c05b43ba52baddaeb68265c7" 864 | } 865 | }, 866 | "schemaVersion": "1.0.1", 867 | "updatedAt": "2018-02-02T09:28:09.719Z" 868 | } -------------------------------------------------------------------------------- /build/contracts/Ownable.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractName": "Ownable", 3 | "abi": [ 4 | { 5 | "constant": true, 6 | "inputs": [], 7 | "name": "owner", 8 | "outputs": [ 9 | { 10 | "name": "", 11 | "type": "address" 12 | } 13 | ], 14 | "payable": false, 15 | "stateMutability": "view", 16 | "type": "function" 17 | }, 18 | { 19 | "constant": false, 20 | "inputs": [ 21 | { 22 | "name": "newOwner", 23 | "type": "address" 24 | } 25 | ], 26 | "name": "transferOwnership", 27 | "outputs": [], 28 | "payable": false, 29 | "stateMutability": "nonpayable", 30 | "type": "function" 31 | }, 32 | { 33 | "inputs": [], 34 | "payable": false, 35 | "stateMutability": "nonpayable", 36 | "type": "constructor" 37 | }, 38 | { 39 | "anonymous": false, 40 | "inputs": [ 41 | { 42 | "indexed": true, 43 | "name": "previousOwner", 44 | "type": "address" 45 | }, 46 | { 47 | "indexed": true, 48 | "name": "newOwner", 49 | "type": "address" 50 | } 51 | ], 52 | "name": "OwnershipTransferred", 53 | "type": "event" 54 | } 55 | ], 56 | "bytecode": "0x6060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102858061005e6000396000f30060606040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638da5cb5b14610051578063f2fde38b146100a6575b600080fd5b341561005c57600080fd5b6100646100df565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100b157600080fd5b6100dd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610104565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561015f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561019b57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a72305820651cb27e4b776f860b83de0806c4a53f2b8896356bfa3f8017d2ecbb67b392880029", 57 | "deployedBytecode": "0x60606040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638da5cb5b14610051578063f2fde38b146100a6575b600080fd5b341561005c57600080fd5b6100646100df565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100b157600080fd5b6100dd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610104565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561015f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561019b57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a72305820651cb27e4b776f860b83de0806c4a53f2b8896356bfa3f8017d2ecbb67b392880029", 58 | "sourceMap": "217:787:1:-;;;469:55;;;;;;;;509:10;501:5;;:18;;;;;;;;;;;;;;;;;;217:787;;;;;;", 59 | "deployedSourceMap": "217:787:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;832:169;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20;;;;;;;;;;;;;:::o;832:169::-;653:5;;;;;;;;;;;639:19;;:10;:19;;;631:28;;;;;;;;928:1;908:22;;:8;:22;;;;900:31;;;;;;;;965:8;937:37;;958:5;;;;;;;;;;;937:37;;;;;;;;;;;;988:8;980:5;;:16;;;;;;;;;;;;;;;;;;832:169;:::o", 60 | "source": "pragma solidity ^0.4.18;\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n", 61 | "sourcePath": "zeppelin-solidity/contracts/ownership/Ownable.sol", 62 | "ast": { 63 | "attributes": { 64 | "absolutePath": "zeppelin-solidity/contracts/ownership/Ownable.sol", 65 | "exportedSymbols": { 66 | "Ownable": [ 67 | 708 68 | ] 69 | } 70 | }, 71 | "children": [ 72 | { 73 | "attributes": { 74 | "literals": [ 75 | "solidity", 76 | "^", 77 | "0.4", 78 | ".18" 79 | ] 80 | }, 81 | "id": 654, 82 | "name": "PragmaDirective", 83 | "src": "0:24:1" 84 | }, 85 | { 86 | "attributes": { 87 | "baseContracts": [ 88 | null 89 | ], 90 | "contractDependencies": [ 91 | null 92 | ], 93 | "contractKind": "contract", 94 | "documentation": "@title Ownable\n@dev The Ownable contract has an owner address, and provides basic authorization control\nfunctions, this simplifies the implementation of \"user permissions\".", 95 | "fullyImplemented": true, 96 | "linearizedBaseContracts": [ 97 | 708 98 | ], 99 | "name": "Ownable", 100 | "scope": 709 101 | }, 102 | "children": [ 103 | { 104 | "attributes": { 105 | "constant": false, 106 | "name": "owner", 107 | "scope": 708, 108 | "stateVariable": true, 109 | "storageLocation": "default", 110 | "type": "address", 111 | "value": null, 112 | "visibility": "public" 113 | }, 114 | "children": [ 115 | { 116 | "attributes": { 117 | "name": "address", 118 | "type": "address" 119 | }, 120 | "id": 655, 121 | "name": "ElementaryTypeName", 122 | "src": "238:7:1" 123 | } 124 | ], 125 | "id": 656, 126 | "name": "VariableDeclaration", 127 | "src": "238:20:1" 128 | }, 129 | { 130 | "attributes": { 131 | "anonymous": false, 132 | "name": "OwnershipTransferred" 133 | }, 134 | "children": [ 135 | { 136 | "children": [ 137 | { 138 | "attributes": { 139 | "constant": false, 140 | "indexed": true, 141 | "name": "previousOwner", 142 | "scope": 662, 143 | "stateVariable": false, 144 | "storageLocation": "default", 145 | "type": "address", 146 | "value": null, 147 | "visibility": "internal" 148 | }, 149 | "children": [ 150 | { 151 | "attributes": { 152 | "name": "address", 153 | "type": "address" 154 | }, 155 | "id": 657, 156 | "name": "ElementaryTypeName", 157 | "src": "291:7:1" 158 | } 159 | ], 160 | "id": 658, 161 | "name": "VariableDeclaration", 162 | "src": "291:29:1" 163 | }, 164 | { 165 | "attributes": { 166 | "constant": false, 167 | "indexed": true, 168 | "name": "newOwner", 169 | "scope": 662, 170 | "stateVariable": false, 171 | "storageLocation": "default", 172 | "type": "address", 173 | "value": null, 174 | "visibility": "internal" 175 | }, 176 | "children": [ 177 | { 178 | "attributes": { 179 | "name": "address", 180 | "type": "address" 181 | }, 182 | "id": 659, 183 | "name": "ElementaryTypeName", 184 | "src": "322:7:1" 185 | } 186 | ], 187 | "id": 660, 188 | "name": "VariableDeclaration", 189 | "src": "322:24:1" 190 | } 191 | ], 192 | "id": 661, 193 | "name": "ParameterList", 194 | "src": "290:57:1" 195 | } 196 | ], 197 | "id": 662, 198 | "name": "EventDefinition", 199 | "src": "264:84:1" 200 | }, 201 | { 202 | "attributes": { 203 | "constant": false, 204 | "implemented": true, 205 | "isConstructor": true, 206 | "modifiers": [ 207 | null 208 | ], 209 | "name": "Ownable", 210 | "payable": false, 211 | "scope": 708, 212 | "stateMutability": "nonpayable", 213 | "superFunction": null, 214 | "visibility": "public" 215 | }, 216 | "children": [ 217 | { 218 | "attributes": { 219 | "parameters": [ 220 | null 221 | ] 222 | }, 223 | "children": [], 224 | "id": 663, 225 | "name": "ParameterList", 226 | "src": "485:2:1" 227 | }, 228 | { 229 | "attributes": { 230 | "parameters": [ 231 | null 232 | ] 233 | }, 234 | "children": [], 235 | "id": 664, 236 | "name": "ParameterList", 237 | "src": "495:0:1" 238 | }, 239 | { 240 | "children": [ 241 | { 242 | "children": [ 243 | { 244 | "attributes": { 245 | "argumentTypes": null, 246 | "isConstant": false, 247 | "isLValue": false, 248 | "isPure": false, 249 | "lValueRequested": false, 250 | "operator": "=", 251 | "type": "address" 252 | }, 253 | "children": [ 254 | { 255 | "attributes": { 256 | "argumentTypes": null, 257 | "overloadedDeclarations": [ 258 | null 259 | ], 260 | "referencedDeclaration": 656, 261 | "type": "address", 262 | "value": "owner" 263 | }, 264 | "id": 665, 265 | "name": "Identifier", 266 | "src": "501:5:1" 267 | }, 268 | { 269 | "attributes": { 270 | "argumentTypes": null, 271 | "isConstant": false, 272 | "isLValue": false, 273 | "isPure": false, 274 | "lValueRequested": false, 275 | "member_name": "sender", 276 | "referencedDeclaration": null, 277 | "type": "address" 278 | }, 279 | "children": [ 280 | { 281 | "attributes": { 282 | "argumentTypes": null, 283 | "overloadedDeclarations": [ 284 | null 285 | ], 286 | "referencedDeclaration": 720, 287 | "type": "msg", 288 | "value": "msg" 289 | }, 290 | "id": 666, 291 | "name": "Identifier", 292 | "src": "509:3:1" 293 | } 294 | ], 295 | "id": 667, 296 | "name": "MemberAccess", 297 | "src": "509:10:1" 298 | } 299 | ], 300 | "id": 668, 301 | "name": "Assignment", 302 | "src": "501:18:1" 303 | } 304 | ], 305 | "id": 669, 306 | "name": "ExpressionStatement", 307 | "src": "501:18:1" 308 | } 309 | ], 310 | "id": 670, 311 | "name": "Block", 312 | "src": "495:29:1" 313 | } 314 | ], 315 | "id": 671, 316 | "name": "FunctionDefinition", 317 | "src": "469:55:1" 318 | }, 319 | { 320 | "attributes": { 321 | "name": "onlyOwner", 322 | "visibility": "internal" 323 | }, 324 | "children": [ 325 | { 326 | "attributes": { 327 | "parameters": [ 328 | null 329 | ] 330 | }, 331 | "children": [], 332 | "id": 672, 333 | "name": "ParameterList", 334 | "src": "622:2:1" 335 | }, 336 | { 337 | "children": [ 338 | { 339 | "children": [ 340 | { 341 | "attributes": { 342 | "argumentTypes": null, 343 | "isConstant": false, 344 | "isLValue": false, 345 | "isPure": false, 346 | "isStructConstructorCall": false, 347 | "lValueRequested": false, 348 | "names": [ 349 | null 350 | ], 351 | "type": "tuple()", 352 | "type_conversion": false 353 | }, 354 | "children": [ 355 | { 356 | "attributes": { 357 | "argumentTypes": [ 358 | { 359 | "typeIdentifier": "t_bool", 360 | "typeString": "bool" 361 | } 362 | ], 363 | "overloadedDeclarations": [ 364 | null 365 | ], 366 | "referencedDeclaration": 723, 367 | "type": "function (bool) pure", 368 | "value": "require" 369 | }, 370 | "id": 673, 371 | "name": "Identifier", 372 | "src": "631:7:1" 373 | }, 374 | { 375 | "attributes": { 376 | "argumentTypes": null, 377 | "commonType": { 378 | "typeIdentifier": "t_address", 379 | "typeString": "address" 380 | }, 381 | "isConstant": false, 382 | "isLValue": false, 383 | "isPure": false, 384 | "lValueRequested": false, 385 | "operator": "==", 386 | "type": "bool" 387 | }, 388 | "children": [ 389 | { 390 | "attributes": { 391 | "argumentTypes": null, 392 | "isConstant": false, 393 | "isLValue": false, 394 | "isPure": false, 395 | "lValueRequested": false, 396 | "member_name": "sender", 397 | "referencedDeclaration": null, 398 | "type": "address" 399 | }, 400 | "children": [ 401 | { 402 | "attributes": { 403 | "argumentTypes": null, 404 | "overloadedDeclarations": [ 405 | null 406 | ], 407 | "referencedDeclaration": 720, 408 | "type": "msg", 409 | "value": "msg" 410 | }, 411 | "id": 674, 412 | "name": "Identifier", 413 | "src": "639:3:1" 414 | } 415 | ], 416 | "id": 675, 417 | "name": "MemberAccess", 418 | "src": "639:10:1" 419 | }, 420 | { 421 | "attributes": { 422 | "argumentTypes": null, 423 | "overloadedDeclarations": [ 424 | null 425 | ], 426 | "referencedDeclaration": 656, 427 | "type": "address", 428 | "value": "owner" 429 | }, 430 | "id": 676, 431 | "name": "Identifier", 432 | "src": "653:5:1" 433 | } 434 | ], 435 | "id": 677, 436 | "name": "BinaryOperation", 437 | "src": "639:19:1" 438 | } 439 | ], 440 | "id": 678, 441 | "name": "FunctionCall", 442 | "src": "631:28:1" 443 | } 444 | ], 445 | "id": 679, 446 | "name": "ExpressionStatement", 447 | "src": "631:28:1" 448 | }, 449 | { 450 | "id": 680, 451 | "name": "PlaceholderStatement", 452 | "src": "665:1:1" 453 | } 454 | ], 455 | "id": 681, 456 | "name": "Block", 457 | "src": "625:46:1" 458 | } 459 | ], 460 | "id": 682, 461 | "name": "ModifierDefinition", 462 | "src": "604:67:1" 463 | }, 464 | { 465 | "attributes": { 466 | "constant": false, 467 | "implemented": true, 468 | "isConstructor": false, 469 | "name": "transferOwnership", 470 | "payable": false, 471 | "scope": 708, 472 | "stateMutability": "nonpayable", 473 | "superFunction": null, 474 | "visibility": "public" 475 | }, 476 | "children": [ 477 | { 478 | "children": [ 479 | { 480 | "attributes": { 481 | "constant": false, 482 | "name": "newOwner", 483 | "scope": 707, 484 | "stateVariable": false, 485 | "storageLocation": "default", 486 | "type": "address", 487 | "value": null, 488 | "visibility": "internal" 489 | }, 490 | "children": [ 491 | { 492 | "attributes": { 493 | "name": "address", 494 | "type": "address" 495 | }, 496 | "id": 683, 497 | "name": "ElementaryTypeName", 498 | "src": "859:7:1" 499 | } 500 | ], 501 | "id": 684, 502 | "name": "VariableDeclaration", 503 | "src": "859:16:1" 504 | } 505 | ], 506 | "id": 685, 507 | "name": "ParameterList", 508 | "src": "858:18:1" 509 | }, 510 | { 511 | "attributes": { 512 | "parameters": [ 513 | null 514 | ] 515 | }, 516 | "children": [], 517 | "id": 688, 518 | "name": "ParameterList", 519 | "src": "894:0:1" 520 | }, 521 | { 522 | "attributes": { 523 | "arguments": [ 524 | null 525 | ] 526 | }, 527 | "children": [ 528 | { 529 | "attributes": { 530 | "argumentTypes": null, 531 | "overloadedDeclarations": [ 532 | null 533 | ], 534 | "referencedDeclaration": 682, 535 | "type": "modifier ()", 536 | "value": "onlyOwner" 537 | }, 538 | "id": 686, 539 | "name": "Identifier", 540 | "src": "884:9:1" 541 | } 542 | ], 543 | "id": 687, 544 | "name": "ModifierInvocation", 545 | "src": "884:9:1" 546 | }, 547 | { 548 | "children": [ 549 | { 550 | "children": [ 551 | { 552 | "attributes": { 553 | "argumentTypes": null, 554 | "isConstant": false, 555 | "isLValue": false, 556 | "isPure": false, 557 | "isStructConstructorCall": false, 558 | "lValueRequested": false, 559 | "names": [ 560 | null 561 | ], 562 | "type": "tuple()", 563 | "type_conversion": false 564 | }, 565 | "children": [ 566 | { 567 | "attributes": { 568 | "argumentTypes": [ 569 | { 570 | "typeIdentifier": "t_bool", 571 | "typeString": "bool" 572 | } 573 | ], 574 | "overloadedDeclarations": [ 575 | null 576 | ], 577 | "referencedDeclaration": 723, 578 | "type": "function (bool) pure", 579 | "value": "require" 580 | }, 581 | "id": 689, 582 | "name": "Identifier", 583 | "src": "900:7:1" 584 | }, 585 | { 586 | "attributes": { 587 | "argumentTypes": null, 588 | "commonType": { 589 | "typeIdentifier": "t_address", 590 | "typeString": "address" 591 | }, 592 | "isConstant": false, 593 | "isLValue": false, 594 | "isPure": false, 595 | "lValueRequested": false, 596 | "operator": "!=", 597 | "type": "bool" 598 | }, 599 | "children": [ 600 | { 601 | "attributes": { 602 | "argumentTypes": null, 603 | "overloadedDeclarations": [ 604 | null 605 | ], 606 | "referencedDeclaration": 684, 607 | "type": "address", 608 | "value": "newOwner" 609 | }, 610 | "id": 690, 611 | "name": "Identifier", 612 | "src": "908:8:1" 613 | }, 614 | { 615 | "attributes": { 616 | "argumentTypes": null, 617 | "isConstant": false, 618 | "isLValue": false, 619 | "isPure": true, 620 | "isStructConstructorCall": false, 621 | "lValueRequested": false, 622 | "names": [ 623 | null 624 | ], 625 | "type": "address", 626 | "type_conversion": true 627 | }, 628 | "children": [ 629 | { 630 | "attributes": { 631 | "argumentTypes": [ 632 | { 633 | "typeIdentifier": "t_rational_0_by_1", 634 | "typeString": "int_const 0" 635 | } 636 | ], 637 | "isConstant": false, 638 | "isLValue": false, 639 | "isPure": true, 640 | "lValueRequested": false, 641 | "type": "type(address)", 642 | "value": "address" 643 | }, 644 | "id": 691, 645 | "name": "ElementaryTypeNameExpression", 646 | "src": "920:7:1" 647 | }, 648 | { 649 | "attributes": { 650 | "argumentTypes": null, 651 | "hexvalue": "30", 652 | "isConstant": false, 653 | "isLValue": false, 654 | "isPure": true, 655 | "lValueRequested": false, 656 | "subdenomination": null, 657 | "token": "number", 658 | "type": "int_const 0", 659 | "value": "0" 660 | }, 661 | "id": 692, 662 | "name": "Literal", 663 | "src": "928:1:1" 664 | } 665 | ], 666 | "id": 693, 667 | "name": "FunctionCall", 668 | "src": "920:10:1" 669 | } 670 | ], 671 | "id": 694, 672 | "name": "BinaryOperation", 673 | "src": "908:22:1" 674 | } 675 | ], 676 | "id": 695, 677 | "name": "FunctionCall", 678 | "src": "900:31:1" 679 | } 680 | ], 681 | "id": 696, 682 | "name": "ExpressionStatement", 683 | "src": "900:31:1" 684 | }, 685 | { 686 | "children": [ 687 | { 688 | "attributes": { 689 | "argumentTypes": null, 690 | "isConstant": false, 691 | "isLValue": false, 692 | "isPure": false, 693 | "isStructConstructorCall": false, 694 | "lValueRequested": false, 695 | "names": [ 696 | null 697 | ], 698 | "type": "tuple()", 699 | "type_conversion": false 700 | }, 701 | "children": [ 702 | { 703 | "attributes": { 704 | "argumentTypes": [ 705 | { 706 | "typeIdentifier": "t_address", 707 | "typeString": "address" 708 | }, 709 | { 710 | "typeIdentifier": "t_address", 711 | "typeString": "address" 712 | } 713 | ], 714 | "overloadedDeclarations": [ 715 | null 716 | ], 717 | "referencedDeclaration": 662, 718 | "type": "function (address,address)", 719 | "value": "OwnershipTransferred" 720 | }, 721 | "id": 697, 722 | "name": "Identifier", 723 | "src": "937:20:1" 724 | }, 725 | { 726 | "attributes": { 727 | "argumentTypes": null, 728 | "overloadedDeclarations": [ 729 | null 730 | ], 731 | "referencedDeclaration": 656, 732 | "type": "address", 733 | "value": "owner" 734 | }, 735 | "id": 698, 736 | "name": "Identifier", 737 | "src": "958:5:1" 738 | }, 739 | { 740 | "attributes": { 741 | "argumentTypes": null, 742 | "overloadedDeclarations": [ 743 | null 744 | ], 745 | "referencedDeclaration": 684, 746 | "type": "address", 747 | "value": "newOwner" 748 | }, 749 | "id": 699, 750 | "name": "Identifier", 751 | "src": "965:8:1" 752 | } 753 | ], 754 | "id": 700, 755 | "name": "FunctionCall", 756 | "src": "937:37:1" 757 | } 758 | ], 759 | "id": 701, 760 | "name": "ExpressionStatement", 761 | "src": "937:37:1" 762 | }, 763 | { 764 | "children": [ 765 | { 766 | "attributes": { 767 | "argumentTypes": null, 768 | "isConstant": false, 769 | "isLValue": false, 770 | "isPure": false, 771 | "lValueRequested": false, 772 | "operator": "=", 773 | "type": "address" 774 | }, 775 | "children": [ 776 | { 777 | "attributes": { 778 | "argumentTypes": null, 779 | "overloadedDeclarations": [ 780 | null 781 | ], 782 | "referencedDeclaration": 656, 783 | "type": "address", 784 | "value": "owner" 785 | }, 786 | "id": 702, 787 | "name": "Identifier", 788 | "src": "980:5:1" 789 | }, 790 | { 791 | "attributes": { 792 | "argumentTypes": null, 793 | "overloadedDeclarations": [ 794 | null 795 | ], 796 | "referencedDeclaration": 684, 797 | "type": "address", 798 | "value": "newOwner" 799 | }, 800 | "id": 703, 801 | "name": "Identifier", 802 | "src": "988:8:1" 803 | } 804 | ], 805 | "id": 704, 806 | "name": "Assignment", 807 | "src": "980:16:1" 808 | } 809 | ], 810 | "id": 705, 811 | "name": "ExpressionStatement", 812 | "src": "980:16:1" 813 | } 814 | ], 815 | "id": 706, 816 | "name": "Block", 817 | "src": "894:107:1" 818 | } 819 | ], 820 | "id": 707, 821 | "name": "FunctionDefinition", 822 | "src": "832:169:1" 823 | } 824 | ], 825 | "id": 708, 826 | "name": "ContractDefinition", 827 | "src": "217:787:1" 828 | } 829 | ], 830 | "id": 709, 831 | "name": "SourceUnit", 832 | "src": "0:1005:1" 833 | }, 834 | "compiler": { 835 | "name": "solc", 836 | "version": "0.4.18+commit.9cf6e910.Emscripten.clang" 837 | }, 838 | "networks": {}, 839 | "schemaVersion": "1.0.1", 840 | "updatedAt": "2018-02-02T09:28:02.408Z" 841 | } -------------------------------------------------------------------------------- /build/contracts/ProofOfExistence1.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractName": "ProofOfExistence1", 3 | "abi": [ 4 | { 5 | "constant": false, 6 | "inputs": [ 7 | { 8 | "name": "document", 9 | "type": "string" 10 | } 11 | ], 12 | "name": "notarize", 13 | "outputs": [], 14 | "payable": false, 15 | "stateMutability": "nonpayable", 16 | "type": "function" 17 | }, 18 | { 19 | "constant": true, 20 | "inputs": [ 21 | { 22 | "name": "document", 23 | "type": "string" 24 | } 25 | ], 26 | "name": "proofFor", 27 | "outputs": [ 28 | { 29 | "name": "", 30 | "type": "bytes32" 31 | } 32 | ], 33 | "payable": false, 34 | "stateMutability": "pure", 35 | "type": "function" 36 | }, 37 | { 38 | "constant": true, 39 | "inputs": [], 40 | "name": "proof", 41 | "outputs": [ 42 | { 43 | "name": "", 44 | "type": "bytes32" 45 | } 46 | ], 47 | "payable": false, 48 | "stateMutability": "view", 49 | "type": "function" 50 | } 51 | ], 52 | "bytecode": "0x6060604052341561000f57600080fd5b6102408061001e6000396000f300606060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680637183616c1461005c578063f6c1acdf146100b9578063faf924cf14610132575b600080fd5b341561006757600080fd5b6100b7600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610163565b005b34156100c457600080fd5b610114600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610179565b60405180826000191660001916815260200191505060405180910390f35b341561013d57600080fd5b61014561020e565b60405180826000191660001916815260200191505060405180910390f35b61016c81610179565b6000816000191690555050565b60006002826000604051602001526040518082805190602001908083835b6020831015156101bc5780518252602082019150602081019050602083039250610197565b6001836020036101000a03801982511681845116808217855250505050505090500191505060206040518083038160008661646e5a03f115156101fe57600080fd5b5050604051805190509050919050565b600054815600a165627a7a723058209699dadcb1e5e878e5b00cdf72e3140a936f7bfaf5c739ea59c36d7ed29a9a870029", 53 | "deployedBytecode": "0x606060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680637183616c1461005c578063f6c1acdf146100b9578063faf924cf14610132575b600080fd5b341561006757600080fd5b6100b7600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610163565b005b34156100c457600080fd5b610114600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610179565b60405180826000191660001916815260200191505060405180910390f35b341561013d57600080fd5b61014561020e565b60405180826000191660001916815260200191505060405180910390f35b61016c81610179565b6000816000191690555050565b60006002826000604051602001526040518082805190602001908083835b6020831015156101bc5780518252602082019150602081019050602083039250610197565b6001836020036101000a03801982511681845116808217855250505050505090500191505060206040518083038160008661646e5a03f115156101fe57600080fd5b5050604051805190509050919050565b600054815600a165627a7a723058209699dadcb1e5e878e5b00cdf72e3140a936f7bfaf5c739ea59c36d7ed29a9a870029", 54 | "sourceMap": "68:407:0:-;;;;;;;;;;;;;;;;;", 55 | "deployedSourceMap": "68:407:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;215:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;372:101;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;110:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;215:79;271:18;280:8;271;:18::i;:::-;263:5;:26;;;;;;;215:79;:::o;372:101::-;428:7;451:16;458:8;451:16;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:2;51:6;36:153;;;182:3;176:5;171:3;164:6;98:2;93:3;89;82:19;;123:2;118:3;114;107:19;;148:2;143:3;139;132:19;;36:153;;;274:1;267:3;263:2;259:3;254;250;246;315:4;311:3;305;299:5;295:3;356:4;350:3;344:5;340:3;389:7;380;377:2;372:3;365:6;3:399;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;444:23:0;;372:101;;;:::o;110:20::-;;;;:::o", 56 | "source": "pragma solidity ^0.4.15;\n\n// Proof of Existence contract, version 1\ncontract ProofOfExistence1 {\n // state\n bytes32 public proof;\n\n // calculate and store the proof for a document\n // *transactional function*\n function notarize(string document) public {\n proof = proofFor(document);\n }\n\n // helper function to get a document's sha256\n // *read-only function*\n function proofFor(string document) public pure returns (bytes32) { \n return sha256(document); \n }\n}", 57 | "sourcePath": "/opt/storage/albert/Projects/cryptoArt/contracts/ProofOfExistence1.sol", 58 | "ast": { 59 | "attributes": { 60 | "absolutePath": "/opt/storage/albert/Projects/cryptoArt/contracts/ProofOfExistence1.sol", 61 | "exportedSymbols": { 62 | "ProofOfExistence1": [ 63 | 28 64 | ] 65 | } 66 | }, 67 | "children": [ 68 | { 69 | "attributes": { 70 | "literals": [ 71 | "solidity", 72 | "^", 73 | "0.4", 74 | ".15" 75 | ] 76 | }, 77 | "id": 1, 78 | "name": "PragmaDirective", 79 | "src": "0:24:0" 80 | }, 81 | { 82 | "attributes": { 83 | "baseContracts": [ 84 | null 85 | ], 86 | "contractDependencies": [ 87 | null 88 | ], 89 | "contractKind": "contract", 90 | "documentation": null, 91 | "fullyImplemented": true, 92 | "linearizedBaseContracts": [ 93 | 28 94 | ], 95 | "name": "ProofOfExistence1", 96 | "scope": 29 97 | }, 98 | "children": [ 99 | { 100 | "attributes": { 101 | "constant": false, 102 | "name": "proof", 103 | "scope": 28, 104 | "stateVariable": true, 105 | "storageLocation": "default", 106 | "type": "bytes32", 107 | "value": null, 108 | "visibility": "public" 109 | }, 110 | "children": [ 111 | { 112 | "attributes": { 113 | "name": "bytes32", 114 | "type": "bytes32" 115 | }, 116 | "id": 2, 117 | "name": "ElementaryTypeName", 118 | "src": "110:7:0" 119 | } 120 | ], 121 | "id": 3, 122 | "name": "VariableDeclaration", 123 | "src": "110:20:0" 124 | }, 125 | { 126 | "attributes": { 127 | "constant": false, 128 | "implemented": true, 129 | "isConstructor": false, 130 | "modifiers": [ 131 | null 132 | ], 133 | "name": "notarize", 134 | "payable": false, 135 | "scope": 28, 136 | "stateMutability": "nonpayable", 137 | "superFunction": null, 138 | "visibility": "public" 139 | }, 140 | "children": [ 141 | { 142 | "children": [ 143 | { 144 | "attributes": { 145 | "constant": false, 146 | "name": "document", 147 | "scope": 15, 148 | "stateVariable": false, 149 | "storageLocation": "default", 150 | "type": "string memory", 151 | "value": null, 152 | "visibility": "internal" 153 | }, 154 | "children": [ 155 | { 156 | "attributes": { 157 | "name": "string", 158 | "type": "string storage pointer" 159 | }, 160 | "id": 4, 161 | "name": "ElementaryTypeName", 162 | "src": "233:6:0" 163 | } 164 | ], 165 | "id": 5, 166 | "name": "VariableDeclaration", 167 | "src": "233:15:0" 168 | } 169 | ], 170 | "id": 6, 171 | "name": "ParameterList", 172 | "src": "232:17:0" 173 | }, 174 | { 175 | "attributes": { 176 | "parameters": [ 177 | null 178 | ] 179 | }, 180 | "children": [], 181 | "id": 7, 182 | "name": "ParameterList", 183 | "src": "257:0:0" 184 | }, 185 | { 186 | "children": [ 187 | { 188 | "children": [ 189 | { 190 | "attributes": { 191 | "argumentTypes": null, 192 | "isConstant": false, 193 | "isLValue": false, 194 | "isPure": false, 195 | "lValueRequested": false, 196 | "operator": "=", 197 | "type": "bytes32" 198 | }, 199 | "children": [ 200 | { 201 | "attributes": { 202 | "argumentTypes": null, 203 | "overloadedDeclarations": [ 204 | null 205 | ], 206 | "referencedDeclaration": 3, 207 | "type": "bytes32", 208 | "value": "proof" 209 | }, 210 | "id": 8, 211 | "name": "Identifier", 212 | "src": "263:5:0" 213 | }, 214 | { 215 | "attributes": { 216 | "argumentTypes": null, 217 | "isConstant": false, 218 | "isLValue": false, 219 | "isPure": false, 220 | "isStructConstructorCall": false, 221 | "lValueRequested": false, 222 | "names": [ 223 | null 224 | ], 225 | "type": "bytes32", 226 | "type_conversion": false 227 | }, 228 | "children": [ 229 | { 230 | "attributes": { 231 | "argumentTypes": [ 232 | { 233 | "typeIdentifier": "t_string_memory_ptr", 234 | "typeString": "string memory" 235 | } 236 | ], 237 | "overloadedDeclarations": [ 238 | null 239 | ], 240 | "referencedDeclaration": 27, 241 | "type": "function (string memory) pure returns (bytes32)", 242 | "value": "proofFor" 243 | }, 244 | "id": 9, 245 | "name": "Identifier", 246 | "src": "271:8:0" 247 | }, 248 | { 249 | "attributes": { 250 | "argumentTypes": null, 251 | "overloadedDeclarations": [ 252 | null 253 | ], 254 | "referencedDeclaration": 5, 255 | "type": "string memory", 256 | "value": "document" 257 | }, 258 | "id": 10, 259 | "name": "Identifier", 260 | "src": "280:8:0" 261 | } 262 | ], 263 | "id": 11, 264 | "name": "FunctionCall", 265 | "src": "271:18:0" 266 | } 267 | ], 268 | "id": 12, 269 | "name": "Assignment", 270 | "src": "263:26:0" 271 | } 272 | ], 273 | "id": 13, 274 | "name": "ExpressionStatement", 275 | "src": "263:26:0" 276 | } 277 | ], 278 | "id": 14, 279 | "name": "Block", 280 | "src": "257:37:0" 281 | } 282 | ], 283 | "id": 15, 284 | "name": "FunctionDefinition", 285 | "src": "215:79:0" 286 | }, 287 | { 288 | "attributes": { 289 | "constant": true, 290 | "implemented": true, 291 | "isConstructor": false, 292 | "modifiers": [ 293 | null 294 | ], 295 | "name": "proofFor", 296 | "payable": false, 297 | "scope": 28, 298 | "stateMutability": "pure", 299 | "superFunction": null, 300 | "visibility": "public" 301 | }, 302 | "children": [ 303 | { 304 | "children": [ 305 | { 306 | "attributes": { 307 | "constant": false, 308 | "name": "document", 309 | "scope": 27, 310 | "stateVariable": false, 311 | "storageLocation": "default", 312 | "type": "string memory", 313 | "value": null, 314 | "visibility": "internal" 315 | }, 316 | "children": [ 317 | { 318 | "attributes": { 319 | "name": "string", 320 | "type": "string storage pointer" 321 | }, 322 | "id": 16, 323 | "name": "ElementaryTypeName", 324 | "src": "390:6:0" 325 | } 326 | ], 327 | "id": 17, 328 | "name": "VariableDeclaration", 329 | "src": "390:15:0" 330 | } 331 | ], 332 | "id": 18, 333 | "name": "ParameterList", 334 | "src": "389:17:0" 335 | }, 336 | { 337 | "children": [ 338 | { 339 | "attributes": { 340 | "constant": false, 341 | "name": "", 342 | "scope": 27, 343 | "stateVariable": false, 344 | "storageLocation": "default", 345 | "type": "bytes32", 346 | "value": null, 347 | "visibility": "internal" 348 | }, 349 | "children": [ 350 | { 351 | "attributes": { 352 | "name": "bytes32", 353 | "type": "bytes32" 354 | }, 355 | "id": 19, 356 | "name": "ElementaryTypeName", 357 | "src": "428:7:0" 358 | } 359 | ], 360 | "id": 20, 361 | "name": "VariableDeclaration", 362 | "src": "428:7:0" 363 | } 364 | ], 365 | "id": 21, 366 | "name": "ParameterList", 367 | "src": "427:9:0" 368 | }, 369 | { 370 | "children": [ 371 | { 372 | "attributes": { 373 | "functionReturnParameters": 21 374 | }, 375 | "children": [ 376 | { 377 | "attributes": { 378 | "argumentTypes": null, 379 | "isConstant": false, 380 | "isLValue": false, 381 | "isPure": false, 382 | "isStructConstructorCall": false, 383 | "lValueRequested": false, 384 | "names": [ 385 | null 386 | ], 387 | "type": "bytes32", 388 | "type_conversion": false 389 | }, 390 | "children": [ 391 | { 392 | "attributes": { 393 | "argumentTypes": [ 394 | { 395 | "typeIdentifier": "t_string_memory_ptr", 396 | "typeString": "string memory" 397 | } 398 | ], 399 | "overloadedDeclarations": [ 400 | null 401 | ], 402 | "referencedDeclaration": 47, 403 | "type": "function () pure returns (bytes32)", 404 | "value": "sha256" 405 | }, 406 | "id": 22, 407 | "name": "Identifier", 408 | "src": "451:6:0" 409 | }, 410 | { 411 | "attributes": { 412 | "argumentTypes": null, 413 | "overloadedDeclarations": [ 414 | null 415 | ], 416 | "referencedDeclaration": 17, 417 | "type": "string memory", 418 | "value": "document" 419 | }, 420 | "id": 23, 421 | "name": "Identifier", 422 | "src": "458:8:0" 423 | } 424 | ], 425 | "id": 24, 426 | "name": "FunctionCall", 427 | "src": "451:16:0" 428 | } 429 | ], 430 | "id": 25, 431 | "name": "Return", 432 | "src": "444:23:0" 433 | } 434 | ], 435 | "id": 26, 436 | "name": "Block", 437 | "src": "437:36:0" 438 | } 439 | ], 440 | "id": 27, 441 | "name": "FunctionDefinition", 442 | "src": "372:101:0" 443 | } 444 | ], 445 | "id": 28, 446 | "name": "ContractDefinition", 447 | "src": "68:407:0" 448 | } 449 | ], 450 | "id": 29, 451 | "name": "SourceUnit", 452 | "src": "0:475:0" 453 | }, 454 | "compiler": { 455 | "name": "solc", 456 | "version": "0.4.18+commit.9cf6e910.Emscripten.clang" 457 | }, 458 | "networks": { 459 | "1517239606305": { 460 | "events": {}, 461 | "links": {}, 462 | "address": "0x3a08de7d9c42eaddcb65e21628a1e00f1cd7d6c8" 463 | } 464 | }, 465 | "schemaVersion": "1.0.1", 466 | "updatedAt": "2018-01-29T15:42:02.814Z" 467 | } -------------------------------------------------------------------------------- /build/contracts/ProofOfExistence2.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractName": "ProofOfExistence2", 3 | "abi": [ 4 | { 5 | "constant": true, 6 | "inputs": [ 7 | { 8 | "name": "document", 9 | "type": "string" 10 | } 11 | ], 12 | "name": "checkDocument", 13 | "outputs": [ 14 | { 15 | "name": "", 16 | "type": "bool" 17 | } 18 | ], 19 | "payable": false, 20 | "stateMutability": "view", 21 | "type": "function" 22 | }, 23 | { 24 | "constant": false, 25 | "inputs": [ 26 | { 27 | "name": "document", 28 | "type": "string" 29 | } 30 | ], 31 | "name": "notarize", 32 | "outputs": [], 33 | "payable": false, 34 | "stateMutability": "nonpayable", 35 | "type": "function" 36 | }, 37 | { 38 | "constant": false, 39 | "inputs": [ 40 | { 41 | "name": "proof", 42 | "type": "bytes32" 43 | } 44 | ], 45 | "name": "storeProof", 46 | "outputs": [], 47 | "payable": false, 48 | "stateMutability": "nonpayable", 49 | "type": "function" 50 | }, 51 | { 52 | "constant": true, 53 | "inputs": [ 54 | { 55 | "name": "proof", 56 | "type": "bytes32" 57 | } 58 | ], 59 | "name": "hasProof", 60 | "outputs": [ 61 | { 62 | "name": "", 63 | "type": "bool" 64 | } 65 | ], 66 | "payable": false, 67 | "stateMutability": "view", 68 | "type": "function" 69 | }, 70 | { 71 | "constant": true, 72 | "inputs": [ 73 | { 74 | "name": "document", 75 | "type": "string" 76 | } 77 | ], 78 | "name": "proofFor", 79 | "outputs": [ 80 | { 81 | "name": "", 82 | "type": "bytes32" 83 | } 84 | ], 85 | "payable": false, 86 | "stateMutability": "pure", 87 | "type": "function" 88 | } 89 | ], 90 | "bytecode": "0x6060604052341561000f57600080fd5b6104008061001e6000396000f30060606040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806353fb9233146100725780637183616c146100e75780638952877b14610144578063e3d1e6d61461016b578063f6c1acdf146101aa575b600080fd5b341561007d57600080fd5b6100cd600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610223565b604051808215151515815260200191505060405180910390f35b34156100f257600080fd5b610142600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610242565b005b341561014f57600080fd5b61016960048080356000191690602001909190505061025c565b005b341561017657600080fd5b61019060048080356000191690602001909190505061028e565b604051808215151515815260200191505060405180910390f35b34156101b557600080fd5b610205600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506102ee565b60405180826000191660001916815260200191505060405180910390f35b60008061022f836102ee565b905061023a8161028e565b915050919050565b600061024d826102ee565b90506102588161025c565b5050565b600080548060010182816102709190610383565b91600052602060002090016000839091909150906000191690555050565b600080600090505b6000805490508110156102e35782600019166000828154811015156102b757fe5b9060005260206000209001546000191614156102d657600191506102e8565b8080600101915050610296565b600091505b50919050565b60006002826000604051602001526040518082805190602001908083835b602083101515610331578051825260208201915060208101905060208303925061030c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060206040518083038160008661646e5a03f1151561037357600080fd5b5050604051805190509050919050565b8154818355818115116103aa578183600052602060002091820191016103a991906103af565b5b505050565b6103d191905b808211156103cd5760008160009055506001016103b5565b5090565b905600a165627a7a7230582006aa0b0d769cc693c3f8a6b2359793a1ba59e4b5a62fab1029a18ece547bc5210029", 91 | "deployedBytecode": "0x60606040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806353fb9233146100725780637183616c146100e75780638952877b14610144578063e3d1e6d61461016b578063f6c1acdf146101aa575b600080fd5b341561007d57600080fd5b6100cd600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610223565b604051808215151515815260200191505060405180910390f35b34156100f257600080fd5b610142600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610242565b005b341561014f57600080fd5b61016960048080356000191690602001909190505061025c565b005b341561017657600080fd5b61019060048080356000191690602001909190505061028e565b604051808215151515815260200191505060405180910390f35b34156101b557600080fd5b610205600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506102ee565b60405180826000191660001916815260200191505060405180910390f35b60008061022f836102ee565b905061023a8161028e565b915050919050565b600061024d826102ee565b90506102588161025c565b5050565b600080548060010182816102709190610383565b91600052602060002090016000839091909150906000191690555050565b600080600090505b6000805490508110156102e35782600019166000828154811015156102b757fe5b9060005260206000209001546000191614156102d657600191506102e8565b8080600101915050610296565b600091505b50919050565b60006002826000604051602001526040518082805190602001908083835b602083101515610331578051825260208201915060208101905060208303925061030c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060206040518083038160008661646e5a03f1151561037357600080fd5b5050604051805190509050919050565b8154818355818115116103aa578183600052602060002091820191016103a991906103af565b5b505050565b6103d191905b808211156103cd5760008160009055506001016103b5565b5090565b905600a165627a7a7230582006aa0b0d769cc693c3f8a6b2359793a1ba59e4b5a62fab1029a18ece547bc5210029", 92 | "sourceMap": "68:1074:0:-;;;;;;;;;;;;;;;;;", 93 | "deployedSourceMap": "68:1074:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;733:140;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;376:110;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;223:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;940:200;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;562:99;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;733:140;794:4;806:13;822:18;831:8;822;:18::i;:::-;806:34;;853:15;862:5;853:8;:15::i;:::-;846:22;;733:140;;;;:::o;376:110::-;424:13;440:18;449:8;440;:18::i;:::-;424:34;;464:17;475:5;464:10;:17::i;:::-;376:110;;:::o;223:71::-;271:6;:18;;;;;;;;;;;:::i;:::-;;;;;;;;;;283:5;271:18;;;;;;;;;;;;223:71;:::o;940:200::-;994:4;1011:9;1023:1;1011:13;;1006:112;1030:6;:13;;;;1026:1;:17;1006:112;;;1075:5;1062:18;;;:6;1069:1;1062:9;;;;;;;;;;;;;;;;;;;:18;;;;1058:54;;;1099:4;1092:11;;;;1058:54;1045:3;;;;;;;1006:112;;;1130:5;1123:12;;940:200;;;;;:::o;562:99::-;618:7;640:16;647:8;640:16;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:2;51:6;36:153;;;182:3;176:5;171:3;164:6;98:2;93:3;89;82:19;;123:2;118:3;114;107:19;;148:2;143:3;139;132:19;;36:153;;;274:1;267:3;263:2;259:3;254;250;246;315:4;311:3;305;299:5;295:3;356:4;350:3;344:5;340:3;389:7;380;377:2;372:3;365:6;3:399;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;633:23:0;;562:99;;;:::o;68:1074::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", 94 | "source": "pragma solidity ^0.4.18;\n\n// Proof of Existence contract, version 2\ncontract ProofOfExistence2 {\n // state\n bytes32[] private proofs;\n\n // store a proof of existence in the contract state\n // *transactional function*\n function storeProof(bytes32 proof) public {\n proofs.push(proof);\n }\n\n// calculate and store the proof for a document\n // *transactional function*\n function notarize(string document) public {\n bytes32 proof = proofFor(document);\n storeProof(proof);\n }\n\n// helper function to get a document's sha256\n // *read-only function*\n function proofFor(string document) public pure returns (bytes32) {\n return sha256(document);\n }\n\n// check if a document has been notarized\n // *read-only function*\n function checkDocument(string document) public view returns (bool) {\n bytes32 proof = proofFor(document);\n return hasProof(proof);\n }\n\n // returns true if proof is stored\n // *read-only function*\n function hasProof(bytes32 proof) public view returns (bool) {\n for (uint256 i = 0; i < proofs.length; i++) {\n if (proofs[i] == proof) {\n return true;\n }\n }\n return false;\n }\n}", 95 | "sourcePath": "/opt/storage/albert/Projects/cryptoArt/contracts/ProofOfExistence2.sol", 96 | "ast": { 97 | "attributes": { 98 | "absolutePath": "/opt/storage/albert/Projects/cryptoArt/contracts/ProofOfExistence2.sol", 99 | "exportedSymbols": { 100 | "ProofOfExistence2": [ 101 | 95 102 | ] 103 | } 104 | }, 105 | "children": [ 106 | { 107 | "attributes": { 108 | "literals": [ 109 | "solidity", 110 | "^", 111 | "0.4", 112 | ".18" 113 | ] 114 | }, 115 | "id": 1, 116 | "name": "PragmaDirective", 117 | "src": "0:24:0" 118 | }, 119 | { 120 | "attributes": { 121 | "baseContracts": [ 122 | null 123 | ], 124 | "contractDependencies": [ 125 | null 126 | ], 127 | "contractKind": "contract", 128 | "documentation": null, 129 | "fullyImplemented": true, 130 | "linearizedBaseContracts": [ 131 | 95 132 | ], 133 | "name": "ProofOfExistence2", 134 | "scope": 96 135 | }, 136 | "children": [ 137 | { 138 | "attributes": { 139 | "constant": false, 140 | "name": "proofs", 141 | "scope": 95, 142 | "stateVariable": true, 143 | "storageLocation": "default", 144 | "type": "bytes32[] storage ref", 145 | "value": null, 146 | "visibility": "private" 147 | }, 148 | "children": [ 149 | { 150 | "attributes": { 151 | "length": null, 152 | "type": "bytes32[] storage pointer" 153 | }, 154 | "children": [ 155 | { 156 | "attributes": { 157 | "name": "bytes32", 158 | "type": "bytes32" 159 | }, 160 | "id": 2, 161 | "name": "ElementaryTypeName", 162 | "src": "110:7:0" 163 | } 164 | ], 165 | "id": 3, 166 | "name": "ArrayTypeName", 167 | "src": "110:9:0" 168 | } 169 | ], 170 | "id": 4, 171 | "name": "VariableDeclaration", 172 | "src": "110:24:0" 173 | }, 174 | { 175 | "attributes": { 176 | "constant": false, 177 | "implemented": true, 178 | "isConstructor": false, 179 | "modifiers": [ 180 | null 181 | ], 182 | "name": "storeProof", 183 | "payable": false, 184 | "scope": 95, 185 | "stateMutability": "nonpayable", 186 | "superFunction": null, 187 | "visibility": "public" 188 | }, 189 | "children": [ 190 | { 191 | "children": [ 192 | { 193 | "attributes": { 194 | "constant": false, 195 | "name": "proof", 196 | "scope": 16, 197 | "stateVariable": false, 198 | "storageLocation": "default", 199 | "type": "bytes32", 200 | "value": null, 201 | "visibility": "internal" 202 | }, 203 | "children": [ 204 | { 205 | "attributes": { 206 | "name": "bytes32", 207 | "type": "bytes32" 208 | }, 209 | "id": 5, 210 | "name": "ElementaryTypeName", 211 | "src": "243:7:0" 212 | } 213 | ], 214 | "id": 6, 215 | "name": "VariableDeclaration", 216 | "src": "243:13:0" 217 | } 218 | ], 219 | "id": 7, 220 | "name": "ParameterList", 221 | "src": "242:15:0" 222 | }, 223 | { 224 | "attributes": { 225 | "parameters": [ 226 | null 227 | ] 228 | }, 229 | "children": [], 230 | "id": 8, 231 | "name": "ParameterList", 232 | "src": "265:0:0" 233 | }, 234 | { 235 | "children": [ 236 | { 237 | "children": [ 238 | { 239 | "attributes": { 240 | "argumentTypes": null, 241 | "isConstant": false, 242 | "isLValue": false, 243 | "isPure": false, 244 | "isStructConstructorCall": false, 245 | "lValueRequested": false, 246 | "names": [ 247 | null 248 | ], 249 | "type": "uint256", 250 | "type_conversion": false 251 | }, 252 | "children": [ 253 | { 254 | "attributes": { 255 | "argumentTypes": [ 256 | { 257 | "typeIdentifier": "t_bytes32", 258 | "typeString": "bytes32" 259 | } 260 | ], 261 | "isConstant": false, 262 | "isLValue": false, 263 | "isPure": false, 264 | "lValueRequested": false, 265 | "member_name": "push", 266 | "referencedDeclaration": null, 267 | "type": "function (bytes32) returns (uint256)" 268 | }, 269 | "children": [ 270 | { 271 | "attributes": { 272 | "argumentTypes": null, 273 | "overloadedDeclarations": [ 274 | null 275 | ], 276 | "referencedDeclaration": 4, 277 | "type": "bytes32[] storage ref", 278 | "value": "proofs" 279 | }, 280 | "id": 9, 281 | "name": "Identifier", 282 | "src": "271:6:0" 283 | } 284 | ], 285 | "id": 11, 286 | "name": "MemberAccess", 287 | "src": "271:11:0" 288 | }, 289 | { 290 | "attributes": { 291 | "argumentTypes": null, 292 | "overloadedDeclarations": [ 293 | null 294 | ], 295 | "referencedDeclaration": 6, 296 | "type": "bytes32", 297 | "value": "proof" 298 | }, 299 | "id": 12, 300 | "name": "Identifier", 301 | "src": "283:5:0" 302 | } 303 | ], 304 | "id": 13, 305 | "name": "FunctionCall", 306 | "src": "271:18:0" 307 | } 308 | ], 309 | "id": 14, 310 | "name": "ExpressionStatement", 311 | "src": "271:18:0" 312 | } 313 | ], 314 | "id": 15, 315 | "name": "Block", 316 | "src": "265:29:0" 317 | } 318 | ], 319 | "id": 16, 320 | "name": "FunctionDefinition", 321 | "src": "223:71:0" 322 | }, 323 | { 324 | "attributes": { 325 | "constant": false, 326 | "implemented": true, 327 | "isConstructor": false, 328 | "modifiers": [ 329 | null 330 | ], 331 | "name": "notarize", 332 | "payable": false, 333 | "scope": 95, 334 | "stateMutability": "nonpayable", 335 | "superFunction": null, 336 | "visibility": "public" 337 | }, 338 | "children": [ 339 | { 340 | "children": [ 341 | { 342 | "attributes": { 343 | "constant": false, 344 | "name": "document", 345 | "scope": 32, 346 | "stateVariable": false, 347 | "storageLocation": "default", 348 | "type": "string memory", 349 | "value": null, 350 | "visibility": "internal" 351 | }, 352 | "children": [ 353 | { 354 | "attributes": { 355 | "name": "string", 356 | "type": "string storage pointer" 357 | }, 358 | "id": 17, 359 | "name": "ElementaryTypeName", 360 | "src": "394:6:0" 361 | } 362 | ], 363 | "id": 18, 364 | "name": "VariableDeclaration", 365 | "src": "394:15:0" 366 | } 367 | ], 368 | "id": 19, 369 | "name": "ParameterList", 370 | "src": "393:17:0" 371 | }, 372 | { 373 | "attributes": { 374 | "parameters": [ 375 | null 376 | ] 377 | }, 378 | "children": [], 379 | "id": 20, 380 | "name": "ParameterList", 381 | "src": "418:0:0" 382 | }, 383 | { 384 | "children": [ 385 | { 386 | "attributes": { 387 | "assignments": [ 388 | 22 389 | ] 390 | }, 391 | "children": [ 392 | { 393 | "attributes": { 394 | "constant": false, 395 | "name": "proof", 396 | "scope": 32, 397 | "stateVariable": false, 398 | "storageLocation": "default", 399 | "type": "bytes32", 400 | "value": null, 401 | "visibility": "internal" 402 | }, 403 | "children": [ 404 | { 405 | "attributes": { 406 | "name": "bytes32", 407 | "type": "bytes32" 408 | }, 409 | "id": 21, 410 | "name": "ElementaryTypeName", 411 | "src": "424:7:0" 412 | } 413 | ], 414 | "id": 22, 415 | "name": "VariableDeclaration", 416 | "src": "424:13:0" 417 | }, 418 | { 419 | "attributes": { 420 | "argumentTypes": null, 421 | "isConstant": false, 422 | "isLValue": false, 423 | "isPure": false, 424 | "isStructConstructorCall": false, 425 | "lValueRequested": false, 426 | "names": [ 427 | null 428 | ], 429 | "type": "bytes32", 430 | "type_conversion": false 431 | }, 432 | "children": [ 433 | { 434 | "attributes": { 435 | "argumentTypes": [ 436 | { 437 | "typeIdentifier": "t_string_memory_ptr", 438 | "typeString": "string memory" 439 | } 440 | ], 441 | "overloadedDeclarations": [ 442 | null 443 | ], 444 | "referencedDeclaration": 44, 445 | "type": "function (string memory) pure returns (bytes32)", 446 | "value": "proofFor" 447 | }, 448 | "id": 23, 449 | "name": "Identifier", 450 | "src": "440:8:0" 451 | }, 452 | { 453 | "attributes": { 454 | "argumentTypes": null, 455 | "overloadedDeclarations": [ 456 | null 457 | ], 458 | "referencedDeclaration": 18, 459 | "type": "string memory", 460 | "value": "document" 461 | }, 462 | "id": 24, 463 | "name": "Identifier", 464 | "src": "449:8:0" 465 | } 466 | ], 467 | "id": 25, 468 | "name": "FunctionCall", 469 | "src": "440:18:0" 470 | } 471 | ], 472 | "id": 26, 473 | "name": "VariableDeclarationStatement", 474 | "src": "424:34:0" 475 | }, 476 | { 477 | "children": [ 478 | { 479 | "attributes": { 480 | "argumentTypes": null, 481 | "isConstant": false, 482 | "isLValue": false, 483 | "isPure": false, 484 | "isStructConstructorCall": false, 485 | "lValueRequested": false, 486 | "names": [ 487 | null 488 | ], 489 | "type": "tuple()", 490 | "type_conversion": false 491 | }, 492 | "children": [ 493 | { 494 | "attributes": { 495 | "argumentTypes": [ 496 | { 497 | "typeIdentifier": "t_bytes32", 498 | "typeString": "bytes32" 499 | } 500 | ], 501 | "overloadedDeclarations": [ 502 | null 503 | ], 504 | "referencedDeclaration": 16, 505 | "type": "function (bytes32)", 506 | "value": "storeProof" 507 | }, 508 | "id": 27, 509 | "name": "Identifier", 510 | "src": "464:10:0" 511 | }, 512 | { 513 | "attributes": { 514 | "argumentTypes": null, 515 | "overloadedDeclarations": [ 516 | null 517 | ], 518 | "referencedDeclaration": 22, 519 | "type": "bytes32", 520 | "value": "proof" 521 | }, 522 | "id": 28, 523 | "name": "Identifier", 524 | "src": "475:5:0" 525 | } 526 | ], 527 | "id": 29, 528 | "name": "FunctionCall", 529 | "src": "464:17:0" 530 | } 531 | ], 532 | "id": 30, 533 | "name": "ExpressionStatement", 534 | "src": "464:17:0" 535 | } 536 | ], 537 | "id": 31, 538 | "name": "Block", 539 | "src": "418:68:0" 540 | } 541 | ], 542 | "id": 32, 543 | "name": "FunctionDefinition", 544 | "src": "376:110:0" 545 | }, 546 | { 547 | "attributes": { 548 | "constant": true, 549 | "implemented": true, 550 | "isConstructor": false, 551 | "modifiers": [ 552 | null 553 | ], 554 | "name": "proofFor", 555 | "payable": false, 556 | "scope": 95, 557 | "stateMutability": "pure", 558 | "superFunction": null, 559 | "visibility": "public" 560 | }, 561 | "children": [ 562 | { 563 | "children": [ 564 | { 565 | "attributes": { 566 | "constant": false, 567 | "name": "document", 568 | "scope": 44, 569 | "stateVariable": false, 570 | "storageLocation": "default", 571 | "type": "string memory", 572 | "value": null, 573 | "visibility": "internal" 574 | }, 575 | "children": [ 576 | { 577 | "attributes": { 578 | "name": "string", 579 | "type": "string storage pointer" 580 | }, 581 | "id": 33, 582 | "name": "ElementaryTypeName", 583 | "src": "580:6:0" 584 | } 585 | ], 586 | "id": 34, 587 | "name": "VariableDeclaration", 588 | "src": "580:15:0" 589 | } 590 | ], 591 | "id": 35, 592 | "name": "ParameterList", 593 | "src": "579:17:0" 594 | }, 595 | { 596 | "children": [ 597 | { 598 | "attributes": { 599 | "constant": false, 600 | "name": "", 601 | "scope": 44, 602 | "stateVariable": false, 603 | "storageLocation": "default", 604 | "type": "bytes32", 605 | "value": null, 606 | "visibility": "internal" 607 | }, 608 | "children": [ 609 | { 610 | "attributes": { 611 | "name": "bytes32", 612 | "type": "bytes32" 613 | }, 614 | "id": 36, 615 | "name": "ElementaryTypeName", 616 | "src": "618:7:0" 617 | } 618 | ], 619 | "id": 37, 620 | "name": "VariableDeclaration", 621 | "src": "618:7:0" 622 | } 623 | ], 624 | "id": 38, 625 | "name": "ParameterList", 626 | "src": "617:9:0" 627 | }, 628 | { 629 | "children": [ 630 | { 631 | "attributes": { 632 | "functionReturnParameters": 38 633 | }, 634 | "children": [ 635 | { 636 | "attributes": { 637 | "argumentTypes": null, 638 | "isConstant": false, 639 | "isLValue": false, 640 | "isPure": false, 641 | "isStructConstructorCall": false, 642 | "lValueRequested": false, 643 | "names": [ 644 | null 645 | ], 646 | "type": "bytes32", 647 | "type_conversion": false 648 | }, 649 | "children": [ 650 | { 651 | "attributes": { 652 | "argumentTypes": [ 653 | { 654 | "typeIdentifier": "t_string_memory_ptr", 655 | "typeString": "string memory" 656 | } 657 | ], 658 | "overloadedDeclarations": [ 659 | null 660 | ], 661 | "referencedDeclaration": 114, 662 | "type": "function () pure returns (bytes32)", 663 | "value": "sha256" 664 | }, 665 | "id": 39, 666 | "name": "Identifier", 667 | "src": "640:6:0" 668 | }, 669 | { 670 | "attributes": { 671 | "argumentTypes": null, 672 | "overloadedDeclarations": [ 673 | null 674 | ], 675 | "referencedDeclaration": 34, 676 | "type": "string memory", 677 | "value": "document" 678 | }, 679 | "id": 40, 680 | "name": "Identifier", 681 | "src": "647:8:0" 682 | } 683 | ], 684 | "id": 41, 685 | "name": "FunctionCall", 686 | "src": "640:16:0" 687 | } 688 | ], 689 | "id": 42, 690 | "name": "Return", 691 | "src": "633:23:0" 692 | } 693 | ], 694 | "id": 43, 695 | "name": "Block", 696 | "src": "627:34:0" 697 | } 698 | ], 699 | "id": 44, 700 | "name": "FunctionDefinition", 701 | "src": "562:99:0" 702 | }, 703 | { 704 | "attributes": { 705 | "constant": true, 706 | "implemented": true, 707 | "isConstructor": false, 708 | "modifiers": [ 709 | null 710 | ], 711 | "name": "checkDocument", 712 | "payable": false, 713 | "scope": 95, 714 | "stateMutability": "view", 715 | "superFunction": null, 716 | "visibility": "public" 717 | }, 718 | "children": [ 719 | { 720 | "children": [ 721 | { 722 | "attributes": { 723 | "constant": false, 724 | "name": "document", 725 | "scope": 62, 726 | "stateVariable": false, 727 | "storageLocation": "default", 728 | "type": "string memory", 729 | "value": null, 730 | "visibility": "internal" 731 | }, 732 | "children": [ 733 | { 734 | "attributes": { 735 | "name": "string", 736 | "type": "string storage pointer" 737 | }, 738 | "id": 45, 739 | "name": "ElementaryTypeName", 740 | "src": "756:6:0" 741 | } 742 | ], 743 | "id": 46, 744 | "name": "VariableDeclaration", 745 | "src": "756:15:0" 746 | } 747 | ], 748 | "id": 47, 749 | "name": "ParameterList", 750 | "src": "755:17:0" 751 | }, 752 | { 753 | "children": [ 754 | { 755 | "attributes": { 756 | "constant": false, 757 | "name": "", 758 | "scope": 62, 759 | "stateVariable": false, 760 | "storageLocation": "default", 761 | "type": "bool", 762 | "value": null, 763 | "visibility": "internal" 764 | }, 765 | "children": [ 766 | { 767 | "attributes": { 768 | "name": "bool", 769 | "type": "bool" 770 | }, 771 | "id": 48, 772 | "name": "ElementaryTypeName", 773 | "src": "794:4:0" 774 | } 775 | ], 776 | "id": 49, 777 | "name": "VariableDeclaration", 778 | "src": "794:4:0" 779 | } 780 | ], 781 | "id": 50, 782 | "name": "ParameterList", 783 | "src": "793:6:0" 784 | }, 785 | { 786 | "children": [ 787 | { 788 | "attributes": { 789 | "assignments": [ 790 | 52 791 | ] 792 | }, 793 | "children": [ 794 | { 795 | "attributes": { 796 | "constant": false, 797 | "name": "proof", 798 | "scope": 62, 799 | "stateVariable": false, 800 | "storageLocation": "default", 801 | "type": "bytes32", 802 | "value": null, 803 | "visibility": "internal" 804 | }, 805 | "children": [ 806 | { 807 | "attributes": { 808 | "name": "bytes32", 809 | "type": "bytes32" 810 | }, 811 | "id": 51, 812 | "name": "ElementaryTypeName", 813 | "src": "806:7:0" 814 | } 815 | ], 816 | "id": 52, 817 | "name": "VariableDeclaration", 818 | "src": "806:13:0" 819 | }, 820 | { 821 | "attributes": { 822 | "argumentTypes": null, 823 | "isConstant": false, 824 | "isLValue": false, 825 | "isPure": false, 826 | "isStructConstructorCall": false, 827 | "lValueRequested": false, 828 | "names": [ 829 | null 830 | ], 831 | "type": "bytes32", 832 | "type_conversion": false 833 | }, 834 | "children": [ 835 | { 836 | "attributes": { 837 | "argumentTypes": [ 838 | { 839 | "typeIdentifier": "t_string_memory_ptr", 840 | "typeString": "string memory" 841 | } 842 | ], 843 | "overloadedDeclarations": [ 844 | null 845 | ], 846 | "referencedDeclaration": 44, 847 | "type": "function (string memory) pure returns (bytes32)", 848 | "value": "proofFor" 849 | }, 850 | "id": 53, 851 | "name": "Identifier", 852 | "src": "822:8:0" 853 | }, 854 | { 855 | "attributes": { 856 | "argumentTypes": null, 857 | "overloadedDeclarations": [ 858 | null 859 | ], 860 | "referencedDeclaration": 46, 861 | "type": "string memory", 862 | "value": "document" 863 | }, 864 | "id": 54, 865 | "name": "Identifier", 866 | "src": "831:8:0" 867 | } 868 | ], 869 | "id": 55, 870 | "name": "FunctionCall", 871 | "src": "822:18:0" 872 | } 873 | ], 874 | "id": 56, 875 | "name": "VariableDeclarationStatement", 876 | "src": "806:34:0" 877 | }, 878 | { 879 | "attributes": { 880 | "functionReturnParameters": 50 881 | }, 882 | "children": [ 883 | { 884 | "attributes": { 885 | "argumentTypes": null, 886 | "isConstant": false, 887 | "isLValue": false, 888 | "isPure": false, 889 | "isStructConstructorCall": false, 890 | "lValueRequested": false, 891 | "names": [ 892 | null 893 | ], 894 | "type": "bool", 895 | "type_conversion": false 896 | }, 897 | "children": [ 898 | { 899 | "attributes": { 900 | "argumentTypes": [ 901 | { 902 | "typeIdentifier": "t_bytes32", 903 | "typeString": "bytes32" 904 | } 905 | ], 906 | "overloadedDeclarations": [ 907 | null 908 | ], 909 | "referencedDeclaration": 94, 910 | "type": "function (bytes32) view returns (bool)", 911 | "value": "hasProof" 912 | }, 913 | "id": 57, 914 | "name": "Identifier", 915 | "src": "853:8:0" 916 | }, 917 | { 918 | "attributes": { 919 | "argumentTypes": null, 920 | "overloadedDeclarations": [ 921 | null 922 | ], 923 | "referencedDeclaration": 52, 924 | "type": "bytes32", 925 | "value": "proof" 926 | }, 927 | "id": 58, 928 | "name": "Identifier", 929 | "src": "862:5:0" 930 | } 931 | ], 932 | "id": 59, 933 | "name": "FunctionCall", 934 | "src": "853:15:0" 935 | } 936 | ], 937 | "id": 60, 938 | "name": "Return", 939 | "src": "846:22:0" 940 | } 941 | ], 942 | "id": 61, 943 | "name": "Block", 944 | "src": "800:73:0" 945 | } 946 | ], 947 | "id": 62, 948 | "name": "FunctionDefinition", 949 | "src": "733:140:0" 950 | }, 951 | { 952 | "attributes": { 953 | "constant": true, 954 | "implemented": true, 955 | "isConstructor": false, 956 | "modifiers": [ 957 | null 958 | ], 959 | "name": "hasProof", 960 | "payable": false, 961 | "scope": 95, 962 | "stateMutability": "view", 963 | "superFunction": null, 964 | "visibility": "public" 965 | }, 966 | "children": [ 967 | { 968 | "children": [ 969 | { 970 | "attributes": { 971 | "constant": false, 972 | "name": "proof", 973 | "scope": 94, 974 | "stateVariable": false, 975 | "storageLocation": "default", 976 | "type": "bytes32", 977 | "value": null, 978 | "visibility": "internal" 979 | }, 980 | "children": [ 981 | { 982 | "attributes": { 983 | "name": "bytes32", 984 | "type": "bytes32" 985 | }, 986 | "id": 63, 987 | "name": "ElementaryTypeName", 988 | "src": "958:7:0" 989 | } 990 | ], 991 | "id": 64, 992 | "name": "VariableDeclaration", 993 | "src": "958:13:0" 994 | } 995 | ], 996 | "id": 65, 997 | "name": "ParameterList", 998 | "src": "957:15:0" 999 | }, 1000 | { 1001 | "children": [ 1002 | { 1003 | "attributes": { 1004 | "constant": false, 1005 | "name": "", 1006 | "scope": 94, 1007 | "stateVariable": false, 1008 | "storageLocation": "default", 1009 | "type": "bool", 1010 | "value": null, 1011 | "visibility": "internal" 1012 | }, 1013 | "children": [ 1014 | { 1015 | "attributes": { 1016 | "name": "bool", 1017 | "type": "bool" 1018 | }, 1019 | "id": 66, 1020 | "name": "ElementaryTypeName", 1021 | "src": "994:4:0" 1022 | } 1023 | ], 1024 | "id": 67, 1025 | "name": "VariableDeclaration", 1026 | "src": "994:4:0" 1027 | } 1028 | ], 1029 | "id": 68, 1030 | "name": "ParameterList", 1031 | "src": "993:6:0" 1032 | }, 1033 | { 1034 | "children": [ 1035 | { 1036 | "children": [ 1037 | { 1038 | "attributes": { 1039 | "assignments": [ 1040 | 70 1041 | ] 1042 | }, 1043 | "children": [ 1044 | { 1045 | "attributes": { 1046 | "constant": false, 1047 | "name": "i", 1048 | "scope": 94, 1049 | "stateVariable": false, 1050 | "storageLocation": "default", 1051 | "type": "uint256", 1052 | "value": null, 1053 | "visibility": "internal" 1054 | }, 1055 | "children": [ 1056 | { 1057 | "attributes": { 1058 | "name": "uint256", 1059 | "type": "uint256" 1060 | }, 1061 | "id": 69, 1062 | "name": "ElementaryTypeName", 1063 | "src": "1011:7:0" 1064 | } 1065 | ], 1066 | "id": 70, 1067 | "name": "VariableDeclaration", 1068 | "src": "1011:9:0" 1069 | }, 1070 | { 1071 | "attributes": { 1072 | "argumentTypes": null, 1073 | "hexvalue": "30", 1074 | "isConstant": false, 1075 | "isLValue": false, 1076 | "isPure": true, 1077 | "lValueRequested": false, 1078 | "subdenomination": null, 1079 | "token": "number", 1080 | "type": "int_const 0", 1081 | "value": "0" 1082 | }, 1083 | "id": 71, 1084 | "name": "Literal", 1085 | "src": "1023:1:0" 1086 | } 1087 | ], 1088 | "id": 72, 1089 | "name": "VariableDeclarationStatement", 1090 | "src": "1011:13:0" 1091 | }, 1092 | { 1093 | "attributes": { 1094 | "argumentTypes": null, 1095 | "commonType": { 1096 | "typeIdentifier": "t_uint256", 1097 | "typeString": "uint256" 1098 | }, 1099 | "isConstant": false, 1100 | "isLValue": false, 1101 | "isPure": false, 1102 | "lValueRequested": false, 1103 | "operator": "<", 1104 | "type": "bool" 1105 | }, 1106 | "children": [ 1107 | { 1108 | "attributes": { 1109 | "argumentTypes": null, 1110 | "overloadedDeclarations": [ 1111 | null 1112 | ], 1113 | "referencedDeclaration": 70, 1114 | "type": "uint256", 1115 | "value": "i" 1116 | }, 1117 | "id": 73, 1118 | "name": "Identifier", 1119 | "src": "1026:1:0" 1120 | }, 1121 | { 1122 | "attributes": { 1123 | "argumentTypes": null, 1124 | "isConstant": false, 1125 | "isLValue": true, 1126 | "isPure": false, 1127 | "lValueRequested": false, 1128 | "member_name": "length", 1129 | "referencedDeclaration": null, 1130 | "type": "uint256" 1131 | }, 1132 | "children": [ 1133 | { 1134 | "attributes": { 1135 | "argumentTypes": null, 1136 | "overloadedDeclarations": [ 1137 | null 1138 | ], 1139 | "referencedDeclaration": 4, 1140 | "type": "bytes32[] storage ref", 1141 | "value": "proofs" 1142 | }, 1143 | "id": 74, 1144 | "name": "Identifier", 1145 | "src": "1030:6:0" 1146 | } 1147 | ], 1148 | "id": 75, 1149 | "name": "MemberAccess", 1150 | "src": "1030:13:0" 1151 | } 1152 | ], 1153 | "id": 76, 1154 | "name": "BinaryOperation", 1155 | "src": "1026:17:0" 1156 | }, 1157 | { 1158 | "children": [ 1159 | { 1160 | "attributes": { 1161 | "argumentTypes": null, 1162 | "isConstant": false, 1163 | "isLValue": false, 1164 | "isPure": false, 1165 | "lValueRequested": false, 1166 | "operator": "++", 1167 | "prefix": false, 1168 | "type": "uint256" 1169 | }, 1170 | "children": [ 1171 | { 1172 | "attributes": { 1173 | "argumentTypes": null, 1174 | "overloadedDeclarations": [ 1175 | null 1176 | ], 1177 | "referencedDeclaration": 70, 1178 | "type": "uint256", 1179 | "value": "i" 1180 | }, 1181 | "id": 77, 1182 | "name": "Identifier", 1183 | "src": "1045:1:0" 1184 | } 1185 | ], 1186 | "id": 78, 1187 | "name": "UnaryOperation", 1188 | "src": "1045:3:0" 1189 | } 1190 | ], 1191 | "id": 79, 1192 | "name": "ExpressionStatement", 1193 | "src": "1045:3:0" 1194 | }, 1195 | { 1196 | "children": [ 1197 | { 1198 | "attributes": { 1199 | "falseBody": null 1200 | }, 1201 | "children": [ 1202 | { 1203 | "attributes": { 1204 | "argumentTypes": null, 1205 | "commonType": { 1206 | "typeIdentifier": "t_bytes32", 1207 | "typeString": "bytes32" 1208 | }, 1209 | "isConstant": false, 1210 | "isLValue": false, 1211 | "isPure": false, 1212 | "lValueRequested": false, 1213 | "operator": "==", 1214 | "type": "bool" 1215 | }, 1216 | "children": [ 1217 | { 1218 | "attributes": { 1219 | "argumentTypes": null, 1220 | "isConstant": false, 1221 | "isLValue": true, 1222 | "isPure": false, 1223 | "lValueRequested": false, 1224 | "type": "bytes32" 1225 | }, 1226 | "children": [ 1227 | { 1228 | "attributes": { 1229 | "argumentTypes": null, 1230 | "overloadedDeclarations": [ 1231 | null 1232 | ], 1233 | "referencedDeclaration": 4, 1234 | "type": "bytes32[] storage ref", 1235 | "value": "proofs" 1236 | }, 1237 | "id": 80, 1238 | "name": "Identifier", 1239 | "src": "1062:6:0" 1240 | }, 1241 | { 1242 | "attributes": { 1243 | "argumentTypes": null, 1244 | "overloadedDeclarations": [ 1245 | null 1246 | ], 1247 | "referencedDeclaration": 70, 1248 | "type": "uint256", 1249 | "value": "i" 1250 | }, 1251 | "id": 81, 1252 | "name": "Identifier", 1253 | "src": "1069:1:0" 1254 | } 1255 | ], 1256 | "id": 82, 1257 | "name": "IndexAccess", 1258 | "src": "1062:9:0" 1259 | }, 1260 | { 1261 | "attributes": { 1262 | "argumentTypes": null, 1263 | "overloadedDeclarations": [ 1264 | null 1265 | ], 1266 | "referencedDeclaration": 64, 1267 | "type": "bytes32", 1268 | "value": "proof" 1269 | }, 1270 | "id": 83, 1271 | "name": "Identifier", 1272 | "src": "1075:5:0" 1273 | } 1274 | ], 1275 | "id": 84, 1276 | "name": "BinaryOperation", 1277 | "src": "1062:18:0" 1278 | }, 1279 | { 1280 | "children": [ 1281 | { 1282 | "attributes": { 1283 | "functionReturnParameters": 68 1284 | }, 1285 | "children": [ 1286 | { 1287 | "attributes": { 1288 | "argumentTypes": null, 1289 | "hexvalue": "74727565", 1290 | "isConstant": false, 1291 | "isLValue": false, 1292 | "isPure": true, 1293 | "lValueRequested": false, 1294 | "subdenomination": null, 1295 | "token": "bool", 1296 | "type": "bool", 1297 | "value": "true" 1298 | }, 1299 | "id": 85, 1300 | "name": "Literal", 1301 | "src": "1099:4:0" 1302 | } 1303 | ], 1304 | "id": 86, 1305 | "name": "Return", 1306 | "src": "1092:11:0" 1307 | } 1308 | ], 1309 | "id": 87, 1310 | "name": "Block", 1311 | "src": "1082:30:0" 1312 | } 1313 | ], 1314 | "id": 88, 1315 | "name": "IfStatement", 1316 | "src": "1058:54:0" 1317 | } 1318 | ], 1319 | "id": 89, 1320 | "name": "Block", 1321 | "src": "1050:68:0" 1322 | } 1323 | ], 1324 | "id": 90, 1325 | "name": "ForStatement", 1326 | "src": "1006:112:0" 1327 | }, 1328 | { 1329 | "attributes": { 1330 | "functionReturnParameters": 68 1331 | }, 1332 | "children": [ 1333 | { 1334 | "attributes": { 1335 | "argumentTypes": null, 1336 | "hexvalue": "66616c7365", 1337 | "isConstant": false, 1338 | "isLValue": false, 1339 | "isPure": true, 1340 | "lValueRequested": false, 1341 | "subdenomination": null, 1342 | "token": "bool", 1343 | "type": "bool", 1344 | "value": "false" 1345 | }, 1346 | "id": 91, 1347 | "name": "Literal", 1348 | "src": "1130:5:0" 1349 | } 1350 | ], 1351 | "id": 92, 1352 | "name": "Return", 1353 | "src": "1123:12:0" 1354 | } 1355 | ], 1356 | "id": 93, 1357 | "name": "Block", 1358 | "src": "1000:140:0" 1359 | } 1360 | ], 1361 | "id": 94, 1362 | "name": "FunctionDefinition", 1363 | "src": "940:200:0" 1364 | } 1365 | ], 1366 | "id": 95, 1367 | "name": "ContractDefinition", 1368 | "src": "68:1074:0" 1369 | } 1370 | ], 1371 | "id": 96, 1372 | "name": "SourceUnit", 1373 | "src": "0:1142:0" 1374 | }, 1375 | "compiler": { 1376 | "name": "solc", 1377 | "version": "0.4.18+commit.9cf6e910.Emscripten.clang" 1378 | }, 1379 | "networks": { 1380 | "5777": { 1381 | "events": {}, 1382 | "links": {}, 1383 | "address": "0x345ca3e014aaf5dca488057592ee47305d9b3e10" 1384 | }, 1385 | "1517239606305": { 1386 | "events": {}, 1387 | "links": {}, 1388 | "address": "0xb5b8d336f833985c6f9b30411f8e9a5857b831e7" 1389 | } 1390 | }, 1391 | "schemaVersion": "1.0.1", 1392 | "updatedAt": "2018-01-29T22:06:43.162Z" 1393 | } -------------------------------------------------------------------------------- /contracts/CryptArtifacts.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.18; 2 | 3 | import "zeppelin-solidity/contracts/ownership/Ownable.sol"; 4 | 5 | contract CryptArtifacts is Ownable { 6 | uint32 constant REST_PERIOD = 60 minutes; 7 | uint8 constant MAX_FIELDS = 20; //Change Artifacts.fields accordinaly 8 | uint8 constant INITIAL_FIELD_VALUE = 7; 9 | uint8 constant INITIAL_LEVEL_VALUE = 1; //must be > 0 10 | uint8 constant INITIAL_WEIGHT_VALUE = 1; 11 | uint8 constant INITIAL_SIZE_VALUE = 1; 12 | uint16 constant NEXT_LEVEL_EXPERIENCE = 999; 13 | uint8 constant UNIQUE_FROM_LEVEL = 20; 14 | uint8 constant BLOCK_NUMBER_FOR_RANDOM = 4; 15 | 16 | uint8 constant ART_LEVEL_RND_IDX = 0; 17 | 18 | struct Artifact { 19 | bool trading; 20 | uint16 level; 21 | uint16 artModifier; 22 | uint16 weight; 23 | uint16 size; 24 | uint16[20] fields; 25 | } 26 | 27 | struct Master { 28 | address source; 29 | string name; 30 | uint16 experience; 31 | uint16 level; 32 | uint32 restUntil; 33 | mapping(bytes32 => uint16) stash; 34 | } 35 | 36 | Master[] private masters; 37 | mapping(address => uint) addressToMaster; 38 | 39 | bytes32[] artsInTrading; 40 | mapping(bytes32 => Artifact) artifacts; 41 | mapping(bytes32 => uint[]) artifactToMaster; 42 | 43 | event ArtOrdered(address indexed sender, bytes32 indexed artId); 44 | event ArtDestroyed(bytes32 indexed artId); 45 | event ArtMixed(address indexed sender, bytes32 indexed artId); 46 | event MasterCreated(address indexed sender, uint masterId); 47 | 48 | function CryptArtifacts() public { 49 | regMaster("Guest"); 50 | } 51 | 52 | modifier isRegistered() { 53 | require(addressToMaster[msg.sender] > 0); 54 | _; 55 | } 56 | 57 | function orderArt(uint16 _fieldId) public payable isRegistered returns(bytes32) { 58 | require(_fieldId < MAX_FIELDS); 59 | require(masterExist[msg.sender]); 60 | 61 | bytes32 artId; 62 | Artifact memory art; 63 | uint16[20] memory fields; 64 | fields[_fieldId] = INITIAL_FIELD_VALUE; 65 | 66 | 67 | (artId,art) = _createArt( 68 | INITIAL_LEVEL_VALUE, 69 | 8, 70 | INITIAL_WEIGHT_VALUE, 71 | INITIAL_SIZE_VALUE, 72 | fields 73 | ); 74 | 75 | ArtOrdered(msg.sender, artId); 76 | return artId; 77 | } 78 | 79 | function _createArt( 80 | uint16 level, 81 | uint16 artModifier, 82 | uint16 weight, 83 | uint16 size, 84 | uint16[20] fields) 85 | internal 86 | returns(bytes32 artId, Artifact art) 87 | { 88 | //Artifact memory art; 89 | art.level = level; 90 | art.artModifier = artModifier; 91 | art.weight = weight; 92 | art.size = size; 93 | art.fields = fields; 94 | art.trading = false; 95 | 96 | artId = _artifactHash(art); 97 | if (artifacts[artId].level == 0) { 98 | artifacts[artId] = art; 99 | } 100 | 101 | uint masterId = addressToMaster[msg.sender]; 102 | artifactToMaster[artId].push(masterId); 103 | masters[masterId].stash[artId]++; 104 | } 105 | 106 | function regMaster(string _name) public { 107 | Master memory master; 108 | master.name = _name; 109 | 110 | uint masterId = masters.push(master) - 1; 111 | addressToMaster[msg.sender] = masterId; 112 | 113 | MasterCreated(msg.sender, masterId); 114 | } 115 | 116 | function _artifactHash(Artifact art) private pure returns(bytes32) { 117 | return keccak256( 118 | uint16(art.level), 119 | uint16(art.artModifier), 120 | uint16(art.weight), 121 | uint16(art.size), 122 | art.fields); 123 | } 124 | 125 | function mixArts(bytes32 _artId1, bytes32 _artId2) public isRegistered returns(bytes32) { 126 | require(artifacts[_artId1].level > 0); 127 | require(artifacts[_artId2].level > 0); 128 | 129 | uint masterId = addressToMaster[msg.sender]; 130 | require(artifacts[_artId1].level <= masters[masterId].level); 131 | require(artifacts[_artId2].level <= masters[masterId].level); 132 | require(masters[masterId].restUntil < now); 133 | require(masters[masterId].stash[_artId1] > 0); 134 | require(masters[masterId].stash[_artId2] > 0); 135 | require((_artId1 != _artId2) || (masters[masterId].stash[_artId1] > 1)); 136 | 137 | var art1 = artifacts[_artId1]; 138 | var art2 = artifacts[_artId2]; 139 | 140 | bytes32 artId; 141 | Artifact memory art; 142 | uint16[20] memory fields; 143 | 144 | for (uint8 i = 0; i < MAX_FIELDS; i++) { 145 | fields[i] = art1.fields[i] + art2.fields[i]; 146 | } 147 | 148 | var newArtLevel = _levelRndVal(art1.level, art2.level, masters[masterId].level); 149 | 150 | (artId,art) = _createArt( 151 | art1.level + art2.level, 152 | art1.artModifier + art2.artModifier, 153 | art1.weight + art2.weight, 154 | art1.size + art2.size, 155 | fields 156 | ); 157 | 158 | if (masters[masterId].experience == NEXT_LEVEL_EXPERIENCE) { 159 | masters[masterId].experience = 0; 160 | masters[masterId].level++; 161 | } else { 162 | masters[masterId].experience++; 163 | } 164 | 165 | 166 | masters[masterId].restUntil = now + 10 minutes; 167 | 168 | _destroyArtifact(_artId1, masters[masterId]); 169 | _destroyArtifact(_artId2, masters[masterId]); 170 | 171 | ArtMixed(msg.sender, artId); 172 | return artId; 173 | } 174 | 175 | function _levelRndVal(uint16 level1, uint16 level2, uint16 masterLevel) internal returns(uint16) { 176 | var levelRnd = getRandValue(ART_LEVEL_RND_IDX); 177 | var levelMin = level1; 178 | var levelMax = level2; 179 | if (levelMin > levelMax) { 180 | levelMin = level2; 181 | levelMax = level1; 182 | } 183 | var levelDiff = (levelMax - levelMin) - masterLevel; 184 | if (levelDiff == 0) { 185 | return 186 | } 187 | } 188 | 189 | function _destroyArtifact(bytes32 _artId, Master storage _master) internal { 190 | _master.stash[_artId]--; 191 | if (0 == _master.stash[_artId]) { 192 | delete(_master.stash[_artId]); 193 | } 194 | delete(artifactToMaster[_artId]); 195 | delete(artifacts[_artId]); 196 | 197 | ArtDestroyed(_artId); 198 | } 199 | 200 | function getRandValue(uint8 idx) public view returns(uint8) { 201 | Master memory master = masters[addressToMaster[msg.sender]]; 202 | bytes32 val = keccak256(block.blockhash(4), msg.sender, master.name, artsInTrading); 203 | //bytes32 val = 0xafd0ecb8cf5be84065c75db7381d239b6f8b9924ec67711556c20d436e8375cb; 204 | uint256 mask = uint256(0xff) << (idx * 8); 205 | uint256 maskedVal = uint256(val) & mask; 206 | uint8 output = uint8(maskedVal >> (idx * 8)); 207 | return output; 208 | } 209 | 210 | /*function getArtifact(uint _artId) 211 | public 212 | view 213 | returns( 214 | uint16 level, 215 | uint16 artModifier, 216 | uint16 weight, 217 | uint16 size, 218 | uint16[20] fields) 219 | { 220 | Artifact storage art = artifactsArr[_artId]; 221 | level = art.level; 222 | artModifier = art.artModifier; 223 | weight = art.weight; 224 | size = art.size; 225 | fields = art.fields; 226 | }*/ 227 | 228 | /*function getArtifact(uint _artId) 229 | external 230 | view 231 | returns(bytes32) 232 | { 233 | Artifact memory art = artifactsArr[_artId]; 234 | bytes32 artHash = _artifactHash(art); 235 | return artHash; 236 | }*/ 237 | 238 | /*function getArtModifier(uint _artId) 239 | external 240 | view 241 | returns(uint16) 242 | { 243 | Artifact memory art = artifactsArr[_artId]; 244 | return art.artModifier; 245 | }*/ 246 | 247 | function getArtifactField(bytes32 _artId, uint8 _fieldId) public view returns(uint16) { 248 | require(_fieldId < MAX_FIELDS); 249 | return artifacts[_artId].fields[_fieldId]; 250 | } 251 | 252 | } -------------------------------------------------------------------------------- /contracts/Migrations.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.17; 2 | 3 | contract Migrations { 4 | address public owner; 5 | uint public last_completed_migration; 6 | 7 | modifier restricted() { 8 | require(msg.sender == owner); 9 | _; 10 | } 11 | 12 | function Migrations() public { 13 | owner = msg.sender; 14 | } 15 | 16 | function setCompleted(uint completed) public restricted { 17 | last_completed_migration = completed; 18 | } 19 | 20 | function upgrade(address new_address) public restricted { 21 | Migrations upgraded = Migrations(new_address); 22 | upgraded.setCompleted(last_completed_migration); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /cryptoArt.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ], 7 | "settings": {} 8 | } -------------------------------------------------------------------------------- /info: -------------------------------------------------------------------------------- 1 | Compile contract: 2 | $ solc --bin --abi UselessWorker.sol 3 | 4 | $ geth console --dev 5 | 6 | $ truffle create contract 7 | $ truffle migrate --reset 8 | $ truffle console 9 | >migrate --reset 10 | >var ca = CryptArtifacts.at(CryptArtifacts.address) 11 | >ca.regMaster("Admin") 12 | >ca.orderArt(2) 13 | >var event = ca.ArtOrdered();event.watch(function(err, result){ console.log(result.args) }); 14 | > 15 | -------------------------------------------------------------------------------- /migrations/1_initial_migration.js: -------------------------------------------------------------------------------- 1 | var Migrations = artifacts.require("./Migrations.sol"); 2 | 3 | module.exports = function(deployer) { 4 | deployer.deploy(Migrations); 5 | }; 6 | -------------------------------------------------------------------------------- /migrations/2_deploy_contracts.js: -------------------------------------------------------------------------------- 1 | var CryptArtifacts = artifacts.require("./CryptArtifacts.sol"); 2 | 3 | module.exports = function(deployer) { 4 | deployer.deploy(CryptArtifacts); 5 | }; -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "crypt-artifacts", 3 | "version": "0.0.1", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "bn.js": { 8 | "version": "4.11.6", 9 | "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", 10 | "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" 11 | }, 12 | "dotenv": { 13 | "version": "4.0.0", 14 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz", 15 | "integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0=" 16 | }, 17 | "ethjs-abi": { 18 | "version": "0.2.1", 19 | "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.1.tgz", 20 | "integrity": "sha1-4KepOn6BFjqUR3utVu3lJKtt5TM=", 21 | "requires": { 22 | "bn.js": "4.11.6", 23 | "js-sha3": "0.5.5", 24 | "number-to-bn": "1.7.0" 25 | } 26 | }, 27 | "is-hex-prefixed": { 28 | "version": "1.0.0", 29 | "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", 30 | "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" 31 | }, 32 | "js-sha3": { 33 | "version": "0.5.5", 34 | "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", 35 | "integrity": "sha1-uvDA6MVK1ZA0R9+Wreekobynmko=" 36 | }, 37 | "number-to-bn": { 38 | "version": "1.7.0", 39 | "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", 40 | "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", 41 | "requires": { 42 | "bn.js": "4.11.6", 43 | "strip-hex-prefix": "1.0.0" 44 | } 45 | }, 46 | "strip-hex-prefix": { 47 | "version": "1.0.0", 48 | "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", 49 | "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", 50 | "requires": { 51 | "is-hex-prefixed": "1.0.0" 52 | } 53 | }, 54 | "zeppelin-solidity": { 55 | "version": "1.6.0", 56 | "resolved": "https://registry.npmjs.org/zeppelin-solidity/-/zeppelin-solidity-1.6.0.tgz", 57 | "integrity": "sha512-OYv0QeEy2h5Esiz7/8vMpywTPDiAS0LSTbca5q0+xEDDSwP/uy2fhAguP7heLDelorf9gMxLMLBrGbn/2xBEMQ==", 58 | "requires": { 59 | "dotenv": "4.0.0", 60 | "ethjs-abi": "0.2.1" 61 | } 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "crypt-artifacts", 3 | "version": "0.0.1", 4 | "description": "", 5 | "main": "truffle.js", 6 | "directories": { 7 | "test": "test" 8 | }, 9 | "scripts": { 10 | "dev": "lite-server", 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "", 14 | "license": "ISC", 15 | "devDependencies": { 16 | "lite-server": "^2.3.0" 17 | }, 18 | "dependencies": { 19 | "zeppelin-solidity": "^1.6.0" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /truffle-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // See 3 | // to customize your Truffle configuration! 4 | }; 5 | -------------------------------------------------------------------------------- /truffle.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | networks: { 3 | development: { 4 | host: "localhost", 5 | port: 7545, 6 | network_id: "*" // Match any network id 7 | } 8 | } 9 | }; 10 | --------------------------------------------------------------------------------