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

3055 lines
119 KiB
JSON

{
"contractName": "Executor",
"abi": [
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "newContract",
"type": "address"
}
],
"name": "ContractCreation",
"type": "event"
}
],
"bytecode": "0x6080604052348015600f57600080fd5b50603280601d6000396000f30060806040520000a165627a7a723058204f5ad88ba445e0f0319a85784ddeaeef53872efa9db1711743380c1ef494d78f0029",
"deployedBytecode": "0x60806040520000a165627a7a723058204f5ad88ba445e0f0319a85784ddeaeef53872efa9db1711743380c1ef494d78f0029",
"sourceMap": "214:1540:3:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;214:1540:3;;;;;;;",
"deployedSourceMap": "214:1540:3:-;;;",
"source": "pragma solidity 0.4.24;\nimport \"../common/Enum.sol\";\nimport \"../common/EtherPaymentFallback.sol\";\n\n\n/// @title Executor - A contract that can execute transactions\n/// @author Richard Meissner - <richard@gnosis.pm>\ncontract Executor is EtherPaymentFallback {\n\n event ContractCreation(address newContract);\n\n function execute(address to, uint256 value, bytes data, Enum.Operation operation, uint256 txGas)\n internal\n returns (bool success)\n {\n if (operation == Enum.Operation.Call)\n success = executeCall(to, value, data, txGas);\n else if (operation == Enum.Operation.DelegateCall)\n success = executeDelegateCall(to, data, txGas);\n else {\n address newContract = executeCreate(data);\n success = newContract != 0;\n emit ContractCreation(newContract);\n }\n }\n\n function executeCall(address to, uint256 value, bytes data, uint256 txGas)\n internal\n returns (bool success)\n {\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function executeDelegateCall(address to, bytes data, uint256 txGas)\n internal\n returns (bool success)\n {\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function executeCreate(bytes data)\n internal\n returns (address newContract)\n {\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n newContract := create(0, add(data, 0x20), mload(data))\n }\n }\n}\n",
"sourcePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/base/Executor.sol",
"ast": {
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/base/Executor.sol",
"exportedSymbols": {
"Executor": [
892
]
},
"id": 893,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 784,
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:23:3"
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/common/Enum.sol",
"file": "../common/Enum.sol",
"id": 785,
"nodeType": "ImportDirective",
"scope": 893,
"sourceUnit": 1660,
"src": "24:28:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/common/EtherPaymentFallback.sol",
"file": "../common/EtherPaymentFallback.sol",
"id": 786,
"nodeType": "ImportDirective",
"scope": 893,
"sourceUnit": 1667,
"src": "53:44:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 787,
"name": "EtherPaymentFallback",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1666,
"src": "235:20:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_EtherPaymentFallback_$1666",
"typeString": "contract EtherPaymentFallback"
}
},
"id": 788,
"nodeType": "InheritanceSpecifier",
"src": "235:20:3"
}
],
"contractDependencies": [
1666
],
"contractKind": "contract",
"documentation": "@title Executor - A contract that can execute transactions\n @author Richard Meissner - <richard@gnosis.pm>",
"fullyImplemented": true,
"id": 892,
"linearizedBaseContracts": [
892,
1666
],
"name": "Executor",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": null,
"id": 792,
"name": "ContractCreation",
"nodeType": "EventDefinition",
"parameters": {
"id": 791,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 790,
"indexed": false,
"name": "newContract",
"nodeType": "VariableDeclaration",
"scope": 792,
"src": "286:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 789,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "286:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "285:21:3"
},
"src": "263:44:3"
},
{
"body": {
"id": 853,
"nodeType": "Block",
"src": "462:399:3",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
},
"id": 811,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 807,
"name": "operation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 800,
"src": "476:9:3",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 808,
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1659,
"src": "489:4:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$1659_$",
"typeString": "type(contract Enum)"
}
},
"id": 809,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 1658,
"src": "489:14:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$1658_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 810,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "489:19:3",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
}
},
"src": "476:32:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
},
"id": 825,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 821,
"name": "operation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 800,
"src": "586:9:3",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 822,
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1659,
"src": "599:4:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$1659_$",
"typeString": "type(contract Enum)"
}
},
"id": 823,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 1658,
"src": "599:14:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$1658_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 824,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "DelegateCall",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "599:27:3",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
}
},
"src": "586:40:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 850,
"nodeType": "Block",
"src": "701:154:3",
"statements": [
{
"assignments": [
835
],
"declarations": [
{
"constant": false,
"id": 835,
"name": "newContract",
"nodeType": "VariableDeclaration",
"scope": 854,
"src": "715:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 834,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "715:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 839,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 837,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 798,
"src": "751:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 836,
"name": "executeCreate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 891,
"src": "737:13:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$_t_address_$",
"typeString": "function (bytes memory) returns (address)"
}
},
"id": 838,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "737:19:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "715:41:3"
},
{
"expression": {
"argumentTypes": null,
"id": 844,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 840,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "770:7:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 843,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 841,
"name": "newContract",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 835,
"src": "780:11:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 842,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "795:1:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "780:16:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "770:26:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 845,
"nodeType": "ExpressionStatement",
"src": "770:26:3"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 847,
"name": "newContract",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 835,
"src": "832:11:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 846,
"name": "ContractCreation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 792,
"src": "815:16:3",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 848,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "815:29:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 849,
"nodeType": "EmitStatement",
"src": "810:34:3"
}
]
},
"id": 851,
"nodeType": "IfStatement",
"src": "582:273:3",
"trueBody": {
"expression": {
"argumentTypes": null,
"id": 832,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 826,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "640:7:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 828,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 794,
"src": "670:2:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 829,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 798,
"src": "674:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"id": 830,
"name": "txGas",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 802,
"src": "680:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 827,
"name": "executeDelegateCall",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 882,
"src": "650:19:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,bytes memory,uint256) returns (bool)"
}
},
"id": 831,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "650:36:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "640:46:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 833,
"nodeType": "ExpressionStatement",
"src": "640:46:3"
}
},
"id": 852,
"nodeType": "IfStatement",
"src": "472:383:3",
"trueBody": {
"expression": {
"argumentTypes": null,
"id": 819,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 812,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "522:7:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 814,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 794,
"src": "544:2:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 815,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 796,
"src": "548:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 816,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 798,
"src": "555:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"id": 817,
"name": "txGas",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 802,
"src": "561:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 813,
"name": "executeCall",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 869,
"src": "532:11:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,uint256,bytes memory,uint256) returns (bool)"
}
},
"id": 818,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "532:35:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "522:45:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 820,
"nodeType": "ExpressionStatement",
"src": "522:45:3"
}
}
]
},
"documentation": null,
"id": 854,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "execute",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 803,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 794,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 854,
"src": "330:10:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 793,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "330:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 796,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 854,
"src": "342:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 795,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "342:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 798,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 854,
"src": "357:10:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 797,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "357:5:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 800,
"name": "operation",
"nodeType": "VariableDeclaration",
"scope": 854,
"src": "369:24:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
},
"typeName": {
"contractScope": null,
"id": 799,
"name": "Enum.Operation",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1658,
"src": "369:14:3",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 802,
"name": "txGas",
"nodeType": "VariableDeclaration",
"scope": 854,
"src": "395:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 801,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "395:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "329:80:3"
},
"payable": false,
"returnParameters": {
"id": 806,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 805,
"name": "success",
"nodeType": "VariableDeclaration",
"scope": 854,
"src": "444:12:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 804,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "444:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "443:14:3"
},
"scope": 892,
"src": "313:548:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 868,
"nodeType": "Block",
"src": "994:182:3",
"statements": [
{
"externalReferences": [
{
"data": {
"declaration": 860,
"isOffset": false,
"isSlot": false,
"src": "1148:4:3",
"valueSize": 1
}
},
{
"data": {
"declaration": 860,
"isOffset": false,
"isSlot": false,
"src": "1129:4:3",
"valueSize": 1
}
},
{
"success": {
"declaration": 865,
"isOffset": false,
"isSlot": false,
"src": "1091:7:3",
"valueSize": 1
}
},
{
"txGas": {
"declaration": 862,
"isOffset": false,
"isSlot": false,
"src": "1107:5:3",
"valueSize": 1
}
},
{
"to": {
"declaration": 856,
"isOffset": false,
"isSlot": false,
"src": "1114:2:3",
"valueSize": 1
}
},
{
"value": {
"declaration": 858,
"isOffset": false,
"isSlot": false,
"src": "1118:5:3",
"valueSize": 1
}
}
],
"id": 867,
"nodeType": "InlineAssembly",
"operations": "{\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n}",
"src": "1068:108:3"
}
]
},
"documentation": null,
"id": 869,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "executeCall",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 863,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 856,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 869,
"src": "888:10:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 855,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "888:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 858,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 869,
"src": "900:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 857,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "900:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 860,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 869,
"src": "915:10:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 859,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "915:5:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 862,
"name": "txGas",
"nodeType": "VariableDeclaration",
"scope": 869,
"src": "927:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 861,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "927:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "887:54:3"
},
"payable": false,
"returnParameters": {
"id": 866,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 865,
"name": "success",
"nodeType": "VariableDeclaration",
"scope": 869,
"src": "976:12:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 864,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "976:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "975:14:3"
},
"scope": 892,
"src": "867:309:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 881,
"nodeType": "Block",
"src": "1302:183:3",
"statements": [
{
"externalReferences": [
{
"data": {
"declaration": 873,
"isOffset": false,
"isSlot": false,
"src": "1457:4:3",
"valueSize": 1
}
},
{
"data": {
"declaration": 873,
"isOffset": false,
"isSlot": false,
"src": "1438:4:3",
"valueSize": 1
}
},
{
"success": {
"declaration": 878,
"isOffset": false,
"isSlot": false,
"src": "1399:7:3",
"valueSize": 1
}
},
{
"txGas": {
"declaration": 875,
"isOffset": false,
"isSlot": false,
"src": "1423:5:3",
"valueSize": 1
}
},
{
"to": {
"declaration": 871,
"isOffset": false,
"isSlot": false,
"src": "1430:2:3",
"valueSize": 1
}
}
],
"id": 880,
"nodeType": "InlineAssembly",
"operations": "{\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n}",
"src": "1376:109:3"
}
]
},
"documentation": null,
"id": 882,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "executeDelegateCall",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 876,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 871,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 882,
"src": "1211:10:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 870,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1211:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 873,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 882,
"src": "1223:10:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 872,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1223:5:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 875,
"name": "txGas",
"nodeType": "VariableDeclaration",
"scope": 882,
"src": "1235:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 874,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1235:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1210:39:3"
},
"payable": false,
"returnParameters": {
"id": 879,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 878,
"name": "success",
"nodeType": "VariableDeclaration",
"scope": 882,
"src": "1284:12:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 877,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1284:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1283:14:3"
},
"scope": 892,
"src": "1182:303:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 890,
"nodeType": "Block",
"src": "1585:167:3",
"statements": [
{
"externalReferences": [
{
"newContract": {
"declaration": 887,
"isOffset": false,
"isSlot": false,
"src": "1682:11:3",
"valueSize": 1
}
},
{
"data": {
"declaration": 884,
"isOffset": false,
"isSlot": false,
"src": "1711:4:3",
"valueSize": 1
}
},
{
"data": {
"declaration": 884,
"isOffset": false,
"isSlot": false,
"src": "1730:4:3",
"valueSize": 1
}
}
],
"id": 889,
"nodeType": "InlineAssembly",
"operations": "{\n newContract := create(0, add(data, 0x20), mload(data))\n}",
"src": "1659:93:3"
}
]
},
"documentation": null,
"id": 891,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "executeCreate",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 885,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 884,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 891,
"src": "1514:10:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 883,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1514:5:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1513:12:3"
},
"payable": false,
"returnParameters": {
"id": 888,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 887,
"name": "newContract",
"nodeType": "VariableDeclaration",
"scope": 891,
"src": "1560:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 886,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1560:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1559:21:3"
},
"scope": 892,
"src": "1491:261:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 893,
"src": "214:1540:3"
}
],
"src": "0:1755:3"
},
"legacyAST": {
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/base/Executor.sol",
"exportedSymbols": {
"Executor": [
892
]
},
"id": 893,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 784,
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:23:3"
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/common/Enum.sol",
"file": "../common/Enum.sol",
"id": 785,
"nodeType": "ImportDirective",
"scope": 893,
"sourceUnit": 1660,
"src": "24:28:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/common/EtherPaymentFallback.sol",
"file": "../common/EtherPaymentFallback.sol",
"id": 786,
"nodeType": "ImportDirective",
"scope": 893,
"sourceUnit": 1667,
"src": "53:44:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 787,
"name": "EtherPaymentFallback",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1666,
"src": "235:20:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_EtherPaymentFallback_$1666",
"typeString": "contract EtherPaymentFallback"
}
},
"id": 788,
"nodeType": "InheritanceSpecifier",
"src": "235:20:3"
}
],
"contractDependencies": [
1666
],
"contractKind": "contract",
"documentation": "@title Executor - A contract that can execute transactions\n @author Richard Meissner - <richard@gnosis.pm>",
"fullyImplemented": true,
"id": 892,
"linearizedBaseContracts": [
892,
1666
],
"name": "Executor",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": null,
"id": 792,
"name": "ContractCreation",
"nodeType": "EventDefinition",
"parameters": {
"id": 791,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 790,
"indexed": false,
"name": "newContract",
"nodeType": "VariableDeclaration",
"scope": 792,
"src": "286:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 789,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "286:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "285:21:3"
},
"src": "263:44:3"
},
{
"body": {
"id": 853,
"nodeType": "Block",
"src": "462:399:3",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
},
"id": 811,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 807,
"name": "operation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 800,
"src": "476:9:3",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 808,
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1659,
"src": "489:4:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$1659_$",
"typeString": "type(contract Enum)"
}
},
"id": 809,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 1658,
"src": "489:14:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$1658_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 810,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "489:19:3",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
}
},
"src": "476:32:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
},
"id": 825,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 821,
"name": "operation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 800,
"src": "586:9:3",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 822,
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1659,
"src": "599:4:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$1659_$",
"typeString": "type(contract Enum)"
}
},
"id": 823,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 1658,
"src": "599:14:3",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$1658_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 824,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "DelegateCall",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "599:27:3",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
}
},
"src": "586:40:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 850,
"nodeType": "Block",
"src": "701:154:3",
"statements": [
{
"assignments": [
835
],
"declarations": [
{
"constant": false,
"id": 835,
"name": "newContract",
"nodeType": "VariableDeclaration",
"scope": 854,
"src": "715:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 834,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "715:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 839,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 837,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 798,
"src": "751:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 836,
"name": "executeCreate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 891,
"src": "737:13:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$returns$_t_address_$",
"typeString": "function (bytes memory) returns (address)"
}
},
"id": 838,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "737:19:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "715:41:3"
},
{
"expression": {
"argumentTypes": null,
"id": 844,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 840,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "770:7:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 843,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 841,
"name": "newContract",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 835,
"src": "780:11:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 842,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "795:1:3",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "780:16:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "770:26:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 845,
"nodeType": "ExpressionStatement",
"src": "770:26:3"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 847,
"name": "newContract",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 835,
"src": "832:11:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 846,
"name": "ContractCreation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 792,
"src": "815:16:3",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 848,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "815:29:3",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 849,
"nodeType": "EmitStatement",
"src": "810:34:3"
}
]
},
"id": 851,
"nodeType": "IfStatement",
"src": "582:273:3",
"trueBody": {
"expression": {
"argumentTypes": null,
"id": 832,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 826,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "640:7:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 828,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 794,
"src": "670:2:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 829,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 798,
"src": "674:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"id": 830,
"name": "txGas",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 802,
"src": "680:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 827,
"name": "executeDelegateCall",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 882,
"src": "650:19:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,bytes memory,uint256) returns (bool)"
}
},
"id": 831,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "650:36:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "640:46:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 833,
"nodeType": "ExpressionStatement",
"src": "640:46:3"
}
},
"id": 852,
"nodeType": "IfStatement",
"src": "472:383:3",
"trueBody": {
"expression": {
"argumentTypes": null,
"id": 819,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 812,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 805,
"src": "522:7:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 814,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 794,
"src": "544:2:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 815,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 796,
"src": "548:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 816,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 798,
"src": "555:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"id": 817,
"name": "txGas",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 802,
"src": "561:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 813,
"name": "executeCall",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 869,
"src": "532:11:3",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,uint256,bytes memory,uint256) returns (bool)"
}
},
"id": 818,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "532:35:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "522:45:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 820,
"nodeType": "ExpressionStatement",
"src": "522:45:3"
}
}
]
},
"documentation": null,
"id": 854,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "execute",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 803,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 794,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 854,
"src": "330:10:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 793,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "330:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 796,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 854,
"src": "342:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 795,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "342:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 798,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 854,
"src": "357:10:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 797,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "357:5:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 800,
"name": "operation",
"nodeType": "VariableDeclaration",
"scope": 854,
"src": "369:24:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
},
"typeName": {
"contractScope": null,
"id": 799,
"name": "Enum.Operation",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1658,
"src": "369:14:3",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"typeString": "enum Enum.Operation"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 802,
"name": "txGas",
"nodeType": "VariableDeclaration",
"scope": 854,
"src": "395:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 801,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "395:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "329:80:3"
},
"payable": false,
"returnParameters": {
"id": 806,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 805,
"name": "success",
"nodeType": "VariableDeclaration",
"scope": 854,
"src": "444:12:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 804,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "444:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "443:14:3"
},
"scope": 892,
"src": "313:548:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 868,
"nodeType": "Block",
"src": "994:182:3",
"statements": [
{
"externalReferences": [
{
"data": {
"declaration": 860,
"isOffset": false,
"isSlot": false,
"src": "1148:4:3",
"valueSize": 1
}
},
{
"data": {
"declaration": 860,
"isOffset": false,
"isSlot": false,
"src": "1129:4:3",
"valueSize": 1
}
},
{
"success": {
"declaration": 865,
"isOffset": false,
"isSlot": false,
"src": "1091:7:3",
"valueSize": 1
}
},
{
"txGas": {
"declaration": 862,
"isOffset": false,
"isSlot": false,
"src": "1107:5:3",
"valueSize": 1
}
},
{
"to": {
"declaration": 856,
"isOffset": false,
"isSlot": false,
"src": "1114:2:3",
"valueSize": 1
}
},
{
"value": {
"declaration": 858,
"isOffset": false,
"isSlot": false,
"src": "1118:5:3",
"valueSize": 1
}
}
],
"id": 867,
"nodeType": "InlineAssembly",
"operations": "{\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n}",
"src": "1068:108:3"
}
]
},
"documentation": null,
"id": 869,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "executeCall",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 863,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 856,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 869,
"src": "888:10:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 855,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "888:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 858,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 869,
"src": "900:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 857,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "900:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 860,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 869,
"src": "915:10:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 859,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "915:5:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 862,
"name": "txGas",
"nodeType": "VariableDeclaration",
"scope": 869,
"src": "927:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 861,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "927:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "887:54:3"
},
"payable": false,
"returnParameters": {
"id": 866,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 865,
"name": "success",
"nodeType": "VariableDeclaration",
"scope": 869,
"src": "976:12:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 864,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "976:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "975:14:3"
},
"scope": 892,
"src": "867:309:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 881,
"nodeType": "Block",
"src": "1302:183:3",
"statements": [
{
"externalReferences": [
{
"data": {
"declaration": 873,
"isOffset": false,
"isSlot": false,
"src": "1457:4:3",
"valueSize": 1
}
},
{
"data": {
"declaration": 873,
"isOffset": false,
"isSlot": false,
"src": "1438:4:3",
"valueSize": 1
}
},
{
"success": {
"declaration": 878,
"isOffset": false,
"isSlot": false,
"src": "1399:7:3",
"valueSize": 1
}
},
{
"txGas": {
"declaration": 875,
"isOffset": false,
"isSlot": false,
"src": "1423:5:3",
"valueSize": 1
}
},
{
"to": {
"declaration": 871,
"isOffset": false,
"isSlot": false,
"src": "1430:2:3",
"valueSize": 1
}
}
],
"id": 880,
"nodeType": "InlineAssembly",
"operations": "{\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n}",
"src": "1376:109:3"
}
]
},
"documentation": null,
"id": 882,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "executeDelegateCall",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 876,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 871,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 882,
"src": "1211:10:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 870,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1211:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 873,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 882,
"src": "1223:10:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 872,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1223:5:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 875,
"name": "txGas",
"nodeType": "VariableDeclaration",
"scope": 882,
"src": "1235:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 874,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1235:7:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1210:39:3"
},
"payable": false,
"returnParameters": {
"id": 879,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 878,
"name": "success",
"nodeType": "VariableDeclaration",
"scope": 882,
"src": "1284:12:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 877,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1284:4:3",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1283:14:3"
},
"scope": 892,
"src": "1182:303:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 890,
"nodeType": "Block",
"src": "1585:167:3",
"statements": [
{
"externalReferences": [
{
"newContract": {
"declaration": 887,
"isOffset": false,
"isSlot": false,
"src": "1682:11:3",
"valueSize": 1
}
},
{
"data": {
"declaration": 884,
"isOffset": false,
"isSlot": false,
"src": "1711:4:3",
"valueSize": 1
}
},
{
"data": {
"declaration": 884,
"isOffset": false,
"isSlot": false,
"src": "1730:4:3",
"valueSize": 1
}
}
],
"id": 889,
"nodeType": "InlineAssembly",
"operations": "{\n newContract := create(0, add(data, 0x20), mload(data))\n}",
"src": "1659:93:3"
}
]
},
"documentation": null,
"id": 891,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "executeCreate",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 885,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 884,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 891,
"src": "1514:10:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 883,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1514:5:3",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1513:12:3"
},
"payable": false,
"returnParameters": {
"id": 888,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 887,
"name": "newContract",
"nodeType": "VariableDeclaration",
"scope": 891,
"src": "1560:19:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 886,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1560:7:3",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1559:21:3"
},
"scope": 892,
"src": "1491:261:3",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 893,
"src": "214:1540:3"
}
],
"src": "0:1755:3"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.0",
"updatedAt": "2018-10-05T14:25:58.887Z"
}