ETH Price: $2,429.15 (+0.21%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw204117242024-07-29 10:48:5998 days ago1722250139IN
0x78E09A8d...C574a4398
0 ETH0.000310132.86934079
Withdraw203342942024-07-18 15:26:47109 days ago1721316407IN
0x78E09A8d...C574a4398
0 ETH0.0022712721.00657634
Withdraw203307762024-07-18 3:38:23109 days ago1721273903IN
0x78E09A8d...C574a4398
0 ETH0.000758996.06120925
Withdraw202909352024-07-12 14:11:35115 days ago1720793495IN
0x78E09A8d...C574a4398
0 ETH0.000207726.62717269
Withdraw202909322024-07-12 14:10:59115 days ago1720793459IN
0x78E09A8d...C574a4398
0 ETH0.001182746.74354727
Claim201686752024-06-25 12:24:23132 days ago1719318263IN
0x78E09A8d...C574a4398
0 ETH0.000592586.42208108
Withdraw201682672024-06-25 11:01:59132 days ago1719313319IN
0x78E09A8d...C574a4398
0 ETH0.000885425.04833856
Claim201682642024-06-25 11:01:23132 days ago1719313283IN
0x78E09A8d...C574a4398
0 ETH0.000401725.28174487
Withdraw201471962024-06-22 12:18:35135 days ago1719058715IN
0x78E09A8d...C574a4398
0 ETH0.00042882.709382
Claim200972712024-06-15 12:44:11142 days ago1718455451IN
0x78E09A8d...C574a4398
0 ETH0.000551895.04602734
Withdraw200543642024-06-09 12:47:47148 days ago1717937267IN
0x78E09A8d...C574a4398
0 ETH0.001451688.27807099
Claim200543622024-06-09 12:47:23148 days ago1717937243IN
0x78E09A8d...C574a4398
0 ETH0.000489927.85402856
Withdraw200353192024-06-06 20:58:11150 days ago1717707491IN
0x78E09A8d...C574a4398
0 ETH0.0039435322.48451094
Claim200353062024-06-06 20:55:35150 days ago1717707335IN
0x78E09A8d...C574a4398
0 ETH0.0020299726.6894783
Claim199816102024-05-30 8:56:11158 days ago1717059371IN
0x78E09A8d...C574a4398
0 ETH0.0009871110.69773453
Withdraw199612582024-05-27 12:37:47161 days ago1716813467IN
0x78E09A8d...C574a4398
0 ETH0.0003961612.63914846
Withdraw199612582024-05-27 12:37:47161 days ago1716813467IN
0x78E09A8d...C574a4398
0 ETH0.0010796612.63914846
Withdraw199466302024-05-25 11:35:59163 days ago1716636959IN
0x78E09A8d...C574a4398
0 ETH0.000429874.72396158
Withdraw198507952024-05-12 1:53:59176 days ago1715478839IN
0x78E09A8d...C574a4398
0 ETH0.000304993.57045983
Claim198507912024-05-12 1:53:11176 days ago1715478791IN
0x78E09A8d...C574a4398
0 ETH0.000308093.33892366
Claim197897622024-05-03 13:03:23185 days ago1714741403IN
0x78E09A8d...C574a4398
0 ETH0.0011102212.69225106
Withdraw197897612024-05-03 13:03:11185 days ago1714741391IN
0x78E09A8d...C574a4398
0 ETH0.0010270911.28852151
Withdraw197532302024-04-28 10:30:11190 days ago1714300211IN
0x78E09A8d...C574a4398
0 ETH0.000490357.17967115
Claim197532282024-04-28 10:29:47190 days ago1714300187IN
0x78E09A8d...C574a4398
0 ETH0.000544847.16346522
Claim197402652024-04-26 14:57:23192 days ago1714143443IN
0x78E09A8d...C574a4398
0 ETH0.0010460911.95900769
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:
StakingPool

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 5000 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2023-10-09
*/

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.15;


// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

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

// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// OpenZeppelin Contracts (last updated v4.9.0) (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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

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

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    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));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    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");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}


// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

// 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;
    }
}

