Discover more of Etherscan's tools and services in one place.
Sponsored
Contract Source Code:
File 1 of 1 : BatchTxCaller.sol
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.7.3; pragma experimental ABIEncoderV2; /** * @title BatchTxCaller * @notice Utility that executes an array of provided transactions. */ contract BatchTxCaller { event TransactionFailed(address indexed destination, uint256 index, bytes data, bytes reason); /** * @notice Executes all transactions marked enabled. * If any transaction in the transaction list reverts, it returns false. */ function executeAll( address[] memory destinations, bytes[] memory data, uint256[] memory values ) external payable returns (bool) { bool exeuctionSuccess = true; for (uint256 i = 0; i < destinations.length; i++) { (bool result, bytes memory reason) = destinations[i].call{value: values[i]}(data[i]); if (!result) { emit TransactionFailed(destinations[i], i, data[i], reason); exeuctionSuccess = false; } } return exeuctionSuccess; } }
Please enter a contract address above to load the contract details and source code.
Please DO NOT store any passwords or private keys here. A private note (up to 100 characters) can be saved and is useful for transaction tracking.
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.