ETH Price: $4,007.43 (+2.52%)

Contract

0x159089d1b385572Fdc2a42Bf7664309f6eEf5Edc
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Transaction Hash
Method
Block
From
To
Update Merkle Ro...198584372024-05-13 3:33:23217 days ago1715571203IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.000129844.3042782
Update Merkle Ro...191746562024-02-07 6:53:35313 days ago1707288815IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.001037934.40633837
Update Merkle Ro...189611742024-01-08 8:39:59343 days ago1704703199IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0004985616.5273775
Update Merkle Ro...187407552023-12-08 9:50:23374 days ago1702029023IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0010934336.24741644
Update Merkle Ro...185332012023-11-09 8:29:59403 days ago1699518599IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0008543828.3228614
Claim184119422023-10-23 9:01:11420 days ago1698051671IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0010414115.52341684
Update Merkle Ro...183264612023-10-11 9:59:47432 days ago1697018387IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.000178095.90394958
Update Merkle Ro...181760572023-09-20 8:58:11453 days ago1695200291IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0003200810.6106881
Update Merkle Ro...181758802023-09-20 8:22:35453 days ago1695198155IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.000257648.54102993
Claim181396542023-09-15 5:49:35458 days ago1694756975IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.000773859
Update Merkle Ro...181118002023-09-11 8:04:11462 days ago1694419451IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0003540311.73607664
Update Merkle Ro...180623922023-09-04 10:02:47469 days ago1693821767IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0003819512.66169409
Claim180531562023-09-03 3:01:35470 days ago1693710095IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0009407613.65995751
Claim And Stake180477252023-09-02 8:45:23471 days ago1693644323IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0016794713.08980249
Update Merkle Ro...180118342023-08-28 8:04:47476 days ago1693209887IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0005191717.21069839
Update Merkle Ro...179617772023-08-21 8:01:11483 days ago1692604871IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0004509614.94947321
Claim179477962023-08-19 9:01:47485 days ago1692435707IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0012081514.04967211
Claim179112902023-08-14 6:27:47490 days ago1691994467IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0012464514.49875612
Update Merkle Ro...178974622023-08-12 8:01:59492 days ago1691827319IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0004566715.13877483
Claim178559462023-08-06 12:33:59498 days ago1691325239IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0014518916.88607763
Update Merkle Ro...178474862023-08-05 8:09:59499 days ago1691222999IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0004212613.96478048
Claim178052392023-07-30 10:25:11505 days ago1690712711IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0011789813.72281901
Update Merkle Ro...177974732023-07-29 8:21:35506 days ago1690618895IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0005091216.88421129
Update Merkle Ro...177474792023-07-22 8:28:47513 days ago1690014527IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.0004765315.79712023
Claim177051452023-07-16 10:05:23519 days ago1689501923IN
TiTi Protocol : TiTiMerkle Distributor
0 ETH0.001422116.54185951
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TiTiMerkleDistributor

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2023-05-14
*/

// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;