/**
 * @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 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 {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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


contract StakingPool is Ownable {
    using SafeERC20 for IERC20;
    event Deposit(address user, uint256 amount);
    event Withdraw(address user, uint256 amount);
    event UpdateDistributor(address addr, bool toggle);

    address public stakeToken;
    address public rewardToken;

    uint256 public totalStaked;

    struct _deposit {
        uint256 rewardPerShare;
        uint256 stakedAmount;
        uint256 earned;
        uint256 claimed;
    }
    mapping(address => _deposit) public userStakes;

    struct _state {
        uint256 totalStaked;
        uint256 rewardPerShare;
        uint256 totalRewards;
    }
    _state public state;

    uint256 private constant MULTIPLIER = 1 ether;

    mapping(address => bool) public whitelistedRewardDistributer;

    constructor(address _tkn0, address _tkn1) {
        stakeToken = _tkn0;
        rewardToken = _tkn1;
    }

    function _calculateRewards(address account) private view returns (uint256) {
        return
            (userStakes[account].stakedAmount *
                (state.rewardPerShare - userStakes[account].rewardPerShare)) /
            MULTIPLIER;
    }

    function calculateEarned(address account) external view returns (uint256) {
        return userStakes[account].earned + _calculateRewards(account);
    }

    function _updateRewards(address account) private {
        userStakes[account].earned += _calculateRewards(account);
        userStakes[account].rewardPerShare = state.rewardPerShare;
    }

    function deposit(address depositor, uint256 amount) public {
        _updateRewards(depositor);
        if (amount == 0) {
            revert("AmountZero");
        }
        IERC20(stakeToken).safeTransferFrom(msg.sender, address(this), amount);

        userStakes[depositor].stakedAmount += amount;
        state.totalStaked += amount;

        emit Deposit(depositor, amount);
    }

    function withdraw(uint256 amount) external {
        _updateRewards(msg.sender);
        if (userStakes[msg.sender].stakedAmount < amount) {
            revert("NotEnoughStaked");
        }

        userStakes[msg.sender].stakedAmount -= amount;
        state.totalStaked -= amount;

        IERC20(stakeToken).safeTransfer(msg.sender, amount);

        emit Withdraw(msg.sender, amount);
    }

    function claim() external returns (uint256) {
        _updateRewards(msg.sender);
        uint256 reward = userStakes[msg.sender].earned;
        if (reward > 0) {
            IERC20(rewardToken).safeTransfer(msg.sender, reward);
            userStakes[msg.sender].claimed += reward;
            userStakes[msg.sender].earned = 0;
        }
        return reward;
    }

    modifier onlyDistributor() {
        if (!whitelistedRewardDistributer[msg.sender]) revert("NotDistributor");
        _;
    }

    function setDistributor(address addr, bool enable) public onlyOwner {
        whitelistedRewardDistributer[addr] = enable;
        emit UpdateDistributor(addr, enable);
    }

    event AddRewards(uint256 time, uint256 rewardShare);

    function distributeReward(uint256 rewardShare) public onlyDistributor {
        IERC20(rewardToken).safeTransferFrom(
            msg.sender,
            address(this),
            rewardShare
        );
        uint256 rewardPerShare = (rewardShare * MULTIPLIER) / state.totalStaked;
        state.rewardPerShare += rewardPerShare;
        state.totalRewards += rewardShare;

        emit AddRewards(block.timestamp, rewardShare);
    }

    function recover(address token) public onlyOwner {
        if (token == stakeToken) revert("IsStakeToken");
        if (token == address(0)) {
            (bool success, ) = address(msg.sender).call{
                value: address(this).balance
            }("");
            if (!success) revert("CallFailed");
        } else {
            IERC20(token).safeTransfer(
                msg.sender,
                IERC20(token).balanceOf(address(this))
            );
        }
    }

    receive() external payable {}

    fallback() external payable {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_tkn0","type":"address"},{"internalType":"address","name":"_tkn1","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardShare","type":"uint256"}],"name":"AddRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","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":"addr","type":"address"},{"indexed":false,"internalType":"bool","name":"toggle","type":"bool"}],"name":"UpdateDistributor","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"calculateEarned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"depositor","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardShare","type":"uint256"}],"name":"distributeReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"recover","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"enable","type":"bool"}],"name":"setDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"state","outputs":[{"internalType":"uint256","name":"totalStaked","type":"uint256"},{"internalType":"uint256","name":"rewardPerShare","type":"uint256"},{"internalType":"uint256","name":"totalRewards","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userStakes","outputs":[{"internalType":"uint256","name":"rewardPerShare","type":"uint256"},{"internalType":"uint256","name":"stakedAmount","type":"uint256"},{"internalType":"uint256","name":"earned","type":"uint256"},{"internalType":"uint256","name":"claimed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedRewardDistributer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b506040516112e23803806112e283398101604081905261002f916100d5565b61003833610069565b600180546001600160a01b039384166001600160a01b03199182161790915560028054929093169116179055610108565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100d057600080fd5b919050565b600080604083850312156100e857600080fd5b6100f1836100b9565b91506100ff602084016100b9565b90509250929050565b6111cb806101176000396000f3fe6080604052600436106100eb5760003560e01c80638da5cb5b11610084578063d59ba0df11610056578063d59ba0df146102f9578063eadf1b9d14610319578063f2fde38b14610339578063f7c618c11461035957005b80638da5cb5b1461021f5780638da7ad231461023d578063940a4e451461029f578063c19d93fb146102bf57005b80634e71d92d116100bd5780634e71d92d1461019957806351ed6a30146101bc578063715018a6146101f4578063817b1cd21461020957005b80630cd865ec146100f45780632e1a7d4d1461011457806347e7ef24146101345780634c69e18e1461015457005b366100f257005b005b34801561010057600080fd5b506100f261010f366004610f46565b610379565b34801561012057600080fd5b506100f261012f366004610f68565b610529565b34801561014057600080fd5b506100f261014f366004610f81565b610628565b34801561016057600080fd5b5061018461016f366004610f46565b60086020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b3480156101a557600080fd5b506101ae61072a565b604051908152602001610190565b3480156101c857600080fd5b506001546101dc906001600160a01b031681565b6040516001600160a01b039091168152602001610190565b34801561020057600080fd5b506100f26107a5565b34801561021557600080fd5b506101ae60035481565b34801561022b57600080fd5b506000546001600160a01b03166101dc565b34801561024957600080fd5b5061027f610258366004610f46565b60046020526000908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610190565b3480156102ab57600080fd5b506100f26102ba366004610f68565b6107b9565b3480156102cb57600080fd5b506005546006546007546102de92919083565b60408051938452602084019290925290820152606001610190565b34801561030557600080fd5b506100f2610314366004610fb9565b6108be565b34801561032557600080fd5b506101ae610334366004610f46565b610940565b34801561034557600080fd5b506100f2610354366004610f46565b610977565b34801561036557600080fd5b506002546101dc906001600160a01b031681565b610381610a04565b6001546001600160a01b03908116908216036103e45760405162461bcd60e51b815260206004820152600c60248201527f49735374616b65546f6b656e000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b03811661048e57604051600090339047908381818185875af1925050503d8060008114610434576040519150601f19603f3d011682016040523d82523d6000602084013e610439565b606091505b505090508061048a5760405162461bcd60e51b815260206004820152600a60248201527f43616c6c4661696c65640000000000000000000000000000000000000000000060448201526064016103db565b5050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526105269033906001600160a01b038416906370a0823190602401602060405180830381865afa1580156104f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105159190610ff0565b6001600160a01b0384169190610a5e565b50565b61053233610b2a565b336000908152600460205260409020600101548111156105945760405162461bcd60e51b815260206004820152600f60248201527f4e6f74456e6f7567685374616b6564000000000000000000000000000000000060448201526064016103db565b33600090815260046020526040812060010180548392906105b6908490611038565b9091555050600580548291906000906105d0908490611038565b90915550506001546105ec906001600160a01b03163383610a5e565b60408051338152602081018390527f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364910160405180910390a150565b61063182610b2a565b806000036106815760405162461bcd60e51b815260206004820152600a60248201527f416d6f756e745a65726f0000000000000000000000000000000000000000000060448201526064016103db565b600154610699906001600160a01b0316333084610b82565b6001600160a01b038216600090815260046020526040812060010180548392906106c490849061104f565b9091555050600580548291906000906106de90849061104f565b9091555050604080516001600160a01b0384168152602081018390527fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c91015b60405180910390a15050565b600061073533610b2a565b3360009081526004602052604090206002015480156107a057600254610765906001600160a01b03163383610a5e565b336000908152600460205260408120600301805483929061078790849061104f565b9091555050336000908152600460205260408120600201555b919050565b6107ad610a04565b6107b76000610bd9565b565b3360009081526008602052604090205460ff166108185760405162461bcd60e51b815260206004820152600e60248201527f4e6f744469737472696275746f7200000000000000000000000000000000000060448201526064016103db565b600254610830906001600160a01b0316333084610b82565b600554600090610848670de0b6b3a764000084611067565b61085291906110a4565b90508060056001016000828254610869919061104f565b90915550506007805483919060009061088390849061104f565b909155505060408051428152602081018490527f035a6817755d9d163087d4649b27315908b801d1f5e33071a44f1fc0f7a871b3910161071e565b6108c6610a04565b6001600160a01b03821660008181526008602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527fb580b1fc534c034a6ca6bc175461b53cdeb5de3263817275148a65aab3f52bd1910161071e565b600061094b82610c41565b6001600160a01b038316600090815260046020526040902060020154610971919061104f565b92915050565b61097f610a04565b6001600160a01b0381166109fb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103db565b61052681610bd9565b6000546001600160a01b031633146107b75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103db565b6040516001600160a01b038316602482015260448101829052610b259084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610ca0565b505050565b610b3381610c41565b6001600160a01b03821660009081526004602052604081206002018054909190610b5e90849061104f565b90915550506006546001600160a01b03909116600090815260046020526040902055565b6040516001600160a01b0380851660248301528316604482015260648101829052610bd39085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401610aa3565b50505050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116600090815260046020526040812054600654670de0b6b3a764000091610c7091611038565b6001600160a01b038416600090815260046020526040902060010154610c969190611067565b61097191906110a4565b6000610cf5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d889092919063ffffffff16565b9050805160001480610d16575080806020019051810190610d1691906110df565b610b255760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103db565b6060610d978484600085610d9f565b949350505050565b606082471015610e175760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103db565b600080866001600160a01b03168587604051610e339190611128565b60006040518083038185875af1925050503d8060008114610e70576040519150601f19603f3d011682016040523d82523d6000602084013e610e75565b606091505b5091509150610e8687838387610e91565b979650505050505050565b60608315610f00578251600003610ef9576001600160a01b0385163b610ef95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103db565b5081610d97565b610d978383815115610f155781518083602001fd5b8060405162461bcd60e51b81526004016103db9190611144565b80356001600160a01b03811681146107a057600080fd5b600060208284031215610f5857600080fd5b610f6182610f2f565b9392505050565b600060208284031215610f7a57600080fd5b5035919050565b60008060408385031215610f9457600080fd5b610f9d83610f2f565b946020939093013593505050565b801515811461052657600080fd5b60008060408385031215610fcc57600080fd5b610fd583610f2f565b91506020830135610fe581610fab565b809150509250929050565b60006020828403121561100257600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561104a5761104a611009565b500390565b6000821982111561106257611062611009565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561109f5761109f611009565b500290565b6000826110da577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000602082840312156110f157600080fd5b8151610f6181610fab565b60005b838110156111175781810151838201526020016110ff565b83811115610bd35750506000910152565b6000825161113a8184602087016110fc565b9190910192915050565b60208152600082518060208401526111638160408501602087016110fc565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea264697066735822122052fe55245e37b00aa28b72db37a9250bbd10b9abeab3723b5cee5285cf99a01564736f6c634300080f0033000000000000000000000000fd4ca4a692f14d88af3e7ae13cf00d5095213b25000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Deployed Bytecode

0x6080604052600436106100eb5760003560e01c80638da5cb5b11610084578063d59ba0df11610056578063d59ba0df146102f9578063eadf1b9d14610319578063f2fde38b14610339578063f7c618c11461035957005b80638da5cb5b1461021f5780638da7ad231461023d578063940a4e451461029f578063c19d93fb146102bf57005b80634e71d92d116100bd5780634e71d92d1461019957806351ed6a30146101bc578063715018a6146101f4578063817b1cd21461020957005b80630cd865ec146100f45780632e1a7d4d1461011457806347e7ef24146101345780634c69e18e1461015457005b366100f257005b005b34801561010057600080fd5b506100f261010f366004610f46565b610379565b34801561012057600080fd5b506100f261012f366004610f68565b610529565b34801561014057600080fd5b506100f261014f366004610f81565b610628565b34801561016057600080fd5b5061018461016f366004610f46565b60086020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b3480156101a557600080fd5b506101ae61072a565b604051908152602001610190565b3480156101c857600080fd5b506001546101dc906001600160a01b031681565b6040516001600160a01b039091168152602001610190565b34801561020057600080fd5b506100f26107a5565b34801561021557600080fd5b506101ae60035481565b34801561022b57600080fd5b506000546001600160a01b03166101dc565b34801561024957600080fd5b5061027f610258366004610f46565b60046020526000908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610190565b3480156102ab57600080fd5b506100f26102ba366004610f68565b6107b9565b3480156102cb57600080fd5b506005546006546007546102de92919083565b60408051938452602084019290925290820152606001610190565b34801561030557600080fd5b506100f2610314366004610fb9565b6108be565b34801561032557600080fd5b506101ae610334366004610f46565b610940565b34801561034557600080fd5b506100f2610354366004610f46565b610977565b34801561036557600080fd5b506002546101dc906001600160a01b031681565b610381610a04565b6001546001600160a01b03908116908216036103e45760405162461bcd60e51b815260206004820152600c60248201527f49735374616b65546f6b656e000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b03811661048e57604051600090339047908381818185875af1925050503d8060008114610434576040519150601f19603f3d011682016040523d82523d6000602084013e610439565b606091505b505090508061048a5760405162461bcd60e51b815260206004820152600a60248201527f43616c6c4661696c65640000000000000000000000000000000000000000000060448201526064016103db565b5050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526105269033906001600160a01b038416906370a0823190602401602060405180830381865afa1580156104f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105159190610ff0565b6001600160a01b0384169190610a5e565b50565b61053233610b2a565b336000908152600460205260409020600101548111156105945760405162461bcd60e51b815260206004820152600f60248201527f4e6f74456e6f7567685374616b6564000000000000000000000000000000000060448201526064016103db565b33600090815260046020526040812060010180548392906105b6908490611038565b9091555050600580548291906000906105d0908490611038565b90915550506001546105ec906001600160a01b03163383610a5e565b60408051338152602081018390527f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364910160405180910390a150565b61063182610b2a565b806000036106815760405162461bcd60e51b815260206004820152600a60248201527f416d6f756e745a65726f0000000000000000000000000000000000000000000060448201526064016103db565b600154610699906001600160a01b0316333084610b82565b6001600160a01b038216600090815260046020526040812060010180548392906106c490849061104f565b9091555050600580548291906000906106de90849061104f565b9091555050604080516001600160a01b0384168152602081018390527fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c91015b60405180910390a15050565b600061073533610b2a565b3360009081526004602052604090206002015480156107a057600254610765906001600160a01b03163383610a5e565b336000908152600460205260408120600301805483929061078790849061104f565b9091555050336000908152600460205260408120600201555b919050565b6107ad610a04565b6107b76000610bd9565b565b3360009081526008602052604090205460ff166108185760405162461bcd60e51b815260206004820152600e60248201527f4e6f744469737472696275746f7200000000000000000000000000000000000060448201526064016103db565b600254610830906001600160a01b0316333084610b82565b600554600090610848670de0b6b3a764000084611067565b61085291906110a4565b90508060056001016000828254610869919061104f565b90915550506007805483919060009061088390849061104f565b909155505060408051428152602081018490527f035a6817755d9d163087d4649b27315908b801d1f5e33071a44f1fc0f7a871b3910161071e565b6108c6610a04565b6001600160a01b03821660008181526008602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527fb580b1fc534c034a6ca6bc175461b53cdeb5de3263817275148a65aab3f52bd1910161071e565b600061094b82610c41565b6001600160a01b038316600090815260046020526040902060020154610971919061104f565b92915050565b61097f610a04565b6001600160a01b0381166109fb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103db565b61052681610bd9565b6000546001600160a01b031633146107b75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103db565b6040516001600160a01b038316602482015260448101829052610b259084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610ca0565b505050565b610b3381610c41565b6001600160a01b03821660009081526004602052604081206002018054909190610b5e90849061104f565b90915550506006546001600160a01b03909116600090815260046020526040902055565b6040516001600160a01b0380851660248301528316604482015260648101829052610bd39085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401610aa3565b50505050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116600090815260046020526040812054600654670de0b6b3a764000091610c7091611038565b6001600160a01b038416600090815260046020526040902060010154610c969190611067565b61097191906110a4565b6000610cf5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d889092919063ffffffff16565b9050805160001480610d16575080806020019051810190610d1691906110df565b610b255760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103db565b6060610d978484600085610d9f565b949350505050565b606082471015610e175760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103db565b600080866001600160a01b03168587604051610e339190611128565b60006040518083038185875af1925050503d8060008114610e70576040519150601f19603f3d011682016040523d82523d6000602084013e610e75565b606091505b5091509150610e8687838387610e91565b979650505050505050565b60608315610f00578251600003610ef9576001600160a01b0385163b610ef95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103db565b5081610d97565b610d978383815115610f155781518083602001fd5b8060405162461bcd60e51b81526004016103db9190611144565b80356001600160a01b03811681146107a057600080fd5b600060208284031215610f5857600080fd5b610f6182610f2f565b9392505050565b600060208284031215610f7a57600080fd5b5035919050565b60008060408385031215610f9457600080fd5b610f9d83610f2f565b946020939093013593505050565b801515811461052657600080fd5b60008060408385031215610fcc57600080fd5b610fd583610f2f565b91506020830135610fe581610fab565b809150509250929050565b60006020828403121561100257600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561104a5761104a611009565b500390565b6000821982111561106257611062611009565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561109f5761109f611009565b500290565b6000826110da577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000602082840312156110f157600080fd5b8151610f6181610fab565b60005b838110156111175781810151838201526020016110ff565b83811115610bd35750506000910152565b6000825161113a8184602087016110fc565b9190910192915050565b60208152600082518060208401526111638160408501602087016110fc565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea264697066735822122052fe55245e37b00aa28b72db37a9250bbd10b9abeab3723b5cee5285cf99a01564736f6c634300080f0033

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

000000000000000000000000fd4ca4a692f14d88af3e7ae13cf00d5095213b25000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

-----Decoded View---------------
Arg [0] : _tkn0 (address): 0xfD4Ca4a692f14d88af3E7Ae13Cf00D5095213B25
Arg [1] : _tkn1 (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000fd4ca4a692f14d88af3e7ae13cf00d5095213b25
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2


Deployed Bytecode Sourcemap

24974:4164:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28565:495;;;;;;;;;;-1:-1:-1;28565:495:0;;;;;:::i;:::-;;:::i;26927:406::-;;;;;;;;;;-1:-1:-1;26927:406:0;;;;;:::i;:::-;;:::i;26522:397::-;;;;;;;;;;-1:-1:-1;26522:397:0;;;;;:::i;:::-;;:::i;25712:60::-;;;;;;;;;;-1:-1:-1;25712:60:0;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1015:14:1;;1008:22;990:41;;978:2;963:18;25712:60:0;;;;;;;;27341:378;;;;;;;;;;;;;:::i;:::-;;;1188:25:1;;;1176:2;1161:18;27341:378:0;1042:177:1;25206:25:0;;;;;;;;;;-1:-1:-1;25206:25:0;;;;-1:-1:-1;;;;;25206:25:0;;;;;;-1:-1:-1;;;;;1388:55:1;;;1370:74;;1358:2;1343:18;25206:25:0;1224:226:1;24155:103:0;;;;;;;;;;;;;:::i;25273:26::-;;;;;;;;;;;;;;;;23514:87;;;;;;;;;;-1:-1:-1;23560:7:0;23587:6;-1:-1:-1;;;;;23587:6:0;23514:87;;25453:46;;;;;;;;;;-1:-1:-1;25453:46:0;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1686:25:1;;;1742:2;1727:18;;1720:34;;;;1770:18;;;1763:34;1828:2;1813:18;;1806:34;1673:3;1658:19;25453:46:0;1455:391:1;28109:448:0;;;;;;;;;;-1:-1:-1;28109:448:0;;;;;:::i;:::-;;:::i;25630:19::-;;;;;;;;;;-1:-1:-1;25630:19:0;;;;;;;;;;;;;;;;2053:25:1;;;2109:2;2094:18;;2087:34;;;;2137:18;;;2130:34;2041:2;2026:18;25630:19:0;1851:319:1;27864:177:0;;;;;;;;;;-1:-1:-1;27864:177:0;;;;;:::i;:::-;;:::i;26159:155::-;;;;;;;;;;-1:-1:-1;26159:155:0;;;;;:::i;:::-;;:::i;24413:201::-;;;;;;;;;;-1:-1:-1;24413:201:0;;;;;:::i;:::-;;:::i;25238:26::-;;;;;;;;;;-1:-1:-1;25238:26:0;;;;-1:-1:-1;;;;;25238:26:0;;;28565:495;23400:13;:11;:13::i;:::-;28638:10:::1;::::0;-1:-1:-1;;;;;28638:10:0;;::::1;28629:19:::0;;::::1;::::0;28625:47:::1;;28650:22;::::0;-1:-1:-1;;;28650:22:0;;2820:2:1;28650:22:0::1;::::0;::::1;2802:21:1::0;2859:2;2839:18;;;2832:30;2898:14;2878:18;;;2871:42;2930:18;;28650:22:0::1;;;;;;;;28625:47;-1:-1:-1::0;;;;;28687:19:0;::::1;28683:370;;28742:90;::::0;28724:12:::1;::::0;28750:10:::1;::::0;28792:21:::1;::::0;28724:12;28742:90;28724:12;28742:90;28792:21;28750:10;28742:90:::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28723:109;;;28852:7;28847:34;;28861:20;::::0;-1:-1:-1;;;28861:20:0;;3371:2:1;28861:20:0::1;::::0;::::1;3353:21:1::0;3410:2;3390:18;;;3383:30;3449:12;3429:18;;;3422:40;3479:18;;28861:20:0::1;3169:334:1::0;28847:34:0::1;28708:185;28565:495:::0;:::o;28683:370::-:1;28988:38;::::0;;;;29020:4:::1;28988:38;::::0;::::1;1370:74:1::0;28914:127:0::1;::::0;28959:10:::1;::::0;-1:-1:-1;;;;;28988:23:0;::::1;::::0;::::1;::::0;1343:18:1;;28988:38:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;28914:26:0;::::1;::::0;:127;:26:::1;:127::i;:::-;28565:495:::0;:::o;26927:406::-;26981:26;26996:10;26981:14;:26::i;:::-;27033:10;27022:22;;;;:10;:22;;;;;:35;;;:44;-1:-1:-1;27018:102:0;;;27083:25;;-1:-1:-1;;;27083:25:0;;3899:2:1;27083:25:0;;;3881:21:1;3938:2;3918:18;;;3911:30;3977:17;3957:18;;;3950:45;4012:18;;27083:25:0;3697:339:1;27018:102:0;27143:10;27132:22;;;;:10;:22;;;;;:35;;:45;;27171:6;;27132:22;:45;;27171:6;;27132:45;:::i;:::-;;;;-1:-1:-1;;27188:5:0;:27;;27209:6;;27188:5;:17;;:27;;27209:6;;27188:27;:::i;:::-;;;;-1:-1:-1;;27235:10:0;;27228:51;;-1:-1:-1;;;;;27235:10:0;27260;27272:6;27228:31;:51::i;:::-;27297:28;;;27306:10;4534:74:1;;4639:2;4624:18;;4617:34;;;27297:28:0;;4507:18:1;27297:28:0;;;;;;;26927:406;:::o;26522:397::-;26592:25;26607:9;26592:14;:25::i;:::-;26632:6;26642:1;26632:11;26628:64;;26660:20;;-1:-1:-1;;;26660:20:0;;4864:2:1;26660:20:0;;;4846:21:1;4903:2;4883:18;;;4876:30;4942:12;4922:18;;;4915:40;4972:18;;26660:20:0;4662:334:1;26628:64:0;26709:10;;26702:70;;-1:-1:-1;;;;;26709:10:0;26738;26758:4;26765:6;26702:35;:70::i;:::-;-1:-1:-1;;;;;26785:21:0;;;;;;:10;:21;;;;;:34;;:44;;26823:6;;26785:21;:44;;26823:6;;26785:44;:::i;:::-;;;;-1:-1:-1;;26840:5:0;:27;;26861:6;;26840:5;:17;;:27;;26861:6;;26840:27;:::i;:::-;;;;-1:-1:-1;;26885:26:0;;;-1:-1:-1;;;;;4552:55:1;;4534:74;;4639:2;4624:18;;4617:34;;;26885:26:0;;4507:18:1;26885:26:0;;;;;;;;26522:397;;:::o;27341:378::-;27376:7;27396:26;27411:10;27396:14;:26::i;:::-;27461:10;27433:14;27450:22;;;:10;:22;;;;;:29;;;27494:10;;27490:198;;27528:11;;27521:52;;-1:-1:-1;;;;;27528:11:0;27554:10;27566:6;27521:32;:52::i;:::-;27599:10;27588:22;;;;:10;:22;;;;;:30;;:40;;27622:6;;27588:22;:40;;27622:6;;27588:40;:::i;:::-;;;;-1:-1:-1;;27654:10:0;27675:1;27643:22;;;:10;:22;;;;;:29;;:33;27490:198;27705:6;27341:378;-1:-1:-1;27341:378:0:o;24155:103::-;23400:13;:11;:13::i;:::-;24220:30:::1;24247:1;24220:18;:30::i;:::-;24155:103::o:0;28109:448::-;27799:10;27770:40;;;;:28;:40;;;;;;;;27765:71;;27812:24;;-1:-1:-1;;;27812:24:0;;5336:2:1;27812:24:0;;;5318:21:1;5375:2;5355:18;;;5348:30;5414:16;5394:18;;;5387:44;5448:18;;27812:24:0;5134:338:1;27765:71:0;28197:11:::1;::::0;28190:126:::1;::::0;-1:-1:-1;;;;;28197:11:0::1;28241:10;28274:4;28294:11:::0;28190:36:::1;:126::i;:::-;28381:5;:17:::0;28327:22:::1;::::0;28353:24:::1;25696:7;28353:11:::0;:24:::1;:::i;:::-;28352:46;;;;:::i;:::-;28327:71;;28433:14;28409:5;:20;;;:38;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;28458:18:0;:33;;28480:11;;28458:18;::::1;::::0;:33:::1;::::0;28480:11;;28458:33:::1;:::i;:::-;::::0;;;-1:-1:-1;;28509:40:0::1;::::0;;28520:15:::1;6163:25:1::0;;6219:2;6204:18;;6197:34;;;28509:40:0::1;::::0;6136:18:1;28509:40:0::1;5989:248:1::0;27864:177:0;23400:13;:11;:13::i;:::-;-1:-1:-1;;;;;27943:34:0;::::1;;::::0;;;:28:::1;:34;::::0;;;;;;;;:43;;;::::1;::::0;::::1;;::::0;;::::1;::::0;;;28002:31;;6410:74:1;;;6500:18;;;6493:50;28002:31:0::1;::::0;6383:18:1;28002:31:0::1;6242:307:1::0;26159:155:0;26224:7;26280:26;26298:7;26280:17;:26::i;:::-;-1:-1:-1;;;;;26251:19:0;;;;;;:10;:19;;;;;:26;;;:55;;;;:::i;:::-;26244:62;26159:155;-1:-1:-1;;26159:155:0:o;24413:201::-;23400:13;:11;:13::i;:::-;-1:-1:-1;;;;;24502:22:0;::::1;24494:73;;;::::0;-1:-1:-1;;;24494:73:0;;6756:2:1;24494:73:0::1;::::0;::::1;6738:21:1::0;6795:2;6775:18;;;6768:30;6834:34;6814:18;;;6807:62;6905:8;6885:18;;;6878:36;6931:19;;24494:73:0::1;6554:402:1::0;24494:73:0::1;24578:28;24597:8;24578:18;:28::i;23679:132::-:0;23560:7;23587:6;-1:-1:-1;;;;;23587:6:0;22303:10;23743:23;23735:68;;;;-1:-1:-1;;;23735:68:0;;7163:2:1;23735:68:0;;;7145:21:1;;;7182:18;;;7175:30;7241:34;7221:18;;;7214:62;7293:18;;23735:68:0;6961:356:1;15438:177:0;15548:58;;-1:-1:-1;;;;;4552:55:1;;15548:58:0;;;4534:74:1;4624:18;;;4617:34;;;15521:86:0;;15541:5;;15571:23;;4507:18:1;;15548:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15521:19;:86::i;:::-;15438:177;;;:::o;26322:192::-;26412:26;26430:7;26412:17;:26::i;:::-;-1:-1:-1;;;;;26382:19:0;;;;;;:10;:19;;;;;:26;;:56;;:26;;:19;:56;;;;;:::i;:::-;;;;-1:-1:-1;;26486:20:0;;-1:-1:-1;;;;;26449:19:0;;;;;;;:10;:19;;;;;:57;26322:192::o;15860:205::-;15988:68;;-1:-1:-1;;;;;7603:15:1;;;15988:68:0;;;7585:34:1;7655:15;;7635:18;;;7628:43;7687:18;;;7680:34;;;15961:96:0;;15981:5;;16011:27;;7497:18:1;;15988:68:0;7322:398:1;15961:96:0;15860:205;;;;:::o;24774:191::-;24848:16;24867:6;;-1:-1:-1;;;;;24884:17:0;;;;;;;;;;24917:40;;24867:6;;;;;;;24917:40;;24848:16;24917:40;24837:128;24774:191;:::o;25898:253::-;-1:-1:-1;;;;;26081:19:0;;25964:7;26081:19;;;:10;:19;;;;;:34;26058:20;;25696:7;;26058:57;;;:::i;:::-;-1:-1:-1;;;;;26005:19:0;;;;;;:10;:19;;;;;:32;;;:111;;;;:::i;:::-;26004:139;;;;:::i;19784:649::-;20208:23;20234:69;20262:4;20234:69;;;;;;;;;;;;;;;;;20242:5;-1:-1:-1;;;;;20234:27:0;;;:69;;;;;:::i;:::-;20208:95;;20322:10;:17;20343:1;20322:22;:56;;;;20359:10;20348:30;;;;;;;;;;;;:::i;:::-;20314:111;;;;-1:-1:-1;;;20314:111:0;;8177:2:1;20314:111:0;;;8159:21:1;8216:2;8196:18;;;8189:30;8255:34;8235:18;;;8228:62;8326:12;8306:18;;;8299:40;8356:19;;20314:111:0;7975:406:1;9320:229:0;9457:12;9489:52;9511:6;9519:4;9525:1;9528:12;9489:21;:52::i;:::-;9482:59;9320:229;-1:-1:-1;;;;9320:229:0:o;10406:455::-;10576:12;10634:5;10609:21;:30;;10601:81;;;;-1:-1:-1;;;10601:81:0;;8588:2:1;10601:81:0;;;8570:21:1;8627:2;8607:18;;;8600:30;8666:34;8646:18;;;8639:62;8737:8;8717:18;;;8710:36;8763:19;;10601:81:0;8386:402:1;10601:81:0;10694:12;10708:23;10735:6;-1:-1:-1;;;;;10735:11:0;10754:5;10761:4;10735:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10693:73;;;;10784:69;10811:6;10819:7;10828:10;10840:12;10784:26;:69::i;:::-;10777:76;10406:455;-1:-1:-1;;;;;;;10406:455:0:o;12979:644::-;13164:12;13193:7;13189:427;;;13221:10;:17;13242:1;13221:22;13217:290;;-1:-1:-1;;;;;6860:19:0;;;13431:60;;;;-1:-1:-1;;;13431:60:0;;9537:2:1;13431:60:0;;;9519:21:1;9576:2;9556:18;;;9549:30;9615:31;9595:18;;;9588:59;9664:18;;13431:60:0;9335:353:1;13431:60:0;-1:-1:-1;13528:10:0;13521:17;;13189:427;13571:33;13579:10;13591:12;14326:17;;:21;14322:388;;14558:10;14552:17;14615:15;14602:10;14598:2;14594:19;14587:44;14322:388;14685:12;14678:20;;-1:-1:-1;;;14678:20:0;;;;;;;;:::i;14:196:1:-;82:20;;-1:-1:-1;;;;;131:54:1;;121:65;;111:93;;200:1;197;190:12;215:186;274:6;327:2;315:9;306:7;302:23;298:32;295:52;;;343:1;340;333:12;295:52;366:29;385:9;366:29;:::i;:::-;356:39;215:186;-1:-1:-1;;;215:186:1:o;406:180::-;465:6;518:2;506:9;497:7;493:23;489:32;486:52;;;534:1;531;524:12;486:52;-1:-1:-1;557:23:1;;406:180;-1:-1:-1;406:180:1:o;591:254::-;659:6;667;720:2;708:9;699:7;695:23;691:32;688:52;;;736:1;733;726:12;688:52;759:29;778:9;759:29;:::i;:::-;749:39;835:2;820:18;;;;807:32;;-1:-1:-1;;;591:254:1:o;2175:118::-;2261:5;2254:13;2247:21;2240:5;2237:32;2227:60;;2283:1;2280;2273:12;2298:315;2363:6;2371;2424:2;2412:9;2403:7;2399:23;2395:32;2392:52;;;2440:1;2437;2430:12;2392:52;2463:29;2482:9;2463:29;:::i;:::-;2453:39;;2542:2;2531:9;2527:18;2514:32;2555:28;2577:5;2555:28;:::i;:::-;2602:5;2592:15;;;2298:315;;;;;:::o;3508:184::-;3578:6;3631:2;3619:9;3610:7;3606:23;3602:32;3599:52;;;3647:1;3644;3637:12;3599:52;-1:-1:-1;3670:16:1;;3508:184;-1:-1:-1;3508:184:1:o;4041:::-;4093:77;4090:1;4083:88;4190:4;4187:1;4180:15;4214:4;4211:1;4204:15;4230:125;4270:4;4298:1;4295;4292:8;4289:34;;;4303:18;;:::i;:::-;-1:-1:-1;4340:9:1;;4230:125::o;5001:128::-;5041:3;5072:1;5068:6;5065:1;5062:13;5059:39;;;5078:18;;:::i;:::-;-1:-1:-1;5114:9:1;;5001:128::o;5477:228::-;5517:7;5643:1;5575:66;5571:74;5568:1;5565:81;5560:1;5553:9;5546:17;5542:105;5539:131;;;5650:18;;:::i;:::-;-1:-1:-1;5690:9:1;;5477:228::o;5710:274::-;5750:1;5776;5766:189;;5811:77;5808:1;5801:88;5912:4;5909:1;5902:15;5940:4;5937:1;5930:15;5766:189;-1:-1:-1;5969:9:1;;5710:274::o;7725:245::-;7792:6;7845:2;7833:9;7824:7;7820:23;7816:32;7813:52;;;7861:1;7858;7851:12;7813:52;7893:9;7887:16;7912:28;7934:5;7912:28;:::i;8793:258::-;8865:1;8875:113;8889:6;8886:1;8883:13;8875:113;;;8965:11;;;8959:18;8946:11;;;8939:39;8911:2;8904:10;8875:113;;;9006:6;9003:1;9000:13;8997:48;;;-1:-1:-1;;9041:1:1;9023:16;;9016:27;8793:258::o;9056:274::-;9185:3;9223:6;9217:13;9239:53;9285:6;9280:3;9273:4;9265:6;9261:17;9239:53;:::i;:::-;9308:16;;;;;9056:274;-1:-1:-1;;9056:274:1:o;9693:442::-;9842:2;9831:9;9824:21;9805:4;9874:6;9868:13;9917:6;9912:2;9901:9;9897:18;9890:34;9933:66;9992:6;9987:2;9976:9;9972:18;9967:2;9959:6;9955:15;9933:66;:::i;:::-;10051:2;10039:15;10056:66;10035:88;10020:104;;;;10126:2;10016:113;;9693:442;-1:-1:-1;;9693:442:1:o

Swarm Source

ipfs://52fe55245e37b00aa28b72db37a9250bbd10b9abeab3723b5cee5285cf99a015

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.