2018-05-04 16:04:04 +02:00
{
"contractName" : "Proxy" ,
"abi" : [
{
"inputs" : [
{
"name" : "_masterCopy" ,
"type" : "address"
}
] ,
"payable" : false ,
"stateMutability" : "nonpayable" ,
"type" : "constructor"
} ,
{
"payable" : true ,
"stateMutability" : "payable" ,
"type" : "fallback"
2018-05-10 13:12:13 +02:00
} ,
{
"constant" : true ,
"inputs" : [ ] ,
"name" : "implementation" ,
"outputs" : [
{
"name" : "" ,
"type" : "address"
}
] ,
"payable" : false ,
"stateMutability" : "view" ,
"type" : "function"
} ,
{
"constant" : true ,
"inputs" : [ ] ,
"name" : "proxyType" ,
"outputs" : [
{
"name" : "" ,
"type" : "uint256"
}
] ,
"payable" : false ,
"stateMutability" : "pure" ,
"type" : "function"
2018-05-04 16:04:04 +02:00
}
] ,
2018-05-10 13:12:13 +02:00
"bytecode" : "0x608060405234801561001057600080fd5b506040516020806102148339810180604052810190808051906020019092919050505060008173ffffffffffffffffffffffffffffffffffffffff161415151561005957600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061016b806100a96000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634555d5c91461008b5780635c60da1b146100b6575b73ffffffffffffffffffffffffffffffffffffffff600054163660008037600080366000845af43d6000803e6000811415610086573d6000fd5b3d6000f35b34801561009757600080fd5b506100a061010d565b6040518082815260200191505060405180910390f35b3480156100c257600080fd5b506100cb610116565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006002905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050905600a165627a7a723058209594d3f13f6fbad0d5e33f423014061ae7898100636a8b854618092ea85c15e90029" ,
"deployedBytecode" : "0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634555d5c91461008b5780635c60da1b146100b6575b73ffffffffffffffffffffffffffffffffffffffff600054163660008037600080366000845af43d6000803e6000811415610086573d6000fd5b3d6000f35b34801561009757600080fd5b506100a061010d565b6040518082815260200191505060405180910390f35b3480156100c257600080fd5b506100cb610116565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006002905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050905600a165627a7a723058209594d3f13f6fbad0d5e33f423014061ae7898100636a8b854618092ea85c15e90029" ,
"sourceMap" : "190:1302:12:-;;;508:128;8:9:-1;5:2;;;30:1;27;20:12;5:2;508:128:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;593:1;578:11;:16;;;;570:25;;;;;;;;618:11;605:10;;:24;;;;;;;;;;;;;;;;;;508:128;190:1302;;;;;;" ,
"deployedSourceMap" : "190:1302:12:-;;;;;;;;;;;;;;;;;;;;;;;;;;915:42;911:1;905:8;901:57;990:14;987:1;984;971:34;1085:1;1082;1066:14;1063:1;1051:10;1046:3;1033:54;1121:16;1118:1;1115;1100:38;1166:1;1157:7;1154:14;1151:2;;;1181:16;1178:1;1171:27;1151:2;1223:16;1220:1;1213:27;1386:104;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1386:104:12;;;;;;;;;;;;;;;;;;;;;;;1262:118;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1262:118:12;;;;;;;;;;;;;;;;;;;;;;;;;;;1386:104;1452:7;1482:1;1475:8;;1386:104;:::o;1262:118::-;1333:7;1363:10;;;;;;;;;;;1356:17;;1262:118;:::o" ,
"source" : "pragma solidity 0.4.23;\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 {\n\n // masterCopy always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.\n address masterCopy;\n\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 // solium-disable-next-line security/no-inline-assembly\n assembly {\n let masterCopy := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(gas, masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if eq(success, 0) { revert(0, returndatasize()) }\n return(0, returndatasize())\n }\n }\n\n function implementation()\n public\n view\n returns (address)\n {\n return masterCopy;\n }\n\n function proxyType()\n public\n pure\n returns (uint256)\n {\n return 2;\n }\n}\n" ,
2018-05-04 16:04:04 +02:00
"sourcePath" : "/Users/apanizo/git/gnosis/safe-contracts/contracts/Proxy.sol" ,
"ast" : {
"absolutePath" : "/Users/apanizo/git/gnosis/safe-contracts/contracts/Proxy.sol" ,
"exportedSymbols" : {
"Proxy" : [
2018-05-10 13:12:13 +02:00
1508
2018-05-04 16:04:04 +02:00
]
} ,
2018-05-10 13:12:13 +02:00
"id" : 1509 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "SourceUnit" ,
"nodes" : [
{
2018-05-10 13:12:13 +02:00
"id" : 1468 ,
2018-05-04 16:04:04 +02:00
"literals" : [
"solidity" ,
"0.4" ,
2018-05-10 13:12:13 +02:00
".23"
2018-05-04 16:04:04 +02:00
] ,
"nodeType" : "PragmaDirective" ,
2018-05-10 13:12:13 +02:00
"src" : "0:23:12"
2018-05-04 16:04:04 +02:00
} ,
{
"baseContracts" : [ ] ,
"contractDependencies" : [ ] ,
"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 ,
2018-05-10 13:12:13 +02:00
"id" : 1508 ,
2018-05-04 16:04:04 +02:00
"linearizedBaseContracts" : [
2018-05-10 13:12:13 +02:00
1508
2018-05-04 16:04:04 +02:00
] ,
"name" : "Proxy" ,
"nodeType" : "ContractDefinition" ,
"nodes" : [
{
"constant" : false ,
2018-05-10 13:12:13 +02:00
"id" : 1470 ,
2018-05-04 16:04:04 +02:00
"name" : "masterCopy" ,
"nodeType" : "VariableDeclaration" ,
2018-05-10 13:12:13 +02:00
"scope" : 1508 ,
"src" : "363:18:12" ,
2018-05-04 16:04:04 +02:00
"stateVariable" : true ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
2018-05-10 13:12:13 +02:00
"id" : 1469 ,
2018-05-04 16:04:04 +02:00
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
2018-05-10 13:12:13 +02:00
"src" : "363:7:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2018-05-10 13:12:13 +02:00
"id" : 1485 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "Block" ,
2018-05-10 13:12:13 +02:00
"src" : "560:76:12" ,
2018-05-04 16:04:04 +02:00
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
2018-05-10 13:12:13 +02:00
"id" : 1478 ,
2018-05-04 16:04:04 +02:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2018-05-10 13:12:13 +02:00
"id" : 1476 ,
2018-05-04 16:04:04 +02:00
"name" : "_masterCopy" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 13:12:13 +02:00
"referencedDeclaration" : 1472 ,
"src" : "578:11:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "!=" ,
"rightExpression" : {
"argumentTypes" : null ,
"hexValue" : "30" ,
2018-05-10 13:12:13 +02:00
"id" : 1477 ,
2018-05-04 16:04:04 +02:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
2018-05-10 13:12:13 +02:00
"src" : "593:1:12" ,
2018-05-04 16:04:04 +02:00
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
} ,
2018-05-10 13:12:13 +02:00
"src" : "578:16:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
] ,
2018-05-10 13:12:13 +02:00
"id" : 1475 ,
2018-05-04 16:04:04 +02:00
"name" : "require" ,
"nodeType" : "Identifier" ,
2018-05-10 13:12:13 +02:00
"overloadedDeclarations" : [
2468 ,
2469
] ,
"referencedDeclaration" : 2468 ,
"src" : "570:7:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$returns$__$" ,
"typeString" : "function (bool) pure"
}
} ,
2018-05-10 13:12:13 +02:00
"id" : 1479 ,
2018-05-04 16:04:04 +02:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
2018-05-10 13:12:13 +02:00
"src" : "570:25:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2018-05-10 13:12:13 +02:00
"id" : 1480 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "ExpressionStatement" ,
2018-05-10 13:12:13 +02:00
"src" : "570:25:12"
2018-05-04 16:04:04 +02:00
} ,
{
"expression" : {
"argumentTypes" : null ,
2018-05-10 13:12:13 +02:00
"id" : 1483 ,
2018-05-04 16:04:04 +02:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftHandSide" : {
"argumentTypes" : null ,
2018-05-10 13:12:13 +02:00
"id" : 1481 ,
2018-05-04 16:04:04 +02:00
"name" : "masterCopy" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 13:12:13 +02:00
"referencedDeclaration" : 1470 ,
"src" : "605:10:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "Assignment" ,
"operator" : "=" ,
"rightHandSide" : {
"argumentTypes" : null ,
2018-05-10 13:12:13 +02:00
"id" : 1482 ,
2018-05-04 16:04:04 +02:00
"name" : "_masterCopy" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 13:12:13 +02:00
"referencedDeclaration" : 1472 ,
"src" : "618:11:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
2018-05-10 13:12:13 +02:00
"src" : "605:24:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
2018-05-10 13:12:13 +02:00
"id" : 1484 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "ExpressionStatement" ,
2018-05-10 13:12:13 +02:00
"src" : "605:24:12"
2018-05-04 16:04:04 +02:00
}
]
} ,
2018-05-10 13:12:13 +02:00
"documentation" : "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address." ,
"id" : 1486 ,
2018-05-04 16:04:04 +02:00
"implemented" : true ,
"isConstructor" : true ,
"isDeclaredConst" : false ,
"modifiers" : [ ] ,
2018-05-10 13:12:13 +02:00
"name" : "" ,
2018-05-04 16:04:04 +02:00
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2018-05-10 13:12:13 +02:00
"id" : 1473 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2018-05-10 13:12:13 +02:00
"id" : 1472 ,
2018-05-04 16:04:04 +02:00
"name" : "_masterCopy" ,
"nodeType" : "VariableDeclaration" ,
2018-05-10 13:12:13 +02:00
"scope" : 1486 ,
"src" : "520:19:12" ,
2018-05-04 16:04:04 +02:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
2018-05-10 13:12:13 +02:00
"id" : 1471 ,
2018-05-04 16:04:04 +02:00
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
2018-05-10 13:12:13 +02:00
"src" : "520:7:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2018-05-10 13:12:13 +02:00
"src" : "519:21:12"
2018-05-04 16:04:04 +02:00
} ,
"payable" : false ,
"returnParameters" : {
2018-05-10 13:12:13 +02:00
"id" : 1474 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
2018-05-10 13:12:13 +02:00
"src" : "560:0:12"
2018-05-04 16:04:04 +02:00
} ,
2018-05-10 13:12:13 +02:00
"scope" : 1508 ,
"src" : "508:128:12" ,
2018-05-04 16:04:04 +02:00
"stateMutability" : "nonpayable" ,
"superFunction" : null ,
"visibility" : "public"
} ,
{
"body" : {
2018-05-10 13:12:13 +02:00
"id" : 1490 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "Block" ,
2018-05-10 13:12:13 +02:00
"src" : "786:470:12" ,
2018-05-04 16:04:04 +02:00
"statements" : [
{
"externalReferences" : [ ] ,
2018-05-10 13:12:13 +02:00
"id" : 1489 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "InlineAssembly" ,
2018-05-10 13:12:13 +02:00
"operations" : "{\n let masterCopy := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(gas(), masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if eq(success, 0)\n {\n revert(0, returndatasize())\n }\n return(0, returndatasize())\n}" ,
"src" : "860:396:12"
2018-05-04 16:04:04 +02:00
}
]
} ,
2018-05-10 13:12:13 +02:00
"documentation" : "@dev Fallback function forwards all transactions and returns all received return data." ,
"id" : 1491 ,
2018-05-04 16:04:04 +02:00
"implemented" : true ,
"isConstructor" : false ,
"isDeclaredConst" : false ,
"modifiers" : [ ] ,
"name" : "" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2018-05-10 13:12:13 +02:00
"id" : 1487 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
2018-05-10 13:12:13 +02:00
"src" : "746:2:12"
2018-05-04 16:04:04 +02:00
} ,
"payable" : true ,
"returnParameters" : {
2018-05-10 13:12:13 +02:00
"id" : 1488 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
2018-05-10 13:12:13 +02:00
"src" : "786:0:12"
2018-05-04 16:04:04 +02:00
} ,
2018-05-10 13:12:13 +02:00
"scope" : 1508 ,
"src" : "737:519:12" ,
2018-05-04 16:04:04 +02:00
"stateMutability" : "payable" ,
"superFunction" : null ,
"visibility" : "external"
2018-05-10 13:12:13 +02:00
} ,
{
"body" : {
"id" : 1498 ,
"nodeType" : "Block" ,
"src" : "1346:34:12" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"id" : 1496 ,
"name" : "masterCopy" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 1470 ,
"src" : "1363:10:12" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"functionReturnParameters" : 1495 ,
"id" : 1497 ,
"nodeType" : "Return" ,
"src" : "1356:17:12"
}
]
} ,
"documentation" : null ,
"id" : 1499 ,
"implemented" : true ,
"isConstructor" : false ,
"isDeclaredConst" : true ,
"modifiers" : [ ] ,
"name" : "implementation" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
"id" : 1492 ,
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
"src" : "1285:2:12"
} ,
"payable" : false ,
"returnParameters" : {
"id" : 1495 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 1494 ,
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 1499 ,
"src" : "1333:7:12" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 1493 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1333:7:12" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "1332:9:12"
} ,
"scope" : 1508 ,
"src" : "1262:118:12" ,
"stateMutability" : "view" ,
"superFunction" : null ,
"visibility" : "public"
} ,
{
"body" : {
"id" : 1506 ,
"nodeType" : "Block" ,
"src" : "1465:25:12" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"hexValue" : "32" ,
"id" : 1504 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "1482:1:12" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_2_by_1" ,
"typeString" : "int_const 2"
} ,
"value" : "2"
} ,
"functionReturnParameters" : 1503 ,
"id" : 1505 ,
"nodeType" : "Return" ,
"src" : "1475:8:12"
}
]
} ,
"documentation" : null ,
"id" : 1507 ,
"implemented" : true ,
"isConstructor" : false ,
"isDeclaredConst" : true ,
"modifiers" : [ ] ,
"name" : "proxyType" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
"id" : 1500 ,
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
"src" : "1404:2:12"
} ,
"payable" : false ,
"returnParameters" : {
"id" : 1503 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 1502 ,
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 1507 ,
"src" : "1452:7:12" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
"id" : 1501 ,
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1452:7:12" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "1451:9:12"
} ,
"scope" : 1508 ,
"src" : "1386:104:12" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "public"
2018-05-04 16:04:04 +02:00
}
] ,
2018-05-10 13:12:13 +02:00
"scope" : 1509 ,
"src" : "190:1302:12"
2018-05-04 16:04:04 +02:00
}
] ,
2018-05-10 13:12:13 +02:00
"src" : "0:1493:12"
2018-05-04 16:04:04 +02:00
} ,
"legacyAST" : {
"absolutePath" : "/Users/apanizo/git/gnosis/safe-contracts/contracts/Proxy.sol" ,
"exportedSymbols" : {
"Proxy" : [
2018-05-10 13:12:13 +02:00
1508
2018-05-04 16:04:04 +02:00
]
} ,
2018-05-10 13:12:13 +02:00
"id" : 1509 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "SourceUnit" ,
"nodes" : [
{
2018-05-10 13:12:13 +02:00
"id" : 1468 ,
2018-05-04 16:04:04 +02:00
"literals" : [
"solidity" ,
"0.4" ,
2018-05-10 13:12:13 +02:00
".23"
2018-05-04 16:04:04 +02:00
] ,
"nodeType" : "PragmaDirective" ,
2018-05-10 13:12:13 +02:00
"src" : "0:23:12"
2018-05-04 16:04:04 +02:00
} ,
{
"baseContracts" : [ ] ,
"contractDependencies" : [ ] ,
"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 ,
2018-05-10 13:12:13 +02:00
"id" : 1508 ,
2018-05-04 16:04:04 +02:00
"linearizedBaseContracts" : [
2018-05-10 13:12:13 +02:00
1508
2018-05-04 16:04:04 +02:00
] ,
"name" : "Proxy" ,
"nodeType" : "ContractDefinition" ,
"nodes" : [
{
"constant" : false ,
2018-05-10 13:12:13 +02:00
"id" : 1470 ,
2018-05-04 16:04:04 +02:00
"name" : "masterCopy" ,
"nodeType" : "VariableDeclaration" ,
2018-05-10 13:12:13 +02:00
"scope" : 1508 ,
"src" : "363:18:12" ,
2018-05-04 16:04:04 +02:00
"stateVariable" : true ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
2018-05-10 13:12:13 +02:00
"id" : 1469 ,
2018-05-04 16:04:04 +02:00
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
2018-05-10 13:12:13 +02:00
"src" : "363:7:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"body" : {
2018-05-10 13:12:13 +02:00
"id" : 1485 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "Block" ,
2018-05-10 13:12:13 +02:00
"src" : "560:76:12" ,
2018-05-04 16:04:04 +02:00
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
2018-05-10 13:12:13 +02:00
"id" : 1478 ,
2018-05-04 16:04:04 +02:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
2018-05-10 13:12:13 +02:00
"id" : 1476 ,
2018-05-04 16:04:04 +02:00
"name" : "_masterCopy" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 13:12:13 +02:00
"referencedDeclaration" : 1472 ,
"src" : "578:11:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "!=" ,
"rightExpression" : {
"argumentTypes" : null ,
"hexValue" : "30" ,
2018-05-10 13:12:13 +02:00
"id" : 1477 ,
2018-05-04 16:04:04 +02:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
2018-05-10 13:12:13 +02:00
"src" : "593:1:12" ,
2018-05-04 16:04:04 +02:00
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
} ,
2018-05-10 13:12:13 +02:00
"src" : "578:16:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
] ,
2018-05-10 13:12:13 +02:00
"id" : 1475 ,
2018-05-04 16:04:04 +02:00
"name" : "require" ,
"nodeType" : "Identifier" ,
2018-05-10 13:12:13 +02:00
"overloadedDeclarations" : [
2468 ,
2469
] ,
"referencedDeclaration" : 2468 ,
"src" : "570:7:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$returns$__$" ,
"typeString" : "function (bool) pure"
}
} ,
2018-05-10 13:12:13 +02:00
"id" : 1479 ,
2018-05-04 16:04:04 +02:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
2018-05-10 13:12:13 +02:00
"src" : "570:25:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2018-05-10 13:12:13 +02:00
"id" : 1480 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "ExpressionStatement" ,
2018-05-10 13:12:13 +02:00
"src" : "570:25:12"
2018-05-04 16:04:04 +02:00
} ,
{
"expression" : {
"argumentTypes" : null ,
2018-05-10 13:12:13 +02:00
"id" : 1483 ,
2018-05-04 16:04:04 +02:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftHandSide" : {
"argumentTypes" : null ,
2018-05-10 13:12:13 +02:00
"id" : 1481 ,
2018-05-04 16:04:04 +02:00
"name" : "masterCopy" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 13:12:13 +02:00
"referencedDeclaration" : 1470 ,
"src" : "605:10:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "Assignment" ,
"operator" : "=" ,
"rightHandSide" : {
"argumentTypes" : null ,
2018-05-10 13:12:13 +02:00
"id" : 1482 ,
2018-05-04 16:04:04 +02:00
"name" : "_masterCopy" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 13:12:13 +02:00
"referencedDeclaration" : 1472 ,
"src" : "618:11:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
2018-05-10 13:12:13 +02:00
"src" : "605:24:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
2018-05-10 13:12:13 +02:00
"id" : 1484 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "ExpressionStatement" ,
2018-05-10 13:12:13 +02:00
"src" : "605:24:12"
2018-05-04 16:04:04 +02:00
}
]
} ,
2018-05-10 13:12:13 +02:00
"documentation" : "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address." ,
"id" : 1486 ,
2018-05-04 16:04:04 +02:00
"implemented" : true ,
"isConstructor" : true ,
"isDeclaredConst" : false ,
"modifiers" : [ ] ,
2018-05-10 13:12:13 +02:00
"name" : "" ,
2018-05-04 16:04:04 +02:00
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2018-05-10 13:12:13 +02:00
"id" : 1473 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2018-05-10 13:12:13 +02:00
"id" : 1472 ,
2018-05-04 16:04:04 +02:00
"name" : "_masterCopy" ,
"nodeType" : "VariableDeclaration" ,
2018-05-10 13:12:13 +02:00
"scope" : 1486 ,
"src" : "520:19:12" ,
2018-05-04 16:04:04 +02:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
2018-05-10 13:12:13 +02:00
"id" : 1471 ,
2018-05-04 16:04:04 +02:00
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
2018-05-10 13:12:13 +02:00
"src" : "520:7:12" ,
2018-05-04 16:04:04 +02:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2018-05-10 13:12:13 +02:00
"src" : "519:21:12"
2018-05-04 16:04:04 +02:00
} ,
"payable" : false ,
"returnParameters" : {
2018-05-10 13:12:13 +02:00
"id" : 1474 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
2018-05-10 13:12:13 +02:00
"src" : "560:0:12"
2018-05-04 16:04:04 +02:00
} ,
2018-05-10 13:12:13 +02:00
"scope" : 1508 ,
"src" : "508:128:12" ,
2018-05-04 16:04:04 +02:00
"stateMutability" : "nonpayable" ,
"superFunction" : null ,
"visibility" : "public"
} ,
{
"body" : {
2018-05-10 13:12:13 +02:00
"id" : 1490 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "Block" ,
2018-05-10 13:12:13 +02:00
"src" : "786:470:12" ,
2018-05-04 16:04:04 +02:00
"statements" : [
{
"externalReferences" : [ ] ,
2018-05-10 13:12:13 +02:00
"id" : 1489 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "InlineAssembly" ,
2018-05-10 13:12:13 +02:00
"operations" : "{\n let masterCopy := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(gas(), masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if eq(success, 0)\n {\n revert(0, returndatasize())\n }\n return(0, returndatasize())\n}" ,
"src" : "860:396:12"
2018-05-04 16:04:04 +02:00
}
]
} ,
2018-05-10 13:12:13 +02:00
"documentation" : "@dev Fallback function forwards all transactions and returns all received return data." ,
"id" : 1491 ,
2018-05-04 16:04:04 +02:00
"implemented" : true ,
"isConstructor" : false ,
"isDeclaredConst" : false ,
"modifiers" : [ ] ,
"name" : "" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2018-05-10 13:12:13 +02:00
"id" : 1487 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
2018-05-10 13:12:13 +02:00
"src" : "746:2:12"
2018-05-04 16:04:04 +02:00
} ,
"payable" : true ,
"returnParameters" : {
2018-05-10 13:12:13 +02:00
"id" : 1488 ,
2018-05-04 16:04:04 +02:00
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
2018-05-10 13:12:13 +02:00
"src" : "786:0:12"
2018-05-04 16:04:04 +02:00
} ,
2018-05-10 13:12:13 +02:00
"scope" : 1508 ,
"src" : "737:519:12" ,
2018-05-04 16:04:04 +02:00
"stateMutability" : "payable" ,
"superFunction" : null ,
"visibility" : "external"
2018-05-10 13:12:13 +02:00
} ,
{
"body" : {
"id" : 1498 ,
"nodeType" : "Block" ,
"src" : "1346:34:12" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"id" : 1496 ,
"name" : "masterCopy" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 1470 ,
"src" : "1363:10:12" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"functionReturnParameters" : 1495 ,
"id" : 1497 ,
"nodeType" : "Return" ,
"src" : "1356:17:12"
}
]
} ,
"documentation" : null ,
"id" : 1499 ,
"implemented" : true ,
"isConstructor" : false ,
"isDeclaredConst" : true ,
"modifiers" : [ ] ,
"name" : "implementation" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
"id" : 1492 ,
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
"src" : "1285:2:12"
} ,
"payable" : false ,
"returnParameters" : {
"id" : 1495 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 1494 ,
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 1499 ,
"src" : "1333:7:12" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 1493 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1333:7:12" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "1332:9:12"
} ,
"scope" : 1508 ,
"src" : "1262:118:12" ,
"stateMutability" : "view" ,
"superFunction" : null ,
"visibility" : "public"
} ,
{
"body" : {
"id" : 1506 ,
"nodeType" : "Block" ,
"src" : "1465:25:12" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"hexValue" : "32" ,
"id" : 1504 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "1482:1:12" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_2_by_1" ,
"typeString" : "int_const 2"
} ,
"value" : "2"
} ,
"functionReturnParameters" : 1503 ,
"id" : 1505 ,
"nodeType" : "Return" ,
"src" : "1475:8:12"
}
]
} ,
"documentation" : null ,
"id" : 1507 ,
"implemented" : true ,
"isConstructor" : false ,
"isDeclaredConst" : true ,
"modifiers" : [ ] ,
"name" : "proxyType" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
"id" : 1500 ,
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
"src" : "1404:2:12"
} ,
"payable" : false ,
"returnParameters" : {
"id" : 1503 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 1502 ,
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 1507 ,
"src" : "1452:7:12" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
"id" : 1501 ,
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1452:7:12" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "1451:9:12"
} ,
"scope" : 1508 ,
"src" : "1386:104:12" ,
"stateMutability" : "pure" ,
"superFunction" : null ,
"visibility" : "public"
2018-05-04 16:04:04 +02:00
}
] ,
2018-05-10 13:12:13 +02:00
"scope" : 1509 ,
"src" : "190:1302:12"
2018-05-04 16:04:04 +02:00
}
] ,
2018-05-10 13:12:13 +02:00
"src" : "0:1493:12"
2018-05-04 16:04:04 +02:00
} ,
"compiler" : {
"name" : "solc" ,
2018-05-10 13:12:13 +02:00
"version" : "0.4.23+commit.124ca40d.Emscripten.clang"
2018-05-04 16:04:04 +02:00
} ,
"networks" : { } ,
"schemaVersion" : "2.0.0" ,
2018-05-10 13:12:13 +02:00
"updatedAt" : "2018-05-10T10:43:07.901Z"
2018-05-04 16:04:04 +02:00
}