ETH Price: $1,790.59 (+10.00%)

Contract

0xCF9C71569f422A3Cd1660edf23798807D12C1E85
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Amount:Between 1-10
Reset Filter

Transaction Hash
Method
Block
From
To

There are no matching entries

> 10 Internal Transactions and 2 Token Transfers found.

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17290022024-04-04 21:56:59383 days ago1712267819
0xCF9C7156...7D12C1E85
1 ETH
17289992024-04-04 21:56:53383 days ago1712267813
0xCF9C7156...7D12C1E85
1 ETH
17289992024-04-04 21:56:53383 days ago1712267813
0xCF9C7156...7D12C1E85
1 ETH
View All Internal Transactions

Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xD0198a56...2d1cc70D7
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Distribute

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 7 : Distribute.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "./interfaces/IDistribute.sol";
import "./interfaces/ILock.sol";

// Uncomment this line to use console.log
// import "hardhat/console.sol";

contract Distribute is IDistribute, Ownable {
    address[] account_list;
    mapping(address => DistributeData) distribute_data;
    // when account data is populated, the total must match these exactly
    // or the contract will not progress to funding stage
    Totals public distribute_totals; // target
    Totals public populate_totals; // progress
    Totals public sent_totals; // sent
    DistributeStage public distribute_stage;
    address public depositor;
    address public distributor;

    address public USDB_CONTRACT;
    address public WETH_CONTRACT;
    address public LOCK_CONTRACT;

    modifier onlyPopulateStage() {
        require(distribute_stage == DistributeStage.POPULATE);
        _;
    }
    modifier onlyFundStage() {
        require(distribute_stage == DistributeStage.FUND);
        _;
    }
    modifier onlyDistributeStage() {
        require(distribute_stage == DistributeStage.DISTRIBUTE);
        _;
    }
    modifier onlyUnconfiguredStage() {
        require(distribute_stage == DistributeStage.UNCONFIGURED);
        _;
    }


    constructor(address _usdb_contract, address _weth_contract, uint256 _eth_total, uint256 _usdb_total, uint256 _weth_total, address _lock_contract)
            Ownable(msg.sender) onlyUnconfiguredStage {
        distribute_stage = DistributeStage.POPULATE;
        distribute_totals.eth = _eth_total;
        distribute_totals.usdb = _usdb_total;
        distribute_totals.weth = _weth_total;

        USDB_CONTRACT = _usdb_contract;
        WETH_CONTRACT = _weth_contract;

        LOCK_CONTRACT = _lock_contract;
    }

    function populate(address[] calldata _accounts, TokenType[] calldata _tokens, uint256[] calldata _quantities) external onlyPopulateStage onlyOwner {

        uint num_accounts = _accounts.length;
        require(_accounts.length == _tokens.length, "Array sizes must match");
        require(_tokens.length == _quantities.length, "Array sizes must match");
        for (uint16 i; i < num_accounts; i++) {
            address _account = _accounts[i];
            TokenType _token = _tokens[i];
            uint256 _quantity = _quantities[i];

            require(_token > TokenType.NONE && _token <= TokenType.WETH, "Invalid token type");
            require(_quantity > 0, "Invalid quantity");

            // check the old contract to verify
//            ILock.LockInfo memory lock_info = ILock(LOCK_CONTRACT).getLocked(_account);
//            require(lock_info.quantity == _quantity, "Quantity mismatch from Lock contract");

            if (distribute_data[_account].token_type == TokenType.NONE){
                if (_token == TokenType.ETH){
                    populate_totals.eth += _quantity;
                }
                else if (_token == TokenType.USDB){
                    populate_totals.usdb += _quantity;
                }
                else if (_token == TokenType.WETH){
                    populate_totals.weth += _quantity;
                }
                distribute_data[_account] = DistributeData(_token, _quantity, false);
                account_list.push(_account);

                emit Populated(_account, _token, _quantity);
            }
        }
    }

    function seal() external onlyPopulateStage onlyOwner {
        require(distribute_totals.eth == populate_totals.eth, "ETH populate totals do not match target");
        require(distribute_totals.usdb == populate_totals.usdb, "USDB populate totals do not match target");
        require(distribute_totals.weth == populate_totals.weth, "WETH populate totals do not match target");

        distribute_stage = DistributeStage.FUND;
        renounceOwnership();

        emit Sealed();
    }

    function fund(address _distributor) external payable onlyFundStage {
        require(msg.value == populate_totals.eth, "ETH total incorrect");
        
        // ETH is here, now transfer the ERC-20s
        IERC20 usdb_contract = IERC20(USDB_CONTRACT);
        IERC20 weth_contract = IERC20(WETH_CONTRACT);

        uint256 usdbBalanceBefore = usdb_contract.balanceOf(address(this));
        uint256 wethBalanceBefore = weth_contract.balanceOf(address(this));

        usdb_contract.transferFrom(msg.sender, address(this), populate_totals.usdb);
        weth_contract.transferFrom(msg.sender, address(this), populate_totals.weth);

        uint256 usdbBalanceAfter = usdb_contract.balanceOf(address(this));
        uint256 wethBalanceAfter = weth_contract.balanceOf(address(this));
        
        // Added redundancy in balance delta checks
        require(usdbBalanceAfter - usdbBalanceBefore == populate_totals.usdb, "USDB transfer amount mismatch");
        require(wethBalanceAfter - wethBalanceBefore == populate_totals.weth, "WETH transfer amount mismatch");

        distribute_stage = DistributeStage.DISTRIBUTE;
        depositor = msg.sender;
        distributor = _distributor;

        emit Funded(depositor, distributor);
    }

    function distribute(uint256 _start, uint256 _count) external onlyDistributeStage {
        require(msg.sender == distributor, "Only distributor can call distribute()");

        uint256 count = _count;
        IERC20 usdb_contract = IERC20(USDB_CONTRACT);
        IERC20 weth_contract = IERC20(WETH_CONTRACT);

        if (account_list.length < _start + count - 1){
            count = account_list.length - _start;
        }

        while (count > 0){
            address payable account = payable(account_list[_start + count - 1]);
            DistributeData memory data = distribute_data[account];
            if (!data.distributed){
                distribute_data[account].distributed = true;

                // send tokens
                if (data.token_type == TokenType.ETH){
                    sent_totals.eth += data.quantity;

                    (bool success,) = account.call{value: data.quantity}("");
                    require(success, "ETH transfer failed");
                }
                else if (data.token_type == TokenType.USDB){
                    sent_totals.usdb += data.quantity;
                    usdb_contract.transfer(account, data.quantity);
                }
                else if (data.token_type == TokenType.WETH){
                    sent_totals.weth += data.quantity;
                    weth_contract.transfer(account, data.quantity);
                }

                emit Distributed(account, data.token_type, data.quantity);
            }
            count--;
        }
    }

    function rescue() external onlyDistributeStage {
        require(depositor != address(0), "Deposit not sent yet");
        require(msg.sender == depositor, "Only depositor can rescue");

        distribute_stage = DistributeStage.REFUNDED;

        IERC20 usdb_contract = IERC20(USDB_CONTRACT);
        IERC20 weth_contract = IERC20(WETH_CONTRACT);

        uint256 eth_balance = address(this).balance;
        uint256 usdb_balance = usdb_contract.balanceOf(address(this));
        uint256 weth_balance = weth_contract.balanceOf(address(this));

        if (eth_balance > 0){
            (bool success,) = payable(depositor).call{value: eth_balance}("");
            require(success, "ETH transfer failed");
        }
        if (usdb_balance > 0){
            usdb_contract.transfer(depositor, usdb_balance);
        }
        if (weth_balance > 0){
            weth_contract.transfer(depositor, weth_balance);
        }
    }

    /////////////////////////////////////////
    // views
    /////////////////////////////////////////

    function getDistributeData(address _account) external view
            returns (DistributeData memory _distribute_data) {
        _distribute_data = distribute_data[_account];
    }

    function getAccountList(uint256 _start_index) external view returns (address[50] memory _accounts) {
        require(account_list.length > _start_index, "Invalid start index");

        address[50] memory ret_accounts;
        for (uint i; i < 50; i++){
            if (account_list.length > _start_index + i){
                ret_accounts[i] = account_list[_start_index + i];
            }
            else {
                break;
            }
        }
        _accounts = ret_accounts;
    }
}

