"source":"pragma solidity 0.4.24;\nimport \"./Proxy.sol\";\n\n\n/// @title Delegate Constructor Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract. It is possible to send along initialization data with the constructor.\n/// @author Stefan George - <stefan@gnosis.pm>\n/// @author Richard Meissner - <richard@gnosis.pm>\ncontract DelegateConstructorProxy is Proxy {\n\n /// @dev Constructor function sets address of master copy contract.\n /// @param _masterCopy Master copy address.\n /// @param initializer Data used for a delegate call to initialize the contract.\n constructor(address _masterCopy, bytes initializer) Proxy(_masterCopy)\n public\n {\n if (initializer.length > 0) {\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n let masterCopy := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\n let success := delegatecall(sub(gas, 10000), masterCopy, add(initializer, 0x20), mload(initializer), 0, 0)\n let ptr := mload(0x40)\n returndatacopy(ptr, 0, returndatasize)\n if eq(success, 0) { revert(ptr, returndatasize) }\n }\n }\n }\n}\n",
"documentation":"@title Delegate Constructor Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract. It is possible to send along initialization data with the constructor.\n @author Stefan George - <stefan@gnosis.pm>\n @author Richard Meissner - <richard@gnosis.pm>",
"fullyImplemented":true,
"id":23,
"linearizedBaseContracts":[
23,
1602
],
"name":"DelegateConstructorProxy",
"nodeType":"ContractDefinition",
"nodes":[
{
"body":{
"id":21,
"nodeType":"Block",
"src":"700:535:0",
"statements":[
{
"condition":{
"argumentTypes":null,
"commonType":{
"typeIdentifier":"t_uint256",
"typeString":"uint256"
},
"id":17,
"isConstant":false,
"isLValue":false,
"isPure":false,
"lValueRequested":false,
"leftExpression":{
"argumentTypes":null,
"expression":{
"argumentTypes":null,
"id":14,
"name":"initializer",
"nodeType":"Identifier",
"overloadedDeclarations":[],
"referencedDeclaration":8,
"src":"714:11:0",
"typeDescriptions":{
"typeIdentifier":"t_bytes_memory_ptr",
"typeString":"bytes memory"
}
},
"id":15,
"isConstant":false,
"isLValue":false,
"isPure":false,
"lValueRequested":false,
"memberName":"length",
"nodeType":"MemberAccess",
"referencedDeclaration":null,
"src":"714:18:0",
"typeDescriptions":{
"typeIdentifier":"t_uint256",
"typeString":"uint256"
}
},
"nodeType":"BinaryOperation",
"operator":">",
"rightExpression":{
"argumentTypes":null,
"hexValue":"30",
"id":16,
"isConstant":false,
"isLValue":false,
"isPure":true,
"kind":"number",
"lValueRequested":false,
"nodeType":"Literal",
"src":"735:1:0",
"subdenomination":null,
"typeDescriptions":{
"typeIdentifier":"t_rational_0_by_1",
"typeString":"int_const 0"
},
"value":"0"
},
"src":"714:22:0",
"typeDescriptions":{
"typeIdentifier":"t_bool",
"typeString":"bool"
}
},
"falseBody":null,
"id":20,
"nodeType":"IfStatement",
"src":"710:519:0",
"trueBody":{
"id":19,
"nodeType":"Block",
"src":"738:491:0",
"statements":[
{
"externalReferences":[
{
"initializer":{
"declaration":8,
"isOffset":false,
"isSlot":false,
"src":"1000:11:0",
"valueSize":1
}
},
{
"initializer":{
"declaration":8,
"isOffset":false,
"isSlot":false,
"src":"1026:11:0",
"valueSize":1
}
}
],
"id":18,
"nodeType":"InlineAssembly",
"operations":"{\n let masterCopy := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\n let success := delegatecall(sub(gas(), 10000), masterCopy, add(initializer, 0x20), mload(initializer), 0, 0)\n let ptr := mload(0x40)\n returndatacopy(ptr, 0, returndatasize())\n if eq(success, 0)\n {\n revert(ptr, returndatasize())\n }\n}",
"src":"820:409:0"
}
]
}
}
]
},
"documentation":"@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.\n @param initializer Data used for a delegate call to initialize the contract.",
"documentation":"@title Delegate Constructor Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract. It is possible to send along initialization data with the constructor.\n @author Stefan George - <stefan@gnosis.pm>\n @author Richard Meissner - <richard@gnosis.pm>",
"fullyImplemented":true,
"id":23,
"linearizedBaseContracts":[
23,
1602
],
"name":"DelegateConstructorProxy",
"nodeType":"ContractDefinition",
"nodes":[
{
"body":{
"id":21,
"nodeType":"Block",
"src":"700:535:0",
"statements":[
{
"condition":{
"argumentTypes":null,
"commonType":{
"typeIdentifier":"t_uint256",
"typeString":"uint256"
},
"id":17,
"isConstant":false,
"isLValue":false,
"isPure":false,
"lValueRequested":false,
"leftExpression":{
"argumentTypes":null,
"expression":{
"argumentTypes":null,
"id":14,
"name":"initializer",
"nodeType":"Identifier",
"overloadedDeclarations":[],
"referencedDeclaration":8,
"src":"714:11:0",
"typeDescriptions":{
"typeIdentifier":"t_bytes_memory_ptr",
"typeString":"bytes memory"
}
},
"id":15,
"isConstant":false,
"isLValue":false,
"isPure":false,
"lValueRequested":false,
"memberName":"length",
"nodeType":"MemberAccess",
"referencedDeclaration":null,
"src":"714:18:0",
"typeDescriptions":{
"typeIdentifier":"t_uint256",
"typeString":"uint256"
}
},
"nodeType":"BinaryOperation",
"operator":">",
"rightExpression":{
"argumentTypes":null,
"hexValue":"30",
"id":16,
"isConstant":false,
"isLValue":false,
"isPure":true,
"kind":"number",
"lValueRequested":false,
"nodeType":"Literal",
"src":"735:1:0",
"subdenomination":null,
"typeDescriptions":{
"typeIdentifier":"t_rational_0_by_1",
"typeString":"int_const 0"
},
"value":"0"
},
"src":"714:22:0",
"typeDescriptions":{
"typeIdentifier":"t_bool",
"typeString":"bool"
}
},
"falseBody":null,
"id":20,
"nodeType":"IfStatement",
"src":"710:519:0",
"trueBody":{
"id":19,
"nodeType":"Block",
"src":"738:491:0",
"statements":[
{
"externalReferences":[
{
"initializer":{
"declaration":8,
"isOffset":false,
"isSlot":false,
"src":"1000:11:0",
"valueSize":1
}
},
{
"initializer":{
"declaration":8,
"isOffset":false,
"isSlot":false,
"src":"1026:11:0",
"valueSize":1
}
}
],
"id":18,
"nodeType":"InlineAssembly",
"operations":"{\n let masterCopy := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\n let success := delegatecall(sub(gas(), 10000), masterCopy, add(initializer, 0x20), mload(initializer), 0, 0)\n let ptr := mload(0x40)\n returndatacopy(ptr, 0, returndatasize())\n if eq(success, 0)\n {\n revert(ptr, returndatasize())\n }\n}",
"src":"820:409:0"
}
]
}
}
]
},
"documentation":"@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.\n @param initializer Data used for a delegate call to initialize the contract.",