+ "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"datas\",\"type\":\"bytes[]\"}],\"name\":\"batchSend\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"datas\",\"type\":\"bytes[]\"}],\"name\":\"batchSendUnchecked\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/utils/TransactionBatcher.sol\":\"TransactionBatcher\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/utils/TransactionBatcher.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// Adapted from https://github.com/daostack/web3-transaction-batcher/blob/1b88d2ea062f8f2d9fdfdf9bbe85d2bbef780151/contracts/Batcher.sol\\n\\ncontract TransactionBatcher {\\n\\n function batchSend(address[] memory targets, uint256[] memory values, bytes[] memory datas) public payable {\\n for (uint256 i = 0; i < targets.length; i++) {\\n (bool success,) = targets[i].call{value: values[i]}(datas[i]);\\n if (!success) revert('transaction failed'); // All the calls must succeed.\\n }\\n }\\n\\n function batchSendUnchecked(address[] memory targets, uint256[] memory values, bytes[] memory datas) public payable {\\n for (uint256 i = 0; i < targets.length; i++) {\\n targets[i].call{value: values[i]}(datas[i]); // Intentionally ignoring return value.\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1983237012c29ef487ca47d60b197eb30d5b072ffec3078685d43fcc5fcc10a0\",\"license\":\"MIT\"}},\"version\":1}",
0 commit comments