// 
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)
/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

    /**
     * @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);
}

// 
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)
/**
 * @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);
            }
        }
    }
}

// 
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)
/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
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 Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @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");
        }
    }
}

// 
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

// 
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
/**
 * @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;
    }
}

// 
// OpenZeppelin Contracts v4.4.1 (access/Ownable.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.
 *
 * By default, the owner account will be the one that deploys the contract. 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;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing 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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _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);
    }
}

// 
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol)
/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }
        return computedHash;
    }
}

// 
interface ITiTiStaking {
    function setWorker(address) external;
    function setPendingGovernor(address) external;
    function acceptGovernor() external;
    function setMerkle(address) external;
    function stake(address, uint) external;
    function unbond(uint) external;
    function withdraw() external;
    function reward(uint) external;
    function skim(uint) external;
    function extract(uint) external;
    function users(address) external view returns (uint, uint, uint, uint);
    function totalTiTi() external view returns (uint);
    function totalShare() external view returns (uint);
    function merkle() external view returns (address);
    function getStakeValue(address) external view returns (uint);
    function STATUS_READY() external view returns (uint);
    function STATUS_UNBONDING() external view returns (uint);
    function UNBONDING_DURATION() external view returns (uint);
    function WITHDRAW_DURATION() external view returns (uint);
}

// 
/// @title The Use-To-Earn's reward distributor of TiTi Protocol
/// @author TiTi Protocol
/// @notice This module is used to distribute the rewards in Use-To-Earn's activity.
/// @dev Only the owner can call the params' update function, the owner will be transferred to Timelock in the future.
contract TiTiMerkleDistributor is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    /// @notice Merkle root for latest reward distribution.
    bytes32 public root;

    /// @notice TiTi contract address.
    IERC20 public immutable token;

    /// @notice TiTiStakingPool contract address.
    ITiTiStaking public staking;

    /// @notice TiTiStakingPool updating merkle root worker address.
    address private merkleRootWorker;

    /// @notice TiTiStakingPool deposit worker address.
    address private depositWorker;

    /// @notice Users' claimed record.
    mapping(address => uint) public claimed;

    /// @notice Emitted when new TiTi reward merkle root is set.
    event UpdateRoot(bytes32 indexed root);

    /// @notice Emitted when new TiTiStakingPool is set.
    event UpdateStaking(address staking);

    /// @notice Emitted when governor deposits new TiTi rewards.
    event Deposit(uint amount);

    /// @notice Emitted when a user claims TiTi rewards.
    event Claim(address indexed account, uint claimAmount);

    /// @notice Emitted when a user claims TiTi rewards and auto stakes these into the TiTIStakingPool.
    event ClaimAndStake(address indexed account, uint claimAmount);

    /// @notice Emitted when governor withdraws tokens in unexpected scenarios. Emergency use only!.
    event Extract(address indexed token, uint amount);

    /// @notice Emitted when new updating merkle root worker is set.
    event NewMerkleRootWorker(address account);

    /// @notice Emitted when new deposit worker is set.
    event NewDepositWorker(address account);

    modifier onlyMerkleRootWorker() {
        require(msg.sender == merkleRootWorker || msg.sender == owner(), 'TiTiMerkleDistributor: Not MerkleRoot Worker');
        _;
    }

    modifier onlyDepositWorker() {
        require(msg.sender == depositWorker || msg.sender == owner(), 'TiTiMerkleDistributor: Not Deposit Worker');
        _;
    }

    constructor(address _token, address _staking, bytes32 _root) {
        token = IERC20(_token);
        _updateMerkleRoot(_root);
        _updateStaking(_staking);
    }

    /// @notice Set new updating merkle root worker and emit NewMerkleRootWorker event.
    /// @param _merkleRootWorker New update merkle root worker address.
    function setMerkleRootWorker(address _merkleRootWorker) external onlyOwner {
        require(_merkleRootWorker != address(0), "TiTiMerkleDistributor: Zero Address");
        merkleRootWorker = _merkleRootWorker;
        emit NewMerkleRootWorker(_merkleRootWorker);
    }

    /// @notice Set new deposit worker and emit NewDepositWorker event.
    /// @param _depositWorker New deposit address.
    function setDepositWorker(address _depositWorker) external onlyOwner {
        require(_depositWorker != address(0), "TiTiMerkleDistributor: Zero Address");
        depositWorker = _depositWorker;
        emit NewDepositWorker(_depositWorker);
    }

    /// @notice Update TiTiStakingPool contract address.
    /// @param _staking New TiTiStakingPool contract address.
    function updateStaking(address _staking) external onlyOwner {
        _updateStaking(_staking);
    }

    /// @notice Update the latest reward distribution's merkle root.
    /// @param _root New merkle root.
    function updateMerkleRoot(bytes32 _root) external onlyMerkleRootWorker {
        _updateMerkleRoot(_root);
    }
    
    /// @notice Governor deposits new TiTi rewards.
    /// @param _amount New TiTi rewards' amount.
    function deposit(uint _amount) external onlyDepositWorker {
        token.safeTransferFrom(msg.sender, address(this), _amount);
        emit Deposit(_amount);
    }

    /// @notice Users claim TiTi rewards and auto-stake these into the TiTIStakingPool..
    /// @param _reward Target user's TiTi rewards' amount.
    /// @param _proof Target user's claimed proof.
    function claimAndStake(uint _reward, bytes32[] calldata _proof) external nonReentrant {
        bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _reward));
        require(MerkleProof.verify(_proof, root, leaf), 'TiTiMerkleDistributor: Invalid Proof');
        uint claimAmount = _reward - claimed[msg.sender];
        require(claimAmount > 0, "TiTiMerkleDistributor: Account don't have reward to claim");

        claimed[msg.sender] = _reward;
        token.safeTransfer(msg.sender, claimAmount);
        staking.stake(msg.sender, claimAmount);
        emit ClaimAndStake(msg.sender, claimAmount);
    }

    /// @notice Users claim TiTi rewards.
    /// @param _reward Target user's TiTi rewards' amount.
    /// @param _proof Target user's claimed proof.
    function claim(uint _reward, bytes32[] calldata _proof) external nonReentrant {
        bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _reward));
        require(MerkleProof.verify(_proof, root, leaf), 'TiTiMerkleDistributor: Invalid Proof');
        uint claimAmount = _reward - claimed[msg.sender];
        require(claimAmount > 0, "TiTiMerkleDistributor: Account don't have reward to claim");

        claimed[msg.sender] = _reward;
        token.safeTransfer(msg.sender, claimAmount);
        emit Claim(msg.sender, claimAmount);
    }

    /// @notice Governor withdraws tokens in unexpected scenarios. Emergency use only!
    /// @param _token Target token address.
    /// @param _amount Withdrawal amount.
    function extract(address _token, uint _amount) external onlyOwner {
        if (_amount == 0) {
            _amount = IERC20(_token).balanceOf(address(this));
        }
        IERC20(_token).safeTransfer(msg.sender, _amount);
        emit Extract(_token, _amount);
    }

    function _updateMerkleRoot(bytes32 _root) internal {
        root = _root;
        emit UpdateRoot(_root);
    }

    function _updateStaking(address _staking) internal {
        require(_staking != address(0), "TiTiMerkleDistributor: Zero Address");
        staking = ITiTiStaking(_staking);
        emit UpdateStaking(_staking);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_staking","type":"address"},{"internalType":"bytes32","name":"_root","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"claimAmount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"claimAmount","type":"uint256"}],"name":"ClaimAndStake","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Extract","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"NewDepositWorker","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"NewMerkleRootWorker","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":true,"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"UpdateRoot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"staking","type":"address"}],"name":"UpdateStaking","type":"event"},{"inputs":[{"internalType":"uint256","name":"_reward","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_reward","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"claimAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"extract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"root","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_depositWorker","type":"address"}],"name":"setDepositWorker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_merkleRootWorker","type":"address"}],"name":"setMerkleRootWorker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"staking","outputs":[{"internalType":"contract ITiTiStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"updateMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_staking","type":"address"}],"name":"updateStaking","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040523480156200001157600080fd5b506040516200151e3803806200151e8339810160408190526200003491620001ca565b6200003f336200006f565b600180556001600160a01b0383166080526200005b81620000bf565b6200006682620000f2565b5050506200020b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600281905560405181907fc8d52687b85ab11e6859cb0b390a9e926e1b348d9796e084f88f88420c176fc690600090a250565b6001600160a01b038116620001595760405162461bcd60e51b815260206004820152602360248201527f546954694d65726b6c654469737472696275746f723a205a65726f204164647260448201526265737360e81b606482015260840160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527ff6cd2a06182d5d09becddeadb7a155f6daae1a6cf8eb0aeef8476c936efe75349060200160405180910390a150565b80516001600160a01b0381168114620001c557600080fd5b919050565b600080600060608486031215620001e057600080fd5b620001eb84620001ad565b9250620001fb60208501620001ad565b9150604084015190509250925092565b6080516112e26200023c6000396000818161022b015281816104a30152818161065c015261094d01526112e26000f3fe608060405234801561001057600080fd5b50600436106100f45760003560e01c8063919be5c311610097578063ebf0c71711610066578063ebf0c717146101f7578063f0b2cb1614610200578063f2fde38b14610213578063fc0c546a1461022657600080fd5b8063919be5c314610190578063a345f38d146101a3578063b6b55f25146101b6578063c884ef83146101c957600080fd5b80634783f0ef116100d35780634783f0ef146101345780634cf088d914610147578063715018a6146101775780638da5cb5b1461017f57600080fd5b80628b5848146100f95780632f52ebb71461010e57806336d76a9514610121575b600080fd5b61010c610107366004610fa2565b61024d565b005b61010c61011c366004610fcc565b61035a565b61010c61012f366004610fcc565b610513565b61010c61014236600461104b565b610721565b60035461015a906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61010c6107b1565b6000546001600160a01b031661015a565b61010c61019e366004611064565b6107e7565b61010c6101b1366004611064565b61088c565b61010c6101c436600461104b565b6108bf565b6101e96101d7366004611064565b60066020526000908152604090205481565b60405190815260200161016e565b6101e960025481565b61010c61020e366004611064565b6109a5565b61010c610221366004611064565b610a43565b61015a7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031633146102805760405162461bcd60e51b81526004016102779061107f565b60405180910390fd5b806102ff576040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b1580156102c457600080fd5b505afa1580156102d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102fc91906110b4565b90505b6103136001600160a01b0383163383610adb565b816001600160a01b03167f6908d99c049f548aababf0b54878d13d3b3065c7a9c2284b7b5218563fe2872f8260405161034e91815260200190565b60405180910390a25050565b600260015414156103ad5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610277565b60026001556040516bffffffffffffffffffffffff193360601b16602082015260348101849052600090605401604051602081830303815290604052805190602001209050610433838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050610b43565b61044f5760405162461bcd60e51b8152600401610277906110cd565b336000908152600660205260408120546104699086611127565b90506000811161048b5760405162461bcd60e51b81526004016102779061113e565b3360008181526006602052604090208690556104d2907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169083610adb565b60405181815233907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4906020015b60405180910390a2505060018055505050565b600260015414156105665760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610277565b60026001556040516bffffffffffffffffffffffff193360601b166020820152603481018490526000906054016040516020818303038152906040528051906020012090506105ec838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050610b43565b6106085760405162461bcd60e51b8152600401610277906110cd565b336000908152600660205260408120546106229086611127565b9050600081116106445760405162461bcd60e51b81526004016102779061113e565b33600081815260066020526040902086905561068b907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169083610adb565b6003546040516356e4bb9760e11b8152336004820152602481018390526001600160a01b039091169063adc9772e90604401600060405180830381600087803b1580156106d757600080fd5b505af11580156106eb573d6000803e3d6000fd5b50506040518381523392507f68495e3d64715347985c953095ae70deaae00087c5efc4a3aa0e00b370441b249150602001610500565b6004546001600160a01b031633148061074457506000546001600160a01b031633145b6107a55760405162461bcd60e51b815260206004820152602c60248201527f546954694d65726b6c654469737472696275746f723a204e6f74204d65726b6c60448201526b32a937b7ba102bb7b935b2b960a11b6064820152608401610277565b6107ae81610b5b565b50565b6000546001600160a01b031633146107db5760405162461bcd60e51b81526004016102779061107f565b6107e56000610b8e565b565b6000546001600160a01b031633146108115760405162461bcd60e51b81526004016102779061107f565b6001600160a01b0381166108375760405162461bcd60e51b81526004016102779061119b565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527fb08999eea46c3749880328fc60344324f415f57526256fd63326b1deec926e30906020015b60405180910390a150565b6000546001600160a01b031633146108b65760405162461bcd60e51b81526004016102779061107f565b6107ae81610bde565b6005546001600160a01b03163314806108e257506000546001600160a01b031633145b6109405760405162461bcd60e51b815260206004820152602960248201527f546954694d65726b6c654469737472696275746f723a204e6f74204465706f7360448201526834ba102bb7b935b2b960b91b6064820152608401610277565b6109756001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084610c52565b6040518181527f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e3842690602001610881565b6000546001600160a01b031633146109cf5760405162461bcd60e51b81526004016102779061107f565b6001600160a01b0381166109f55760405162461bcd60e51b81526004016102779061119b565b600580546001600160a01b0319166001600160a01b0383169081179091556040519081527fe0563d6ff93b68fe3cc6d54b7d8c6bc1b2095cf6cba8d1ac58ca779282aa58c190602001610881565b6000546001600160a01b03163314610a6d5760405162461bcd60e51b81526004016102779061107f565b6001600160a01b038116610ad25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610277565b6107ae81610b8e565b6040516001600160a01b038316602482015260448101829052610b3e90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610c90565b505050565b600082610b508584610d62565b1490505b9392505050565b600281905560405181907fc8d52687b85ab11e6859cb0b390a9e926e1b348d9796e084f88f88420c176fc690600090a250565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116610c045760405162461bcd60e51b81526004016102779061119b565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527ff6cd2a06182d5d09becddeadb7a155f6daae1a6cf8eb0aeef8476c936efe753490602001610881565b6040516001600160a01b0380851660248301528316604482015260648101829052610c8a9085906323b872dd60e01b90608401610b07565b50505050565b6000610ce5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610e0e9092919063ffffffff16565b805190915015610b3e5780806020019051810190610d0391906111de565b610b3e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610277565b600081815b8451811015610e06576000858281518110610d8457610d84611200565b60200260200101519050808311610dc6576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250610df3565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080610dfe81611216565b915050610d67565b509392505050565b6060610e1d8484600085610e25565b949350505050565b606082471015610e865760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610277565b843b610ed45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610277565b600080866001600160a01b03168587604051610ef0919061125d565b60006040518083038185875af1925050503d8060008114610f2d576040519150601f19603f3d011682016040523d82523d6000602084013e610f32565b606091505b5091509150610f42828286610f4d565b979650505050505050565b60608315610f5c575081610b54565b825115610f6c5782518084602001fd5b8160405162461bcd60e51b81526004016102779190611279565b80356001600160a01b0381168114610f9d57600080fd5b919050565b60008060408385031215610fb557600080fd5b610fbe83610f86565b946020939093013593505050565b600080600060408486031215610fe157600080fd5b83359250602084013567ffffffffffffffff8082111561100057600080fd5b818601915086601f83011261101457600080fd5b81358181111561102357600080fd5b8760208260051b850101111561103857600080fd5b6020830194508093505050509250925092565b60006020828403121561105d57600080fd5b5035919050565b60006020828403121561107657600080fd5b610b5482610f86565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156110c657600080fd5b5051919050565b60208082526024908201527f546954694d65726b6c654469737472696275746f723a20496e76616c696420506040820152633937b7b360e11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008282101561113957611139611111565b500390565b60208082526039908201527f546954694d65726b6c654469737472696275746f723a204163636f756e74206460408201527f6f6e277420686176652072657761726420746f20636c61696d00000000000000606082015260800190565b60208082526023908201527f546954694d65726b6c654469737472696275746f723a205a65726f204164647260408201526265737360e81b606082015260800190565b6000602082840312156111f057600080fd5b81518015158114610b5457600080fd5b634e487b7160e01b600052603260045260246000fd5b600060001982141561122a5761122a611111565b5060010190565b60005b8381101561124c578181015183820152602001611234565b83811115610c8a5750506000910152565b6000825161126f818460208701611231565b9190910192915050565b6020815260008251806020840152611298816040850160208701611231565b601f01601f1916919091016040019291505056fea2646970667358221220752119ffb0a535941fb7027fc46527f6f7c7367e1bc9dd6a961274ca8c377b4764736f6c634300080900330000000000000000000000003bdffa70f4b4e6985eed50453c7c0d4a15dcec520000000000000000000000005390dbf4958f21bb317c72744c110977f4c033113078300000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100f45760003560e01c8063919be5c311610097578063ebf0c71711610066578063ebf0c717146101f7578063f0b2cb1614610200578063f2fde38b14610213578063fc0c546a1461022657600080fd5b8063919be5c314610190578063a345f38d146101a3578063b6b55f25146101b6578063c884ef83146101c957600080fd5b80634783f0ef116100d35780634783f0ef146101345780634cf088d914610147578063715018a6146101775780638da5cb5b1461017f57600080fd5b80628b5848146100f95780632f52ebb71461010e57806336d76a9514610121575b600080fd5b61010c610107366004610fa2565b61024d565b005b61010c61011c366004610fcc565b61035a565b61010c61012f366004610fcc565b610513565b61010c61014236600461104b565b610721565b60035461015a906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61010c6107b1565b6000546001600160a01b031661015a565b61010c61019e366004611064565b6107e7565b61010c6101b1366004611064565b61088c565b61010c6101c436600461104b565b6108bf565b6101e96101d7366004611064565b60066020526000908152604090205481565b60405190815260200161016e565b6101e960025481565b61010c61020e366004611064565b6109a5565b61010c610221366004611064565b610a43565b61015a7f0000000000000000000000003bdffa70f4b4e6985eed50453c7c0d4a15dcec5281565b6000546001600160a01b031633146102805760405162461bcd60e51b81526004016102779061107f565b60405180910390fd5b806102ff576040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b1580156102c457600080fd5b505afa1580156102d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102fc91906110b4565b90505b6103136001600160a01b0383163383610adb565b816001600160a01b03167f6908d99c049f548aababf0b54878d13d3b3065c7a9c2284b7b5218563fe2872f8260405161034e91815260200190565b60405180910390a25050565b600260015414156103ad5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610277565b60026001556040516bffffffffffffffffffffffff193360601b16602082015260348101849052600090605401604051602081830303815290604052805190602001209050610433838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050610b43565b61044f5760405162461bcd60e51b8152600401610277906110cd565b336000908152600660205260408120546104699086611127565b90506000811161048b5760405162461bcd60e51b81526004016102779061113e565b3360008181526006602052604090208690556104d2907f0000000000000000000000003bdffa70f4b4e6985eed50453c7c0d4a15dcec526001600160a01b03169083610adb565b60405181815233907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4906020015b60405180910390a2505060018055505050565b600260015414156105665760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610277565b60026001556040516bffffffffffffffffffffffff193360601b166020820152603481018490526000906054016040516020818303038152906040528051906020012090506105ec838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050610b43565b6106085760405162461bcd60e51b8152600401610277906110cd565b336000908152600660205260408120546106229086611127565b9050600081116106445760405162461bcd60e51b81526004016102779061113e565b33600081815260066020526040902086905561068b907f0000000000000000000000003bdffa70f4b4e6985eed50453c7c0d4a15dcec526001600160a01b03169083610adb565b6003546040516356e4bb9760e11b8152336004820152602481018390526001600160a01b039091169063adc9772e90604401600060405180830381600087803b1580156106d757600080fd5b505af11580156106eb573d6000803e3d6000fd5b50506040518381523392507f68495e3d64715347985c953095ae70deaae00087c5efc4a3aa0e00b370441b249150602001610500565b6004546001600160a01b031633148061074457506000546001600160a01b031633145b6107a55760405162461bcd60e51b815260206004820152602c60248201527f546954694d65726b6c654469737472696275746f723a204e6f74204d65726b6c60448201526b32a937b7ba102bb7b935b2b960a11b6064820152608401610277565b6107ae81610b5b565b50565b6000546001600160a01b031633146107db5760405162461bcd60e51b81526004016102779061107f565b6107e56000610b8e565b565b6000546001600160a01b031633146108115760405162461bcd60e51b81526004016102779061107f565b6001600160a01b0381166108375760405162461bcd60e51b81526004016102779061119b565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527fb08999eea46c3749880328fc60344324f415f57526256fd63326b1deec926e30906020015b60405180910390a150565b6000546001600160a01b031633146108b65760405162461bcd60e51b81526004016102779061107f565b6107ae81610bde565b6005546001600160a01b03163314806108e257506000546001600160a01b031633145b6109405760405162461bcd60e51b815260206004820152602960248201527f546954694d65726b6c654469737472696275746f723a204e6f74204465706f7360448201526834ba102bb7b935b2b960b91b6064820152608401610277565b6109756001600160a01b037f0000000000000000000000003bdffa70f4b4e6985eed50453c7c0d4a15dcec5216333084610c52565b6040518181527f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e3842690602001610881565b6000546001600160a01b031633146109cf5760405162461bcd60e51b81526004016102779061107f565b6001600160a01b0381166109f55760405162461bcd60e51b81526004016102779061119b565b600580546001600160a01b0319166001600160a01b0383169081179091556040519081527fe0563d6ff93b68fe3cc6d54b7d8c6bc1b2095cf6cba8d1ac58ca779282aa58c190602001610881565b6000546001600160a01b03163314610a6d5760405162461bcd60e51b81526004016102779061107f565b6001600160a01b038116610ad25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610277565b6107ae81610b8e565b6040516001600160a01b038316602482015260448101829052610b3e90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610c90565b505050565b600082610b508584610d62565b1490505b9392505050565b600281905560405181907fc8d52687b85ab11e6859cb0b390a9e926e1b348d9796e084f88f88420c176fc690600090a250565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116610c045760405162461bcd60e51b81526004016102779061119b565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527ff6cd2a06182d5d09becddeadb7a155f6daae1a6cf8eb0aeef8476c936efe753490602001610881565b6040516001600160a01b0380851660248301528316604482015260648101829052610c8a9085906323b872dd60e01b90608401610b07565b50505050565b6000610ce5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610e0e9092919063ffffffff16565b805190915015610b3e5780806020019051810190610d0391906111de565b610b3e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610277565b600081815b8451811015610e06576000858281518110610d8457610d84611200565b60200260200101519050808311610dc6576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250610df3565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080610dfe81611216565b915050610d67565b509392505050565b6060610e1d8484600085610e25565b949350505050565b606082471015610e865760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610277565b843b610ed45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610277565b600080866001600160a01b03168587604051610ef0919061125d565b60006040518083038185875af1925050503d8060008114610f2d576040519150601f19603f3d011682016040523d82523d6000602084013e610f32565b606091505b5091509150610f42828286610f4d565b979650505050505050565b60608315610f5c575081610b54565b825115610f6c5782518084602001fd5b8160405162461bcd60e51b81526004016102779190611279565b80356001600160a01b0381168114610f9d57600080fd5b919050565b60008060408385031215610fb557600080fd5b610fbe83610f86565b946020939093013593505050565b600080600060408486031215610fe157600080fd5b83359250602084013567ffffffffffffffff8082111561100057600080fd5b818601915086601f83011261101457600080fd5b81358181111561102357600080fd5b8760208260051b850101111561103857600080fd5b6020830194508093505050509250925092565b60006020828403121561105d57600080fd5b5035919050565b60006020828403121561107657600080fd5b610b5482610f86565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156110c657600080fd5b5051919050565b60208082526024908201527f546954694d65726b6c654469737472696275746f723a20496e76616c696420506040820152633937b7b360e11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008282101561113957611139611111565b500390565b60208082526039908201527f546954694d65726b6c654469737472696275746f723a204163636f756e74206460408201527f6f6e277420686176652072657761726420746f20636c61696d00000000000000606082015260800190565b60208082526023908201527f546954694d65726b6c654469737472696275746f723a205a65726f204164647260408201526265737360e81b606082015260800190565b6000602082840312156111f057600080fd5b81518015158114610b5457600080fd5b634e487b7160e01b600052603260045260246000fd5b600060001982141561122a5761122a611111565b5060010190565b60005b8381101561124c578181015183820152602001611234565b83811115610c8a5750506000910152565b6000825161126f818460208701611231565b9190910192915050565b6020815260008251806020840152611298816040850160208701611231565b601f01601f1916919091016040019291505056fea2646970667358221220752119ffb0a535941fb7027fc46527f6f7c7367e1bc9dd6a961274ca8c377b4764736f6c63430008090033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000003bdffa70f4b4e6985eed50453c7c0d4a15dcec520000000000000000000000005390dbf4958f21bb317c72744c110977f4c033113078300000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _token (address): 0x3bdffA70f4b4E6985eED50453c7C0D4A15dcEc52
Arg [1] : _staking (address): 0x5390Dbf4958F21BB317C72744c110977F4c03311
Arg [2] : _root (bytes32): 0x3078300000000000000000000000000000000000000000000000000000000000

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000003bdffa70f4b4e6985eed50453c7c0d4a15dcec52
Arg [1] : 0000000000000000000000005390dbf4958f21bb317c72744c110977f4c03311
Arg [2] : 3078300000000000000000000000000000000000000000000000000000000000


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
[ 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.