Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
1 wei
Eth Value
Less Than $0.01 (@ $2,418.67/ETH)More Info
Private Name Tags
ContractCreator
Latest 7 from a total of 7 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Recipient | 20093199 | 92 days ago | IN | 0 ETH | 0.0001969 | ||||
Set Recipient | 20093197 | 92 days ago | IN | 0 ETH | 0.00018482 | ||||
Set Splitter Typ... | 20090819 | 92 days ago | IN | 0 ETH | 0.00046196 | ||||
Add Recipient | 20090816 | 92 days ago | IN | 0 ETH | 0.00105274 | ||||
Add Recipient | 20090814 | 92 days ago | IN | 0 ETH | 0.00101242 | ||||
Add Recipient | 20090811 | 92 days ago | IN | 0 ETH | 0.00134236 | ||||
0x60806040 | 20090767 | 92 days ago | IN | 0 ETH | 0.01190813 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
20538526 | 29 days ago | 0.03228385 ETH | ||||
20538526 | 29 days ago | 0.04842578 ETH | ||||
20538526 | 29 days ago | 0.08070964 ETH | ||||
20538526 | 29 days ago | 0.16141928 ETH | ||||
20535994 | 30 days ago | 0.0336104 ETH | ||||
20535994 | 30 days ago | 0.0504156 ETH | ||||
20535994 | 30 days ago | 0.08402601 ETH | ||||
20535994 | 30 days ago | 0.16805202 ETH | ||||
20535122 | 30 days ago | 0.02291207 ETH | ||||
20535122 | 30 days ago | 0.03436811 ETH | ||||
20535122 | 30 days ago | 0.05728018 ETH | ||||
20535122 | 30 days ago | 0.11456037 ETH | ||||
20534143 | 30 days ago | 0.02790396 ETH | ||||
20534143 | 30 days ago | 0.04185595 ETH | ||||
20534143 | 30 days ago | 0.06975992 ETH | ||||
20534143 | 30 days ago | 0.13951984 ETH | ||||
20533976 | 30 days ago | 0.02140621 ETH | ||||
20533976 | 30 days ago | 0.03210932 ETH | ||||
20533976 | 30 days ago | 0.05351553 ETH | ||||
20533976 | 30 days ago | 0.10703106 ETH | ||||
20533897 | 30 days ago | 0.0264545 ETH | ||||
20533897 | 30 days ago | 0.03968176 ETH | ||||
20533897 | 30 days ago | 0.06613627 ETH | ||||
20533897 | 30 days ago | 0.13227254 ETH | ||||
20530818 | 30 days ago | 0.02138038 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Splitter
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; contract Splitter is Ownable { struct Recipient { address payable addr; uint8 share; } Recipient[] public recipients; uint public splitterType; constructor(address _owner) Ownable(_owner) { splitterType = 1; } function addRecipient(address payable _addr, uint8 _share) external onlyOwner { recipients.push(Recipient({addr: _addr, share: _share})); } function removeRecipient(uint index) external onlyOwner { require(index < recipients.length, "Index out of bounds"); recipients[index] = recipients[recipients.length - 1]; recipients.pop(); } function setRecipient(uint index, address payable _addr, uint8 _share) external onlyOwner { require(index < recipients.length, "Index out of bounds"); recipients[index].addr = _addr; recipients[index].share = _share; } function distribute() internal { uint totalReceived = address(this).balance; uint8 totalShares = 0; uint recipientsLength = recipients.length; for (uint i = 0; i < recipientsLength; ) { totalShares += recipients[i].share; unchecked { i++; } } for (uint i = 0; i < recipientsLength; ) { Recipient memory recipent = recipients[i]; uint amount = (totalReceived * recipent.share) / totalShares; (bool sent, ) = recipent.addr.call{value: amount}(""); require(sent, "Failed to send Ether"); unchecked { i++; } } } function claim() external { distribute(); } function setSplitterType(uint8 _splitterType) external onlyOwner { require(_splitterType <= 1, "Type incorrect"); splitterType = _splitterType; } function transferAll(address payable _to) external onlyOwner { (bool sent, ) = _to.call{value: address(this).balance}(""); require(sent, "Failed to send Ether"); } receive() external payable { if (splitterType == 0) { distribute(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address payable","name":"_addr","type":"address"},{"internalType":"uint8","name":"_share","type":"uint8"}],"name":"addRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"recipients","outputs":[{"internalType":"address payable","name":"addr","type":"address"},{"internalType":"uint8","name":"share","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"removeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address payable","name":"_addr","type":"address"},{"internalType":"uint8","name":"_share","type":"uint8"}],"name":"setRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_splitterType","type":"uint8"}],"name":"setSplitterType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"splitterType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"}],"name":"transferAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561000f575f80fd5b50604051610aa6380380610aa683398101604081905261002e916100c0565b806001600160a01b03811661005c57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b61006581610071565b505060016002556100ed565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f602082840312156100d0575f80fd5b81516001600160a01b03811681146100e6575f80fd5b9392505050565b6109ac806100fa5f395ff3fe60806040526004361061009d575f3560e01c80638da5cb5b116100625780638da5cb5b146101475780638e69e2551461016d578063a3a7e7f31461018c578063d1bc76a1146101ab578063dc410f3d146101eb578063f2fde38b1461020a575f80fd5b80634e71d92d146100b95780635674be35146100cd578063715018a6146100ec5780637db06bed146101005780638c7d5d191461011f575f80fd5b366100b5576002545f036100b3576100b3610229565b005b5f80fd5b3480156100c4575f80fd5b506100b3610395565b3480156100d8575f80fd5b506100b36100e7366004610812565b61039f565b3480156100f7575f80fd5b506100b3610422565b34801561010b575f80fd5b506100b361011a366004610845565b610433565b34801561012a575f80fd5b5061013460025481565b6040519081526020015b60405180910390f35b348015610152575f80fd5b505f546040516001600160a01b03909116815260200161013e565b348015610178575f80fd5b506100b3610187366004610865565b610488565b348015610197575f80fd5b506100b36101a636600461087c565b610591565b3480156101b6575f80fd5b506101ca6101c5366004610865565b610633565b604080516001600160a01b03909316835260ff90911660208301520161013e565b3480156101f6575f80fd5b506100b3610205366004610897565b610666565b348015610215575f80fd5b506100b361022436600461087c565b610731565b60015447905f90815b81811015610276576001818154811061024d5761024d6108d2565b5f9182526020909120015461026c90600160a01b900460ff16846108fa565b9250600101610232565b505f5b8181101561038f575f60018281548110610295576102956108d2565b5f9182526020808320604080518082019091529201546001600160a01b038116835260ff600160a01b9091048116918301829052919350908616906102da9088610919565b6102e49190610930565b90505f825f01516001600160a01b0316826040515f6040518083038185875af1925050503d805f8114610332576040519150601f19603f3d011682016040523d82523d5f602084013e610337565b606091505b50509050806103845760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b60448201526064015b60405180910390fd5b505050600101610279565b50505050565b61039d610229565b565b6103a761076e565b604080518082019091526001600160a01b03928316815260ff918216602082019081526001805480820182555f9190915291517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf690920180549151929094166001600160a81b031990911617600160a01b9190921602179055565b61042a61076e565b61039d5f61079a565b61043b61076e565b60018160ff1611156104805760405162461bcd60e51b815260206004820152600e60248201526d151e5c19481a5b98dbdc9c9958dd60921b604482015260640161037b565b60ff16600255565b61049061076e565b60015481106104d75760405162461bcd60e51b8152602060048201526013602482015272496e646578206f7574206f6620626f756e647360681b604482015260640161037b565b600180546104e690829061094f565b815481106104f6576104f66108d2565b905f5260205f200160018281548110610511576105116108d2565b5f91825260209091208254910180546001600160a01b039092166001600160a01b031983168117825592546001600160a81b0319909216909217600160a01b9182900460ff16909102179055600180548061056e5761056e610962565b5f8281526020902081015f1990810180546001600160a81b031916905501905550565b61059961076e565b5f816001600160a01b0316476040515f6040518083038185875af1925050503d805f81146105e2576040519150601f19603f3d011682016040523d82523d5f602084013e6105e7565b606091505b505090508061062f5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b604482015260640161037b565b5050565b60018181548110610642575f80fd5b5f918252602090912001546001600160a01b0381169150600160a01b900460ff1682565b61066e61076e565b60015483106106b55760405162461bcd60e51b8152602060048201526013602482015272496e646578206f7574206f6620626f756e647360681b604482015260640161037b565b81600184815481106106c9576106c96108d2565b905f5260205f20015f015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550806001848154811061070a5761070a6108d2565b905f5260205f20015f0160146101000a81548160ff021916908360ff160217905550505050565b61073961076e565b6001600160a01b03811661076257604051631e4fbdf760e01b81525f600482015260240161037b565b61076b8161079a565b50565b5f546001600160a01b0316331461039d5760405163118cdaa760e01b815233600482015260240161037b565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461076b575f80fd5b803560ff8116811461080d575f80fd5b919050565b5f8060408385031215610823575f80fd5b823561082e816107e9565b915061083c602084016107fd565b90509250929050565b5f60208284031215610855575f80fd5b61085e826107fd565b9392505050565b5f60208284031215610875575f80fd5b5035919050565b5f6020828403121561088c575f80fd5b813561085e816107e9565b5f805f606084860312156108a9575f80fd5b8335925060208401356108bb816107e9565b91506108c9604085016107fd565b90509250925092565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b60ff8181168382160190811115610913576109136108e6565b92915050565b8082028115828204841417610913576109136108e6565b5f8261094a57634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115610913576109136108e6565b634e487b7160e01b5f52603160045260245ffdfea2646970667358221220fe8e58e8873c5e91cb3b3c6a9462e8208ec1fe7ad33d54a4903f5617bf405c5d64736f6c63430008180033000000000000000000000000e9fcea030df8490100d49edbc82c6e99e75c54b0
Deployed Bytecode
0x60806040526004361061009d575f3560e01c80638da5cb5b116100625780638da5cb5b146101475780638e69e2551461016d578063a3a7e7f31461018c578063d1bc76a1146101ab578063dc410f3d146101eb578063f2fde38b1461020a575f80fd5b80634e71d92d146100b95780635674be35146100cd578063715018a6146100ec5780637db06bed146101005780638c7d5d191461011f575f80fd5b366100b5576002545f036100b3576100b3610229565b005b5f80fd5b3480156100c4575f80fd5b506100b3610395565b3480156100d8575f80fd5b506100b36100e7366004610812565b61039f565b3480156100f7575f80fd5b506100b3610422565b34801561010b575f80fd5b506100b361011a366004610845565b610433565b34801561012a575f80fd5b5061013460025481565b6040519081526020015b60405180910390f35b348015610152575f80fd5b505f546040516001600160a01b03909116815260200161013e565b348015610178575f80fd5b506100b3610187366004610865565b610488565b348015610197575f80fd5b506100b36101a636600461087c565b610591565b3480156101b6575f80fd5b506101ca6101c5366004610865565b610633565b604080516001600160a01b03909316835260ff90911660208301520161013e565b3480156101f6575f80fd5b506100b3610205366004610897565b610666565b348015610215575f80fd5b506100b361022436600461087c565b610731565b60015447905f90815b81811015610276576001818154811061024d5761024d6108d2565b5f9182526020909120015461026c90600160a01b900460ff16846108fa565b9250600101610232565b505f5b8181101561038f575f60018281548110610295576102956108d2565b5f9182526020808320604080518082019091529201546001600160a01b038116835260ff600160a01b9091048116918301829052919350908616906102da9088610919565b6102e49190610930565b90505f825f01516001600160a01b0316826040515f6040518083038185875af1925050503d805f8114610332576040519150601f19603f3d011682016040523d82523d5f602084013e610337565b606091505b50509050806103845760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b60448201526064015b60405180910390fd5b505050600101610279565b50505050565b61039d610229565b565b6103a761076e565b604080518082019091526001600160a01b03928316815260ff918216602082019081526001805480820182555f9190915291517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf690920180549151929094166001600160a81b031990911617600160a01b9190921602179055565b61042a61076e565b61039d5f61079a565b61043b61076e565b60018160ff1611156104805760405162461bcd60e51b815260206004820152600e60248201526d151e5c19481a5b98dbdc9c9958dd60921b604482015260640161037b565b60ff16600255565b61049061076e565b60015481106104d75760405162461bcd60e51b8152602060048201526013602482015272496e646578206f7574206f6620626f756e647360681b604482015260640161037b565b600180546104e690829061094f565b815481106104f6576104f66108d2565b905f5260205f200160018281548110610511576105116108d2565b5f91825260209091208254910180546001600160a01b039092166001600160a01b031983168117825592546001600160a81b0319909216909217600160a01b9182900460ff16909102179055600180548061056e5761056e610962565b5f8281526020902081015f1990810180546001600160a81b031916905501905550565b61059961076e565b5f816001600160a01b0316476040515f6040518083038185875af1925050503d805f81146105e2576040519150601f19603f3d011682016040523d82523d5f602084013e6105e7565b606091505b505090508061062f5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b604482015260640161037b565b5050565b60018181548110610642575f80fd5b5f918252602090912001546001600160a01b0381169150600160a01b900460ff1682565b61066e61076e565b60015483106106b55760405162461bcd60e51b8152602060048201526013602482015272496e646578206f7574206f6620626f756e647360681b604482015260640161037b565b81600184815481106106c9576106c96108d2565b905f5260205f20015f015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550806001848154811061070a5761070a6108d2565b905f5260205f20015f0160146101000a81548160ff021916908360ff160217905550505050565b61073961076e565b6001600160a01b03811661076257604051631e4fbdf760e01b81525f600482015260240161037b565b61076b8161079a565b50565b5f546001600160a01b0316331461039d5760405163118cdaa760e01b815233600482015260240161037b565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461076b575f80fd5b803560ff8116811461080d575f80fd5b919050565b5f8060408385031215610823575f80fd5b823561082e816107e9565b915061083c602084016107fd565b90509250929050565b5f60208284031215610855575f80fd5b61085e826107fd565b9392505050565b5f60208284031215610875575f80fd5b5035919050565b5f6020828403121561088c575f80fd5b813561085e816107e9565b5f805f606084860312156108a9575f80fd5b8335925060208401356108bb816107e9565b91506108c9604085016107fd565b90509250925092565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b60ff8181168382160190811115610913576109136108e6565b92915050565b8082028115828204841417610913576109136108e6565b5f8261094a57634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115610913576109136108e6565b634e487b7160e01b5f52603160045260245ffdfea2646970667358221220fe8e58e8873c5e91cb3b3c6a9462e8208ec1fe7ad33d54a4903f5617bf405c5d64736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e9fcea030df8490100d49edbc82c6e99e75c54b0
-----Decoded View---------------
Arg [0] : _owner (address): 0xE9FcEA030DF8490100D49edbC82C6E99E75c54b0
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000e9fcea030df8490100d49edbc82c6e99e75c54b0
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $2,419.29 | 0.000000000000000001 | <$0.000001 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.