{
  "contractName": "IsContract",
  "abi": [],
  "bytecode": "0x6080604052348015600f57600080fd5b50603580601d6000396000f3006080604052600080fd00a165627a7a723058200ff78dc478d703d55e24288833273671135ae33eb2aec8d4d0022d8d0e39909f0029",
  "deployedBytecode": "0x6080604052600080fd00a165627a7a723058200ff78dc478d703d55e24288833273671135ae33eb2aec8d4d0022d8d0e39909f0029",
  "sourceMap": "71:601:27:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;71:601:27;;;;;;;",
  "deployedSourceMap": "71:601:27:-;;;;;",
  "source": "/*\n * SPDX-License-Identitifer:    MIT\n */\n\npragma solidity ^0.4.24;\n\n\ncontract IsContract {\n    /*\n    * NOTE: this should NEVER be used for authentication\n    * (see pitfalls: https://github.com/fergarrui/ethereum-security/tree/master/contracts/extcodesize).\n    *\n    * This is only intended to be used as a sanity check that an address is actually a contract,\n    * RATHER THAN an address not being a contract.\n    */\n    function isContract(address _target) internal view returns (bool) {\n        if (_target == address(0)) {\n            return false;\n        }\n\n        uint256 size;\n        assembly { size := extcodesize(_target) }\n        return size > 0;\n    }\n}\n",
  "sourcePath": "@aragon/os/contracts/common/IsContract.sol",
  "ast": {
    "absolutePath": "@aragon/os/contracts/common/IsContract.sol",
    "exportedSymbols": {
      "IsContract": [
        8789
      ]
    },
    "id": 8790,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 8763,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "44:24:27"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 8789,
        "linearizedBaseContracts": [
          8789
        ],
        "name": "IsContract",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 8787,
              "nodeType": "Block",
              "src": "492:178:27",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    },
                    "id": 8774,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 8770,
                      "name": "_target",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8765,
                      "src": "506:7:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 8772,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "525:1:27",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          }
                        ],
                        "id": 8771,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "517:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_address_$",
                          "typeString": "type(address)"
                        },
                        "typeName": "address"
                      },
                      "id": 8773,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "517:10:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "506:21:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 8778,
                  "nodeType": "IfStatement",
                  "src": "502:64:27",
                  "trueBody": {
                    "id": 8777,
                    "nodeType": "Block",
                    "src": "529:37:27",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "66616c7365",
                          "id": 8775,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "550:5:27",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "functionReturnParameters": 8769,
                        "id": 8776,
                        "nodeType": "Return",
                        "src": "543:12:27"
                      }
                    ]
                  }
                },
                {
                  "assignments": [],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 8780,
                      "name": "size",
                      "nodeType": "VariableDeclaration",
                      "scope": 8788,
                      "src": "576:12:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 8779,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "576:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 8781,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "576:12:27"
                },
                {
                  "externalReferences": [
                    {
                      "size": {
                        "declaration": 8780,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "609:4:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "_target": {
                        "declaration": 8765,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "629:7:27",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 8782,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    size := extcodesize(_target)\n}",
                  "src": "598:56:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 8785,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 8783,
                      "name": "size",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8780,
                      "src": "655:4:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 8784,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "662:1:27",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "655:8:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 8769,
                  "id": 8786,
                  "nodeType": "Return",
                  "src": "648:15:27"
                }
              ]
            },
            "documentation": null,
            "id": 8788,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "isContract",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8766,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8765,
                  "name": "_target",
                  "nodeType": "VariableDeclaration",
                  "scope": 8788,
                  "src": "446:15:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 8764,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "446:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "445:17:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 8769,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8768,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 8788,
                  "src": "486:4:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 8767,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "486:4:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "485:6:27"
            },
            "scope": 8789,
            "src": "426:244:27",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 8790,
        "src": "71:601:27"
      }
    ],
    "src": "44:629:27"
  },
  "legacyAST": {
    "absolutePath": "@aragon/os/contracts/common/IsContract.sol",
    "exportedSymbols": {
      "IsContract": [
        8789
      ]
    },
    "id": 8790,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 8763,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "44:24:27"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 8789,
        "linearizedBaseContracts": [
          8789
        ],
        "name": "IsContract",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 8787,
              "nodeType": "Block",
              "src": "492:178:27",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    },
                    "id": 8774,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 8770,
                      "name": "_target",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8765,
                      "src": "506:7:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 8772,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "525:1:27",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          }
                        ],
                        "id": 8771,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "517:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_address_$",
                          "typeString": "type(address)"
                        },
                        "typeName": "address"
                      },
                      "id": 8773,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "517:10:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "506:21:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 8778,
                  "nodeType": "IfStatement",
                  "src": "502:64:27",
                  "trueBody": {
                    "id": 8777,
                    "nodeType": "Block",
                    "src": "529:37:27",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "66616c7365",
                          "id": 8775,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "550:5:27",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "functionReturnParameters": 8769,
                        "id": 8776,
                        "nodeType": "Return",
                        "src": "543:12:27"
                      }
                    ]
                  }
                },
                {
                  "assignments": [],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 8780,
                      "name": "size",
                      "nodeType": "VariableDeclaration",
                      "scope": 8788,
                      "src": "576:12:27",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 8779,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "576:7:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 8781,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "576:12:27"
                },
                {
                  "externalReferences": [
                    {
                      "size": {
                        "declaration": 8780,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "609:4:27",
                        "valueSize": 1
                      }
                    },
                    {
                      "_target": {
                        "declaration": 8765,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "629:7:27",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 8782,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    size := extcodesize(_target)\n}",
                  "src": "598:56:27"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 8785,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 8783,
                      "name": "size",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8780,
                      "src": "655:4:27",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 8784,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "662:1:27",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "655:8:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 8769,
                  "id": 8786,
                  "nodeType": "Return",
                  "src": "648:15:27"
                }
              ]
            },
            "documentation": null,
            "id": 8788,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "isContract",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8766,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8765,
                  "name": "_target",
                  "nodeType": "VariableDeclaration",
                  "scope": 8788,
                  "src": "446:15:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 8764,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "446:7:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "445:17:27"
            },
            "payable": false,
            "returnParameters": {
              "id": 8769,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8768,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 8788,
                  "src": "486:4:27",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 8767,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "486:4:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "485:6:27"
            },
            "scope": 8789,
            "src": "426:244:27",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 8790,
        "src": "71:601:27"
      }
    ],
    "src": "44:629:27"
  },
  "compiler": {
    "name": "solc",
    "version": "0.4.24+commit.e67f0147.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.0.1",
  "updatedAt": "2019-03-29T09:45:33.507Z",
  "devdoc": {
    "methods": {}
  },
  "userdoc": {
    "methods": {}
  }
}