@gnosis.pm/hg-contracts
Version:
Collection of smart contracts for the Gnosis prediction market platform
520 lines • 19.7 kB
JSON
{
"contractName": "Address",
"abi": [],
"bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a723058202065566219d0f4bc609a1a827e9809ca2cf9fbae81d166b8ba8833a1d5534e0d0029",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a723058202065566219d0f4bc609a1a827e9809ca2cf9fbae81d166b8ba8833a1d5534e0d0029",
"sourceMap": "94:863:12:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24",
"deployedSourceMap": "94:863:12:-;;;;;;;;",
"source": "pragma solidity ^0.5.0;\n\n/**\n * @dev Collection of functions related to the address type,\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * > It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n // solhint-disable-next-line no-inline-assembly\n assembly { size := extcodesize(account) }\n return size > 0;\n }\n}\n",
"sourcePath": "openzeppelin-solidity/contracts/utils/Address.sol",
"ast": {
"absolutePath": "openzeppelin-solidity/contracts/utils/Address.sol",
"exportedSymbols": {
"Address": [
2780
]
},
"id": 2781,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 2763,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:12"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@dev Collection of functions related to the address type,",
"fullyImplemented": true,
"id": 2780,
"linearizedBaseContracts": [
2780
],
"name": "Address",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 2778,
"nodeType": "Block",
"src": "608:347:12",
"statements": [
{
"assignments": [
2771
],
"declarations": [
{
"constant": false,
"id": 2771,
"name": "size",
"nodeType": "VariableDeclaration",
"scope": 2778,
"src": "805:12:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2770,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "805:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2772,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "805:12:12"
},
{
"externalReferences": [
{
"size": {
"declaration": 2771,
"isOffset": false,
"isSlot": false,
"src": "894:4:12",
"valueSize": 1
}
},
{
"account": {
"declaration": 2765,
"isOffset": false,
"isSlot": false,
"src": "914:7:12",
"valueSize": 1
}
}
],
"id": 2773,
"nodeType": "InlineAssembly",
"operations": "{\n size := extcodesize(account)\n}",
"src": "883:56:12"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2776,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2774,
"name": "size",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2771,
"src": "940:4:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2775,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "947:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "940:8:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 2769,
"id": 2777,
"nodeType": "Return",
"src": "933:15:12"
}
]
},
"documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * > It is unsafe to assume that an address for which this function returns\nfalse is an externally-owned account (EOA) and not a contract.",
"id": 2779,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isContract",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2766,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2765,
"name": "account",
"nodeType": "VariableDeclaration",
"scope": 2779,
"src": "562:15:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2764,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "562:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "561:17:12"
},
"returnParameters": {
"id": 2769,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2768,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2779,
"src": "602:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2767,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "602:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "601:6:12"
},
"scope": 2780,
"src": "542:413:12",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 2781,
"src": "94:863:12"
}
],
"src": "0:958:12"
},
"legacyAST": {
"absolutePath": "openzeppelin-solidity/contracts/utils/Address.sol",
"exportedSymbols": {
"Address": [
2780
]
},
"id": 2781,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 2763,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:12"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": "@dev Collection of functions related to the address type,",
"fullyImplemented": true,
"id": 2780,
"linearizedBaseContracts": [
2780
],
"name": "Address",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 2778,
"nodeType": "Block",
"src": "608:347:12",
"statements": [
{
"assignments": [
2771
],
"declarations": [
{
"constant": false,
"id": 2771,
"name": "size",
"nodeType": "VariableDeclaration",
"scope": 2778,
"src": "805:12:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2770,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "805:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2772,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "805:12:12"
},
{
"externalReferences": [
{
"size": {
"declaration": 2771,
"isOffset": false,
"isSlot": false,
"src": "894:4:12",
"valueSize": 1
}
},
{
"account": {
"declaration": 2765,
"isOffset": false,
"isSlot": false,
"src": "914:7:12",
"valueSize": 1
}
}
],
"id": 2773,
"nodeType": "InlineAssembly",
"operations": "{\n size := extcodesize(account)\n}",
"src": "883:56:12"
},
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2776,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2774,
"name": "size",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2771,
"src": "940:4:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2775,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "947:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "940:8:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 2769,
"id": 2777,
"nodeType": "Return",
"src": "933:15:12"
}
]
},
"documentation": "@dev Returns true if `account` is a contract.\n * This test is non-exhaustive, and there may be false-negatives: during the\nexecution of a contract's constructor, its address will be reported as\nnot containing a contract.\n * > It is unsafe to assume that an address for which this function returns\nfalse is an externally-owned account (EOA) and not a contract.",
"id": 2779,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isContract",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2766,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2765,
"name": "account",
"nodeType": "VariableDeclaration",
"scope": 2779,
"src": "562:15:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2764,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "562:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "561:17:12"
},
"returnParameters": {
"id": 2769,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2768,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2779,
"src": "602:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2767,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "602:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "601:6:12"
},
"scope": 2780,
"src": "542:413:12",
"stateMutability": "view",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 2781,
"src": "94:863:12"
}
],
"src": "0:958:12"
},
"compiler": {
"name": "solc",
"version": "0.5.1+commit.c8a2cb62.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.0.3",
"updatedAt": "2019-06-08T17:32:19.232Z",
"devdoc": {
"details": "Collection of functions related to the address type,",
"methods": {}
},
"userdoc": {
"methods": {}
}
}