{
  "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": "0x6060604052341561000f57600080fd5b60008054600160a060020a033316600160a060020a03199091161790556101e78061003b6000396000f3006060604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100875780638da5cb5b146100ac578063fdacd576146100db575b600080fd5b341561007157600080fd5b610085600160a060020a03600435166100f1565b005b341561009257600080fd5b61009a610186565b60405190815260200160405180910390f35b34156100b757600080fd5b6100bf61018c565b604051600160a060020a03909116815260200160405180910390f35b34156100e657600080fd5b61008560043561019b565b6000805433600160a060020a03908116911614156101825781905080600160a060020a031663fdacd5766001546040517c010000000000000000000000000000000000000000000000000000000063ffffffff84160281526004810191909152602401600060405180830381600087803b151561016d57600080fd5b6102c65a03f1151561017e57600080fd5b5050505b5050565b60015481565b600054600160a060020a031681565b60005433600160a060020a03908116911614156101b85760018190555b505600a165627a7a72305820674557b6b6aa2e13c5d7f9f3d3864a3a64e2b4d18b04e88c12e5f0af677ee3290029",
  "deployedBytecode": "0x6060604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100875780638da5cb5b146100ac578063fdacd576146100db575b600080fd5b341561007157600080fd5b610085600160a060020a03600435166100f1565b005b341561009257600080fd5b61009a610186565b60405190815260200160405180910390f35b34156100b757600080fd5b6100bf61018c565b604051600160a060020a03909116815260200160405180910390f35b34156100e657600080fd5b61008560043561019b565b6000805433600160a060020a03908116911614156101825781905080600160a060020a031663fdacd5766001546040517c010000000000000000000000000000000000000000000000000000000063ffffffff84160281526004810191909152602401600060405180830381600087803b151561016d57600080fd5b6102c65a03f1151561017e57600080fd5b5050505b5050565b60015481565b600054600160a060020a031681565b60005433600160a060020a03908116911614156101b85760018190555b505600a165627a7a72305820674557b6b6aa2e13c5d7f9f3d3864a3a64e2b4d18b04e88c12e5f0af677ee3290029",
  "sourceMap": "27:550:0:-;;;217:64;;;;;;;;256:5;:18;;-1:-1:-1;;;;;264:10:0;256:18;-1:-1:-1;;;;;;256:18:0;;;;;;27:550;;;;;;",
  "deployedSourceMap": "27:550:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;402:173;;;;;;;;;;-1:-1:-1;;;;;402:173:0;;;;;;;79:36;;;;;;;;;;;;;;;;;;;;;;;;;;;53:20;;;;;;;;;;;;;;;-1:-1:-1;;;;;53:20:0;;;;;;;;;;;;;;287:109;;;;;;;;;;;;;;402:173;467:19;172:5;;158:10;-1:-1:-1;;;;;158:19:0;;;172:5;;158:19;154:51;;;500:10;467:44;;521:8;-1:-1:-1;;;;;521:21:0;;543:24;;521:47;;;;;;;;;;;;;;;;;;-1:-1:-1;521:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;154:51;402:173;;:::o;79:36::-;;;;:::o;53:20::-;;;-1:-1:-1;;;;;53:20:0;;:::o;287:109::-;172:5;;158:10;-1:-1:-1;;;;;158:19:0;;;172:5;;158:19;154:51;;;353:24;:36;;;154:51;287:109;:::o",
  "source": "pragma solidity ^0.4.18;\n\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\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/oren/daostack/daostack2/daostack/contracts/Migrations.sol",
  "ast": {
    "attributes": {
      "absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/Migrations.sol",
      "exportedSymbols": {
        "Migrations": [
          57
        ]
      }
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            "^",
            "0.4",
            ".18"
          ]
        },
        "id": 1,
        "name": "PragmaDirective",
        "src": "0:24:0"
      },
      {
        "attributes": {
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "contract",
          "documentation": null,
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            57
          ],
          "name": "Migrations",
          "scope": 58
        },
        "children": [
          {
            "attributes": {
              "constant": false,
              "name": "owner",
              "scope": 57,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "address",
              "value": null,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "name": "address",
                  "type": "address"
                },
                "id": 2,
                "name": "ElementaryTypeName",
                "src": "53:7:0"
              }
            ],
            "id": 3,
            "name": "VariableDeclaration",
            "src": "53:20:0"
          },
          {
            "attributes": {
              "constant": false,
              "name": "last_completed_migration",
              "scope": 57,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "uint256",
              "value": null,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "name": "uint",
                  "type": "uint256"
                },
                "id": 4,
                "name": "ElementaryTypeName",
                "src": "79:4:0"
              }
            ],
            "id": 5,
            "name": "VariableDeclaration",
            "src": "79:36:0"
          },
          {
            "attributes": {
              "name": "restricted",
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 6,
                "name": "ParameterList",
                "src": "141:2:0"
              },
              {
                "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": 12011,
                                  "type": "msg",
                                  "value": "msg"
                                },
                                "id": 7,
                                "name": "Identifier",
                                "src": "158:3:0"
                              }
                            ],
                            "id": 8,
                            "name": "MemberAccess",
                            "src": "158:10:0"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3,
                              "type": "address",
                              "value": "owner"
                            },
                            "id": 9,
                            "name": "Identifier",
                            "src": "172:5:0"
                          }
                        ],
                        "id": 10,
                        "name": "BinaryOperation",
                        "src": "158:19:0"
                      },
                      {
                        "children": [
                          {
                            "id": 11,
                            "name": "PlaceholderStatement",
                            "src": "193:1:0"
                          }
                        ],
                        "id": 12,
                        "name": "Block",
                        "src": "179:26:0"
                      }
                    ],
                    "id": 13,
                    "name": "IfStatement",
                    "src": "154:51:0"
                  }
                ],
                "id": 14,
                "name": "Block",
                "src": "144:67:0"
              }
            ],
            "id": 15,
            "name": "ModifierDefinition",
            "src": "122:89:0"
          },
          {
            "attributes": {
              "constant": false,
              "implemented": true,
              "isConstructor": true,
              "modifiers": [
                null
              ],
              "name": "Migrations",
              "payable": false,
              "scope": 57,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 16,
                "name": "ParameterList",
                "src": "236:2:0"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 17,
                "name": "ParameterList",
                "src": "246:0:0"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "address"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3,
                              "type": "address",
                              "value": "owner"
                            },
                            "id": 18,
                            "name": "Identifier",
                            "src": "256:5:0"
                          },
                          {
                            "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": 12011,
                                  "type": "msg",
                                  "value": "msg"
                                },
                                "id": 19,
                                "name": "Identifier",
                                "src": "264:3:0"
                              }
                            ],
                            "id": 20,
                            "name": "MemberAccess",
                            "src": "264:10:0"
                          }
                        ],
                        "id": 21,
                        "name": "Assignment",
                        "src": "256:18:0"
                      }
                    ],
                    "id": 22,
                    "name": "ExpressionStatement",
                    "src": "256:18:0"
                  }
                ],
                "id": 23,
                "name": "Block",
                "src": "246:35:0"
              }
            ],
            "id": 24,
            "name": "FunctionDefinition",
            "src": "217:64:0"
          },
          {
            "attributes": {
              "constant": false,
              "implemented": true,
              "isConstructor": false,
              "name": "setCompleted",
              "payable": false,
              "scope": 57,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "completed",
                      "scope": 36,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 25,
                        "name": "ElementaryTypeName",
                        "src": "309:4:0"
                      }
                    ],
                    "id": 26,
                    "name": "VariableDeclaration",
                    "src": "309:14:0"
                  }
                ],
                "id": 27,
                "name": "ParameterList",
                "src": "308:16:0"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 30,
                "name": "ParameterList",
                "src": "343:0:0"
              },
              {
                "attributes": {
                  "arguments": [
                    null
                  ]
                },
                "children": [
                  {
                    "attributes": {
                      "argumentTypes": null,
                      "overloadedDeclarations": [
                        null
                      ],
                      "referencedDeclaration": 15,
                      "type": "modifier ()",
                      "value": "restricted"
                    },
                    "id": 28,
                    "name": "Identifier",
                    "src": "332:10:0"
                  }
                ],
                "id": 29,
                "name": "ModifierInvocation",
                "src": "332:10:0"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "uint256"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 5,
                              "type": "uint256",
                              "value": "last_completed_migration"
                            },
                            "id": 31,
                            "name": "Identifier",
                            "src": "353:24:0"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 26,
                              "type": "uint256",
                              "value": "completed"
                            },
                            "id": 32,
                            "name": "Identifier",
                            "src": "380:9:0"
                          }
                        ],
                        "id": 33,
                        "name": "Assignment",
                        "src": "353:36:0"
                      }
                    ],
                    "id": 34,
                    "name": "ExpressionStatement",
                    "src": "353:36:0"
                  }
                ],
                "id": 35,
                "name": "Block",
                "src": "343:53:0"
              }
            ],
            "id": 36,
            "name": "FunctionDefinition",
            "src": "287:109:0"
          },
          {
            "attributes": {
              "constant": false,
              "implemented": true,
              "isConstructor": false,
              "name": "upgrade",
              "payable": false,
              "scope": 57,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "newAddress",
                      "scope": 56,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "type": "address"
                        },
                        "id": 37,
                        "name": "ElementaryTypeName",
                        "src": "419:7:0"
                      }
                    ],
                    "id": 38,
                    "name": "VariableDeclaration",
                    "src": "419:18:0"
                  }
                ],
                "id": 39,
                "name": "ParameterList",
                "src": "418:20:0"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 42,
                "name": "ParameterList",
                "src": "457:0:0"
              },
              {
                "attributes": {
                  "arguments": [
                    null
                  ]
                },
                "children": [
                  {
                    "attributes": {
                      "argumentTypes": null,
                      "overloadedDeclarations": [
                        null
                      ],
                      "referencedDeclaration": 15,
                      "type": "modifier ()",
                      "value": "restricted"
                    },
                    "id": 40,
                    "name": "Identifier",
                    "src": "446:10:0"
                  }
                ],
                "id": 41,
                "name": "ModifierInvocation",
                "src": "446:10:0"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        44
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "upgraded",
                          "scope": 56,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "contract Migrations",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "contractScope": null,
                              "name": "Migrations",
                              "referencedDeclaration": 57,
                              "type": "contract Migrations"
                            },
                            "id": 43,
                            "name": "UserDefinedTypeName",
                            "src": "467:10:0"
                          }
                        ],
                        "id": 44,
                        "name": "VariableDeclaration",
                        "src": "467:19:0"
                      },
                      {
                        "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": 57,
                              "type": "type(contract Migrations)",
                              "value": "Migrations"
                            },
                            "id": 45,
                            "name": "Identifier",
                            "src": "489:10:0"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 38,
                              "type": "address",
                              "value": "newAddress"
                            },
                            "id": 46,
                            "name": "Identifier",
                            "src": "500:10:0"
                          }
                        ],
                        "id": 47,
                        "name": "FunctionCall",
                        "src": "489:22:0"
                      }
                    ],
                    "id": 48,
                    "name": "VariableDeclarationStatement",
                    "src": "467:44:0"
                  },
                  {
                    "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": 36,
                              "type": "function (uint256) external"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 44,
                                  "type": "contract Migrations",
                                  "value": "upgraded"
                                },
                                "id": 49,
                                "name": "Identifier",
                                "src": "521:8:0"
                              }
                            ],
                            "id": 51,
                            "name": "MemberAccess",
                            "src": "521:21:0"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 5,
                              "type": "uint256",
                              "value": "last_completed_migration"
                            },
                            "id": 52,
                            "name": "Identifier",
                            "src": "543:24:0"
                          }
                        ],
                        "id": 53,
                        "name": "FunctionCall",
                        "src": "521:47:0"
                      }
                    ],
                    "id": 54,
                    "name": "ExpressionStatement",
                    "src": "521:47:0"
                  }
                ],
                "id": 55,
                "name": "Block",
                "src": "457:118:0"
              }
            ],
            "id": 56,
            "name": "FunctionDefinition",
            "src": "402:173:0"
          }
        ],
        "id": 57,
        "name": "ContractDefinition",
        "src": "27:550:0"
      }
    ],
    "id": 58,
    "name": "SourceUnit",
    "src": "0:578:0"
  },
  "compiler": {
    "name": "solc",
    "version": "0.4.18+commit.9cf6e910.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "1.0.1",
  "updatedAt": "2018-02-04T21:57:39.043Z"
}