{
  "contractName": "Migrations",
  "abi": [
    {
      "constant": false,
      "inputs": [
        {
          "name": "newAddress",
          "type": "address"
        }
      ],
      "name": "upgrade",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "last_completed_migration",
      "outputs": [
        {
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "completed",
          "type": "uint256"
        }
      ],
      "name": "setCompleted",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "constructor"
    }
  ],
  "bytecode": "0x6060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102db8061005e6000396000f300606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100a05780638da5cb5b146100c9578063fdacd5761461011e575b600080fd5b341561007257600080fd5b61009e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610141565b005b34156100ab57600080fd5b6100b3610224565b6040518082815260200191505060405180910390f35b34156100d457600080fd5b6100dc61022a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012957600080fd5b61013f600480803590602001909190505061024f565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610220578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b151561020b57600080fd5b6102c65a03f1151561021c57600080fd5b5050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102ac57806001819055505b505600a165627a7a723058202eca80c1cd20e28097a30212538b45e1f89de82e432208f8e6fbd8d80ab8e5870029",
  "deployedBytecode": "0x606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100a05780638da5cb5b146100c9578063fdacd5761461011e575b600080fd5b341561007257600080fd5b61009e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610141565b005b34156100ab57600080fd5b6100b3610224565b6040518082815260200191505060405180910390f35b34156100d457600080fd5b6100dc61022a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012957600080fd5b61013f600480803590602001909190505061024f565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610220578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b151561020b57600080fd5b6102c65a03f1151561021c57600080fd5b5050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102ac57806001819055505b505600a165627a7a723058202eca80c1cd20e28097a30212538b45e1f89de82e432208f8e6fbd8d80ab8e5870029",
  "sourceMap": "26:491:5:-;;;183:58;;;;;;;;226:10;218:5;;:18;;;;;;;;;;;;;;;;;;26:491;;;;;;",
  "deployedSourceMap": "26:491:5:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;352:163;;;;;;;;;;;;;;;;;;;;;;;;;;;;74:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;245:103;;;;;;;;;;;;;;;;;;;;;;;;;;352:163;413:19;161:5;;;;;;;;;;;147:19;;:10;:19;;;143:31;;;446:10;413:44;;463:8;:21;;;485:24;;463:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;143:31;352:163;;:::o;74:36::-;;;;:::o;50:20::-;;;;;;;;;;;;;:::o;245:103::-;161:5;;;;;;;;;;;147:19;;:10;:19;;;143:31;;;334:9;307:24;:36;;;;143:31;245:103;:::o",
  "source": "pragma solidity ^0.4.18;\n\ncontract Migrations {\n  address public owner;\n  uint public last_completed_migration;\n\n  modifier restricted() {\n    if (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 newAddress) public restricted {\n    Migrations upgraded = Migrations(newAddress);\n    upgraded.setCompleted(last_completed_migration);\n  }\n}\n",
  "sourcePath": "/Users/lucaban/.ghq/github.com/DRI-network/RICO/contracts/Migrations.sol",
  "ast": {
    "attributes": {
      "absolutePath": "/Users/lucaban/.ghq/github.com/DRI-network/RICO/contracts/Migrations.sol",
      "exportedSymbols": {
        "Migrations": [
          674
        ]
      }
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            "^",
            "0.4",
            ".18"
          ]
        },
        "id": 619,
        "name": "PragmaDirective",
        "src": "0:24:5"
      },
      {
        "attributes": {
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "contract",
          "documentation": null,
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            674
          ],
          "name": "Migrations",
          "scope": 675
        },
        "children": [
          {
            "attributes": {
              "constant": false,
              "name": "owner",
              "scope": 674,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "address",
              "value": null,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "name": "address",
                  "type": "address"
                },
                "id": 620,
                "name": "ElementaryTypeName",
                "src": "50:7:5"
              }
            ],
            "id": 621,
            "name": "VariableDeclaration",
            "src": "50:20:5"
          },
          {
            "attributes": {
              "constant": false,
              "name": "last_completed_migration",
              "scope": 674,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "uint256",
              "value": null,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "name": "uint",
                  "type": "uint256"
                },
                "id": 622,
                "name": "ElementaryTypeName",
                "src": "74:4:5"
              }
            ],
            "id": 623,
            "name": "VariableDeclaration",
            "src": "74:36:5"
          },
          {
            "attributes": {
              "name": "restricted",
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 624,
                "name": "ParameterList",
                "src": "134:2:5"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "==",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "sender",
                              "referencedDeclaration": null,
                              "type": "address"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 3767,
                                  "type": "msg",
                                  "value": "msg"
                                },
                                "id": 625,
                                "name": "Identifier",
                                "src": "147:3:5"
                              }
                            ],
                            "id": 626,
                            "name": "MemberAccess",
                            "src": "147:10:5"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 621,
                              "type": "address",
                              "value": "owner"
                            },
                            "id": 627,
                            "name": "Identifier",
                            "src": "161:5:5"
                          }
                        ],
                        "id": 628,
                        "name": "BinaryOperation",
                        "src": "147:19:5"
                      },
                      {
                        "id": 629,
                        "name": "PlaceholderStatement",
                        "src": "173:1:5"
                      }
                    ],
                    "id": 630,
                    "name": "IfStatement",
                    "src": "143:31:5"
                  }
                ],
                "id": 631,
                "name": "Block",
                "src": "137:42:5"
              }
            ],
            "id": 632,
            "name": "ModifierDefinition",
            "src": "115:64:5"
          },
          {
            "attributes": {
              "constant": false,
              "implemented": true,
              "isConstructor": true,
              "modifiers": [
                null
              ],
              "name": "Migrations",
              "payable": false,
              "scope": 674,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 633,
                "name": "ParameterList",
                "src": "202:2:5"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 634,
                "name": "ParameterList",
                "src": "212:0:5"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "address"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 621,
                              "type": "address",
                              "value": "owner"
                            },
                            "id": 635,
                            "name": "Identifier",
                            "src": "218:5:5"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "sender",
                              "referencedDeclaration": null,
                              "type": "address"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 3767,
                                  "type": "msg",
                                  "value": "msg"
                                },
                                "id": 636,
                                "name": "Identifier",
                                "src": "226:3:5"
                              }
                            ],
                            "id": 637,
                            "name": "MemberAccess",
                            "src": "226:10:5"
                          }
                        ],
                        "id": 638,
                        "name": "Assignment",
                        "src": "218:18:5"
                      }
                    ],
                    "id": 639,
                    "name": "ExpressionStatement",
                    "src": "218:18:5"
                  }
                ],
                "id": 640,
                "name": "Block",
                "src": "212:29:5"
              }
            ],
            "id": 641,
            "name": "FunctionDefinition",
            "src": "183:58:5"
          },
          {
            "attributes": {
              "constant": false,
              "implemented": true,
              "isConstructor": false,
              "name": "setCompleted",
              "payable": false,
              "scope": 674,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "completed",
                      "scope": 653,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 642,
                        "name": "ElementaryTypeName",
                        "src": "267:4:5"
                      }
                    ],
                    "id": 643,
                    "name": "VariableDeclaration",
                    "src": "267:14:5"
                  }
                ],
                "id": 644,
                "name": "ParameterList",
                "src": "266:16:5"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 647,
                "name": "ParameterList",
                "src": "301:0:5"
              },
              {
                "attributes": {
                  "arguments": [
                    null
                  ]
                },
                "children": [
                  {
                    "attributes": {
                      "argumentTypes": null,
                      "overloadedDeclarations": [
                        null
                      ],
                      "referencedDeclaration": 632,
                      "type": "modifier ()",
                      "value": "restricted"
                    },
                    "id": 645,
                    "name": "Identifier",
                    "src": "290:10:5"
                  }
                ],
                "id": 646,
                "name": "ModifierInvocation",
                "src": "290:10:5"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "uint256"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 623,
                              "type": "uint256",
                              "value": "last_completed_migration"
                            },
                            "id": 648,
                            "name": "Identifier",
                            "src": "307:24:5"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 643,
                              "type": "uint256",
                              "value": "completed"
                            },
                            "id": 649,
                            "name": "Identifier",
                            "src": "334:9:5"
                          }
                        ],
                        "id": 650,
                        "name": "Assignment",
                        "src": "307:36:5"
                      }
                    ],
                    "id": 651,
                    "name": "ExpressionStatement",
                    "src": "307:36:5"
                  }
                ],
                "id": 652,
                "name": "Block",
                "src": "301:47:5"
              }
            ],
            "id": 653,
            "name": "FunctionDefinition",
            "src": "245:103:5"
          },
          {
            "attributes": {
              "constant": false,
              "implemented": true,
              "isConstructor": false,
              "name": "upgrade",
              "payable": false,
              "scope": 674,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "newAddress",
                      "scope": 673,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "type": "address"
                        },
                        "id": 654,
                        "name": "ElementaryTypeName",
                        "src": "369:7:5"
                      }
                    ],
                    "id": 655,
                    "name": "VariableDeclaration",
                    "src": "369:18:5"
                  }
                ],
                "id": 656,
                "name": "ParameterList",
                "src": "368:20:5"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 659,
                "name": "ParameterList",
                "src": "407:0:5"
              },
              {
                "attributes": {
                  "arguments": [
                    null
                  ]
                },
                "children": [
                  {
                    "attributes": {
                      "argumentTypes": null,
                      "overloadedDeclarations": [
                        null
                      ],
                      "referencedDeclaration": 632,
                      "type": "modifier ()",
                      "value": "restricted"
                    },
                    "id": 657,
                    "name": "Identifier",
                    "src": "396:10:5"
                  }
                ],
                "id": 658,
                "name": "ModifierInvocation",
                "src": "396:10:5"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        661
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "upgraded",
                          "scope": 673,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "contract Migrations",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "contractScope": null,
                              "name": "Migrations",
                              "referencedDeclaration": 674,
                              "type": "contract Migrations"
                            },
                            "id": 660,
                            "name": "UserDefinedTypeName",
                            "src": "413:10:5"
                          }
                        ],
                        "id": 661,
                        "name": "VariableDeclaration",
                        "src": "413:19:5"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "contract Migrations",
                          "type_conversion": true
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 674,
                              "type": "type(contract Migrations)",
                              "value": "Migrations"
                            },
                            "id": 662,
                            "name": "Identifier",
                            "src": "435:10:5"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 655,
                              "type": "address",
                              "value": "newAddress"
                            },
                            "id": 663,
                            "name": "Identifier",
                            "src": "446:10:5"
                          }
                        ],
                        "id": 664,
                        "name": "FunctionCall",
                        "src": "435:22:5"
                      }
                    ],
                    "id": 665,
                    "name": "VariableDeclarationStatement",
                    "src": "413:44:5"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "setCompleted",
                              "referencedDeclaration": 653,
                              "type": "function (uint256) external"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 661,
                                  "type": "contract Migrations",
                                  "value": "upgraded"
                                },
                                "id": 666,
                                "name": "Identifier",
                                "src": "463:8:5"
                              }
                            ],
                            "id": 668,
                            "name": "MemberAccess",
                            "src": "463:21:5"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 623,
                              "type": "uint256",
                              "value": "last_completed_migration"
                            },
                            "id": 669,
                            "name": "Identifier",
                            "src": "485:24:5"
                          }
                        ],
                        "id": 670,
                        "name": "FunctionCall",
                        "src": "463:47:5"
                      }
                    ],
                    "id": 671,
                    "name": "ExpressionStatement",
                    "src": "463:47:5"
                  }
                ],
                "id": 672,
                "name": "Block",
                "src": "407:108:5"
              }
            ],
            "id": 673,
            "name": "FunctionDefinition",
            "src": "352:163:5"
          }
        ],
        "id": 674,
        "name": "ContractDefinition",
        "src": "26:491:5"
      }
    ],
    "id": 675,
    "name": "SourceUnit",
    "src": "0:518:5"
  },
  "compiler": {
    "name": "solc",
    "version": "0.4.18+commit.9cf6e910.Emscripten.clang"
  },
  "networks": {
    "1520399383573": {
      "events": {},
      "links": {},
      "address": "0x567df8a8f66819d0895d6f4e4ddd74b022bc02e4"
    }
  },
  "schemaVersion": "1.0.1",
  "updatedAt": "2018-03-07T05:10:53.100Z"
}