File 2 of 7 : Ownable.sol
// 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);
    }
}

File 3 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";

File 4 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

File 5 of 7 : Context.sol
// 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;
    }
}

File 6 of 7 : IDistribute.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;

interface IDistribute {

    enum TokenType {
        NONE,
        ETH,
        USDB,
        WETH
    }

    enum DistributeStage {
        UNCONFIGURED,  // Should never be here
        POPULATE, // waiting for distribute data to be loaded
        FUND, // data has been loaded, totals match.  funds can now be sent
        DISTRIBUTE, // funds received and waiting to be distributed
        REFUNDED // funds were refunded
    }

    struct Totals {
        uint256 eth;
        uint256 usdb;
        uint256 weth;
    }

    struct DistributeData {
        TokenType token_type;
        uint256   quantity;
        bool      distributed;
    }

    function populate(address[] memory _accounts, TokenType[] memory _tokens, uint256[] memory _quantities) external;
    function seal() external;
    function fund(address _distributor) external payable;
    function distribute(uint256 _start, uint256 _count) external;
    function rescue() external;

    function getDistributeData(address account) external view returns (DistributeData memory return_data);
    function getAccountList(uint256 _start_index) external view returns (address[50] memory _accounts);

    event Populated(address account, TokenType token, uint256 quantity);
    event Sealed();
    event Funded(address depositor, address distributor);
    event Distributed(address indexed account, TokenType token_type, uint256 quantity);
}

