hardlydifficult-eth
Version:
A collection of reusable contracts and Javascript helpers for Ethereum.
627 lines • 26.5 kB
JSON
{
"contractName": "AntiOwnerProxy",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
},
{
"internalType": "bytes",
"name": "_callData",
"type": "bytes"
}
],
"name": "proxyCall",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.6.10+commit.00c0fcaf\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_callData\",\"type\":\"bytes\"}],\"name\":\"proxyCall\",\"outputs\":[],\"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\":{\"project:/contracts/proxies/AntiOwnerProxy.sol\":\"AntiOwnerProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":2000000},\"remappings\":[]},\"sources\":{\"project:/contracts/proxies/AntiOwnerProxy.sol\":{\"keccak256\":\"0x313bd2183cb3664de157a3f07e6a23a44fe53631f5dcf33cb2212b73f47d87fb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d27a32c50893c8ab4bf895b4b52f6d0505ea6ddc5091f87c8625dc3907f236ef\",\"dweb:/ipfs/QmbYvXhHAiKBApco2QuhaSLYewFAR6xELF6iNNQ6F1KXUa\"]},\"project:/contracts/proxies/CallContract.sol\":{\"keccak256\":\"0xb30b0e77e31fd3e37b3a2028fb4ebcf7789d4225feb011b921b8a25447a09b68\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ee3c46722099a245797c4116382ba9fbdc338274d4ed440e97d15ff761611efa\",\"dweb:/ipfs/QmU2Zb2vmGeEjPoa6ZbCVGgjw2ogdnuKQeRCSoiv7SK4ro\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506101da806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80632a31f6b414610030575b600080fd5b6100f36004803603604081101561004657600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561007e57600080fd5b82018360208201111561009057600080fd5b803590602001918460018302840111640100000000831117156100b257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506100f5945050505050565b005b61011d73ffffffffffffffffffffffffffffffffffffffff831682600063ffffffff61012116565b5050565b600080600084516020860185885af190508061019e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f494e5445524e414c5f434f4e54524143545f43414c4c5f4641494c4544000000604482015290519081900360640190fd5b5050505056fea2646970667358221220a3e5fbd37f9436fce948e18622693be43d53684f8ab352225bb86edc88fef61564736f6c634300060a0033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80632a31f6b414610030575b600080fd5b6100f36004803603604081101561004657600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561007e57600080fd5b82018360208201111561009057600080fd5b803590602001918460018302840111640100000000831117156100b257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506100f5945050505050565b005b61011d73ffffffffffffffffffffffffffffffffffffffff831682600063ffffffff61012116565b5050565b600080600084516020860185885af190508061019e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f494e5445524e414c5f434f4e54524143545f43414c4c5f4641494c4544000000604482015290519081900360640190fd5b5050505056fea2646970667358221220a3e5fbd37f9436fce948e18622693be43d53684f8ab352225bb86edc88fef61564736f6c634300060a0033",
"immutableReferences": {},
"sourceMap": "414:188:16:-:0;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "414:188:16:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;477:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;477:123:16;;-1:-1:-1;477:123:16;;-1:-1:-1;;;;;477:123:16:i;:::-;;;566:29;:15;;;582:9;593:1;566:29;:15;:29;:::i;:::-;477:123;;:::o;430:481:17:-;537:11;820:1;791;751:9;745:16;699:2;688:9;684:18;665:9;646;631:5;617:230;607:240;;866:6;858:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;430:481;;;;:::o",
"source": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.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": "project:/contracts/proxies/AntiOwnerProxy.sol",
"exportedSymbols": {
"AntiOwnerProxy": [
3652
]
},
"id": 3653,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3631,
"literals": [
"solidity",
"^",
"0.6",
".0"
],
"nodeType": "PragmaDirective",
"src": "32:23:16"
},
{
"absolutePath": "project:/contracts/proxies/CallContract.sol",
"file": "./CallContract.sol",
"id": 3632,
"nodeType": "ImportDirective",
"scope": 3653,
"sourceUnit": 3731,
"src": "57:28:16",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": {
"id": 3633,
"nodeType": "StructuredDocumentation",
"src": "88:325:16",
"text": " @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."
},
"fullyImplemented": true,
"id": 3652,
"linearizedBaseContracts": [
3652
],
"name": "AntiOwnerProxy",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 3636,
"libraryName": {
"contractScope": null,
"id": 3634,
"name": "CallContract",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3730,
"src": "448:12:16",
"typeDescriptions": {
"typeIdentifier": "t_contract$_CallContract_$3730",
"typeString": "library CallContract"
}
},
"nodeType": "UsingForDirective",
"src": "442:31:16",
"typeName": {
"id": 3635,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "465:7:16",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
},
{
"body": {
"id": 3650,
"nodeType": "Block",
"src": "560:40:16",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3646,
"name": "_callData",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3640,
"src": "582:9:16",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 3647,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "593:1:16",
"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": 3643,
"name": "_contract",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3638,
"src": "566:9:16",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 3645,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "_call",
"nodeType": "MemberAccess",
"referencedDeclaration": 3706,
"src": "566:15:16",
"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": 3648,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "566:29:16",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3649,
"nodeType": "ExpressionStatement",
"src": "566:29:16"
}
]
},
"documentation": null,
"functionSelector": "2a31f6b4",
"id": 3651,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "proxyCall",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 3641,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3638,
"mutability": "mutable",
"name": "_contract",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3651,
"src": "501:17:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3637,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "501:7:16",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3640,
"mutability": "mutable",
"name": "_callData",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 3651,
"src": "524:22:16",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 3639,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "524:5:16",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "495:55:16"
},
"returnParameters": {
"id": 3642,
"nodeType": "ParameterList",
"parameters": [],
"src": "560:0:16"
},
"scope": 3652,
"src": "477:123:16",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 3653,
"src": "414:188:16"
}
],
"src": "32:571:16"
},
"legacyAST": {
"attributes": {
"absolutePath": "project:/contracts/proxies/AntiOwnerProxy.sol",
"exportedSymbols": {
"AntiOwnerProxy": [
3652
]
},
"license": "MIT"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
"^",
"0.6",
".0"
]
},
"id": 3631,
"name": "PragmaDirective",
"src": "32:23:16"
},
{
"attributes": {
"SourceUnit": 3731,
"absolutePath": "project:/contracts/proxies/CallContract.sol",
"file": "./CallContract.sol",
"scope": 3653,
"symbolAliases": [
null
],
"unitAlias": ""
},
"id": 3632,
"name": "ImportDirective",
"src": "57:28:16"
},
{
"attributes": {
"abstract": false,
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts": [
3652
],
"name": "AntiOwnerProxy",
"scope": 3653
},
"children": [
{
"attributes": {
"text": " @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."
},
"id": 3633,
"name": "StructuredDocumentation",
"src": "88:325:16"
},
{
"children": [
{
"attributes": {
"contractScope": null,
"name": "CallContract",
"referencedDeclaration": 3730,
"type": "library CallContract"
},
"id": 3634,
"name": "UserDefinedTypeName",
"src": "448:12:16"
},
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 3635,
"name": "ElementaryTypeName",
"src": "465:7:16"
}
],
"id": 3636,
"name": "UsingForDirective",
"src": "442:31:16"
},
{
"attributes": {
"documentation": null,
"functionSelector": "2a31f6b4",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "proxyCall",
"overrides": null,
"scope": 3652,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "_contract",
"overrides": null,
"scope": 3651,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 3637,
"name": "ElementaryTypeName",
"src": "501:7:16"
}
],
"id": 3638,
"name": "VariableDeclaration",
"src": "501:17:16"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "_callData",
"overrides": null,
"scope": 3651,
"stateVariable": false,
"storageLocation": "memory",
"type": "bytes",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes",
"type": "bytes"
},
"id": 3639,
"name": "ElementaryTypeName",
"src": "524:5:16"
}
],
"id": 3640,
"name": "VariableDeclaration",
"src": "524:22:16"
}
],
"id": 3641,
"name": "ParameterList",
"src": "495:55:16"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 3642,
"name": "ParameterList",
"src": "560:0:16"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "_call",
"referencedDeclaration": 3706,
"type": "function (address,bytes memory,uint256)"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3638,
"type": "address",
"value": "_contract"
},
"id": 3643,
"name": "Identifier",
"src": "566:9:16"
}
],
"id": 3645,
"name": "MemberAccess",
"src": "566:15:16"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3640,
"type": "bytes memory",
"value": "_callData"
},
"id": 3646,
"name": "Identifier",
"src": "582:9:16"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 3647,
"name": "Literal",
"src": "593:1:16"
}
],
"id": 3648,
"name": "FunctionCall",
"src": "566:29:16"
}
],
"id": 3649,
"name": "ExpressionStatement",
"src": "566:29:16"
}
],
"id": 3650,
"name": "Block",
"src": "560:40:16"
}
],
"id": 3651,
"name": "FunctionDefinition",
"src": "477:123:16"
}
],
"id": 3652,
"name": "ContractDefinition",
"src": "414:188:16"
}
],
"id": 3653,
"name": "SourceUnit",
"src": "32:571:16"
},
"compiler": {
"name": "solc",
"version": "0.6.10+commit.00c0fcaf.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.1",
"updatedAt": "2021-07-08T17:04:13.841Z",
"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."
}
}