2018-05-04 14:04:04 +00:00
{
2018-05-10 11:12:13 +00:00
"contractName" : "CreateAndAddModule" ,
2018-05-04 14:04:04 +00:00
"abi" : [
{
"constant" : false ,
"inputs" : [
{
2018-05-10 11:12:13 +00:00
"name" : "module" ,
2018-05-04 14:04:04 +00:00
"type" : "address"
}
] ,
2018-05-10 11:12:13 +00:00
"name" : "addModule" ,
2018-05-04 14:04:04 +00:00
"outputs" : [ ] ,
"payable" : false ,
"stateMutability" : "nonpayable" ,
"type" : "function"
} ,
{
"constant" : false ,
"inputs" : [
{
"name" : "proxyFactory" ,
"type" : "address"
} ,
{
"name" : "data" ,
"type" : "bytes"
}
] ,
2018-05-10 11:12:13 +00:00
"name" : "createAndAddModule" ,
2018-05-04 14:04:04 +00:00
"outputs" : [ ] ,
"payable" : false ,
"stateMutability" : "nonpayable" ,
"type" : "function"
}
] ,
2018-05-10 11:12:13 +00:00
"bytecode" : "0x608060405234801561001057600080fd5b50610253806100206000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631ed86f1914610051578063250ad41214610094575b600080fd5b34801561005d57600080fd5b50610092600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061011d565b005b3480156100a057600080fd5b5061011b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610122565b005b600080fd5b600061012e83836101e8565b90503073ffffffffffffffffffffffffffffffffffffffff16631ed86f19826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156101cb57600080fd5b505af11580156101df573d6000803e3d6000fd5b50505050505050565b60006040516000602082855160208701885af4141561020657600080fd5b73ffffffffffffffffffffffffffffffffffffffff815116915050929150505600a165627a7a72305820a69aa3f8b7eccb408d63a4c5990d1f9082b38369bf3c801ed918bfa3abd34d320029" ,
"deployedBytecode" : "0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631ed86f1914610051578063250ad41214610094575b600080fd5b34801561005d57600080fd5b50610092600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061011d565b005b3480156100a057600080fd5b5061011b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610122565b005b600080fd5b600061012e83836101e8565b90503073ffffffffffffffffffffffffffffffffffffffff16631ed86f19826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156101cb57600080fd5b505af11580156101df573d6000803e3d6000fd5b50505050505050565b60006040516000602082855160208701885af4141561020657600080fd5b73ffffffffffffffffffffffffffffffffffffffff815116915050929150505600a165627a7a72305820a69aa3f8b7eccb408d63a4c5990d1f9082b38369bf3c801ed918bfa3abd34d320029" ,
"sourceMap" : "190:1054:15:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;190:1054:15;;;;;;;" ,
"deployedSourceMap" : "190:1054:15:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;349:78;;8:9:-1;5:2;;;30:1;27;20:12;5:2;349:78:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;611:178;;8:9:-1;5:2;;;30:1;27;20:12;5:2;611:178:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;349:78;412:8;;;611:178;702:13;718:32;731:12;745:4;718:12;:32::i;:::-;702:48;;760:4;:14;;;775:6;760:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;760:22:15;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;760:22:15;;;;611:178;;;:::o;795:447::-;885:13;1021:4;1015:11;1122:1;1115:4;1107:6;1100:4;1094:11;1087:4;1081;1077:15;1063:12;1058:3;1045:75;1042:82;1039:2;;;1137:1;1134;1127:12;1039:2;1183:42;1174:6;1168:13;1164:62;1154:72;;987:249;;;;;:::o" ,
"source" : "pragma solidity 0.4.23;\nimport \"../Module.sol\";\n\n\n/// @title Create and Add Module - Allows to create and add a new module in one transaction.\n/// @author Stefan George - <stefan@gnosis.pm>\ncontract CreateAndAddModule {\n\n /// @dev Function required to compile contract. Gnosis Safe function is called instead.\n /// @param module Not used.\n function addModule(Module module)\n public\n {\n revert();\n }\n\n /// @dev Allows to create and add a new module in one transaction.\n /// @param proxyFactory Module proxy factory contract.\n /// @param data Module constructor payload.\n function createAndAddModule(address proxyFactory, bytes data)\n public\n {\n Module module = createModule(proxyFactory, data);\n this.addModule(module);\n }\n\n function createModule(address proxyFactory, bytes data)\n internal\n returns (Module module)\n {\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n let output := mload(0x40)\n if eq(delegatecall(gas, proxyFactory, add(data, 0x20), mload(data), output, 0x20), 0) { revert(0, 0) }\n module := and(mload(output), 0xffffffffffffffffffffffffffffffffffffffff)\n }\n }\n}\n" ,
"sourcePath" : "/Users/apanizo/git/gnosis/safe-contracts/contracts/libraries/CreateAndAddModule.sol" ,
2018-05-04 14:04:04 +00:00
"ast" : {
2018-05-10 11:12:13 +00:00
"absolutePath" : "/Users/apanizo/git/gnosis/safe-contracts/contracts/libraries/CreateAndAddModule.sol" ,
2018-05-04 14:04:04 +00:00
"exportedSymbols" : {
2018-05-10 11:12:13 +00:00
"CreateAndAddModule" : [
1604
2018-05-04 14:04:04 +00:00
]
} ,
2018-05-10 11:12:13 +00:00
"id" : 1605 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "SourceUnit" ,
"nodes" : [
{
2018-05-10 11:12:13 +00:00
"id" : 1561 ,
2018-05-04 14:04:04 +00:00
"literals" : [
"solidity" ,
"0.4" ,
2018-05-10 11:12:13 +00:00
".23"
2018-05-04 14:04:04 +00:00
] ,
"nodeType" : "PragmaDirective" ,
2018-05-10 11:12:13 +00:00
"src" : "0:23:15"
2018-05-04 14:04:04 +00:00
} ,
{
2018-05-10 11:12:13 +00:00
"absolutePath" : "/Users/apanizo/git/gnosis/safe-contracts/contracts/Module.sol" ,
"file" : "../Module.sol" ,
"id" : 1562 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ImportDirective" ,
2018-05-10 11:12:13 +00:00
"scope" : 1605 ,
"sourceUnit" : 878 ,
"src" : "24:23:15" ,
2018-05-04 14:04:04 +00:00
"symbolAliases" : [ ] ,
"unitAlias" : ""
} ,
{
"baseContracts" : [ ] ,
"contractDependencies" : [ ] ,
"contractKind" : "contract" ,
2018-05-10 11:12:13 +00:00
"documentation" : "@title Create and Add Module - Allows to create and add a new module in one transaction.\n @author Stefan George - <stefan@gnosis.pm>" ,
2018-05-04 14:04:04 +00:00
"fullyImplemented" : true ,
2018-05-10 11:12:13 +00:00
"id" : 1604 ,
2018-05-04 14:04:04 +00:00
"linearizedBaseContracts" : [
2018-05-10 11:12:13 +00:00
1604
2018-05-04 14:04:04 +00:00
] ,
2018-05-10 11:12:13 +00:00
"name" : "CreateAndAddModule" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ContractDefinition" ,
"nodes" : [
{
"body" : {
2018-05-10 11:12:13 +00:00
"id" : 1570 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "Block" ,
2018-05-10 11:12:13 +00:00
"src" : "402:25:15" ,
2018-05-04 14:04:04 +00:00
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [ ] ,
"expression" : {
"argumentTypes" : [ ] ,
2018-05-10 11:12:13 +00:00
"id" : 1567 ,
2018-05-04 14:04:04 +00:00
"name" : "revert" ,
"nodeType" : "Identifier" ,
2018-05-10 11:12:13 +00:00
"overloadedDeclarations" : [
2470 ,
2471
] ,
"referencedDeclaration" : 2470 ,
"src" : "412:6:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_function_revert_pure$__$returns$__$" ,
"typeString" : "function () pure"
}
} ,
2018-05-10 11:12:13 +00:00
"id" : 1568 ,
2018-05-04 14:04:04 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
2018-05-10 11:12:13 +00:00
"src" : "412:8:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2018-05-10 11:12:13 +00:00
"id" : 1569 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ExpressionStatement" ,
2018-05-10 11:12:13 +00:00
"src" : "412:8:15"
2018-05-04 14:04:04 +00:00
}
]
} ,
2018-05-10 11:12:13 +00:00
"documentation" : "@dev Function required to compile contract. Gnosis Safe function is called instead.\n @param module Not used." ,
"id" : 1571 ,
2018-05-04 14:04:04 +00:00
"implemented" : true ,
"isConstructor" : false ,
"isDeclaredConst" : false ,
"modifiers" : [ ] ,
2018-05-10 11:12:13 +00:00
"name" : "addModule" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2018-05-10 11:12:13 +00:00
"id" : 1565 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2018-05-10 11:12:13 +00:00
"id" : 1564 ,
"name" : "module" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "VariableDeclaration" ,
2018-05-10 11:12:13 +00:00
"scope" : 1571 ,
"src" : "368:13:15" ,
2018-05-04 14:04:04 +00:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
} ,
"typeName" : {
"contractScope" : null ,
2018-05-10 11:12:13 +00:00
"id" : 1563 ,
"name" : "Module" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "UserDefinedTypeName" ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 877 ,
"src" : "368:6:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2018-05-10 11:12:13 +00:00
"src" : "367:15:15"
2018-05-04 14:04:04 +00:00
} ,
"payable" : false ,
"returnParameters" : {
2018-05-10 11:12:13 +00:00
"id" : 1566 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
2018-05-10 11:12:13 +00:00
"src" : "402:0:15"
2018-05-04 14:04:04 +00:00
} ,
2018-05-10 11:12:13 +00:00
"scope" : 1604 ,
"src" : "349:78:15" ,
2018-05-04 14:04:04 +00:00
"stateMutability" : "nonpayable" ,
"superFunction" : null ,
"visibility" : "public"
} ,
{
"body" : {
2018-05-10 11:12:13 +00:00
"id" : 1591 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "Block" ,
2018-05-10 11:12:13 +00:00
"src" : "692:97:15" ,
2018-05-04 14:04:04 +00:00
"statements" : [
{
"assignments" : [
2018-05-10 11:12:13 +00:00
1579
2018-05-04 14:04:04 +00:00
] ,
"declarations" : [
{
"constant" : false ,
2018-05-10 11:12:13 +00:00
"id" : 1579 ,
"name" : "module" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "VariableDeclaration" ,
2018-05-10 11:12:13 +00:00
"scope" : 1592 ,
"src" : "702:13:15" ,
2018-05-04 14:04:04 +00:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
} ,
"typeName" : {
"contractScope" : null ,
2018-05-10 11:12:13 +00:00
"id" : 1578 ,
"name" : "Module" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "UserDefinedTypeName" ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 877 ,
"src" : "702:6:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2018-05-10 11:12:13 +00:00
"id" : 1584 ,
2018-05-04 14:04:04 +00:00
"initialValue" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
2018-05-10 11:12:13 +00:00
"id" : 1581 ,
2018-05-04 14:04:04 +00:00
"name" : "proxyFactory" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 1573 ,
"src" : "731:12:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
{
"argumentTypes" : null ,
2018-05-10 11:12:13 +00:00
"id" : 1582 ,
2018-05-04 14:04:04 +00:00
"name" : "data" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 1575 ,
"src" : "745:4:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_bytes_memory_ptr" ,
"typeString" : "bytes memory"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
{
"typeIdentifier" : "t_bytes_memory_ptr" ,
"typeString" : "bytes memory"
}
] ,
2018-05-10 11:12:13 +00:00
"id" : 1580 ,
"name" : "createModule" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 1603 ,
"src" : "718:12:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_contract$_Module_$877_$" ,
"typeString" : "function (address,bytes memory) returns (contract Module)"
2018-05-04 14:04:04 +00:00
}
} ,
2018-05-10 11:12:13 +00:00
"id" : 1583 ,
2018-05-04 14:04:04 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
2018-05-10 11:12:13 +00:00
"src" : "718:32:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
}
} ,
"nodeType" : "VariableDeclarationStatement" ,
2018-05-10 11:12:13 +00:00
"src" : "702:48:15"
2018-05-04 14:04:04 +00:00
} ,
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
2018-05-10 11:12:13 +00:00
"id" : 1588 ,
"name" : "module" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 1579 ,
"src" : "775:6:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
}
}
] ,
"expression" : {
"argumentTypes" : [
{
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
}
] ,
"expression" : {
"argumentTypes" : null ,
2018-05-10 11:12:13 +00:00
"id" : 1585 ,
2018-05-04 14:04:04 +00:00
"name" : "this" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 2508 ,
"src" : "760:4:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_CreateAndAddModule_$1604" ,
"typeString" : "contract CreateAndAddModule"
2018-05-04 14:04:04 +00:00
}
} ,
2018-05-10 11:12:13 +00:00
"id" : 1587 ,
2018-05-04 14:04:04 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
2018-05-10 11:12:13 +00:00
"memberName" : "addModule" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "MemberAccess" ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 1571 ,
"src" : "760:14:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_function_external_nonpayable$_t_contract$_Module_$877_$returns$__$" ,
"typeString" : "function (contract Module) external"
2018-05-04 14:04:04 +00:00
}
} ,
2018-05-10 11:12:13 +00:00
"id" : 1589 ,
2018-05-04 14:04:04 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
2018-05-10 11:12:13 +00:00
"src" : "760:22:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2018-05-10 11:12:13 +00:00
"id" : 1590 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ExpressionStatement" ,
2018-05-10 11:12:13 +00:00
"src" : "760:22:15"
2018-05-04 14:04:04 +00:00
}
]
} ,
2018-05-10 11:12:13 +00:00
"documentation" : "@dev Allows to create and add a new module in one transaction.\n @param proxyFactory Module proxy factory contract.\n @param data Module constructor payload." ,
"id" : 1592 ,
2018-05-04 14:04:04 +00:00
"implemented" : true ,
"isConstructor" : false ,
"isDeclaredConst" : false ,
"modifiers" : [ ] ,
2018-05-10 11:12:13 +00:00
"name" : "createAndAddModule" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2018-05-10 11:12:13 +00:00
"id" : 1576 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2018-05-10 11:12:13 +00:00
"id" : 1573 ,
2018-05-04 14:04:04 +00:00
"name" : "proxyFactory" ,
"nodeType" : "VariableDeclaration" ,
2018-05-10 11:12:13 +00:00
"scope" : 1592 ,
"src" : "639:20:15" ,
2018-05-04 14:04:04 +00:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
2018-05-10 11:12:13 +00:00
"id" : 1572 ,
2018-05-04 14:04:04 +00:00
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
2018-05-10 11:12:13 +00:00
"src" : "639:7:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2018-05-10 11:12:13 +00:00
"id" : 1575 ,
2018-05-04 14:04:04 +00:00
"name" : "data" ,
"nodeType" : "VariableDeclaration" ,
2018-05-10 11:12:13 +00:00
"scope" : 1592 ,
"src" : "661:10:15" ,
2018-05-04 14:04:04 +00:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bytes_memory_ptr" ,
2018-05-10 11:12:13 +00:00
"typeString" : "bytes"
2018-05-04 14:04:04 +00:00
} ,
"typeName" : {
2018-05-10 11:12:13 +00:00
"id" : 1574 ,
2018-05-04 14:04:04 +00:00
"name" : "bytes" ,
"nodeType" : "ElementaryTypeName" ,
2018-05-10 11:12:13 +00:00
"src" : "661:5:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_bytes_storage_ptr" ,
2018-05-10 11:12:13 +00:00
"typeString" : "bytes"
2018-05-04 14:04:04 +00:00
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2018-05-10 11:12:13 +00:00
"src" : "638:34:15"
2018-05-04 14:04:04 +00:00
} ,
"payable" : false ,
"returnParameters" : {
2018-05-10 11:12:13 +00:00
"id" : 1577 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
2018-05-10 11:12:13 +00:00
"src" : "692:0:15"
2018-05-04 14:04:04 +00:00
} ,
2018-05-10 11:12:13 +00:00
"scope" : 1604 ,
"src" : "611:178:15" ,
2018-05-04 14:04:04 +00:00
"stateMutability" : "nonpayable" ,
"superFunction" : null ,
"visibility" : "public"
} ,
{
"body" : {
2018-05-10 11:12:13 +00:00
"id" : 1602 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "Block" ,
2018-05-10 11:12:13 +00:00
"src" : "904:338:15" ,
2018-05-04 14:04:04 +00:00
"statements" : [
{
"externalReferences" : [
{
2018-05-10 11:12:13 +00:00
"module" : {
"declaration" : 1599 ,
2018-05-04 14:04:04 +00:00
"isOffset" : false ,
"isSlot" : false ,
2018-05-10 11:12:13 +00:00
"src" : "1154:6:15" ,
2018-05-04 14:04:04 +00:00
"valueSize" : 1
}
} ,
{
"data" : {
2018-05-10 11:12:13 +00:00
"declaration" : 1596 ,
2018-05-04 14:04:04 +00:00
"isOffset" : false ,
"isSlot" : false ,
2018-05-10 11:12:13 +00:00
"src" : "1100:4:15" ,
2018-05-04 14:04:04 +00:00
"valueSize" : 1
}
} ,
{
2018-05-10 11:12:13 +00:00
"proxyFactory" : {
"declaration" : 1594 ,
2018-05-04 14:04:04 +00:00
"isOffset" : false ,
"isSlot" : false ,
2018-05-10 11:12:13 +00:00
"src" : "1063:12:15" ,
2018-05-04 14:04:04 +00:00
"valueSize" : 1
}
} ,
{
2018-05-10 11:12:13 +00:00
"data" : {
"declaration" : 1596 ,
2018-05-04 14:04:04 +00:00
"isOffset" : false ,
"isSlot" : false ,
2018-05-10 11:12:13 +00:00
"src" : "1081:4:15" ,
2018-05-04 14:04:04 +00:00
"valueSize" : 1
}
}
] ,
2018-05-10 11:12:13 +00:00
"id" : 1601 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "InlineAssembly" ,
2018-05-10 11:12:13 +00:00
"operations" : "{\n let output := mload(0x40)\n if eq(delegatecall(gas(), proxyFactory, add(data, 0x20), mload(data), output, 0x20), 0)\n {\n revert(0, 0)\n }\n module := and(mload(output), 0xffffffffffffffffffffffffffffffffffffffff)\n}" ,
"src" : "978:264:15"
2018-05-04 14:04:04 +00:00
}
]
} ,
2018-05-10 11:12:13 +00:00
"documentation" : null ,
"id" : 1603 ,
2018-05-04 14:04:04 +00:00
"implemented" : true ,
"isConstructor" : false ,
"isDeclaredConst" : false ,
"modifiers" : [ ] ,
2018-05-10 11:12:13 +00:00
"name" : "createModule" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2018-05-10 11:12:13 +00:00
"id" : 1597 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2018-05-10 11:12:13 +00:00
"id" : 1594 ,
2018-05-04 14:04:04 +00:00
"name" : "proxyFactory" ,
"nodeType" : "VariableDeclaration" ,
2018-05-10 11:12:13 +00:00
"scope" : 1603 ,
"src" : "817:20:15" ,
2018-05-04 14:04:04 +00:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
2018-05-10 11:12:13 +00:00
"id" : 1593 ,
2018-05-04 14:04:04 +00:00
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
2018-05-10 11:12:13 +00:00
"src" : "817:7:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2018-05-10 11:12:13 +00:00
"id" : 1596 ,
2018-05-04 14:04:04 +00:00
"name" : "data" ,
"nodeType" : "VariableDeclaration" ,
2018-05-10 11:12:13 +00:00
"scope" : 1603 ,
"src" : "839:10:15" ,
2018-05-04 14:04:04 +00:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bytes_memory_ptr" ,
2018-05-10 11:12:13 +00:00
"typeString" : "bytes"
2018-05-04 14:04:04 +00:00
} ,
"typeName" : {
2018-05-10 11:12:13 +00:00
"id" : 1595 ,
2018-05-04 14:04:04 +00:00
"name" : "bytes" ,
"nodeType" : "ElementaryTypeName" ,
2018-05-10 11:12:13 +00:00
"src" : "839:5:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_bytes_storage_ptr" ,
2018-05-10 11:12:13 +00:00
"typeString" : "bytes"
2018-05-04 14:04:04 +00:00
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2018-05-10 11:12:13 +00:00
"src" : "816:34:15"
2018-05-04 14:04:04 +00:00
} ,
"payable" : false ,
"returnParameters" : {
2018-05-10 11:12:13 +00:00
"id" : 1600 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2018-05-10 11:12:13 +00:00
"id" : 1599 ,
"name" : "module" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "VariableDeclaration" ,
2018-05-10 11:12:13 +00:00
"scope" : 1603 ,
"src" : "885:13:15" ,
2018-05-04 14:04:04 +00:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
} ,
"typeName" : {
"contractScope" : null ,
2018-05-10 11:12:13 +00:00
"id" : 1598 ,
"name" : "Module" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "UserDefinedTypeName" ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 877 ,
"src" : "885:6:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2018-05-10 11:12:13 +00:00
"src" : "884:15:15"
2018-05-04 14:04:04 +00:00
} ,
2018-05-10 11:12:13 +00:00
"scope" : 1604 ,
"src" : "795:447:15" ,
2018-05-04 14:04:04 +00:00
"stateMutability" : "nonpayable" ,
"superFunction" : null ,
"visibility" : "internal"
}
] ,
2018-05-10 11:12:13 +00:00
"scope" : 1605 ,
"src" : "190:1054:15"
2018-05-04 14:04:04 +00:00
}
] ,
2018-05-10 11:12:13 +00:00
"src" : "0:1245:15"
2018-05-04 14:04:04 +00:00
} ,
"legacyAST" : {
2018-05-10 11:12:13 +00:00
"absolutePath" : "/Users/apanizo/git/gnosis/safe-contracts/contracts/libraries/CreateAndAddModule.sol" ,
2018-05-04 14:04:04 +00:00
"exportedSymbols" : {
2018-05-10 11:12:13 +00:00
"CreateAndAddModule" : [
1604
2018-05-04 14:04:04 +00:00
]
} ,
2018-05-10 11:12:13 +00:00
"id" : 1605 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "SourceUnit" ,
"nodes" : [
{
2018-05-10 11:12:13 +00:00
"id" : 1561 ,
2018-05-04 14:04:04 +00:00
"literals" : [
"solidity" ,
"0.4" ,
2018-05-10 11:12:13 +00:00
".23"
2018-05-04 14:04:04 +00:00
] ,
"nodeType" : "PragmaDirective" ,
2018-05-10 11:12:13 +00:00
"src" : "0:23:15"
2018-05-04 14:04:04 +00:00
} ,
{
2018-05-10 11:12:13 +00:00
"absolutePath" : "/Users/apanizo/git/gnosis/safe-contracts/contracts/Module.sol" ,
"file" : "../Module.sol" ,
"id" : 1562 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ImportDirective" ,
2018-05-10 11:12:13 +00:00
"scope" : 1605 ,
"sourceUnit" : 878 ,
"src" : "24:23:15" ,
2018-05-04 14:04:04 +00:00
"symbolAliases" : [ ] ,
"unitAlias" : ""
} ,
{
"baseContracts" : [ ] ,
"contractDependencies" : [ ] ,
"contractKind" : "contract" ,
2018-05-10 11:12:13 +00:00
"documentation" : "@title Create and Add Module - Allows to create and add a new module in one transaction.\n @author Stefan George - <stefan@gnosis.pm>" ,
2018-05-04 14:04:04 +00:00
"fullyImplemented" : true ,
2018-05-10 11:12:13 +00:00
"id" : 1604 ,
2018-05-04 14:04:04 +00:00
"linearizedBaseContracts" : [
2018-05-10 11:12:13 +00:00
1604
2018-05-04 14:04:04 +00:00
] ,
2018-05-10 11:12:13 +00:00
"name" : "CreateAndAddModule" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ContractDefinition" ,
"nodes" : [
{
"body" : {
2018-05-10 11:12:13 +00:00
"id" : 1570 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "Block" ,
2018-05-10 11:12:13 +00:00
"src" : "402:25:15" ,
2018-05-04 14:04:04 +00:00
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [ ] ,
"expression" : {
"argumentTypes" : [ ] ,
2018-05-10 11:12:13 +00:00
"id" : 1567 ,
2018-05-04 14:04:04 +00:00
"name" : "revert" ,
"nodeType" : "Identifier" ,
2018-05-10 11:12:13 +00:00
"overloadedDeclarations" : [
2470 ,
2471
] ,
"referencedDeclaration" : 2470 ,
"src" : "412:6:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_function_revert_pure$__$returns$__$" ,
"typeString" : "function () pure"
}
} ,
2018-05-10 11:12:13 +00:00
"id" : 1568 ,
2018-05-04 14:04:04 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
2018-05-10 11:12:13 +00:00
"src" : "412:8:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2018-05-10 11:12:13 +00:00
"id" : 1569 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ExpressionStatement" ,
2018-05-10 11:12:13 +00:00
"src" : "412:8:15"
2018-05-04 14:04:04 +00:00
}
]
} ,
2018-05-10 11:12:13 +00:00
"documentation" : "@dev Function required to compile contract. Gnosis Safe function is called instead.\n @param module Not used." ,
"id" : 1571 ,
2018-05-04 14:04:04 +00:00
"implemented" : true ,
"isConstructor" : false ,
"isDeclaredConst" : false ,
"modifiers" : [ ] ,
2018-05-10 11:12:13 +00:00
"name" : "addModule" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2018-05-10 11:12:13 +00:00
"id" : 1565 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2018-05-10 11:12:13 +00:00
"id" : 1564 ,
"name" : "module" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "VariableDeclaration" ,
2018-05-10 11:12:13 +00:00
"scope" : 1571 ,
"src" : "368:13:15" ,
2018-05-04 14:04:04 +00:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
} ,
"typeName" : {
"contractScope" : null ,
2018-05-10 11:12:13 +00:00
"id" : 1563 ,
"name" : "Module" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "UserDefinedTypeName" ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 877 ,
"src" : "368:6:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2018-05-10 11:12:13 +00:00
"src" : "367:15:15"
2018-05-04 14:04:04 +00:00
} ,
"payable" : false ,
"returnParameters" : {
2018-05-10 11:12:13 +00:00
"id" : 1566 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
2018-05-10 11:12:13 +00:00
"src" : "402:0:15"
2018-05-04 14:04:04 +00:00
} ,
2018-05-10 11:12:13 +00:00
"scope" : 1604 ,
"src" : "349:78:15" ,
2018-05-04 14:04:04 +00:00
"stateMutability" : "nonpayable" ,
"superFunction" : null ,
"visibility" : "public"
} ,
{
"body" : {
2018-05-10 11:12:13 +00:00
"id" : 1591 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "Block" ,
2018-05-10 11:12:13 +00:00
"src" : "692:97:15" ,
2018-05-04 14:04:04 +00:00
"statements" : [
{
"assignments" : [
2018-05-10 11:12:13 +00:00
1579
2018-05-04 14:04:04 +00:00
] ,
"declarations" : [
{
"constant" : false ,
2018-05-10 11:12:13 +00:00
"id" : 1579 ,
"name" : "module" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "VariableDeclaration" ,
2018-05-10 11:12:13 +00:00
"scope" : 1592 ,
"src" : "702:13:15" ,
2018-05-04 14:04:04 +00:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
} ,
"typeName" : {
"contractScope" : null ,
2018-05-10 11:12:13 +00:00
"id" : 1578 ,
"name" : "Module" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "UserDefinedTypeName" ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 877 ,
"src" : "702:6:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2018-05-10 11:12:13 +00:00
"id" : 1584 ,
2018-05-04 14:04:04 +00:00
"initialValue" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
2018-05-10 11:12:13 +00:00
"id" : 1581 ,
2018-05-04 14:04:04 +00:00
"name" : "proxyFactory" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 1573 ,
"src" : "731:12:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
{
"argumentTypes" : null ,
2018-05-10 11:12:13 +00:00
"id" : 1582 ,
2018-05-04 14:04:04 +00:00
"name" : "data" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 1575 ,
"src" : "745:4:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_bytes_memory_ptr" ,
"typeString" : "bytes memory"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
{
"typeIdentifier" : "t_bytes_memory_ptr" ,
"typeString" : "bytes memory"
}
] ,
2018-05-10 11:12:13 +00:00
"id" : 1580 ,
"name" : "createModule" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 1603 ,
"src" : "718:12:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_contract$_Module_$877_$" ,
"typeString" : "function (address,bytes memory) returns (contract Module)"
2018-05-04 14:04:04 +00:00
}
} ,
2018-05-10 11:12:13 +00:00
"id" : 1583 ,
2018-05-04 14:04:04 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
2018-05-10 11:12:13 +00:00
"src" : "718:32:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
}
} ,
"nodeType" : "VariableDeclarationStatement" ,
2018-05-10 11:12:13 +00:00
"src" : "702:48:15"
2018-05-04 14:04:04 +00:00
} ,
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
2018-05-10 11:12:13 +00:00
"id" : 1588 ,
"name" : "module" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 1579 ,
"src" : "775:6:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
}
}
] ,
"expression" : {
"argumentTypes" : [
{
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
}
] ,
"expression" : {
"argumentTypes" : null ,
2018-05-10 11:12:13 +00:00
"id" : 1585 ,
2018-05-04 14:04:04 +00:00
"name" : "this" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 2508 ,
"src" : "760:4:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_CreateAndAddModule_$1604" ,
"typeString" : "contract CreateAndAddModule"
2018-05-04 14:04:04 +00:00
}
} ,
2018-05-10 11:12:13 +00:00
"id" : 1587 ,
2018-05-04 14:04:04 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
2018-05-10 11:12:13 +00:00
"memberName" : "addModule" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "MemberAccess" ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 1571 ,
"src" : "760:14:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_function_external_nonpayable$_t_contract$_Module_$877_$returns$__$" ,
"typeString" : "function (contract Module) external"
2018-05-04 14:04:04 +00:00
}
} ,
2018-05-10 11:12:13 +00:00
"id" : 1589 ,
2018-05-04 14:04:04 +00:00
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
2018-05-10 11:12:13 +00:00
"src" : "760:22:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
2018-05-10 11:12:13 +00:00
"id" : 1590 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ExpressionStatement" ,
2018-05-10 11:12:13 +00:00
"src" : "760:22:15"
2018-05-04 14:04:04 +00:00
}
]
} ,
2018-05-10 11:12:13 +00:00
"documentation" : "@dev Allows to create and add a new module in one transaction.\n @param proxyFactory Module proxy factory contract.\n @param data Module constructor payload." ,
"id" : 1592 ,
2018-05-04 14:04:04 +00:00
"implemented" : true ,
"isConstructor" : false ,
"isDeclaredConst" : false ,
"modifiers" : [ ] ,
2018-05-10 11:12:13 +00:00
"name" : "createAndAddModule" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2018-05-10 11:12:13 +00:00
"id" : 1576 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2018-05-10 11:12:13 +00:00
"id" : 1573 ,
2018-05-04 14:04:04 +00:00
"name" : "proxyFactory" ,
"nodeType" : "VariableDeclaration" ,
2018-05-10 11:12:13 +00:00
"scope" : 1592 ,
"src" : "639:20:15" ,
2018-05-04 14:04:04 +00:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
2018-05-10 11:12:13 +00:00
"id" : 1572 ,
2018-05-04 14:04:04 +00:00
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
2018-05-10 11:12:13 +00:00
"src" : "639:7:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2018-05-10 11:12:13 +00:00
"id" : 1575 ,
2018-05-04 14:04:04 +00:00
"name" : "data" ,
"nodeType" : "VariableDeclaration" ,
2018-05-10 11:12:13 +00:00
"scope" : 1592 ,
"src" : "661:10:15" ,
2018-05-04 14:04:04 +00:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bytes_memory_ptr" ,
2018-05-10 11:12:13 +00:00
"typeString" : "bytes"
2018-05-04 14:04:04 +00:00
} ,
"typeName" : {
2018-05-10 11:12:13 +00:00
"id" : 1574 ,
2018-05-04 14:04:04 +00:00
"name" : "bytes" ,
"nodeType" : "ElementaryTypeName" ,
2018-05-10 11:12:13 +00:00
"src" : "661:5:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_bytes_storage_ptr" ,
2018-05-10 11:12:13 +00:00
"typeString" : "bytes"
2018-05-04 14:04:04 +00:00
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2018-05-10 11:12:13 +00:00
"src" : "638:34:15"
2018-05-04 14:04:04 +00:00
} ,
"payable" : false ,
"returnParameters" : {
2018-05-10 11:12:13 +00:00
"id" : 1577 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
2018-05-10 11:12:13 +00:00
"src" : "692:0:15"
2018-05-04 14:04:04 +00:00
} ,
2018-05-10 11:12:13 +00:00
"scope" : 1604 ,
"src" : "611:178:15" ,
2018-05-04 14:04:04 +00:00
"stateMutability" : "nonpayable" ,
"superFunction" : null ,
"visibility" : "public"
} ,
{
"body" : {
2018-05-10 11:12:13 +00:00
"id" : 1602 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "Block" ,
2018-05-10 11:12:13 +00:00
"src" : "904:338:15" ,
2018-05-04 14:04:04 +00:00
"statements" : [
{
"externalReferences" : [
{
2018-05-10 11:12:13 +00:00
"module" : {
"declaration" : 1599 ,
2018-05-04 14:04:04 +00:00
"isOffset" : false ,
"isSlot" : false ,
2018-05-10 11:12:13 +00:00
"src" : "1154:6:15" ,
2018-05-04 14:04:04 +00:00
"valueSize" : 1
}
} ,
{
"data" : {
2018-05-10 11:12:13 +00:00
"declaration" : 1596 ,
2018-05-04 14:04:04 +00:00
"isOffset" : false ,
"isSlot" : false ,
2018-05-10 11:12:13 +00:00
"src" : "1100:4:15" ,
2018-05-04 14:04:04 +00:00
"valueSize" : 1
}
} ,
{
2018-05-10 11:12:13 +00:00
"proxyFactory" : {
"declaration" : 1594 ,
2018-05-04 14:04:04 +00:00
"isOffset" : false ,
"isSlot" : false ,
2018-05-10 11:12:13 +00:00
"src" : "1063:12:15" ,
2018-05-04 14:04:04 +00:00
"valueSize" : 1
}
} ,
{
2018-05-10 11:12:13 +00:00
"data" : {
"declaration" : 1596 ,
2018-05-04 14:04:04 +00:00
"isOffset" : false ,
"isSlot" : false ,
2018-05-10 11:12:13 +00:00
"src" : "1081:4:15" ,
2018-05-04 14:04:04 +00:00
"valueSize" : 1
}
}
] ,
2018-05-10 11:12:13 +00:00
"id" : 1601 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "InlineAssembly" ,
2018-05-10 11:12:13 +00:00
"operations" : "{\n let output := mload(0x40)\n if eq(delegatecall(gas(), proxyFactory, add(data, 0x20), mload(data), output, 0x20), 0)\n {\n revert(0, 0)\n }\n module := and(mload(output), 0xffffffffffffffffffffffffffffffffffffffff)\n}" ,
"src" : "978:264:15"
2018-05-04 14:04:04 +00:00
}
]
} ,
2018-05-10 11:12:13 +00:00
"documentation" : null ,
"id" : 1603 ,
2018-05-04 14:04:04 +00:00
"implemented" : true ,
"isConstructor" : false ,
"isDeclaredConst" : false ,
"modifiers" : [ ] ,
2018-05-10 11:12:13 +00:00
"name" : "createModule" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "FunctionDefinition" ,
"parameters" : {
2018-05-10 11:12:13 +00:00
"id" : 1597 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2018-05-10 11:12:13 +00:00
"id" : 1594 ,
2018-05-04 14:04:04 +00:00
"name" : "proxyFactory" ,
"nodeType" : "VariableDeclaration" ,
2018-05-10 11:12:13 +00:00
"scope" : 1603 ,
"src" : "817:20:15" ,
2018-05-04 14:04:04 +00:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
2018-05-10 11:12:13 +00:00
"id" : 1593 ,
2018-05-04 14:04:04 +00:00
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
2018-05-10 11:12:13 +00:00
"src" : "817:7:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
2018-05-10 11:12:13 +00:00
"id" : 1596 ,
2018-05-04 14:04:04 +00:00
"name" : "data" ,
"nodeType" : "VariableDeclaration" ,
2018-05-10 11:12:13 +00:00
"scope" : 1603 ,
"src" : "839:10:15" ,
2018-05-04 14:04:04 +00:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bytes_memory_ptr" ,
2018-05-10 11:12:13 +00:00
"typeString" : "bytes"
2018-05-04 14:04:04 +00:00
} ,
"typeName" : {
2018-05-10 11:12:13 +00:00
"id" : 1595 ,
2018-05-04 14:04:04 +00:00
"name" : "bytes" ,
"nodeType" : "ElementaryTypeName" ,
2018-05-10 11:12:13 +00:00
"src" : "839:5:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
"typeIdentifier" : "t_bytes_storage_ptr" ,
2018-05-10 11:12:13 +00:00
"typeString" : "bytes"
2018-05-04 14:04:04 +00:00
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2018-05-10 11:12:13 +00:00
"src" : "816:34:15"
2018-05-04 14:04:04 +00:00
} ,
"payable" : false ,
"returnParameters" : {
2018-05-10 11:12:13 +00:00
"id" : 1600 ,
2018-05-04 14:04:04 +00:00
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
2018-05-10 11:12:13 +00:00
"id" : 1599 ,
"name" : "module" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "VariableDeclaration" ,
2018-05-10 11:12:13 +00:00
"scope" : 1603 ,
"src" : "885:13:15" ,
2018-05-04 14:04:04 +00:00
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
} ,
"typeName" : {
"contractScope" : null ,
2018-05-10 11:12:13 +00:00
"id" : 1598 ,
"name" : "Module" ,
2018-05-04 14:04:04 +00:00
"nodeType" : "UserDefinedTypeName" ,
2018-05-10 11:12:13 +00:00
"referencedDeclaration" : 877 ,
"src" : "885:6:15" ,
2018-05-04 14:04:04 +00:00
"typeDescriptions" : {
2018-05-10 11:12:13 +00:00
"typeIdentifier" : "t_contract$_Module_$877" ,
"typeString" : "contract Module"
2018-05-04 14:04:04 +00:00
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
2018-05-10 11:12:13 +00:00
"src" : "884:15:15"
2018-05-04 14:04:04 +00:00
} ,
2018-05-10 11:12:13 +00:00
"scope" : 1604 ,
"src" : "795:447:15" ,
2018-05-04 14:04:04 +00:00
"stateMutability" : "nonpayable" ,
"superFunction" : null ,
"visibility" : "internal"
}
] ,
2018-05-10 11:12:13 +00:00
"scope" : 1605 ,
"src" : "190:1054:15"
2018-05-04 14:04:04 +00:00
}
] ,
2018-05-10 11:12:13 +00:00
"src" : "0:1245:15"
2018-05-04 14:04:04 +00:00
} ,
"compiler" : {
"name" : "solc" ,
2018-05-10 11:12:13 +00:00
"version" : "0.4.23+commit.124ca40d.Emscripten.clang"
2018-05-04 14:04:04 +00:00
} ,
"networks" : {
"4" : {
"events" : { } ,
"links" : { } ,
2018-05-10 11:12:13 +00:00
"address" : "0xabb64de6d5ca20609e2f331bf3c4818a1f6f94fd" ,
"transactionHash" : "0x61759c9f25325ca90bbd3d45b8a2c629e6ee721b995ec0ef614c3338516b530e"
2018-05-08 14:41:03 +00:00
} ,
2018-05-10 11:12:13 +00:00
"1525950336085" : {
2018-05-08 14:41:03 +00:00
"events" : { } ,
"links" : { } ,
2018-05-10 11:12:13 +00:00
"address" : "0x544c20ddcab0459a99c93823d0c02d50f75ced36" ,
"transactionHash" : "0x0e6adf453722b13530f4f8c8f947f6e5105156aa99a10b588447ed57e27d7b85"
2018-05-04 14:04:04 +00:00
}
} ,
"schemaVersion" : "2.0.0" ,
2018-05-10 11:12:13 +00:00
"updatedAt" : "2018-05-10T11:07:04.706Z"
2018-05-04 14:04:04 +00:00
}