File 7 of 7 : ILock.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

interface ILock {
    /// @notice AllowedToken : Structure of allowed tokens
    /// @param token_contract : Address of the token contract
    /// @param precision : Precision of the token, aka decimal
    /// @param usd_value : Value of the token in USD
    /// @param yield_rate : Yield of the token in percent, multiplied by 100
    /// @param nft_drop_cost : Cost of the NFT drop
    /// @param yield_contract : Address of the yield contract
    /// @param active : True if the token is active
    struct AllowedToken {
        address token_contract;
        uint256 precision;
        uint256 usd_value;
        uint256 yield_rate;
        uint256 nft_drop_cost;
        address yield_contract;
        bool active;
    }

    /// @notice LockInfo : Structure of lock information of an account
    /// @param token_contract : Address of the token contract
    /// @param quantity : Quantity of the token
    /// @param unlock_time : Time when the user can unlock their tokens
    /// @param lock_duration : The amount of time the user wants to lock tokens for
    /// @param lock_remainder : Store the remainder of locked_tokens / nft_cost here and add it to future locks
    struct LockInfo {
        address token_contract;
        uint256 quantity;
        uint256 lock_duration;
        uint256 unlock_time;
        uint256 lock_remainder;
    }

    /// @notice yieldClaim : Claim the yield, called by claim contract
    function yieldClaim() external;

    /// @notice getLocked : Returns the amount of locked tokens, the account lock time and account unlock_time
    /// @param _account : Address of the account
    /// @return _lock_info : LockInfo
    function getLocked(
        address _account
    ) external view returns (LockInfo memory _lock_info);

    /// @notice getLockedWeightedValue : Returns a dollar value of locked tokens for an account, each locked asset, weighted by yield value of that asset
    /// @param _account : Address of the account
    /// @return _locked_weighted_value : Locked weighted value
    function getLockedWeightedValue(
        address _account
    ) external view returns (uint256 _locked_weighted_value);

    /// @notice getLockDrop : Returns lockdrop_start and lockdrop_end
    /// @return _lockdrop_start : Start time of the lockdrop
    /// @return _lockdrop_end : End time of the lockdrop
    function getLockdrop()
        external
        view
        returns (uint256 _lockdrop_start, uint256 _lockdrop_end);

