"source":"pragma solidity 0.4.24;\n\n\n/// @title Multi Send - Allows to batch multiple transactions into one.\n/// @author Nick Dodson - <nick.dodson@consensys.net>\n/// @author Gonçalo Sá - <goncalo.sa@consensys.net>\n/// @author Stefan George - <stefan@gnosis.pm>\ncontract MultiSend {\n\n /// @dev Sends multiple transactions and reverts all if one fails.\n /// @param transactions Encoded transactions. Each transaction is encoded as\n /// a tuple(address,uint256,bytes). The bytes of all\n /// encoded transactions are concatenated to form the input.\n function multiSend(bytes transactions)\n public\n {\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n let length := mload(transactions)\n let i := 0x20\n for { } lt(i, length) { } {\n let to := mload(add(transactions, i))\n let value := mload(add(transactions, add(i, 0x20)))\n let dataLength := mload(add(transactions, add(i, 0x60)))\n let data := add(transactions, add(i, 0x80))\n switch call(gas, to, value, data, dataLength, 0, 0)\n case 0 { revert(0, 0) }\n i := add(i, add(0x80, mul(div(add(dataLength, 0x1f), 0x20), 0x20)))\n }\n }\n }\n}\n",
"documentation":"@title Multi Send - Allows to batch multiple transactions into one.\n @author Nick Dodson - <nick.dodson@consensys.net>\n @author Gonçalo Sá - <goncalo.sa@consensys.net>\n @author Stefan George - <stefan@gnosis.pm>",
"fullyImplemented":true,
"id":1775,
"linearizedBaseContracts":[
1775
],
"name":"MultiSend",
"nodeType":"ContractDefinition",
"nodes":[
{
"body":{
"id":1773,
"nodeType":"Block",
"src":"651:673:16",
"statements":[
{
"externalReferences":[
{
"transactions":{
"declaration":1769,
"isOffset":false,
"isSlot":false,
"src":"768:12:16",
"valueSize":1
}
},
{
"transactions":{
"declaration":1769,
"isOffset":false,
"isSlot":false,
"src":"884:12:16",
"valueSize":1
}
},
{
"transactions":{
"declaration":1769,
"isOffset":false,
"isSlot":false,
"src":"941:12:16",
"valueSize":1
}
},
{
"transactions":{
"declaration":1769,
"isOffset":false,
"isSlot":false,
"src":"1014:12:16",
"valueSize":1
}
},
{
"transactions":{
"declaration":1769,
"isOffset":false,
"isSlot":false,
"src":"1075:12:16",
"valueSize":1
}
}
],
"id":1772,
"nodeType":"InlineAssembly",
"operations":"{\n let length := mload(transactions)\n let i := 0x20\n for {\n }\n lt(i, length)\n {\n }\n {\n let to := mload(add(transactions, i))\n let value := mload(add(transactions, add(i, 0x20)))\n let dataLength := mload(add(transactions, add(i, 0x60)))\n let data := add(transactions, add(i, 0x80))\n switch call(gas(), to, value, data, dataLength, 0, 0)\n case 0 {\n revert(0, 0)\n }\n i := add(i, add(0x80, mul(div(add(dataLength, 0x1f), 0x20), 0x20)))\n }\n}",
"src":"725:599:16"
}
]
},
"documentation":"@dev Sends multiple transactions and reverts all if one fails.\n @param transactions Encoded transactions. Each transaction is encoded as\n a tuple(address,uint256,bytes). The bytes of all\n encoded transactions are concatenated to form the input.",
"documentation":"@title Multi Send - Allows to batch multiple transactions into one.\n @author Nick Dodson - <nick.dodson@consensys.net>\n @author Gonçalo Sá - <goncalo.sa@consensys.net>\n @author Stefan George - <stefan@gnosis.pm>",
"fullyImplemented":true,
"id":1775,
"linearizedBaseContracts":[
1775
],
"name":"MultiSend",
"nodeType":"ContractDefinition",
"nodes":[
{
"body":{
"id":1773,
"nodeType":"Block",
"src":"651:673:16",
"statements":[
{
"externalReferences":[
{
"transactions":{
"declaration":1769,
"isOffset":false,
"isSlot":false,
"src":"768:12:16",
"valueSize":1
}
},
{
"transactions":{
"declaration":1769,
"isOffset":false,
"isSlot":false,
"src":"884:12:16",
"valueSize":1
}
},
{
"transactions":{
"declaration":1769,
"isOffset":false,
"isSlot":false,
"src":"941:12:16",
"valueSize":1
}
},
{
"transactions":{
"declaration":1769,
"isOffset":false,
"isSlot":false,
"src":"1014:12:16",
"valueSize":1
}
},
{
"transactions":{
"declaration":1769,
"isOffset":false,
"isSlot":false,
"src":"1075:12:16",
"valueSize":1
}
}
],
"id":1772,
"nodeType":"InlineAssembly",
"operations":"{\n let length := mload(transactions)\n let i := 0x20\n for {\n }\n lt(i, length)\n {\n }\n {\n let to := mload(add(transactions, i))\n let value := mload(add(transactions, add(i, 0x20)))\n let dataLength := mload(add(transactions, add(i, 0x60)))\n let data := add(transactions, add(i, 0x80))\n switch call(gas(), to, value, data, dataLength, 0, 0)\n case 0 {\n revert(0, 0)\n }\n i := add(i, add(0x80, mul(div(add(dataLength, 0x1f), 0x20), 0x20)))\n }\n}",
"src":"725:599:16"
}
]
},
"documentation":"@dev Sends multiple transactions and reverts all if one fails.\n @param transactions Encoded transactions. Each transaction is encoded as\n a tuple(address,uint256,bytes). The bytes of all\n encoded transactions are concatenated to form the input.",