UNPKG

@marketprotocol/marketprotocol

Version:

Decentralized Derivatives Trading Protocol For The Ethereum Blockchain

521 lines 20.4 kB
{ "contractName": "Address", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.5.2+commit.1df8f40c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{},\"notice\":\"Utility library of inline functions on addresses\"}},\"settings\":{\"compilationTarget\":{\"openzeppelin-solidity/contracts/utils/Address.sol\":\"Address\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/utils/Address.sol\":{\"keccak256\":\"0xea16b9933153c647242ba50b3e494fb133063d49f1fa81823f35a8c28754142e\",\"urls\":[\"bzzr://aa2b2eb534149525e194341c01cadf666668a1b7d679a268d10e23570a7e26b1\"]}},\"version\":1}", "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a723058203bbfa49bf3da470a3edb8edfe3a5a12735b08df84e29ea9561202d04b799ccaa0029", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a723058203bbfa49bf3da470a3edb8edfe3a5a12735b08df84e29ea9561202d04b799ccaa0029", "sourceMap": "85:996:22:-;;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": "85:996:22:-;;;;;;;;", "source": "pragma solidity ^0.5.2;\n\n/**\n * Utility library of inline functions on addresses\n */\nlibrary Address {\n /**\n * Returns whether the target address is a contract\n * @dev This function will return false if invoked during the constructor of a contract,\n * as the code is not actually created until after the constructor finishes.\n * @param account address of the account to check\n * @return whether the target address is a contract\n */\n function isContract(address account) internal view returns (bool) {\n uint256 size;\n // XXX Currently there is no better way to check if there is a contract in an address\n // than to check the size of the code at that address.\n // See https://ethereum.stackexchange.com/a/14016/36603\n // for more details about how this works.\n // TODO Check this again before the Serenity release, because all addresses will be\n // contracts then.\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": [ 3171 ] }, "id": 3172, "nodeType": "SourceUnit", "nodes": [ { "id": 3154, "literals": [ "solidity", "^", "0.5", ".2" ], "nodeType": "PragmaDirective", "src": "0:23:22" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": "Utility library of inline functions on addresses", "fullyImplemented": true, "id": 3171, "linearizedBaseContracts": [ 3171 ], "name": "Address", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 3169, "nodeType": "Block", "src": "529:550:22", "statements": [ { "assignments": [ 3162 ], "declarations": [ { "constant": false, "id": 3162, "name": "size", "nodeType": "VariableDeclaration", "scope": 3169, "src": "539:12:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3161, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "539:7:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 3163, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "539:12:22" }, { "externalReferences": [ { "size": { "declaration": 3162, "isOffset": false, "isSlot": false, "src": "1018:4:22", "valueSize": 1 } }, { "account": { "declaration": 3156, "isOffset": false, "isSlot": false, "src": "1038:7:22", "valueSize": 1 } } ], "id": 3164, "nodeType": "InlineAssembly", "operations": "{\n size := extcodesize(account)\n}", "src": "1007:56:22" }, { "expression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 3167, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 3165, "name": "size", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3162, "src": "1064:4:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 3166, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1071:1:22", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1064:8:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 3160, "id": 3168, "nodeType": "Return", "src": "1057:15:22" } ] }, "documentation": "Returns whether the target address is a contract\n@dev This function will return false if invoked during the constructor of a contract,\nas the code is not actually created until after the constructor finishes.\n@param account address of the account to check\n@return whether the target address is a contract", "id": 3170, "implemented": true, "kind": "function", "modifiers": [], "name": "isContract", "nodeType": "FunctionDefinition", "parameters": { "id": 3157, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3156, "name": "account", "nodeType": "VariableDeclaration", "scope": 3170, "src": "483:15:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3155, "name": "address", "nodeType": "ElementaryTypeName", "src": "483:7:22", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "482:17:22" }, "returnParameters": { "id": 3160, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3159, "name": "", "nodeType": "VariableDeclaration", "scope": 3170, "src": "523:4:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3158, "name": "bool", "nodeType": "ElementaryTypeName", "src": "523:4:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "522:6:22" }, "scope": 3171, "src": "463:616:22", "stateMutability": "view", "superFunction": null, "visibility": "internal" } ], "scope": 3172, "src": "85:996:22" } ], "src": "0:1082:22" }, "legacyAST": { "absolutePath": "openzeppelin-solidity/contracts/utils/Address.sol", "exportedSymbols": { "Address": [ 3171 ] }, "id": 3172, "nodeType": "SourceUnit", "nodes": [ { "id": 3154, "literals": [ "solidity", "^", "0.5", ".2" ], "nodeType": "PragmaDirective", "src": "0:23:22" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": "Utility library of inline functions on addresses", "fullyImplemented": true, "id": 3171, "linearizedBaseContracts": [ 3171 ], "name": "Address", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 3169, "nodeType": "Block", "src": "529:550:22", "statements": [ { "assignments": [ 3162 ], "declarations": [ { "constant": false, "id": 3162, "name": "size", "nodeType": "VariableDeclaration", "scope": 3169, "src": "539:12:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3161, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "539:7:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 3163, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "539:12:22" }, { "externalReferences": [ { "size": { "declaration": 3162, "isOffset": false, "isSlot": false, "src": "1018:4:22", "valueSize": 1 } }, { "account": { "declaration": 3156, "isOffset": false, "isSlot": false, "src": "1038:7:22", "valueSize": 1 } } ], "id": 3164, "nodeType": "InlineAssembly", "operations": "{\n size := extcodesize(account)\n}", "src": "1007:56:22" }, { "expression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 3167, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 3165, "name": "size", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3162, "src": "1064:4:22", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 3166, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1071:1:22", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1064:8:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 3160, "id": 3168, "nodeType": "Return", "src": "1057:15:22" } ] }, "documentation": "Returns whether the target address is a contract\n@dev This function will return false if invoked during the constructor of a contract,\nas the code is not actually created until after the constructor finishes.\n@param account address of the account to check\n@return whether the target address is a contract", "id": 3170, "implemented": true, "kind": "function", "modifiers": [], "name": "isContract", "nodeType": "FunctionDefinition", "parameters": { "id": 3157, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3156, "name": "account", "nodeType": "VariableDeclaration", "scope": 3170, "src": "483:15:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3155, "name": "address", "nodeType": "ElementaryTypeName", "src": "483:7:22", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "482:17:22" }, "returnParameters": { "id": 3160, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3159, "name": "", "nodeType": "VariableDeclaration", "scope": 3170, "src": "523:4:22", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3158, "name": "bool", "nodeType": "ElementaryTypeName", "src": "523:4:22", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "522:6:22" }, "scope": 3171, "src": "463:616:22", "stateMutability": "view", "superFunction": null, "visibility": "internal" } ], "scope": 3172, "src": "85:996:22" } ], "src": "0:1082:22" }, "compiler": { "name": "solc", "version": "0.5.2+commit.1df8f40c.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.0.9", "updatedAt": "2019-05-28T23:53:01.608Z", "devdoc": { "methods": {} }, "userdoc": { "methods": {}, "notice": "Utility library of inline functions on addresses" } }