UNPKG

@josojo/realitytoken-contracts

Version:
872 lines 33.4 kB
{ "contractName": "Proxy", "abi": [ { "constant": true, "inputs": [], "name": "masterCopy", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "inputs": [ { "name": "_masterCopy", "type": "address" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "payable": true, "stateMutability": "payable", "type": "fallback" } ], "bytecode": "0x608060405234801561001057600080fd5b506040516020806101658339810160405251600160a060020a038116151561003757600080fd5b60008054600160a060020a03909216600160a060020a031990921691909117905560ff806100666000396000f300608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663a619486e8114607c575b6000805473ffffffffffffffffffffffffffffffffffffffff169036908037600080368184600019f43d6000803e8080156077573d6000f35b3d6000fd5b348015608757600080fd5b50608e60b7565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a723058202f3c6d7af3ee84be126f01554901275221f57e87340ba2abd93f1af08148b1680029", "deployedBytecode": "0x608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663a619486e8114607c575b6000805473ffffffffffffffffffffffffffffffffffffffff169036908037600080368184600019f43d6000803e8080156077573d6000f35b3d6000fd5b348015608757600080fd5b50608e60b7565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a723058202f3c6d7af3ee84be126f01554901275221f57e87340ba2abd93f1af08148b1680029", "sourceMap": "391:824:3:-;;;543:128;8:9:-1;5:2;;;30:1;27;20:12;5:2;543:128:3;;;;;;;;;;;;;-1:-1:-1;;;;;613:16:3;;;;605:25;;;;;;640:10;:24;;-1:-1:-1;;;;;640:24:3;;;-1:-1:-1;;;;;;640:24:3;;;;;;;;;391:824;;;;;;", "deployedSourceMap": "391:824:3:-;;;;;;;;;;;;;;;;;;;;831:19;853:10;;;;;915:14;;831:19;896:34;1014:1;;995:14;1014:1;979:11;-1:-1:-1;;958:58:3;1050:16;1047:1;1044;1029:38;1087:7;1107:38;;;;1178:16;1175:1;1168:27;1107:38;1126:16;1123:1;1116:27;197:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", "source": "pragma solidity ^0.4.24;\n\n/// @title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n/// @author Alan Lu - <alan@gnosis.pm>\ncontract Proxied {\n address public masterCopy;\n}\n\n/// @title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n/// @author Stefan George - <stefan@gnosis.pm>\ncontract Proxy is Proxied {\n /// @dev Constructor function sets address of master copy contract.\n /// @param _masterCopy Master copy address.\n constructor(address _masterCopy)\n public\n {\n require(_masterCopy != 0);\n masterCopy = _masterCopy;\n }\n\n /// @dev Fallback function forwards all transactions and returns all received return data.\n function ()\n external\n payable\n {\n address _masterCopy = masterCopy;\n assembly {\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 { revert(0, returndatasize()) }\n default { return(0, returndatasize()) }\n }\n }\n}", "sourcePath": "/home/josojo/reality/tokenized-events/contracts/Proxy.sol", "ast": { "absolutePath": "/home/josojo/reality/tokenized-events/contracts/Proxy.sol", "exportedSymbols": { "Proxied": [ 458 ], "Proxy": [ 486 ] }, "id": 487, "nodeType": "SourceUnit", "nodes": [ { "id": 455, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:3" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - <alan@gnosis.pm>", "fullyImplemented": true, "id": 458, "linearizedBaseContracts": [ 458 ], "name": "Proxied", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 457, "name": "masterCopy", "nodeType": "VariableDeclaration", "scope": 458, "src": "197:25:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 456, "name": "address", "nodeType": "ElementaryTypeName", "src": "197:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" } ], "scope": 487, "src": "174:51:3" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 459, "name": "Proxied", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 458, "src": "409:7:3", "typeDescriptions": { "typeIdentifier": "t_contract$_Proxied_$458", "typeString": "contract Proxied" } }, "id": 460, "nodeType": "InheritanceSpecifier", "src": "409:7:3" } ], "contractDependencies": [ 458 ], "contractKind": "contract", "documentation": "@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - <stefan@gnosis.pm>", "fullyImplemented": true, "id": 486, "linearizedBaseContracts": [ 486, 458 ], "name": "Proxy", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 475, "nodeType": "Block", "src": "595:76:3", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 468, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 466, "name": "_masterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 462, "src": "613:11:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 467, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "628:1:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "613:16:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 465, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 9183, 9184 ], "referencedDeclaration": 9183, "src": "605:7:3", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 469, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "605:25:3", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 470, "nodeType": "ExpressionStatement", "src": "605:25:3" }, { "expression": { "argumentTypes": null, "id": 473, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 471, "name": "masterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 457, "src": "640:10:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 472, "name": "_masterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 462, "src": "653:11:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "640:24:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 474, "nodeType": "ExpressionStatement", "src": "640:24:3" } ] }, "documentation": "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.", "id": 476, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 463, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 462, "name": "_masterCopy", "nodeType": "VariableDeclaration", "scope": 476, "src": "555:19:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 461, "name": "address", "nodeType": "ElementaryTypeName", "src": "555:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "554:21:3" }, "payable": false, "returnParameters": { "id": 464, "nodeType": "ParameterList", "parameters": [], "src": "595:0:3" }, "scope": 486, "src": "543:128:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 484, "nodeType": "Block", "src": "821:392:3", "statements": [ { "assignments": [ 480 ], "declarations": [ { "constant": false, "id": 480, "name": "_masterCopy", "nodeType": "VariableDeclaration", "scope": 485, "src": "831:19:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 479, "name": "address", "nodeType": "ElementaryTypeName", "src": "831:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "id": 482, "initialValue": { "argumentTypes": null, "id": 481, "name": "masterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 457, "src": "853:10:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "831:32:3" }, { "externalReferences": [ { "_masterCopy": { "declaration": 480, "isOffset": false, "isSlot": false, "src": "979:11:3", "valueSize": 1 } } ], "id": 483, "nodeType": "InlineAssembly", "operations": "{\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}", "src": "873:340:3" } ] }, "documentation": "@dev Fallback function forwards all transactions and returns all received return data.", "id": 485, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 477, "nodeType": "ParameterList", "parameters": [], "src": "781:2:3" }, "payable": true, "returnParameters": { "id": 478, "nodeType": "ParameterList", "parameters": [], "src": "821:0:3" }, "scope": 486, "src": "772:441:3", "stateMutability": "payable", "superFunction": null, "visibility": "external" } ], "scope": 487, "src": "391:824:3" } ], "src": "0:1215:3" }, "legacyAST": { "absolutePath": "/home/josojo/reality/tokenized-events/contracts/Proxy.sol", "exportedSymbols": { "Proxied": [ 458 ], "Proxy": [ 486 ] }, "id": 487, "nodeType": "SourceUnit", "nodes": [ { "id": 455, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:3" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - <alan@gnosis.pm>", "fullyImplemented": true, "id": 458, "linearizedBaseContracts": [ 458 ], "name": "Proxied", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 457, "name": "masterCopy", "nodeType": "VariableDeclaration", "scope": 458, "src": "197:25:3", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 456, "name": "address", "nodeType": "ElementaryTypeName", "src": "197:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" } ], "scope": 487, "src": "174:51:3" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 459, "name": "Proxied", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 458, "src": "409:7:3", "typeDescriptions": { "typeIdentifier": "t_contract$_Proxied_$458", "typeString": "contract Proxied" } }, "id": 460, "nodeType": "InheritanceSpecifier", "src": "409:7:3" } ], "contractDependencies": [ 458 ], "contractKind": "contract", "documentation": "@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - <stefan@gnosis.pm>", "fullyImplemented": true, "id": 486, "linearizedBaseContracts": [ 486, 458 ], "name": "Proxy", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 475, "nodeType": "Block", "src": "595:76:3", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 468, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 466, "name": "_masterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 462, "src": "613:11:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 467, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "628:1:3", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "613:16:3", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 465, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 9183, 9184 ], "referencedDeclaration": 9183, "src": "605:7:3", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 469, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "605:25:3", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 470, "nodeType": "ExpressionStatement", "src": "605:25:3" }, { "expression": { "argumentTypes": null, "id": 473, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 471, "name": "masterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 457, "src": "640:10:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 472, "name": "_masterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 462, "src": "653:11:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "640:24:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 474, "nodeType": "ExpressionStatement", "src": "640:24:3" } ] }, "documentation": "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.", "id": 476, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 463, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 462, "name": "_masterCopy", "nodeType": "VariableDeclaration", "scope": 476, "src": "555:19:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 461, "name": "address", "nodeType": "ElementaryTypeName", "src": "555:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "554:21:3" }, "payable": false, "returnParameters": { "id": 464, "nodeType": "ParameterList", "parameters": [], "src": "595:0:3" }, "scope": 486, "src": "543:128:3", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 484, "nodeType": "Block", "src": "821:392:3", "statements": [ { "assignments": [ 480 ], "declarations": [ { "constant": false, "id": 480, "name": "_masterCopy", "nodeType": "VariableDeclaration", "scope": 485, "src": "831:19:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 479, "name": "address", "nodeType": "ElementaryTypeName", "src": "831:7:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "id": 482, "initialValue": { "argumentTypes": null, "id": 481, "name": "masterCopy", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 457, "src": "853:10:3", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "831:32:3" }, { "externalReferences": [ { "_masterCopy": { "declaration": 480, "isOffset": false, "isSlot": false, "src": "979:11:3", "valueSize": 1 } } ], "id": 483, "nodeType": "InlineAssembly", "operations": "{\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}", "src": "873:340:3" } ] }, "documentation": "@dev Fallback function forwards all transactions and returns all received return data.", "id": 485, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 477, "nodeType": "ParameterList", "parameters": [], "src": "781:2:3" }, "payable": true, "returnParameters": { "id": 478, "nodeType": "ParameterList", "parameters": [], "src": "821:0:3" }, "scope": 486, "src": "772:441:3", "stateMutability": "payable", "superFunction": null, "visibility": "external" } ], "scope": 487, "src": "391:824:3" } ], "src": "0:1215:3" }, "compiler": { "name": "solc", "version": "0.4.25+commit.59dbf8f1.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.0.0-beta.1", "updatedAt": "2018-10-27T21:23:29.081Z" }