    /// @notice getAllowedTokens : Returns the array of allowed tokens
    /// @return _allowed_tokens : Array of allowed tokens
    function getAllowedTokens()
        external
        view
        returns (AllowedToken[] memory _allowed_tokens);

    event ContractConfigured(
        address _account_manager_contract,
        address _claim_contract,
        address _pair_contract,
        address _proxy_contract
    );
    event Locked(
        address indexed _account,
        address indexed _token_contract,
        uint256 _quantity,
        uint256 _lock_duration,
        uint256 _unlock_time,
        uint256 _lock_remainder,
        uint256 _nft_drop_cost,
        uint256 _nft_drop
    );
    event LockTime(
        address indexed _account,
        uint256 _lock_duration,
        uint256 _unlock_time
    );
    event Relocked(
        address indexed _account,
        uint256 _lock_duration,
        uint256 _unlock_time
    );
    event Unlocked(
        address indexed _account,
        address indexed _token_contract,
        uint256 _quantity
    );
    event LockDrop(uint256 _lockdrop_start, uint256 _lockdrop_end);
    event AllowedTokenAdded(
        address indexed _token_contract,
        uint256 _precision,
        uint256 _yield_rate,
        uint256 _nft_drop_cost,
        address _yield_contract
    );
    event TokenConfigured(
        address indexed _token_contract,
        uint256 _yield_rate,
        uint256 _nft_drop_cost
    );
    event TokenDeactivated(address indexed _token_contract, bool _active);
    event TokenActivated(address indexed _token_contract, bool _active);
    event ValueUpdated(address indexed _token_contract, uint256 _usd_value);
    event YieldClaimed(
        uint256 _eth_yield,
        uint256 _gas_yield,
        uint256 _usdb_yield,
        uint256 _weth_yield
    );
    event SetProxyAddress(address _proxy_address);
    event WriteDataFeed(
        uint256 _eth_usd_value,
        uint256 _eth_nft_drop_cost,
        uint256 _usdb_usd_value,
        uint256 _usdb_nft_drop_cost,
        uint256 _weth_usd_value,
        uint256 _weth_nft_drop_cost
    );
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "viaIR": true,
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_usdb_contract","type":"address"},{"internalType":"address","name":"_weth_contract","type":"address"},{"internalType":"uint256","name":"_eth_total","type":"uint256"},{"internalType":"uint256","name":"_usdb_total","type":"uint256"},{"internalType":"uint256","name":"_weth_total","type":"uint256"},{"internalType":"address","name":"_lock_contract","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":"account","type":"address"},{"indexed":false,"internalType":"enum IDistribute.TokenType","name":"token_type","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"Distributed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"depositor","type":"address"},{"indexed":false,"internalType":"address","name":"distributor","type":"address"}],"name":"Funded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"enum IDistribute.TokenType","name":"token","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"Populated","type":"event"},{"anonymous":false,"inputs":[],"name":"Sealed","type":"event"},{"inputs":[],"name":"LOCK_CONTRACT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDB_CONTRACT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH_CONTRACT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distribute_stage","outputs":[{"internalType":"enum IDistribute.DistributeStage","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distribute_totals","outputs":[{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"usdb","type":"uint256"},{"internalType":"uint256","name":"weth","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_distributor","type":"address"}],"name":"fund","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_start_index","type":"uint256"}],"name":"getAccountList","outputs":[{"internalType":"address[50]","name":"_accounts","type":"address[50]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getDistributeData","outputs":[{"components":[{"internalType":"enum IDistribute.TokenType","name":"token_type","type":"uint8"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bool","name":"distributed","type":"bool"}],"internalType":"struct IDistribute.DistributeData","name":"_distribute_data","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_accounts","type":"address[]"},{"internalType":"enum IDistribute.TokenType[]","name":"_tokens","type":"uint8[]"},{"internalType":"uint256[]","name":"_quantities","type":"uint256[]"}],"name":"populate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"populate_totals","outputs":[{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"usdb","type":"uint256"},{"internalType":"uint256","name":"weth","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rescue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sent_totals","outputs":[{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"usdb","type":"uint256"},{"internalType":"uint256","name":"weth","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608080604052600436101561001357600080fd5b60003560e01c9081627948b4146112775750806308fb5adf146112455780630ed62b7d1461119f57806318830f55146111765780631fbe197914610ed65780632302440814610b15578063337bf88114610ae35780633f31f2a8146107bb5780633fb27b851461062857806361fe9ab8146105f6578063715018a6146105d35780637625391a1461029557806378a3b8231461026c5780637cba94e9146102435780638da5cb5b1461021a578063bfe10928146101f1578063c7c4ff46146101c4578063d1d3f22c146101845763f2fde38b146100ef57600080fd5b3461017f57602036600319011261017f576004356001600160a01b038181169182900361017f5761011e61157e565b811561016657600054826bffffffffffffffffffffffff60a01b821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b604051631e4fbdf760e01b815260006004820152602490fd5b600080fd5b3461017f57600036600319011261017f5760ff600c541660405160058210156101ae576020918152f35b634e487b7160e01b600052602160045260246000fd5b3461017f57600036600319011261017f57600c5460405160089190911c6001600160a01b03168152602090f35b3461017f57600036600319011261017f57600d546040516001600160a01b039091168152602090f35b3461017f57600036600319011261017f576000546040516001600160a01b039091168152602090f35b3461017f57600036600319011261017f57600e546040516001600160a01b039091168152602090f35b3461017f57600036600319011261017f57600f546040516001600160a01b039091168152602090f35b3461017f57604036600319011261017f5760243560ff600c541660058110156101ae5760030361017f57600d546001600160a01b0316330361057f57600e54600f546001546001600160a01b0392831692909116906102f68460043561141c565b6000198101908111610553578110610569575b5091805b61031357005b61031f8160043561141c565b60001981019081116105535761033490611429565b60018060a01b0391549060031b1c16806000526002602052604060002060ff600260405192610362846113c1565b61036f8382541685611476565b600181015460208501520154161580156040830152610395575b5050600019018061030d565b8160005260026020526002604060002001600160ff19825416179055805160048110156101ae576001036104435760208101516103d5600991825461141c565b90556103f560008080806020860151875af16103ef611482565b506114c2565b80519060048210156101ae577f24d060b91e1ac621f42c2b8fc99cd280985f736719885fba2e00c0fc4d314aec916020604092015161043683518093611383565b6020820152a28380610389565b805160048110156101ae576002036104e9576020810151610467600a91825461141c565b905560208181015160405163a9059cbb60e01b81526001600160a01b0385166004820152602481019190915290816044816000895af180156104dd576104ae575b506103f5565b6104cf9060203d6020116104d6575b6104c781836113fa565b810190611504565b50856104a8565b503d6104bd565b6040513d6000823e3d90fd5b805160048110156101ae576003036103f557602081015161050d600b91825461141c565b905560208181015160405163a9059cbb60e01b81526001600160a01b03851660048201526024810191909152908160448160008a5af180156104dd576104ae57506103f5565b634e487b7160e01b600052601160045260246000fd5b6105789193506004359061151c565b9183610309565b60405162461bcd60e51b815260206004820152602660248201527f4f6e6c79206469737472696275746f722063616e2063616c6c2064697374726960448201526562757465282960d01b6064820152608490fd5b3461017f57600036600319011261017f576105ec61157e565b6105f46115aa565b005b3461017f57600036600319011261017f5760035460045460055460408051938452602084019290925290820152606090f35b3461017f57600036600319011261017f57600c5460ff811660058110156101ae5760010361017f5761065861157e565b60035460065403610766576004546007540361071057600554600854036106ba5760ff1916600217600c5561068b61157e565b6106936115aa565b7f1b2d71eb44f882534bf4e86f940c56ccc869ffb927e2bab86561de93950c2216600080a1005b60405162461bcd60e51b815260206004820152602860248201527f5745544820706f70756c61746520746f74616c7320646f206e6f74206d6174636044820152671a081d185c99d95d60c21b6064820152608490fd5b60405162461bcd60e51b815260206004820152602860248201527f5553444220706f70756c61746520746f74616c7320646f206e6f74206d6174636044820152671a081d185c99d95d60c21b6064820152608490fd5b60405162461bcd60e51b815260206004820152602760248201527f45544820706f70756c61746520746f74616c7320646f206e6f74206d61746368604482015266081d185c99d95d60ca1b6064820152608490fd5b3461017f57606036600319011261017f5767ffffffffffffffff60043581811161017f576107ed903690600401611390565b919060243582811161017f57610807903690600401611390565b909260443590811161017f57610821903690600401611390565b92909160ff600c541660058110156101ae5760010361017f5761084261157e565b61084d818714611529565b610858848214611529565b60005b61ffff8116878110156105f45761087381898661156e565b35906001600160a01b038216820361017f5761089081858a61156e565b3590600482101561017f576108a690888861156e565b3591600082151580610ad5575b15610a9b578315610a63576001600160a01b03821660009081526002602052604090205460ff1660048110156101ae5715610902575b5050505061ffff8091169081146105535760010161085b565b6101ae5760018203610a3257600661091b84825461141c565b90555b60405161092a816113c1565b6109348382611476565b8360208201526000604082015260018060a01b0382166000526002602052604060002081519060048210156101ae576040600260ff9283199484868354169116178155602086015160018201550193015115159183541691161790556001549268010000000000000000841015610a1c57610a0d6060936109dc8660017f184dbe1c732d6d725f0556c3c6de11e5d2f340c58a4f4b94214a1646614a8b299801600155611429565b81546001600160a01b0396871660039290921b82811b97901b19169590951790556040519384526020840190611383565b6040820152a1878080806108e9565b634e487b7160e01b600052604160045260246000fd5b60028203610a4e576007610a4784825461141c565b905561091e565b6003820361091e576008610a4784825461141c565b60405162461bcd60e51b815260206004820152601060248201526f496e76616c6964207175616e7469747960801b6044820152606490fd5b60405162461bcd60e51b8152602060048201526012602482015271496e76616c696420746f6b656e207479706560701b6044820152606490fd5b5050600060038311156108b3565b3461017f57600036600319011261017f5760065460075460085460408051938452602084019290925290820152606090f35b60208060031936011261017f576001600160a01b0390600435828116919082900361017f5760ff600c541660058110156101ae5760020361017f576006543403610e9c5782600e541683600f541690604051916370a0823160e01b9081845230600485015260249385818681875afa9081156104dd57600091610e6f575b506040519383855230600486015286858781865afa9485156104dd57600095610e40575b506007546040516323b872dd60e01b8082523360048301523060248301526044820192909252919088836064816000865af19081156104dd57610c22938a92610e23575b50600854604051918252336004830152306024830152604482015292839081906064820190565b03816000885af19081156104dd5787928992610e06575b50604051928380928882523060048301525afa9384156104dd578791600095610dd5575b50866040518095819382523060048301525afa9182156104dd57600092610da4575b50610c8a919261151c565b60075403610d605790610c9c9161151c565b60085403610d1d577fae4ccaaebafd7429d917375073665c7b5f76b6fd002ac9bba803bb7293e6d12d60408585856003600c54610100600160a81b033360081b16906affffffffffffffffffffff60a81b1617179283600c55826bffffffffffffffffffffffff60a01b600d541617600d5584519360081c168352820152a1005b90601d6064926040519262461bcd60e51b845260048401528201527f57455448207472616e7366657220616d6f756e74206d69736d617463680000006044820152fd5b60405162461bcd60e51b815260048101859052601d818501527f55534442207472616e7366657220616d6f756e74206d69736d617463680000006044820152606490fd5b91508582813d8311610dce575b610dbb81836113fa565b8101031261017f57610c8a915191610c7f565b503d610db1565b8281939296503d8311610dff575b610ded81836113fa565b8101031261017f57869051938a610c5d565b503d610de3565b610e1c90833d85116104d6576104c781836113fa565b508b610c39565b610e3990833d85116104d6576104c781836113fa565b508c610bfb565b9094508681813d8311610e68575b610e5881836113fa565b8101031261017f57519389610bb7565b503d610e4e565b90508581813d8311610e95575b610e8681836113fa565b8101031261017f575188610b93565b503d610e7c565b6064906040519062461bcd60e51b825260048201526013602482015272115512081d1bdd185b081a5b98dbdc9c9958dd606a1b6044820152fd5b3461017f57600036600319011261017f57600c5460ff811660058110156101ae5760030361017f576001600160a01b0390600881901c8216801561113a5733036110f55760049060ff19161780600c5581600e54169180600f5416914793604051946370a0823160e01b958681523060048201526020968782602481875afa9182156104dd576000926110c6575b5060405190815230600482015287816024818a5afa9485156104dd5788938792600097611092575b5080611070575b50505080611004575b50505080610fa657005b600c5460405163a9059cbb60e01b815260089190911c929092166001600160a01b031660048301526024820152908290829060449082906000905af180156104dd57610fee57005b816105f492903d106104d6576104c781836113fa565b600c5460405163a9059cbb60e01b815260089190911c86166001600160a01b031660048201526024810191909152918290816000816044810103925af180156104dd57611053575b8481610f9c565b61106990853d87116104d6576104c781836113fa565b508461104c565b60008080939261108a95829460081c165af16103ef611482565b848880610f93565b925095509281813d83116110bf575b6110ab81836113fa565b8101031261017f578792869151958a610f8c565b503d6110a1565b9091508781813d83116110ee575b6110de81836113fa565b8101031261017f57519088610f64565b503d6110d4565b60405162461bcd60e51b815260206004820152601960248201527f4f6e6c79206465706f7369746f722063616e20726573637565000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601460248201527311195c1bdcda5d081b9bdd081cd95b9d081e595d60621b6044820152606490fd5b3461017f57600036600319011261017f576010546040516001600160a01b039091168152602090f35b3461017f57602036600319011261017f576004356001600160a01b0381169081900361017f576000604080516111d4816113c1565b8281528260208201520152600052600260205260606040600020604051906111fb826113c1565b61120960ff82541683611476565b60ff60026001830154926020850193845201541690604083019115158252611235604051809451611383565b5160208301525115156040820152f35b3461017f57600036600319011261017f57600954600a54600b5460408051938452602084019290925290820152606090f35b3461017f5760208060031936011261017f57600435611295836113dd565b61064080933690376001906001548181111561134857604051916112b8836113dd565b853684378360005b603281106112fe575b5050505060405192836000905b603282106112e2578686f35b83516001600160a01b03168152928201929084019082016112d6565b611308818461141c565b8411156113435761132161131c828561141c565b611429565b905460039190911b1c6001600160a01b0316600582901b8601528591016112c0565b6112c9565b60405162461bcd60e51b8152602060048201526013602482015272092dcecc2d8d2c840e6e8c2e4e840d2dcc8caf606b1b6044820152606490fd5b9060048210156101ae5752565b9181601f8401121561017f5782359167ffffffffffffffff831161017f576020808501948460051b01011161017f57565b6060810190811067ffffffffffffffff821117610a1c57604052565b610640810190811067ffffffffffffffff821117610a1c57604052565b90601f8019910116810190811067ffffffffffffffff821117610a1c57604052565b9190820180921161055357565b6001548110156114605760016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60190600090565b634e487b7160e01b600052603260045260246000fd5b60048210156101ae5752565b3d156114bd573d9067ffffffffffffffff8211610a1c57604051916114b1601f8201601f1916602001846113fa565b82523d6000602084013e565b606090565b156114c957565b60405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b6044820152606490fd5b9081602091031261017f5751801515810361017f5790565b9190820391821161055357565b1561153057565b60405162461bcd60e51b8152602060048201526016602482015275082e4e4c2f240e6d2f4cae640daeae6e840dac2e8c6d60531b6044820152606490fd5b91908110156114605760051b0190565b6000546001600160a01b0316330361159257565b60405163118cdaa760e01b8152336004820152602490fd5b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a356fea2646970667358221220f2646f66d517688068edcaacc40280e3948d61b9fe914c78894f8558244884c964736f6c63430008180033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
Loading...
Loading
[ 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.