{ "contractName": "MultiSendStruct", "abi": [ { "constant": false, "inputs": [ { "components": [ { "name": "to", "type": "address" }, { "name": "value", "type": "uint256" }, { "name": "data", "type": "bytes" } ], "name": "transactions", "type": "tuple[]" } ], "name": "multiSend", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b506103c6806100206000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632f6fda4a14610046575b600080fd5b34801561005257600080fd5b5061006d60048036036100689190810190610291565b61006f565b005b60006100796100ed565b600091505b82518210156100d057828281518110151561009557fe5b9060200190602002015190506100b88160000151826020015183604001516100d5565b15156100c357600080fd5b818060010192505061007e565b505050565b600080600083516020850186885af190509392505050565b606060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001606081525090565b60006101318235610353565b905092915050565b600082601f830112151561014c57600080fd5b813561015f61015a826102ff565b6102d2565b9150818183526020840193506020810190508360005b838110156101a5578135860161018b8882610205565b845260208401935060208301925050600181019050610175565b5050505092915050565b600082601f83011215156101c257600080fd5b81356101d56101d082610327565b6102d2565b915080825260208301602083018583830111156101f157600080fd5b6101fc83828461037d565b50505092915050565b60006060828403121561021757600080fd5b61022160606102d2565b9050600061023184828501610125565b60008301525060206102458482850161027d565b602083015250604082013567ffffffffffffffff81111561026557600080fd5b610271848285016101af565b60408301525092915050565b60006102898235610373565b905092915050565b6000602082840312156102a357600080fd5b600082013567ffffffffffffffff8111156102bd57600080fd5b6102c984828501610139565b91505092915050565b6000604051905081810181811067ffffffffffffffff821117156102f557600080fd5b8060405250919050565b600067ffffffffffffffff82111561031657600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561033e57600080fd5b601f19601f8301169050602081019050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b828183376000838301525050505600a265627a7a7230582005384089695c7c77816220e122b3c45435a664207e3c979cd8b6653c05e379236c6578706572696d656e74616cf50037", "deployedBytecode": "0x608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632f6fda4a14610046575b600080fd5b34801561005257600080fd5b5061006d60048036036100689190810190610291565b61006f565b005b60006100796100ed565b600091505b82518210156100d057828281518110151561009557fe5b9060200190602002015190506100b88160000151826020015183604001516100d5565b15156100c357600080fd5b818060010192505061007e565b505050565b600080600083516020850186885af190509392505050565b606060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001606081525090565b60006101318235610353565b905092915050565b600082601f830112151561014c57600080fd5b813561015f61015a826102ff565b6102d2565b9150818183526020840193506020810190508360005b838110156101a5578135860161018b8882610205565b845260208401935060208301925050600181019050610175565b5050505092915050565b600082601f83011215156101c257600080fd5b81356101d56101d082610327565b6102d2565b915080825260208301602083018583830111156101f157600080fd5b6101fc83828461037d565b50505092915050565b60006060828403121561021757600080fd5b61022160606102d2565b9050600061023184828501610125565b60008301525060206102458482850161027d565b602083015250604082013567ffffffffffffffff81111561026557600080fd5b610271848285016101af565b60408301525092915050565b60006102898235610373565b905092915050565b6000602082840312156102a357600080fd5b600082013567ffffffffffffffff8111156102bd57600080fd5b6102c984828501610139565b91505092915050565b6000604051905081810181811067ffffffffffffffff821117156102f557600080fd5b8060405250919050565b600067ffffffffffffffff82111561031657600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561033e57600080fd5b601f19601f8301169050602081019050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b828183376000838301525050505600a265627a7a7230582005384089695c7c77816220e122b3c45435a664207e3c979cd8b6653c05e379236c6578706572696d656e74616cf50037", "sourceMap": "339:839:17:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;339:839:17;;;;;;;", "deployedSourceMap": "339:839:17:-;;;;;;;;;;;;;;;;;;;;;;;;587:291;;8:9:-1;5:2;;;30:1;27;20:12;5:2;587:291:17;;;;;;;;;;;;;;;;;;;;667:9;726:30;;:::i;:::-;679:1;667:13;;663:209;686:12;:19;682:1;:23;663:209;;;759:12;772:1;759:15;;;;;;;;;;;;;;;;;;726:48;;796:64;808:11;:14;;;824:11;:17;;;843:11;:16;;;796:11;:64::i;:::-;788:73;;;;;;;;707:3;;;;;;;663:209;;;587:291;;;:::o;884:292::-;978:12;1158:1;1155;1148:4;1142:11;1135:4;1129;1125:15;1118:5;1114:2;1109:3;1104:56;1093:67;;1079:91;;;;;:::o;339:839::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;5:118:-1:-;;72:46;110:6;97:20;72:46;;;63:55;;57:66;;;;;175:753;;317:3;310:4;302:6;298:17;294:27;287:35;284:2;;;335:1;332;325:12;284:2;372:6;359:20;394:105;409:89;491:6;409:89;;;394:105;;;385:114;;516:5;541:6;534:5;527:21;571:4;563:6;559:17;549:27;;593:4;588:3;584:14;577:21;;646:6;679:1;664:258;689:6;686:1;683:13;664:258;;;772:3;759:17;751:6;747:30;796:62;854:3;842:10;796:62;;;791:3;784:75;882:4;877:3;873:14;866:21;;910:4;905:3;901:14;894:21;;721:201;711:1;708;704:9;699:14;;664:258;;;668:14;277:651;;;;;;;;937:432;;1034:3;1027:4;1019:6;1015:17;1011:27;1004:35;1001:2;;;1052:1;1049;1042:12;1001:2;1089:6;1076:20;1111:60;1126:44;1163:6;1126:44;;;1111:60;;;1102:69;;1191:6;1184:5;1177:21;1227:4;1219:6;1215:17;1260:4;1253:5;1249:16;1295:3;1286:6;1281:3;1277:16;1274:25;1271:2;;;1312:1;1309;1302:12;1271:2;1322:41;1356:6;1351:3;1346;1322:41;;;994:375;;;;;;;;1418:700;;1532:4;1520:9;1515:3;1511:19;1507:30;1504:2;;;1550:1;1547;1540:12;1504:2;1568:20;1583:4;1568:20;;;1559:29;;1636:1;1667:49;1712:3;1703:6;1692:9;1688:22;1667:49;;;1661:3;1654:5;1650:15;1643:74;1598:130;1779:2;1812:49;1857:3;1848:6;1837:9;1833:22;1812:49;;;1805:4;1798:5;1794:16;1787:75;1738:135;1951:2;1940:9;1936:18;1923:32;1975:18;1967:6;1964:30;1961:2;;;2007:1;2004;1997:12;1961:2;2042:54;2092:3;2083:6;2072:9;2068:22;2042:54;;;2035:4;2028:5;2024:16;2017:80;1883:225;1498:620;;;;;2125:118;;2192:46;2230:6;2217:20;2192:46;;;2183:55;;2177:66;;;;;2250:427;;2404:2;2392:9;2383:7;2379:23;2375:32;2372:2;;;2420:1;2417;2410:12;2372:2;2483:1;2472:9;2468:17;2455:31;2506:18;2498:6;2495:30;2492:2;;;2538:1;2535;2528:12;2492:2;2558:103;2653:7;2644:6;2633:9;2629:22;2558:103;;;2548:113;;2434:233;2366:311;;;;;2684:256;;2746:2;2740:9;2730:19;;2784:4;2776:6;2772:17;2883:6;2871:10;2868:22;2847:18;2835:10;2832:34;2829:62;2826:2;;;2904:1;2901;2894:12;2826:2;2924:10;2920:2;2913:22;2724:216;;;;;2947:283;;3131:18;3123:6;3120:30;3117:2;;;3163:1;3160;3153:12;3117:2;3192:4;3184:6;3180:17;3172:25;;3220:4;3214;3210:15;3202:23;;3054:176;;;;3237:254;;3376:18;3368:6;3365:30;3362:2;;;3408:1;3405;3398:12;3362:2;3452:4;3448:9;3441:4;3433:6;3429:17;3425:33;3417:41;;3481:4;3475;3471:15;3463:23;;3299:192;;;;3498:128;;3578:42;3571:5;3567:54;3556:65;;3550:76;;;;3633:79;;3702:5;3691:16;;3685:27;;;;3720:145;3801:6;3796:3;3791;3778:30;3857:1;3848:6;3843:3;3839:16;3832:27;3771:94;;;", "source": "pragma solidity ^0.4.23;\npragma experimental ABIEncoderV2;\n\n\n/// @title Multi Send - Allows to batch multiple transactions into one.\n/// @author Nick Dodson - \n/// @author Gonçalo Sá - \n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract MultiSendStruct {\n\n struct Transaction {\n address to;\n uint256 value;\n bytes data;\n }\n\n /// @dev Sends multiple transactions and reverts all if one fails.\n /// @param transactions Encoded transactions.\n function multiSend(Transaction[] transactions)\n public\n {\n for(uint256 i = 0; i < transactions.length; i++) {\n Transaction memory transaction = transactions[i];\n require(executeCall(transaction.to, transaction.value, transaction.data));\n }\n }\n\n function executeCall(address to, uint256 value, bytes data)\n internal\n returns (bool success)\n {\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n success := call(gas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n}\n", "sourcePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/libraries/MultiSendStruct.sol", "ast": { "absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/libraries/MultiSendStruct.sol", "exportedSymbols": { "MultiSendStruct": [ 1675 ] }, "id": 1676, "nodeType": "SourceUnit", "nodes": [ { "id": 1616, "literals": [ "solidity", "^", "0.4", ".23" ], "nodeType": "PragmaDirective", "src": "0:24:17" }, { "id": 1617, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "25:33:17" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title Multi Send - Allows to batch multiple transactions into one.\n @author Nick Dodson - \n @author Gonçalo Sá - \n @author Stefan George - \n @author Richard Meissner - ", "fullyImplemented": true, "id": 1675, "linearizedBaseContracts": [ 1675 ], "name": "MultiSendStruct", "nodeType": "ContractDefinition", "nodes": [ { "canonicalName": "MultiSendStruct.Transaction", "id": 1624, "members": [ { "constant": false, "id": 1619, "name": "to", "nodeType": "VariableDeclaration", "scope": 1624, "src": "400:10:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1618, "name": "address", "nodeType": "ElementaryTypeName", "src": "400:7:17", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1621, "name": "value", "nodeType": "VariableDeclaration", "scope": 1624, "src": "420:13:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1620, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "420:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1623, "name": "data", "nodeType": "VariableDeclaration", "scope": 1624, "src": "443:10:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" }, "typeName": { "id": 1622, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "443:5:17", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "name": "Transaction", "nodeType": "StructDefinition", "scope": 1675, "src": "371:89:17", "visibility": "public" }, { "body": { "id": 1660, "nodeType": "Block", "src": "653:225:17", "statements": [ { "body": { "id": 1658, "nodeType": "Block", "src": "712:160:17", "statements": [ { "assignments": [ 1642 ], "declarations": [ { "constant": false, "id": 1642, "name": "transaction", "nodeType": "VariableDeclaration", "scope": 1661, "src": "726:30:17", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_Transaction_$1624_memory_ptr", "typeString": "struct MultiSendStruct.Transaction" }, "typeName": { "contractScope": null, "id": 1641, "name": "Transaction", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1624, "src": "726:11:17", "typeDescriptions": { "typeIdentifier": "t_struct$_Transaction_$1624_storage_ptr", "typeString": "struct MultiSendStruct.Transaction" } }, "value": null, "visibility": "internal" } ], "id": 1646, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 1643, "name": "transactions", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1627, "src": "759:12:17", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Transaction_$1624_memory_$dyn_memory_ptr", "typeString": "struct MultiSendStruct.Transaction memory[] memory" } }, "id": 1645, "indexExpression": { "argumentTypes": null, "id": 1644, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1631, "src": "772:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "759:15:17", "typeDescriptions": { "typeIdentifier": "t_struct$_Transaction_$1624_memory", "typeString": "struct MultiSendStruct.Transaction memory" } }, "nodeType": "VariableDeclarationStatement", "src": "726:48:17" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1649, "name": "transaction", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1642, "src": "808:11:17", "typeDescriptions": { "typeIdentifier": "t_struct$_Transaction_$1624_memory_ptr", "typeString": "struct MultiSendStruct.Transaction memory" } }, "id": 1650, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "to", "nodeType": "MemberAccess", "referencedDeclaration": 1619, "src": "808:14:17", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1651, "name": "transaction", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1642, "src": "824:11:17", "typeDescriptions": { "typeIdentifier": "t_struct$_Transaction_$1624_memory_ptr", "typeString": "struct MultiSendStruct.Transaction memory" } }, "id": 1652, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": 1621, "src": "824:17:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1653, "name": "transaction", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1642, "src": "843:11:17", "typeDescriptions": { "typeIdentifier": "t_struct$_Transaction_$1624_memory_ptr", "typeString": "struct MultiSendStruct.Transaction memory" } }, "id": 1654, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "data", "nodeType": "MemberAccess", "referencedDeclaration": 1623, "src": "843:16:17", "typeDescriptions": { "typeIdentifier": "t_bytes_memory", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_bytes_memory", "typeString": "bytes memory" } ], "id": 1648, "name": "executeCall", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1674, "src": "796:11:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", "typeString": "function (address,uint256,bytes memory) returns (bool)" } }, "id": 1655, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "796:64:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 1647, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 2468, 2469 ], "referencedDeclaration": 2468, "src": "788:7:17", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 1656, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "788:73:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1657, "nodeType": "ExpressionStatement", "src": "788:73:17" } ] }, "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1637, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 1634, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1631, "src": "682:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1635, "name": "transactions", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1627, "src": "686:12:17", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Transaction_$1624_memory_$dyn_memory_ptr", "typeString": "struct MultiSendStruct.Transaction memory[] memory" } }, "id": 1636, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "686:19:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "682:23:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 1659, "initializationExpression": { "assignments": [ 1631 ], "declarations": [ { "constant": false, "id": 1631, "name": "i", "nodeType": "VariableDeclaration", "scope": 1661, "src": "667:9:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1630, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "667:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 1633, "initialValue": { "argumentTypes": null, "hexValue": "30", "id": 1632, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "679:1:17", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "667:13:17" }, "loopExpression": { "expression": { "argumentTypes": null, "id": 1639, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "707:3:17", "subExpression": { "argumentTypes": null, "id": 1638, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1631, "src": "707:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 1640, "nodeType": "ExpressionStatement", "src": "707:3:17" }, "nodeType": "ForStatement", "src": "663:209:17" } ] }, "documentation": "@dev Sends multiple transactions and reverts all if one fails.\n @param transactions Encoded transactions.", "id": 1661, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "multiSend", "nodeType": "FunctionDefinition", "parameters": { "id": 1628, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1627, "name": "transactions", "nodeType": "VariableDeclaration", "scope": 1661, "src": "606:26:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Transaction_$1624_memory_$dyn_memory_ptr", "typeString": "struct MultiSendStruct.Transaction[]" }, "typeName": { "baseType": { "contractScope": null, "id": 1625, "name": "Transaction", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1624, "src": "606:11:17", "typeDescriptions": { "typeIdentifier": "t_struct$_Transaction_$1624_storage_ptr", "typeString": "struct MultiSendStruct.Transaction" } }, "id": 1626, "length": null, "nodeType": "ArrayTypeName", "src": "606:13:17", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Transaction_$1624_storage_$dyn_storage_ptr", "typeString": "struct MultiSendStruct.Transaction[]" } }, "value": null, "visibility": "internal" } ], "src": "605:28:17" }, "payable": false, "returnParameters": { "id": 1629, "nodeType": "ParameterList", "parameters": [], "src": "653:0:17" }, "scope": 1675, "src": "587:291:17", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 1673, "nodeType": "Block", "src": "996:180:17", "statements": [ { "externalReferences": [ { "data": { "declaration": 1667, "isOffset": false, "isSlot": false, "src": "1148:4:17", "valueSize": 1 } }, { "data": { "declaration": 1667, "isOffset": false, "isSlot": false, "src": "1129:4:17", "valueSize": 1 } }, { "success": { "declaration": 1670, "isOffset": false, "isSlot": false, "src": "1093:7:17", "valueSize": 1 } }, { "to": { "declaration": 1663, "isOffset": false, "isSlot": false, "src": "1114:2:17", "valueSize": 1 } }, { "value": { "declaration": 1665, "isOffset": false, "isSlot": false, "src": "1118:5:17", "valueSize": 1 } } ], "id": 1672, "nodeType": "InlineAssembly", "operations": "{\n success := call(gas(), to, value, add(data, 0x20), mload(data), 0, 0)\n}", "src": "1070:106:17" } ] }, "documentation": null, "id": 1674, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "executeCall", "nodeType": "FunctionDefinition", "parameters": { "id": 1668, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1663, "name": "to", "nodeType": "VariableDeclaration", "scope": 1674, "src": "905:10:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1662, "name": "address", "nodeType": "ElementaryTypeName", "src": "905:7:17", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1665, "name": "value", "nodeType": "VariableDeclaration", "scope": 1674, "src": "917:13:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1664, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "917:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1667, "name": "data", "nodeType": "VariableDeclaration", "scope": 1674, "src": "932:10:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 1666, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "932:5:17", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "904:39:17" }, "payable": false, "returnParameters": { "id": 1671, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1670, "name": "success", "nodeType": "VariableDeclaration", "scope": 1674, "src": "978:12:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 1669, "name": "bool", "nodeType": "ElementaryTypeName", "src": "978:4:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "977:14:17" }, "scope": 1675, "src": "884:292:17", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], "scope": 1676, "src": "339:839:17" } ], "src": "0:1179:17" }, "legacyAST": { "absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/libraries/MultiSendStruct.sol", "exportedSymbols": { "MultiSendStruct": [ 1675 ] }, "id": 1676, "nodeType": "SourceUnit", "nodes": [ { "id": 1616, "literals": [ "solidity", "^", "0.4", ".23" ], "nodeType": "PragmaDirective", "src": "0:24:17" }, { "id": 1617, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "25:33:17" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title Multi Send - Allows to batch multiple transactions into one.\n @author Nick Dodson - \n @author Gonçalo Sá - \n @author Stefan George - \n @author Richard Meissner - ", "fullyImplemented": true, "id": 1675, "linearizedBaseContracts": [ 1675 ], "name": "MultiSendStruct", "nodeType": "ContractDefinition", "nodes": [ { "canonicalName": "MultiSendStruct.Transaction", "id": 1624, "members": [ { "constant": false, "id": 1619, "name": "to", "nodeType": "VariableDeclaration", "scope": 1624, "src": "400:10:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1618, "name": "address", "nodeType": "ElementaryTypeName", "src": "400:7:17", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1621, "name": "value", "nodeType": "VariableDeclaration", "scope": 1624, "src": "420:13:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1620, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "420:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1623, "name": "data", "nodeType": "VariableDeclaration", "scope": 1624, "src": "443:10:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" }, "typeName": { "id": 1622, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "443:5:17", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "name": "Transaction", "nodeType": "StructDefinition", "scope": 1675, "src": "371:89:17", "visibility": "public" }, { "body": { "id": 1660, "nodeType": "Block", "src": "653:225:17", "statements": [ { "body": { "id": 1658, "nodeType": "Block", "src": "712:160:17", "statements": [ { "assignments": [ 1642 ], "declarations": [ { "constant": false, "id": 1642, "name": "transaction", "nodeType": "VariableDeclaration", "scope": 1661, "src": "726:30:17", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_Transaction_$1624_memory_ptr", "typeString": "struct MultiSendStruct.Transaction" }, "typeName": { "contractScope": null, "id": 1641, "name": "Transaction", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1624, "src": "726:11:17", "typeDescriptions": { "typeIdentifier": "t_struct$_Transaction_$1624_storage_ptr", "typeString": "struct MultiSendStruct.Transaction" } }, "value": null, "visibility": "internal" } ], "id": 1646, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 1643, "name": "transactions", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1627, "src": "759:12:17", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Transaction_$1624_memory_$dyn_memory_ptr", "typeString": "struct MultiSendStruct.Transaction memory[] memory" } }, "id": 1645, "indexExpression": { "argumentTypes": null, "id": 1644, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1631, "src": "772:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "759:15:17", "typeDescriptions": { "typeIdentifier": "t_struct$_Transaction_$1624_memory", "typeString": "struct MultiSendStruct.Transaction memory" } }, "nodeType": "VariableDeclarationStatement", "src": "726:48:17" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1649, "name": "transaction", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1642, "src": "808:11:17", "typeDescriptions": { "typeIdentifier": "t_struct$_Transaction_$1624_memory_ptr", "typeString": "struct MultiSendStruct.Transaction memory" } }, "id": 1650, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "to", "nodeType": "MemberAccess", "referencedDeclaration": 1619, "src": "808:14:17", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1651, "name": "transaction", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1642, "src": "824:11:17", "typeDescriptions": { "typeIdentifier": "t_struct$_Transaction_$1624_memory_ptr", "typeString": "struct MultiSendStruct.Transaction memory" } }, "id": 1652, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": 1621, "src": "824:17:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1653, "name": "transaction", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1642, "src": "843:11:17", "typeDescriptions": { "typeIdentifier": "t_struct$_Transaction_$1624_memory_ptr", "typeString": "struct MultiSendStruct.Transaction memory" } }, "id": 1654, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "data", "nodeType": "MemberAccess", "referencedDeclaration": 1623, "src": "843:16:17", "typeDescriptions": { "typeIdentifier": "t_bytes_memory", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_bytes_memory", "typeString": "bytes memory" } ], "id": 1648, "name": "executeCall", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1674, "src": "796:11:17", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", "typeString": "function (address,uint256,bytes memory) returns (bool)" } }, "id": 1655, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "796:64:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 1647, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 2468, 2469 ], "referencedDeclaration": 2468, "src": "788:7:17", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 1656, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "788:73:17", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1657, "nodeType": "ExpressionStatement", "src": "788:73:17" } ] }, "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1637, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 1634, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1631, "src": "682:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1635, "name": "transactions", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1627, "src": "686:12:17", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Transaction_$1624_memory_$dyn_memory_ptr", "typeString": "struct MultiSendStruct.Transaction memory[] memory" } }, "id": 1636, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "686:19:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "682:23:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 1659, "initializationExpression": { "assignments": [ 1631 ], "declarations": [ { "constant": false, "id": 1631, "name": "i", "nodeType": "VariableDeclaration", "scope": 1661, "src": "667:9:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1630, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "667:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 1633, "initialValue": { "argumentTypes": null, "hexValue": "30", "id": 1632, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "679:1:17", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "667:13:17" }, "loopExpression": { "expression": { "argumentTypes": null, "id": 1639, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "707:3:17", "subExpression": { "argumentTypes": null, "id": 1638, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1631, "src": "707:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 1640, "nodeType": "ExpressionStatement", "src": "707:3:17" }, "nodeType": "ForStatement", "src": "663:209:17" } ] }, "documentation": "@dev Sends multiple transactions and reverts all if one fails.\n @param transactions Encoded transactions.", "id": 1661, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "multiSend", "nodeType": "FunctionDefinition", "parameters": { "id": 1628, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1627, "name": "transactions", "nodeType": "VariableDeclaration", "scope": 1661, "src": "606:26:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Transaction_$1624_memory_$dyn_memory_ptr", "typeString": "struct MultiSendStruct.Transaction[]" }, "typeName": { "baseType": { "contractScope": null, "id": 1625, "name": "Transaction", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1624, "src": "606:11:17", "typeDescriptions": { "typeIdentifier": "t_struct$_Transaction_$1624_storage_ptr", "typeString": "struct MultiSendStruct.Transaction" } }, "id": 1626, "length": null, "nodeType": "ArrayTypeName", "src": "606:13:17", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Transaction_$1624_storage_$dyn_storage_ptr", "typeString": "struct MultiSendStruct.Transaction[]" } }, "value": null, "visibility": "internal" } ], "src": "605:28:17" }, "payable": false, "returnParameters": { "id": 1629, "nodeType": "ParameterList", "parameters": [], "src": "653:0:17" }, "scope": 1675, "src": "587:291:17", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 1673, "nodeType": "Block", "src": "996:180:17", "statements": [ { "externalReferences": [ { "data": { "declaration": 1667, "isOffset": false, "isSlot": false, "src": "1148:4:17", "valueSize": 1 } }, { "data": { "declaration": 1667, "isOffset": false, "isSlot": false, "src": "1129:4:17", "valueSize": 1 } }, { "success": { "declaration": 1670, "isOffset": false, "isSlot": false, "src": "1093:7:17", "valueSize": 1 } }, { "to": { "declaration": 1663, "isOffset": false, "isSlot": false, "src": "1114:2:17", "valueSize": 1 } }, { "value": { "declaration": 1665, "isOffset": false, "isSlot": false, "src": "1118:5:17", "valueSize": 1 } } ], "id": 1672, "nodeType": "InlineAssembly", "operations": "{\n success := call(gas(), to, value, add(data, 0x20), mload(data), 0, 0)\n}", "src": "1070:106:17" } ] }, "documentation": null, "id": 1674, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "executeCall", "nodeType": "FunctionDefinition", "parameters": { "id": 1668, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1663, "name": "to", "nodeType": "VariableDeclaration", "scope": 1674, "src": "905:10:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1662, "name": "address", "nodeType": "ElementaryTypeName", "src": "905:7:17", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1665, "name": "value", "nodeType": "VariableDeclaration", "scope": 1674, "src": "917:13:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1664, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "917:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1667, "name": "data", "nodeType": "VariableDeclaration", "scope": 1674, "src": "932:10:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 1666, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "932:5:17", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "904:39:17" }, "payable": false, "returnParameters": { "id": 1671, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1670, "name": "success", "nodeType": "VariableDeclaration", "scope": 1674, "src": "978:12:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 1669, "name": "bool", "nodeType": "ElementaryTypeName", "src": "978:4:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "977:14:17" }, "scope": 1675, "src": "884:292:17", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], "scope": 1676, "src": "339:839:17" } ], "src": "0:1179:17" }, "compiler": { "name": "solc", "version": "0.4.23+commit.124ca40d.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.0", "updatedAt": "2018-05-10T10:43:07.902Z" }