Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x7268BCF71aFE37818cB2dEb609F62dB164131090
Balance 0 ETH
Nonce 1
Code Size 2343 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

2343 bytes
0x6080604052600436106100345760003560e01c806351ba162c14610039578063c73a2d601461005b578063e63d38ed1461007b575b600080fd5b34801561004557600080fd5b50610059610054366004610737565b61008e565b005b34801561006757600080fd5b50610059610076366004610737565b610120565b6100596100893660046106b6565b61021b565b60005b825181101561011a57610108338483815181106100be57634e487b7160e01b600052603260045260246000fd5b60200260200101518484815181106100e657634e487b7160e01b600052603260045260246000fd5b6020026020010151876001600160a01b03166102fb909392919063ffffffff16565b8061011281610892565b915050610091565b50505050565b6000805b83518110156101745782818151811061014d57634e487b7160e01b600052603260045260246000fd5b602002602001015182610160919061084e565b91508061016c81610892565b915050610124565b5061018a6001600160a01b0385163330846102fb565b60005b8351811015610214576102028482815181106101b957634e487b7160e01b600052603260045260246000fd5b60200260200101518483815181106101e157634e487b7160e01b600052603260045260246000fd5b6020026020010151876001600160a01b03166103669092919063ffffffff16565b8061020c81610892565b91505061018d565b5050505050565b60005b82518110156102c15782818151811061024757634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166108fc83838151811061027b57634e487b7160e01b600052603260045260246000fd5b60200260200101519081150290604051600060405180830381858888f193505050501580156102ae573d6000803e3d6000fd5b50806102b981610892565b91505061021e565b504780156102f657604051339082156108fc029083906000818181858888f1935050505015801561011a573d6000803e3d6000fd5b505050565b6040516001600160a01b038085166024830152831660448201526064810182905261011a9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610396565b6040516001600160a01b0383166024820152604481018290526102f690849063a9059cbb60e01b9060640161032f565b60006103eb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661046d9092919063ffffffff16565b8051909150156102f657808060200190518101906104099190610717565b6102f65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b606061047c8484600085610486565b90505b9392505050565b6060824710156104e75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610464565b843b6105355760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610464565b600080866001600160a01b0316858760405161055191906107aa565b60006040518083038185875af1925050503d806000811461058e576040519150601f19603f3d011682016040523d82523d6000602084013e610593565b606091505b50915091506105a38282866105ae565b979650505050505050565b606083156105bd57508161047f565b8251156105cd5782518084602001fd5b8160405162461bcd60e51b815260040161046491906107c6565b600082601f8301126105f7578081fd5b8135602061060c6106078361082a565b6107f9565b8281528181019085830183850287018401881015610628578586fd5b855b8581101561064f57813561063d816108d9565b8452928401929084019060010161062a565b5090979650505050505050565b600082601f83011261066c578081fd5b8135602061067c6106078361082a565b8281528181019085830183850287018401881015610698578586fd5b855b8581101561064f5781358452928401929084019060010161069a565b600080604083850312156106c8578182fd5b823567ffffffffffffffff808211156106df578384fd5b6106eb868387016105e7565b93506020850135915080821115610700578283fd5b5061070d8582860161065c565b9150509250929050565b600060208284031215610728578081fd5b8151801515811461047f578182fd5b60008060006060848603121561074b578081fd5b8335610756816108d9565b9250602084013567ffffffffffffffff80821115610772578283fd5b61077e878388016105e7565b93506040860135915080821115610793578283fd5b506107a08682870161065c565b9150509250925092565b600082516107bc818460208701610866565b9190910192915050565b60006020825282518060208401526107e5816040850160208701610866565b601f01601f19169190910160400192915050565b604051601f8201601f1916810167ffffffffffffffff81118282101715610822576108226108c3565b604052919050565b600067ffffffffffffffff821115610844576108446108c3565b5060209081020190565b60008219821115610861576108616108ad565b500190565b60005b83811015610881578181015183820152602001610869565b8381111561011a5750506000910152565b60006000198214156108a6576108a66108ad565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146108ee57600080fd5b5056fea26469706673582212203c9e2a2143a1a7fd264f846d7661e5fcb8f252400ee0da0e3ff967456f73a82d64736f6c63430008020033

Verified Source Code Partial Match

Compiler: v0.8.2+commit.661d1103 EVM: istanbul Optimization: Yes (200 runs)
DisperseV2.sol 75 lines
pragma solidity 0.8.2;

import { Address } from "Address.sol";


interface IERC20 {
    function transfer(address to, uint256 value) external returns (bool);
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}


library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}


contract DisperseV2 {
    using SafeERC20 for IERC20;
    function disperseEther(address[] memory recipients, uint256[] memory values) external payable {
        for (uint256 i = 0; i < recipients.length; i++)
            payable(recipients[i]).transfer(values[i]);
        uint256 balance = address(this).balance;
        if (balance > 0)
            payable(msg.sender).transfer(balance);
    }

    function disperseToken(IERC20 token, address[] memory recipients, uint256[] memory values) external {
        uint256 total = 0;
        for (uint256 i = 0; i < recipients.length; i++)
            total += values[i];
        token.safeTransferFrom(msg.sender, address(this), total);
        for (uint256 i = 0; i < recipients.length; i++)
            token.safeTransfer(recipients[i], values[i]);
    }

    function disperseTokenSimple(IERC20 token, address[] memory recipients, uint256[] memory values) external {
        for (uint256 i = 0; i < recipients.length; i++)
            token.safeTransferFrom(msg.sender, recipients[i], values[i]);
    }
}
Address.sol 216 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

Write Contract 3 functions

These functions modify contract state and require a wallet transaction to execute.

disperseEther 0xe63d38ed
address[] recipients
uint256[] values
disperseToken 0xc73a2d60
address token
address[] recipients
uint256[] values
disperseTokenSimple 0x51ba162c
address token
address[] recipients
uint256[] values

Recent Transactions

No transactions found for this address