UNPKG

hardlydifficult-ethereum-contracts

Version:
566 lines 25 kB
{ "contractName": "AntiOwnerProxy", "abi": [ { "constant": false, "inputs": [ { "internalType": "address", "name": "_contract", "type": "address" }, { "internalType": "bytes", "name": "_callData", "type": "bytes" } ], "name": "proxyCall", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_callData\",\"type\":\"bytes\"}],\"name\":\"proxyCall\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"If this contract is the owner / admin account for another, this contract allows anyone to make owner only calls; bypassing the owner requirement.\",\"methods\":{},\"title\":\"Anti-Owner Proxy used to bypass existing owner checks (typically for testing).\"},\"userdoc\":{\"methods\":{},\"notice\":\"Allows anyone to make arbitrary calls through this contract.\"}},\"settings\":{\"compilationTarget\":{\"/home/circleci/repo/contracts/proxies/AntiOwnerProxy.sol\":\"AntiOwnerProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":2000000},\"remappings\":[]},\"sources\":{\"/home/circleci/repo/contracts/proxies/AntiOwnerProxy.sol\":{\"keccak256\":\"0x4c8933e0ce68f8b311cf15e915e1518ddebfc94c2db2af0526e9b7c6907c08ff\",\"urls\":[\"bzz-raw://568ac6b3b1f37027d667368dc17d50c3faca66d38dad1738382549d9d60b4d02\",\"dweb:/ipfs/QmaoK6hiE4Lck9aC1JM18RDyzy1XkqLoJPW2g3G8MWnacT\"]},\"/home/circleci/repo/contracts/proxies/CallContract.sol\":{\"keccak256\":\"0x5b891896d85a8937da32acd5af2d4b2d3fd8f5fbae639540d54ed972d05304b4\",\"urls\":[\"bzz-raw://982e6db3cc9a612ab3ecd4a404ed15255429e857ebf0bb96b404dedb83313dc1\",\"dweb:/ipfs/Qmeh7ezyMrD4q62edq1oLdR93NuTr8GYwE4XKE62T125Mt\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b506101d9806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80632a31f6b414610030575b600080fd5b6100f36004803603604081101561004657600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561007e57600080fd5b82018360208201111561009057600080fd5b803590602001918460018302840111640100000000831117156100b257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506100f5945050505050565b005b61011d73ffffffffffffffffffffffffffffffffffffffff831682600063ffffffff61012116565b5050565b600080600084516020860185885af190508061019e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f494e5445524e414c5f434f4e54524143545f43414c4c5f4641494c4544000000604482015290519081900360640190fd5b5050505056fea265627a7a723158205af9ac07c5c5e5beed79a9f6a1f24c601f3235918b753b6ba1f37563e91e49e064736f6c63430005110032", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80632a31f6b414610030575b600080fd5b6100f36004803603604081101561004657600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561007e57600080fd5b82018360208201111561009057600080fd5b803590602001918460018302840111640100000000831117156100b257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506100f5945050505050565b005b61011d73ffffffffffffffffffffffffffffffffffffffff831682600063ffffffff61012116565b5050565b600080600084516020860185885af190508061019e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f494e5445524e414c5f434f4e54524143545f43414c4c5f4641494c4544000000604482015290519081900360640190fd5b5050505056fea265627a7a723158205af9ac07c5c5e5beed79a9f6a1f24c601f3235918b753b6ba1f37563e91e49e064736f6c63430005110032", "sourceMap": "382:188:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;382:188:6;;;;;;;", "deployedSourceMap": "382:188:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;382:188:6;;;;;;;;;;;;;;;;;;;445:123;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;445:123:6;;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;445:123:6;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;445:123:6;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;445:123:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;445:123:6;;-1:-1:-1;445:123:6;;-1:-1:-1;;;;;445:123:6:i;:::-;;;534:29;:15;;;550:9;561:1;534:29;:15;:29;:::i;:::-;445:123;;:::o;398:479:7:-;505:11;786:1;757;717:9;711:16;665:2;654:9;650:18;631:9;612;599:3;585:228;575:238;;832:6;824:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;398:479;;;;:::o", "source": "pragma solidity ^0.5.0;\n\nimport './CallContract.sol';\n\n\n/**\n * @title Anti-Owner Proxy used to bypass existing owner checks (typically for testing).\n * @notice Allows anyone to make arbitrary calls through this contract.\n * @dev If this contract is the owner / admin account for another, this contract allows\n * anyone to make owner only calls; bypassing the owner requirement.\n */\ncontract AntiOwnerProxy\n{\n using CallContract for address;\n\n function proxyCall(\n address _contract,\n bytes memory _callData\n ) public\n {\n _contract._call(_callData, 0);\n }\n}\n", "sourcePath": "/home/circleci/repo/contracts/proxies/AntiOwnerProxy.sol", "ast": { "absolutePath": "/home/circleci/repo/contracts/proxies/AntiOwnerProxy.sol", "exportedSymbols": { "AntiOwnerProxy": [ 1253 ] }, "id": 1254, "nodeType": "SourceUnit", "nodes": [ { "id": 1233, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:6" }, { "absolutePath": "/home/circleci/repo/contracts/proxies/CallContract.sol", "file": "./CallContract.sol", "id": 1234, "nodeType": "ImportDirective", "scope": 1254, "sourceUnit": 1330, "src": "25:28:6", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title Anti-Owner Proxy used to bypass existing owner checks (typically for testing).\n@notice Allows anyone to make arbitrary calls through this contract.\n@dev If this contract is the owner / admin account for another, this contract allows\nanyone to make owner only calls; bypassing the owner requirement.", "fullyImplemented": true, "id": 1253, "linearizedBaseContracts": [ 1253 ], "name": "AntiOwnerProxy", "nodeType": "ContractDefinition", "nodes": [ { "id": 1237, "libraryName": { "contractScope": null, "id": 1235, "name": "CallContract", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1329, "src": "416:12:6", "typeDescriptions": { "typeIdentifier": "t_contract$_CallContract_$1329", "typeString": "library CallContract" } }, "nodeType": "UsingForDirective", "src": "410:31:6", "typeName": { "id": 1236, "name": "address", "nodeType": "ElementaryTypeName", "src": "433:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } }, { "body": { "id": 1251, "nodeType": "Block", "src": "528:40:6", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1247, "name": "_callData", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1241, "src": "550:9:6", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "hexValue": "30", "id": 1248, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "561:1:6", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "expression": { "argumentTypes": null, "id": 1244, "name": "_contract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1239, "src": "534:9:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 1246, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_call", "nodeType": "MemberAccess", "referencedDeclaration": 1305, "src": "534:15:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$bound_to$_t_address_$", "typeString": "function (address,bytes memory,uint256)" } }, "id": 1249, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "534:29:6", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1250, "nodeType": "ExpressionStatement", "src": "534:29:6" } ] }, "documentation": null, "id": 1252, "implemented": true, "kind": "function", "modifiers": [], "name": "proxyCall", "nodeType": "FunctionDefinition", "parameters": { "id": 1242, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1239, "name": "_contract", "nodeType": "VariableDeclaration", "scope": 1252, "src": "469:17:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1238, "name": "address", "nodeType": "ElementaryTypeName", "src": "469:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1241, "name": "_callData", "nodeType": "VariableDeclaration", "scope": 1252, "src": "492:22:6", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 1240, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "492:5:6", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "463:55:6" }, "returnParameters": { "id": 1243, "nodeType": "ParameterList", "parameters": [], "src": "528:0:6" }, "scope": 1253, "src": "445:123:6", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 1254, "src": "382:188:6" } ], "src": "0:571:6" }, "legacyAST": { "absolutePath": "/home/circleci/repo/contracts/proxies/AntiOwnerProxy.sol", "exportedSymbols": { "AntiOwnerProxy": [ 1253 ] }, "id": 1254, "nodeType": "SourceUnit", "nodes": [ { "id": 1233, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:6" }, { "absolutePath": "/home/circleci/repo/contracts/proxies/CallContract.sol", "file": "./CallContract.sol", "id": 1234, "nodeType": "ImportDirective", "scope": 1254, "sourceUnit": 1330, "src": "25:28:6", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title Anti-Owner Proxy used to bypass existing owner checks (typically for testing).\n@notice Allows anyone to make arbitrary calls through this contract.\n@dev If this contract is the owner / admin account for another, this contract allows\nanyone to make owner only calls; bypassing the owner requirement.", "fullyImplemented": true, "id": 1253, "linearizedBaseContracts": [ 1253 ], "name": "AntiOwnerProxy", "nodeType": "ContractDefinition", "nodes": [ { "id": 1237, "libraryName": { "contractScope": null, "id": 1235, "name": "CallContract", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1329, "src": "416:12:6", "typeDescriptions": { "typeIdentifier": "t_contract$_CallContract_$1329", "typeString": "library CallContract" } }, "nodeType": "UsingForDirective", "src": "410:31:6", "typeName": { "id": 1236, "name": "address", "nodeType": "ElementaryTypeName", "src": "433:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } }, { "body": { "id": 1251, "nodeType": "Block", "src": "528:40:6", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1247, "name": "_callData", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1241, "src": "550:9:6", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "hexValue": "30", "id": 1248, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "561:1:6", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "expression": { "argumentTypes": null, "id": 1244, "name": "_contract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1239, "src": "534:9:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 1246, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_call", "nodeType": "MemberAccess", "referencedDeclaration": 1305, "src": "534:15:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$bound_to$_t_address_$", "typeString": "function (address,bytes memory,uint256)" } }, "id": 1249, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "534:29:6", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1250, "nodeType": "ExpressionStatement", "src": "534:29:6" } ] }, "documentation": null, "id": 1252, "implemented": true, "kind": "function", "modifiers": [], "name": "proxyCall", "nodeType": "FunctionDefinition", "parameters": { "id": 1242, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1239, "name": "_contract", "nodeType": "VariableDeclaration", "scope": 1252, "src": "469:17:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1238, "name": "address", "nodeType": "ElementaryTypeName", "src": "469:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1241, "name": "_callData", "nodeType": "VariableDeclaration", "scope": 1252, "src": "492:22:6", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 1240, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "492:5:6", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "463:55:6" }, "returnParameters": { "id": 1243, "nodeType": "ParameterList", "parameters": [], "src": "528:0:6" }, "scope": 1253, "src": "445:123:6", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 1254, "src": "382:188:6" } ], "src": "0:571:6" }, "compiler": { "name": "solc", "version": "0.5.17+commit.d19bba13.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.0.23", "updatedAt": "2020-04-07T20:17:34.940Z", "devdoc": { "details": "If this contract is the owner / admin account for another, this contract allows anyone to make owner only calls; bypassing the owner requirement.", "methods": {}, "title": "Anti-Owner Proxy used to bypass existing owner checks (typically for testing)." }, "userdoc": { "methods": {}, "notice": "Allows anyone to make arbitrary calls through this contract." } }