13 lines
405 B
Solidity
13 lines
405 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.0;
|
|
|
|
contract MultiSend {
|
|
function multiTransfer(address[] calldata to, uint256[] calldata amounts) external payable {
|
|
uint256 length = to.length;
|
|
require(length == amounts.length, "Arrays must have the same length");
|
|
|
|
for (uint256 i = 0; i < length; i++) {
|
|
payable(to[i]).transfer(amounts[i]);
|
|
}
|
|
}
|
|
} |