Created
May 29, 2026 09:42
-
-
Save ImanMousavi/596ae27372fbbc48d811d883a511d146 to your computer and use it in GitHub Desktop.
MultiSendETH.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.8.20; | |
| contract MultiSendETH { | |
| function multiSendEqual( | |
| address payable[] calldata _addresses, | |
| uint256 _amountEther | |
| ) external payable { | |
| require(_addresses.length > 0, "no addresses"); | |
| require( | |
| _amountEther * _addresses.length <= msg.value, | |
| "insufficient ETH" | |
| ); | |
| for (uint256 i; i < _addresses.length; i++) { | |
| _addresses[i].call{value: _amountEther}(""); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment