safe-react/safe-contracts/build/contracts/CreateAndAddExtension.json

1209 lines
47 KiB
JSON

{
"contractName": "CreateAndAddExtension",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "extension",
"type": "address"
}
],
"name": "addExtension",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "proxyFactory",
"type": "address"
},
{
"name": "data",
"type": "bytes"
}
],
"name": "createAndAddExtension",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x6060604052341561000f57600080fd5b61023f8061001e6000396000f30060606040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063170ff3e11461005157806324aae6941461008a575b600080fd5b341561005c57600080fd5b610088600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610106565b005b341561009557600080fd5b610104600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061010b565b005b600080fd5b600061011783836101cc565b90503073ffffffffffffffffffffffffffffffffffffffff1663170ff3e1826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15156101b357600080fd5b6102c65a03f115156101c457600080fd5b505050505050565b600060405160208184516020860187600019f4600081146101ec576101f1565b600080fd5b5073ffffffffffffffffffffffffffffffffffffffff815116915050929150505600a165627a7a723058208120395f85344344c66227841e7bb657a31240594ca20234664dc785131ecbcd0029",
"deployedBytecode": "0x60606040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063170ff3e11461005157806324aae6941461008a575b600080fd5b341561005c57600080fd5b610088600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610106565b005b341561009557600080fd5b610104600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061010b565b005b600080fd5b600061011783836101cc565b90503073ffffffffffffffffffffffffffffffffffffffff1663170ff3e1826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15156101b357600080fd5b6102c65a03f115156101c457600080fd5b505050505050565b600060405160208184516020860187600019f4600081146101ec576101f1565b600080fd5b5073ffffffffffffffffffffffffffffffffffffffff815116915050929150505600a165627a7a723058208120395f85344344c66227841e7bb657a31240594ca20234664dc785131ecbcd0029",
"sourceMap": "199:1057:8:-;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "199:1057:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;364:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;638:196;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;364:87;436:8;;;638:196;732:19;754:35;770:12;784:4;754:15;:35::i;:::-;732:57;;799:4;:17;;;817:9;799:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;638:196;;;:::o;840:414::-;933:19;1011:4;1005:5;1109:4;1101:6;1094:4;1088:5;1081:4;1075;1071:3;1057:12;1053:1;1049:3;1036:12;1132:1;1127:23;;;;1029:121;;1127:23;1146:1;1143;1136:6;1029:121;;1195:42;1186:6;1180:5;1176:3;1163:75;;977:271;;;;;:::o",
"source": "pragma solidity 0.4.19;\nimport \"../Extension.sol\";\n\n\n/// @title Create and Add Extension - Allows to create and add a new extension in one transaction.\n/// @author Stefan George - <stefan@gnosis.pm>\ncontract CreateAndAddExtension {\n\n /// @dev Function required to compile contract. Gnosis Safe function is called instead.\n /// @param extension Not used.\n function addExtension(Extension extension)\n public\n {\n revert();\n }\n\n /// @dev Allows to create and add a new extension in one transaction.\n /// @param proxyFactory Extension factory contract.\n /// @param data Extension constructor payload.\n function createAndAddExtension(address proxyFactory, bytes data)\n public\n {\n Extension extension = createExtension(proxyFactory, data);\n this.addExtension(extension);\n }\n\n function createExtension(address proxyFactory, bytes data)\n internal\n returns (Extension extension)\n {\n assembly {\n let output := mload(0x40)\n switch delegatecall(not(0), proxyFactory, add(data, 0x20), mload(data), output, 0x20)\n case 0 { revert(0, 0) }\n extension := and(mload(output), 0xffffffffffffffffffffffffffffffffffffffff)\n }\n }\n}\n",
"sourcePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/libraries/CreateAndAddExtension.sol",
"ast": {
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/libraries/CreateAndAddExtension.sol",
"exportedSymbols": {
"CreateAndAddExtension": [
2006
]
},
"id": 2007,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1963,
"literals": [
"solidity",
"0.4",
".19"
],
"nodeType": "PragmaDirective",
"src": "0:23:8"
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Extension.sol",
"file": "../Extension.sol",
"id": 1964,
"nodeType": "ImportDirective",
"scope": 2007,
"sourceUnit": 19,
"src": "24:26:8",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title Create and Add Extension - Allows to create and add a new extension in one transaction.\n @author Stefan George - <stefan@gnosis.pm>",
"fullyImplemented": true,
"id": 2006,
"linearizedBaseContracts": [
2006
],
"name": "CreateAndAddExtension",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1972,
"nodeType": "Block",
"src": "426:25:8",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 1969,
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2093,
"src": "436:6:8",
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 1970,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "436:8:8",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1971,
"nodeType": "ExpressionStatement",
"src": "436:8:8"
}
]
},
"id": 1973,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "addExtension",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1967,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1966,
"name": "extension",
"nodeType": "VariableDeclaration",
"scope": 1973,
"src": "386:19:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
},
"typeName": {
"contractScope": null,
"id": 1965,
"name": "Extension",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 18,
"src": "386:9:8",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "385:21:8"
},
"payable": false,
"returnParameters": {
"id": 1968,
"nodeType": "ParameterList",
"parameters": [],
"src": "426:0:8"
},
"scope": 2006,
"src": "364:87:8",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1993,
"nodeType": "Block",
"src": "722:112:8",
"statements": [
{
"assignments": [
1981
],
"declarations": [
{
"constant": false,
"id": 1981,
"name": "extension",
"nodeType": "VariableDeclaration",
"scope": 1994,
"src": "732:19:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
},
"typeName": {
"contractScope": null,
"id": 1980,
"name": "Extension",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 18,
"src": "732:9:8",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1986,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1983,
"name": "proxyFactory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1975,
"src": "770:12:8",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1984,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1977,
"src": "784:4:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 1982,
"name": "createExtension",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2005,
"src": "754:15:8",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_contract$_Extension_$18_$",
"typeString": "function (address,bytes memory) returns (contract Extension)"
}
},
"id": 1985,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "754:35:8",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "732:57:8"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1990,
"name": "extension",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1981,
"src": "817:9:8",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
}
],
"expression": {
"argumentTypes": null,
"id": 1987,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2116,
"src": "799:4:8",
"typeDescriptions": {
"typeIdentifier": "t_contract$_CreateAndAddExtension_$2006",
"typeString": "contract CreateAndAddExtension"
}
},
"id": 1989,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "addExtension",
"nodeType": "MemberAccess",
"referencedDeclaration": 1973,
"src": "799:17:8",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_Extension_$18_$returns$__$",
"typeString": "function (contract Extension) external"
}
},
"id": 1991,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "799:28:8",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1992,
"nodeType": "ExpressionStatement",
"src": "799:28:8"
}
]
},
"id": 1994,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "createAndAddExtension",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1978,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1975,
"name": "proxyFactory",
"nodeType": "VariableDeclaration",
"scope": 1994,
"src": "669:20:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1974,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "669:7:8",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1977,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 1994,
"src": "691:10:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
"typeName": {
"id": 1976,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "691:5:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes storage pointer"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "668:34:8"
},
"payable": false,
"returnParameters": {
"id": 1979,
"nodeType": "ParameterList",
"parameters": [],
"src": "722:0:8"
},
"scope": 2006,
"src": "638:196:8",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2004,
"nodeType": "Block",
"src": "958:296:8",
"statements": [
{
"externalReferences": [
{
"extension": {
"declaration": 2001,
"isOffset": false,
"isSlot": false,
"src": "1163:9:8",
"valueSize": 1
}
},
{
"data": {
"declaration": 1998,
"isOffset": false,
"isSlot": false,
"src": "1075:4:8",
"valueSize": 1
}
},
{
"data": {
"declaration": 1998,
"isOffset": false,
"isSlot": false,
"src": "1094:4:8",
"valueSize": 1
}
},
{
"proxyFactory": {
"declaration": 1996,
"isOffset": false,
"isSlot": false,
"src": "1057:12:8",
"valueSize": 1
}
}
],
"id": 2003,
"nodeType": "InlineAssembly",
"operations": "{\n let output := mload(0x40)\n switch delegatecall(not(0), proxyFactory, add(data, 0x20), mload(data), output, 0x20)\n case 0 {\n revert(0, 0)\n }\n extension := and(mload(output), 0xffffffffffffffffffffffffffffffffffffffff)\n}",
"src": "968:286:8"
}
]
},
"id": 2005,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "createExtension",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1999,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1996,
"name": "proxyFactory",
"nodeType": "VariableDeclaration",
"scope": 2005,
"src": "865:20:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1995,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "865:7:8",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1998,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 2005,
"src": "887:10:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
"typeName": {
"id": 1997,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "887:5:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes storage pointer"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "864:34:8"
},
"payable": false,
"returnParameters": {
"id": 2002,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2001,
"name": "extension",
"nodeType": "VariableDeclaration",
"scope": 2005,
"src": "933:19:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
},
"typeName": {
"contractScope": null,
"id": 2000,
"name": "Extension",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 18,
"src": "933:9:8",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "932:21:8"
},
"scope": 2006,
"src": "840:414:8",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 2007,
"src": "199:1057:8"
}
],
"src": "0:1257:8"
},
"legacyAST": {
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/libraries/CreateAndAddExtension.sol",
"exportedSymbols": {
"CreateAndAddExtension": [
2006
]
},
"id": 2007,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1963,
"literals": [
"solidity",
"0.4",
".19"
],
"nodeType": "PragmaDirective",
"src": "0:23:8"
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Extension.sol",
"file": "../Extension.sol",
"id": 1964,
"nodeType": "ImportDirective",
"scope": 2007,
"sourceUnit": 19,
"src": "24:26:8",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title Create and Add Extension - Allows to create and add a new extension in one transaction.\n @author Stefan George - <stefan@gnosis.pm>",
"fullyImplemented": true,
"id": 2006,
"linearizedBaseContracts": [
2006
],
"name": "CreateAndAddExtension",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1972,
"nodeType": "Block",
"src": "426:25:8",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 1969,
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2093,
"src": "436:6:8",
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 1970,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "436:8:8",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1971,
"nodeType": "ExpressionStatement",
"src": "436:8:8"
}
]
},
"id": 1973,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "addExtension",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1967,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1966,
"name": "extension",
"nodeType": "VariableDeclaration",
"scope": 1973,
"src": "386:19:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
},
"typeName": {
"contractScope": null,
"id": 1965,
"name": "Extension",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 18,
"src": "386:9:8",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "385:21:8"
},
"payable": false,
"returnParameters": {
"id": 1968,
"nodeType": "ParameterList",
"parameters": [],
"src": "426:0:8"
},
"scope": 2006,
"src": "364:87:8",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1993,
"nodeType": "Block",
"src": "722:112:8",
"statements": [
{
"assignments": [
1981
],
"declarations": [
{
"constant": false,
"id": 1981,
"name": "extension",
"nodeType": "VariableDeclaration",
"scope": 1994,
"src": "732:19:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
},
"typeName": {
"contractScope": null,
"id": 1980,
"name": "Extension",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 18,
"src": "732:9:8",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1986,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1983,
"name": "proxyFactory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1975,
"src": "770:12:8",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1984,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1977,
"src": "784:4:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 1982,
"name": "createExtension",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2005,
"src": "754:15:8",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_contract$_Extension_$18_$",
"typeString": "function (address,bytes memory) returns (contract Extension)"
}
},
"id": 1985,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "754:35:8",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "732:57:8"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1990,
"name": "extension",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1981,
"src": "817:9:8",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
}
],
"expression": {
"argumentTypes": null,
"id": 1987,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2116,
"src": "799:4:8",
"typeDescriptions": {
"typeIdentifier": "t_contract$_CreateAndAddExtension_$2006",
"typeString": "contract CreateAndAddExtension"
}
},
"id": 1989,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "addExtension",
"nodeType": "MemberAccess",
"referencedDeclaration": 1973,
"src": "799:17:8",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_Extension_$18_$returns$__$",
"typeString": "function (contract Extension) external"
}
},
"id": 1991,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "799:28:8",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1992,
"nodeType": "ExpressionStatement",
"src": "799:28:8"
}
]
},
"id": 1994,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "createAndAddExtension",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1978,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1975,
"name": "proxyFactory",
"nodeType": "VariableDeclaration",
"scope": 1994,
"src": "669:20:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1974,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "669:7:8",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1977,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 1994,
"src": "691:10:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
"typeName": {
"id": 1976,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "691:5:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes storage pointer"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "668:34:8"
},
"payable": false,
"returnParameters": {
"id": 1979,
"nodeType": "ParameterList",
"parameters": [],
"src": "722:0:8"
},
"scope": 2006,
"src": "638:196:8",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2004,
"nodeType": "Block",
"src": "958:296:8",
"statements": [
{
"externalReferences": [
{
"extension": {
"declaration": 2001,
"isOffset": false,
"isSlot": false,
"src": "1163:9:8",
"valueSize": 1
}
},
{
"data": {
"declaration": 1998,
"isOffset": false,
"isSlot": false,
"src": "1075:4:8",
"valueSize": 1
}
},
{
"data": {
"declaration": 1998,
"isOffset": false,
"isSlot": false,
"src": "1094:4:8",
"valueSize": 1
}
},
{
"proxyFactory": {
"declaration": 1996,
"isOffset": false,
"isSlot": false,
"src": "1057:12:8",
"valueSize": 1
}
}
],
"id": 2003,
"nodeType": "InlineAssembly",
"operations": "{\n let output := mload(0x40)\n switch delegatecall(not(0), proxyFactory, add(data, 0x20), mload(data), output, 0x20)\n case 0 {\n revert(0, 0)\n }\n extension := and(mload(output), 0xffffffffffffffffffffffffffffffffffffffff)\n}",
"src": "968:286:8"
}
]
},
"id": 2005,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "createExtension",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1999,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1996,
"name": "proxyFactory",
"nodeType": "VariableDeclaration",
"scope": 2005,
"src": "865:20:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1995,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "865:7:8",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1998,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 2005,
"src": "887:10:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
"typeName": {
"id": 1997,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "887:5:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes storage pointer"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "864:34:8"
},
"payable": false,
"returnParameters": {
"id": 2002,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2001,
"name": "extension",
"nodeType": "VariableDeclaration",
"scope": 2005,
"src": "933:19:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
},
"typeName": {
"contractScope": null,
"id": 2000,
"name": "Extension",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 18,
"src": "933:9:8",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Extension_$18",
"typeString": "contract Extension"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "932:21:8"
},
"scope": 2006,
"src": "840:414:8",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 2007,
"src": "199:1057:8"
}
],
"src": "0:1257:8"
},
"compiler": {
"name": "solc",
"version": "0.4.19+commit.c4cbbb05.Emscripten.clang"
},
"networks": {
"4": {
"events": {},
"links": {},
"address": "0xb19cd8c86c13dcade8f680a67e49aaa48c0817a9",
"transactionHash": "0x11ae4fbe0e73a77a68f8229c126331e9fb4e6ff09ebee7e8b60890913a1ca440"
},
"42": {
"events": {},
"links": {},
"address": "0xce33c528bca2944d25eeadf7107a896018702a98",
"transactionHash": "0x99b20dea53ddbbb9757e414a9a36289c379203be870619b55af681ee86d3b953"
},
"1525342778744": {
"events": {},
"links": {},
"address": "0x69c1cca644134e10f5f82fc28b3d45e136786dfc",
"transactionHash": "0x2af139a9359ac4b51195eab08a5958d134195ea3793c8851e63b2657d6b1a1be"
}
},
"schemaVersion": "2.0.0",
"updatedAt": "2018-05-04T13:47:03.968Z"
}