Skip to content
Verified contractExactMIT

BatchSend

Address0x57e91e62b160a0e4e64bf3172e38c54d4d6e607b
Balance

0 ETH

 

Transactions

12

 

Compiler

solc 0.8.24

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.24+commit.e11b9ed9
Language
solidity
Optimization
No
EVM version
paris
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
20,298,248
Creation transaction
0xe800825486…075e69fcc0

contracts/BatchSend.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract BatchSend {
    function batchSend(
        address[] calldata list,
        uint[] calldata amounts
    ) external payable {
        //
        require(
            list.length == amounts.length,
            "List and amounts must have the same length"
        );
        uint totalAmount = 0;

        // 
        for (uint i = 0; i < amounts.length; i++) {
            totalAmount += amounts[i];
        }

        require(msg.value == totalAmount, "Insufficient ETH sent");

        // 
        for (uint i = 0; i < list.length; i++) {
            payable(list[i]).transfer(amounts[i]);
        }
    }
}
Compiler settingsShow
{
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "evmVersion": "paris",
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.