ETH Price: $3,123.08 (-1.39%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Transaction Hash
Method
Block
From
To
0xe2f3548e8b2b1c884a3a00f3c889a9d0fe5c1c1f396db42bd7213caf93507bc2 Unstake(pending)2025-01-05 1:22:4424 days ago1736040164IN
0x0E3efD5B...7F2A0e95F
0 ETH(Pending)(Pending)
Unstake217302442025-01-29 12:39:475 hrs ago1738154387IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000239434.01492023
Unstake217302432025-01-29 12:39:355 hrs ago1738154375IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000227823.82022448
Unstake Users217299562025-01-29 11:41:596 hrs ago1738150919IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000142022.29590157
Unstake217293812025-01-29 9:46:358 hrs ago1738143995IN
0x0E3efD5B...7F2A0e95F
0 ETH0.00021392.31561553
Unstake217293192025-01-29 9:33:598 hrs ago1738143239IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000152522.55698845
Unstake217287252025-01-29 7:34:3510 hrs ago1738136075IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000131222.2
Unstake217285512025-01-29 6:59:3510 hrs ago1738133975IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000086271.44629836
Unstake217281562025-01-29 5:39:5912 hrs ago1738129199IN
0x0E3efD5B...7F2A0e95F
0 ETH0.00007951.33282141
Unstake217281442025-01-29 5:37:3512 hrs ago1738129055IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000110411.85103842
Unstake217280192025-01-29 5:12:3512 hrs ago1738127555IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000146352.45352101
Unstake217280152025-01-29 5:11:4712 hrs ago1738127507IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000145762.44376357
Unstake217280102025-01-29 5:10:4712 hrs ago1738127447IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000149482.50652435
Unstake217273932025-01-29 3:07:1114 hrs ago1738120031IN
0x0E3efD5B...7F2A0e95F
0 ETH0.00014652.45620106
Unstake Users217264512025-01-28 23:57:1117 hrs ago1738108631IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000239243.02987748
Unstake Users217264462025-01-28 23:56:1117 hrs ago1738108571IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000290553.13144993
Unstake217250002025-01-28 19:05:5922 hrs ago1738091159IN
0x0E3efD5B...7F2A0e95F
0 ETH0.0008814114.77668515
Unstake217247912025-01-28 18:23:5923 hrs ago1738088639IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000451747.57331954
Unstake217237842025-01-28 15:01:3526 hrs ago1738076495IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000540149.05717374
Unstake217228382025-01-28 11:50:5929 hrs ago1738065059IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000202593.39638536
Unstake217226992025-01-28 11:23:1130 hrs ago1738063391IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000176422.95769326
Unstake Users217223402025-01-28 10:10:5931 hrs ago1738059059IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000213963.21897234
Unstake217223322025-01-28 10:09:2331 hrs ago1738058963IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000225313.77812334
Unstake217216782025-01-28 7:57:5933 hrs ago1738051079IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000233333.91260125
Unstake Users217216652025-01-28 7:55:2333 hrs ago1738050923IN
0x0E3efD5B...7F2A0e95F
0 ETH0.000563798.48187454
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
217302442025-01-29 12:39:475 hrs ago1738154387
0x0E3efD5B...7F2A0e95F
0 ETH
217302432025-01-29 12:39:355 hrs ago1738154375
0x0E3efD5B...7F2A0e95F
0 ETH
217299562025-01-29 11:41:596 hrs ago1738150919
0x0E3efD5B...7F2A0e95F
0 ETH
217293812025-01-29 9:46:358 hrs ago1738143995
0x0E3efD5B...7F2A0e95F
0 ETH
217293192025-01-29 9:33:598 hrs ago1738143239
0x0E3efD5B...7F2A0e95F
0 ETH
217287252025-01-29 7:34:3510 hrs ago1738136075
0x0E3efD5B...7F2A0e95F
0 ETH
217285512025-01-29 6:59:3510 hrs ago1738133975
0x0E3efD5B...7F2A0e95F
0 ETH
217281562025-01-29 5:39:5912 hrs ago1738129199
0x0E3efD5B...7F2A0e95F
0 ETH
217281442025-01-29 5:37:3512 hrs ago1738129055
0x0E3efD5B...7F2A0e95F
0 ETH
217280192025-01-29 5:12:3512 hrs ago1738127555
0x0E3efD5B...7F2A0e95F
0 ETH
217280152025-01-29 5:11:4712 hrs ago1738127507
0x0E3efD5B...7F2A0e95F
0 ETH
217280102025-01-29 5:10:4712 hrs ago1738127447
0x0E3efD5B...7F2A0e95F
0 ETH
217273932025-01-29 3:07:1114 hrs ago1738120031
0x0E3efD5B...7F2A0e95F
0 ETH
217264512025-01-28 23:57:1117 hrs ago1738108631
0x0E3efD5B...7F2A0e95F
0 ETH
217264462025-01-28 23:56:1117 hrs ago1738108571
0x0E3efD5B...7F2A0e95F
0 ETH
217250002025-01-28 19:05:5922 hrs ago1738091159
0x0E3efD5B...7F2A0e95F
0 ETH
217247912025-01-28 18:23:5923 hrs ago1738088639
0x0E3efD5B...7F2A0e95F
0 ETH
217237842025-01-28 15:01:3526 hrs ago1738076495
0x0E3efD5B...7F2A0e95F
0 ETH
217228382025-01-28 11:50:5929 hrs ago1738065059
0x0E3efD5B...7F2A0e95F
0 ETH
217226992025-01-28 11:23:1130 hrs ago1738063391
0x0E3efD5B...7F2A0e95F
0 ETH
217223402025-01-28 10:10:5931 hrs ago1738059059
0x0E3efD5B...7F2A0e95F
0 ETH
217223322025-01-28 10:09:2331 hrs ago1738058963
0x0E3efD5B...7F2A0e95F
0 ETH
217216782025-01-28 7:57:5933 hrs ago1738051079
0x0E3efD5B...7F2A0e95F
0 ETH
217216652025-01-28 7:55:2333 hrs ago1738050923
0x0E3efD5B...7F2A0e95F
0 ETH
217214612025-01-28 7:14:1134 hrs ago1738048451
0x0E3efD5B...7F2A0e95F
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
IDStaking

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 11 : IDStaking.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;

import {Staking} from "./Staking.sol";
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {EIP712} from "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";

contract IDStaking is Staking, EIP712, AccessControl {
    uint256 public latestRound;

    // 0x7ba1e5E9d013EaE624D274bfbAC886459F291081
    address public trustedSigner;

    struct Round {
        string meta;
        uint256 tvl;
        uint256 start;
        uint256 duration;
    }

    mapping(uint256 => mapping(bytes32 => uint256)) public xStakes;
    mapping(uint256 => Round) rounds;
    mapping(bytes32 => bool) usedDigest;

    event roundCreated(uint256 id);
    event selfStake(
        uint256 roundId,
        address staker,
        uint256 amount,
        bool staked
    );
    event xStake(
        uint256 roundId,
        address staker,
        address user,
        uint256 amount,
        bool staked
    );
    event tokenMigrated(
        address staker,
        uint256 amount,
        uint256 fromRound,
        uint256 toRound
    );

    modifier roundExists(uint256 roundId) {
        require(roundId > 0 && roundId <= latestRound, "Round does not exist");
        _;
    }

    modifier canStakeRound(uint256 roundId) {
        require(roundId > 0 && roundId <= latestRound, "Round does not exist");
        require(
            rounds[roundId].start + rounds[roundId].duration > block.timestamp,
            "Can't stake on this round"
        );
        _;
    }

    modifier canUnstakeRound(uint256 roundId) {
        require(roundId > 0 && roundId <= latestRound, "Round does not exist");
        require(
            rounds[roundId].start + rounds[roundId].duration < block.timestamp,
            "Can't unstake an active round"
        );
        _;
    }

    constructor(IERC20 _token)
        EIP712("IDStaking", "1.0")
    {
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        token = _token;
    }

    function addAdmin(address admin) public {
        grantRole(DEFAULT_ADMIN_ROLE, admin);
    }

    function removeAdmin(address admin) public {
        revokeRole(DEFAULT_ADMIN_ROLE, admin);
    }

    function createRound(
        uint256 start,
        uint256 duration,
        string calldata meta
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (latestRound > 0) {
            require(
                start >
                    rounds[latestRound].start + rounds[latestRound].duration,
                "new rounds have to start after old rounds"
            );
        }

        require(start >= block.timestamp, "new rounds should be in the future");

        latestRound++;

        uint256 currentRound = latestRound;

        rounds[currentRound].start = start;
        rounds[currentRound].duration = duration;
        rounds[currentRound].meta = meta;

        emit roundCreated(currentRound);
    }

    // stake
    function stake(uint256 roundId, uint256 amount)
        external
        canStakeRound(roundId)
    {
        _stake(roundId, amount);

        rounds[roundId].tvl += amount;

        emit selfStake(roundId, msg.sender, amount, true);
    }

    // unstake
    function unstake(uint256 roundId, uint256 amount)
        external
        canUnstakeRound(roundId)
    {
        require(
            stakes[roundId][msg.sender] >= amount,
            "Not enough balance to withdraw"
        );

        rounds[roundId].tvl -= amount;

        _unstake(roundId, amount);

        emit selfStake(roundId, msg.sender, amount, false);
    }

    // stakeUser
    function stakeUsers(
        uint256 roundId,
        address[] calldata users,
        uint256[] calldata amounts
    ) external canStakeRound(roundId) {
        require(users.length == amounts.length, "Unequal users and amount");

        uint256 totalAmount;

        for (uint256 i = 0; i < users.length; i++) {
            address user = users[i];
            uint256 amount = amounts[i];
            require(
                amount > 0,
                "You can't stake nothing on a selected address"
            );
            require(address(0) != user, "can't stake the zero address");
            require(user != msg.sender, "You can't stake on your address here");

            xStakes[roundId][getStakeId(msg.sender, user)] += amount;
            totalAmount += amount;

            emit xStake(roundId, msg.sender, user, amount, true);
        }

        require(
            token.transferFrom(msg.sender, address(this), totalAmount),
            "unable to stake users"
        );

        rounds[roundId].tvl += totalAmount;
    }

    // unstakeUser
    function unstakeUsers(uint256 roundId, address[] calldata users)
        external
        canUnstakeRound(roundId)
    {
        uint256 totalAmount = 0;

        for (uint256 i = 0; i < users.length; i++) {
            require(address(0) != users[i], "can't unstake the zero address");
            require(
                users[i] != msg.sender,
                "You can't unstake on your address here"
            );

            bytes32 stakeId = getStakeId(msg.sender, users[i]);
            uint256 unstakeBalance = xStakes[roundId][stakeId];

            if (unstakeBalance > 0) {
                xStakes[roundId][stakeId] -= unstakeBalance;

                totalAmount += unstakeBalance;

                emit xStake(
                    roundId,
                    msg.sender,
                    users[i],
                    unstakeBalance,
                    false
                );
            }
        }

        rounds[roundId].tvl -= totalAmount;
        require(
            token.transfer(msg.sender, totalAmount),
            "unable to unstake users"
        );
    }

    // migrateStake
    function migrateStake(uint256 fromRound)
        external
        canUnstakeRound(fromRound)
    {
        uint256 toRound = latestRound;

        require(fromRound < toRound, "Can't migrate from an active round");

        uint256 balance = stakes[fromRound][msg.sender];

        require(balance > 0, "Not enough balance to migrate");

        rounds[fromRound].tvl -= balance;
        stakes[fromRound][msg.sender] = 0;
        rounds[toRound].tvl += balance;
        stakes[toRound][msg.sender] = balance;

        emit selfStake(fromRound, msg.sender, balance, false);
        emit selfStake(toRound, msg.sender, balance, true);
        emit tokenMigrated(msg.sender, balance, fromRound, toRound);
    }

    // VIEW
    function fetchRoundMeta(uint256 roundId)
        public
        view
        roundExists(roundId)
        returns (
            uint256 start,
            uint256 duration,
            uint256 tvl,
            string memory meta
        )
    {
        return (
            rounds[roundId].start,
            rounds[roundId].duration,
            rounds[roundId].tvl,
            rounds[roundId].meta
        );
    }

    function isActiveRound(uint256 roundId)
        public
        view
        returns (bool isActive)
    {
        (uint256 start, uint256 duration, , ) = fetchRoundMeta(roundId);
        isActive =
            start < block.timestamp &&
            start + duration > block.timestamp;
    }

    function getUserStakeForRound(uint256 roundId, address user)
        public
        view
        roundExists(roundId)
        returns (uint256)
    {
        return _getUserStakeForRound(roundId, user);
    }

    function getUserXStakeForRound(
        uint256 roundId,
        address staker,
        address user
    ) external view returns (uint256) {
        return xStakes[roundId][getStakeId(staker, user)];
    }

    function getStakeId(address staker, address user)
        public
        pure
        returns (bytes32)
    {
        return keccak256(abi.encode(staker, user));
    }
}

File 2 of 11 : Staking.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;

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

contract Staking {
    IERC20 public token;

    mapping(uint256 => mapping(address => uint256)) public stakes;

    // stake
    function _stake(uint256 roundId, uint256 amount) internal {
        require(
            token.transferFrom(msg.sender, address(this), amount),
            "unable to stake amount"
        );

        stakes[roundId][msg.sender] += amount;
    }

    // unstake
    function _unstake(uint256 roundId, uint256 amount) internal {
        stakes[roundId][msg.sender] -= amount;

        require(token.transfer(msg.sender, amount), "unable to unstake amount");
    }

    function _getUserStakeForRound(uint256 roundId, address user)
        internal
        view
        returns (uint256)
    {
        return stakes[roundId][user];
    }
}

File 3 of 11 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 4 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

File 5 of 11 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 6 of 11 : draft-EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;
    address private immutable _CACHED_THIS;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _CACHED_THIS = address(this);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

File 7 of 11 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 8 of 11 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

File 9 of 11 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 10 of 11 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 11 of 11 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"roundCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"staked","type":"bool"}],"name":"selfStake","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fromRound","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toRound","type":"uint256"}],"name":"tokenMigrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"staked","type":"bool"}],"name":"xStake","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"string","name":"meta","type":"string"}],"name":"createRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"roundId","type":"uint256"}],"name":"fetchRoundMeta","outputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"tvl","type":"uint256"},{"internalType":"string","name":"meta","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"address","name":"user","type":"address"}],"name":"getStakeId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"roundId","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"getUserStakeForRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"roundId","type":"uint256"},{"internalType":"address","name":"staker","type":"address"},{"internalType":"address","name":"user","type":"address"}],"name":"getUserXStakeForRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"roundId","type":"uint256"}],"name":"isActiveRound","outputs":[{"internalType":"bool","name":"isActive","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fromRound","type":"uint256"}],"name":"migrateStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"roundId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"roundId","type":"uint256"},{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"stakeUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"stakes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"roundId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"roundId","type":"uint256"},{"internalType":"address[]","name":"users","type":"address[]"}],"name":"unstakeUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"xStakes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6101406040523480156200001257600080fd5b50604051620022ec380380620022ec833981016040819052620000359162000212565b604080518082018252600981526849445374616b696e6760b81b6020808301918252835180850190945260038452620312e360ec1b908401528151902060e08190527fe6bbd6277e1bf288eed5e8d1780f9a50b239e86b153736bceebccf4ea79d90b36101008190524660a0529192917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620001168184846040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6080523060601b60c0526101205250620001389250600091503390506200015e565b600080546001600160a01b0319166001600160a01b039290921691909117905562000242565b6200016a82826200016e565b5050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff166200016a5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001ce3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006020828403121562000224578081fd5b81516001600160a01b03811681146200023b578182fd5b9392505050565b60805160a05160c05160601c60e0516101005161012051612069620002836000396000505060005050600050506000505060005050600050506120696000f3fe608060405234801561001057600080fd5b50600436106101725760003560e01c806366abc2a6116100de578063a217fddf11610097578063e5f8b15611610071578063e5f8b15614610356578063f23d829b14610369578063f74d54801461038c578063fc0c546a146103b757600080fd5b8063a217fddf14610310578063a9a3bba414610318578063d547741f1461034357600080fd5b806366abc2a61461028657806370480275146102995780637b0472f0146102ac57806385a68681146102bf57806391d14854146102ea5780639e2c8a5b146102fd57600080fd5b80632f2ff15d116101305780632f2ff15d1461021e5780633029e04d1461023157806336568abe14610244578063565cd0941461025757806362dfb7bb1461026a578063668a0f021461027d57600080fd5b806202069e1461017757806301ffc9a71461018c5780631785f53c146101b45780631b45c18d146101c7578063248a9ca3146101da57806329b09f271461020b575b600080fd5b61018a610185366004611d29565b6103ca565b005b61019f61019a366004611be4565b610540565b60405190151581526020015b60405180910390f35b61018a6101c2366004611b3e565b610577565b61018a6101d5366004611c91565b610585565b6101fd6101e8366004611baa565b60009081526002602052604090206001015490565b6040519081526020016101ab565b6101fd610219366004611bc2565b6109b4565b61018a61022c366004611bc2565b610a11565b6101fd61023f366004611c0c565b610a3c565b61018a610252366004611bc2565b610a6d565b61018a610265366004611baa565b610aeb565b61018a610278366004611c47565b610d40565b6101fd60035481565b61019f610294366004611baa565b61111d565b61018a6102a7366004611b3e565b61114f565b61018a6102ba366004611d08565b61115a565b6101fd6102cd366004611d08565b600560209081526000928352604080842090915290825290205481565b61019f6102f8366004611bc2565b611258565b61018a61030b366004611d08565b611283565b6101fd600081565b6101fd610326366004611bc2565b600160209081526000928352604080842090915290825290205481565b61018a610351366004611bc2565b6113b1565b6101fd610364366004611b58565b6113d7565b61037c610377366004611baa565b61140f565b6040516101ab9493929190611ee3565b60045461039f906001600160a01b031681565b6040516001600160a01b0390911681526020016101ab565b60005461039f906001600160a01b031681565b60006103d68133611506565b6003541561046957600380546000908152600660205260409020908101546002909101546104049190611f12565b85116104695760405162461bcd60e51b815260206004820152602960248201527f6e657720726f756e6473206861766520746f207374617274206166746572206f6044820152686c6420726f756e647360b81b60648201526084015b60405180910390fd5b428510156104c45760405162461bcd60e51b815260206004820152602260248201527f6e657720726f756e64732073686f756c6420626520696e207468652066757475604482015261726560f01b6064820152608401610460565b600380549060006104d483611fe2565b90915550506003805460008181526006602052604090206002810188905591820186905590610504908585611a3f565b506040518181527ff9465e09a9cd4cd6a0d6a75077f9781249102ba59ba6631015ceebee6616e0be9060200160405180910390a1505050505050565b60006001600160e01b03198216637965db0b60e01b148061057157506301ffc9a760e01b6001600160e01b03198316145b92915050565b6105826000826113b1565b50565b8460008111801561059857506003548111155b6105b45760405162461bcd60e51b815260040161046090611e58565b6000818152600660205260409020600381015460029091015442916105d891611f12565b116106215760405162461bcd60e51b815260206004820152601960248201527810d85b89dd081cdd185ad9481bdb881d1a1a5cc81c9bdd5b99603a1b6044820152606401610460565b8382146106705760405162461bcd60e51b815260206004820152601860248201527f556e657175616c20757365727320616e6420616d6f756e7400000000000000006044820152606401610460565b6000805b858110156108b657600087878381811061069e57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106b39190611b3e565b905060008686848181106106d757634e487b7160e01b600052603260045260246000fd5b905060200201359050600081116107465760405162461bcd60e51b815260206004820152602d60248201527f596f752063616e2774207374616b65206e6f7468696e67206f6e20612073656c60448201526c6563746564206164647265737360981b6064820152608401610460565b6001600160a01b03821661079c5760405162461bcd60e51b815260206004820152601c60248201527f63616e2774207374616b6520746865207a65726f2061646472657373000000006044820152606401610460565b6001600160a01b0382163314156108015760405162461bcd60e51b8152602060048201526024808201527f596f752063616e2774207374616b65206f6e20796f75722061646472657373206044820152636865726560e01b6064820152608401610460565b60008a8152600560205260408120829161081b33866113d7565b815260200190815260200160002060008282546108389190611f12565b9091555061084890508185611f12565b604080518c81523360208201526001600160a01b03851681830152606081018490526001608082015290519195507f178123d39dce6e2b64dc524173d382bbaa21eeb3f2e27ecf9d5ff72e10e6eb03919081900360a00190a1505080806108ae90611fe2565b915050610674565b506000546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b15801561090957600080fd5b505af115801561091d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109419190611b8a565b6109855760405162461bcd60e51b8152602060048201526015602482015274756e61626c6520746f207374616b6520757365727360581b6044820152606401610460565b600087815260066020526040812060010180548392906109a6908490611f12565b909155505050505050505050565b6000826000811180156109c957506003548111155b6109e55760405162461bcd60e51b815260040161046090611e58565b60008481526001602090815260408083206001600160a01b03871684529091529020545b949350505050565b600082815260026020526040902060010154610a2d8133611506565b610a37838361156a565b505050565b600083815260056020526040812081610a5585856113d7565b81526020019081526020016000205490509392505050565b6001600160a01b0381163314610add5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610460565b610ae782826115f0565b5050565b80600081118015610afe57506003548111155b610b1a5760405162461bcd60e51b815260040161046090611e58565b600081815260066020526040902060038101546002909101544291610b3e91611f12565b10610b5b5760405162461bcd60e51b815260040161046090611e86565b600354808310610bb85760405162461bcd60e51b815260206004820152602260248201527f43616e2774206d6967726174652066726f6d20616e2061637469766520726f756044820152611b9960f21b6064820152608401610460565b600083815260016020908152604080832033845290915290205480610c1f5760405162461bcd60e51b815260206004820152601d60248201527f4e6f7420656e6f7567682062616c616e636520746f206d6967726174650000006044820152606401610460565b60008481526006602052604081206001018054839290610c40908490611f49565b90915550506000848152600160208181526040808420338552825280842084905585845260069091528220018054839290610c7c908490611f12565b909155505060008281526001602090815260408083203380855292528083208490555160008051602061201483398151915292610cbe92889290918691611ebd565b60405180910390a16000805160206120148339815191528233836001604051610cea9493929190611ebd565b60405180910390a16040805133815260208101839052908101859052606081018390527f98d2b1d29e5031a0e15170f32c6a62e031a004cdaa9ed8273c35d24a6b4256059060800160405180910390a150505050565b82600081118015610d5357506003548111155b610d6f5760405162461bcd60e51b815260040161046090611e58565b600081815260066020526040902060038101546002909101544291610d9391611f12565b10610db05760405162461bcd60e51b815260040161046090611e86565b6000805b8381101561101f57848482818110610ddc57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610df19190611b3e565b6001600160a01b0316610e465760405162461bcd60e51b815260206004820152601e60248201527f63616e277420756e7374616b6520746865207a65726f206164647265737300006044820152606401610460565b33858583818110610e6757634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610e7c9190611b3e565b6001600160a01b03161415610ee25760405162461bcd60e51b815260206004820152602660248201527f596f752063616e277420756e7374616b65206f6e20796f75722061646472657360448201526573206865726560d01b6064820152608401610460565b6000610f1d33878785818110610f0857634e487b7160e01b600052603260045260246000fd5b90506020020160208101906103649190611b3e565b6000888152600560209081526040808320848452909152902054909150801561100a57600088815260056020908152604080832085845290915281208054839290610f69908490611f49565b90915550610f7990508185611f12565b93507f178123d39dce6e2b64dc524173d382bbaa21eeb3f2e27ecf9d5ff72e10e6eb038833898987818110610fbe57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610fd39190611b3e565b604080519384526001600160a01b039283166020850152911690820152606081018390526000608082015260a00160405180910390a15b5050808061101790611fe2565b915050610db4565b5060008581526006602052604081206001018054839290611041908490611f49565b909155505060005460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561109257600080fd5b505af11580156110a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ca9190611b8a565b6111165760405162461bcd60e51b815260206004820152601760248201527f756e61626c6520746f20756e7374616b652075736572730000000000000000006044820152606401610460565b5050505050565b600080600061112b8461140f565b5050915091504282108015610a095750426111468284611f12565b11949350505050565b610582600082610a11565b8160008111801561116d57506003548111155b6111895760405162461bcd60e51b815260040161046090611e58565b6000818152600660205260409020600381015460029091015442916111ad91611f12565b116111f65760405162461bcd60e51b815260206004820152601960248201527810d85b89dd081cdd185ad9481bdb881d1a1a5cc81c9bdd5b99603a1b6044820152606401610460565b6112008383611657565b60008381526006602052604081206001018054849290611221908490611f12565b90915550506040516000805160206120148339815191529061124b90859033908690600190611ebd565b60405180910390a1505050565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b8160008111801561129657506003548111155b6112b25760405162461bcd60e51b815260040161046090611e58565b6000818152600660205260409020600381015460029091015442916112d691611f12565b106112f35760405162461bcd60e51b815260040161046090611e86565b600083815260016020908152604080832033845290915290205482111561135c5760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f7567682062616c616e636520746f20776974686472617700006044820152606401610460565b6000838152600660205260408120600101805484929061137d908490611f49565b9091555061138d90508383611758565b600080516020612014833981519152833384600060405161124b9493929190611ebd565b6000828152600260205260409020600101546113cd8133611506565b610a3783836115f0565b604080516001600160a01b03938416602080830191909152929093168382015280518084038201815260609093019052815191012090565b600080600060608460008111801561142957506003548111155b6114455760405162461bcd60e51b815260040161046090611e58565b6000868152600660205260409020600281015460038201546001830154835492939192909190819061147690611fa7565b80601f01602080910402602001604051908101604052809291908181526020018280546114a290611fa7565b80156114ef5780601f106114c4576101008083540402835291602001916114ef565b820191906000526020600020905b8154815290600101906020018083116114d257829003601f168201915b505050505090509450945094509450509193509193565b6115108282611258565b610ae757611528816001600160a01b03166014611856565b611533836020611856565b604051602001611544929190611dd0565b60408051601f198184030181529082905262461bcd60e51b825261046091600401611e45565b6115748282611258565b610ae75760008281526002602090815260408083206001600160a01b03851684529091529020805460ff191660011790556115ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6115fa8282611258565b15610ae75760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156116a957600080fd5b505af11580156116bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e19190611b8a565b6117265760405162461bcd60e51b81526020600482015260166024820152751d5b98589b19481d1bc81cdd185ad948185b5bdd5b9d60521b6044820152606401610460565b60008281526001602090815260408083203384529091528120805483929061174f908490611f12565b90915550505050565b600082815260016020908152604080832033845290915281208054839290611781908490611f49565b909155505060005460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b1580156117d257600080fd5b505af11580156117e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180a9190611b8a565b610ae75760405162461bcd60e51b815260206004820152601860248201527f756e61626c6520746f20756e7374616b6520616d6f756e7400000000000000006044820152606401610460565b60606000611865836002611f2a565b611870906002611f12565b67ffffffffffffffff81111561189657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156118c0576020820181803683370190505b509050600360fc1b816000815181106118e957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061192657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061194a846002611f2a565b611955906001611f12565b90505b60018111156119e9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061199757634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106119bb57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936119e281611f90565b9050611958565b508315611a385760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610460565b9392505050565b828054611a4b90611fa7565b90600052602060002090601f016020900481019282611a6d5760008555611ab3565b82601f10611a865782800160ff19823516178555611ab3565b82800160010185558215611ab3579182015b82811115611ab3578235825591602001919060010190611a98565b50611abf929150611ac3565b5090565b5b80821115611abf5760008155600101611ac4565b80356001600160a01b0381168114611aef57600080fd5b919050565b60008083601f840112611b05578182fd5b50813567ffffffffffffffff811115611b1c578182fd5b6020830191508360208260051b8501011115611b3757600080fd5b9250929050565b600060208284031215611b4f578081fd5b611a3882611ad8565b60008060408385031215611b6a578081fd5b611b7383611ad8565b9150611b8160208401611ad8565b90509250929050565b600060208284031215611b9b578081fd5b81518015158114611a38578182fd5b600060208284031215611bbb578081fd5b5035919050565b60008060408385031215611bd4578182fd5b82359150611b8160208401611ad8565b600060208284031215611bf5578081fd5b81356001600160e01b031981168114611a38578182fd5b600080600060608486031215611c20578081fd5b83359250611c3060208501611ad8565b9150611c3e60408501611ad8565b90509250925092565b600080600060408486031215611c5b578283fd5b83359250602084013567ffffffffffffffff811115611c78578283fd5b611c8486828701611af4565b9497909650939450505050565b600080600080600060608688031215611ca8578081fd5b85359450602086013567ffffffffffffffff80821115611cc6578283fd5b611cd289838a01611af4565b90965094506040880135915080821115611cea578283fd5b50611cf788828901611af4565b969995985093965092949392505050565b60008060408385031215611d1a578182fd5b50508035926020909101359150565b60008060008060608587031215611d3e578384fd5b8435935060208501359250604085013567ffffffffffffffff80821115611d63578384fd5b818701915087601f830112611d76578384fd5b813581811115611d84578485fd5b886020828501011115611d95578485fd5b95989497505060200194505050565b60008151808452611dbc816020860160208601611f60565b601f01601f19169290920160200192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611e08816017850160208801611f60565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611e39816028840160208801611f60565b01602801949350505050565b602081526000611a386020830184611da4565b602080825260149082015273149bdd5b9908191bd95cc81b9bdd08195e1a5cdd60621b604082015260600190565b6020808252601d908201527f43616e277420756e7374616b6520616e2061637469766520726f756e64000000604082015260600190565b9384526001600160a01b0392909216602084015260408301521515606082015260800190565b848152836020820152826040820152608060608201526000611f086080830184611da4565b9695505050505050565b60008219821115611f2557611f25611ffd565b500190565b6000816000190483118215151615611f4457611f44611ffd565b500290565b600082821015611f5b57611f5b611ffd565b500390565b60005b83811015611f7b578181015183820152602001611f63565b83811115611f8a576000848401525b50505050565b600081611f9f57611f9f611ffd565b506000190190565b600181811c90821680611fbb57607f821691505b60208210811415611fdc57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415611ff657611ff6611ffd565b5060010190565b634e487b7160e01b600052601160045260246000fdfedcf891885e788b94db6de05809e1c074e1396e919fa3ef010342de9dfbdd8361a26469706673582212204cc70b1bbc8f43b14456e6859b29671b8574b55744b24d2eac1da16a72e845e764736f6c63430008040033000000000000000000000000de30da39c46104798bb5aa3fe8b9e0e1f348163f

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101725760003560e01c806366abc2a6116100de578063a217fddf11610097578063e5f8b15611610071578063e5f8b15614610356578063f23d829b14610369578063f74d54801461038c578063fc0c546a146103b757600080fd5b8063a217fddf14610310578063a9a3bba414610318578063d547741f1461034357600080fd5b806366abc2a61461028657806370480275146102995780637b0472f0146102ac57806385a68681146102bf57806391d14854146102ea5780639e2c8a5b146102fd57600080fd5b80632f2ff15d116101305780632f2ff15d1461021e5780633029e04d1461023157806336568abe14610244578063565cd0941461025757806362dfb7bb1461026a578063668a0f021461027d57600080fd5b806202069e1461017757806301ffc9a71461018c5780631785f53c146101b45780631b45c18d146101c7578063248a9ca3146101da57806329b09f271461020b575b600080fd5b61018a610185366004611d29565b6103ca565b005b61019f61019a366004611be4565b610540565b60405190151581526020015b60405180910390f35b61018a6101c2366004611b3e565b610577565b61018a6101d5366004611c91565b610585565b6101fd6101e8366004611baa565b60009081526002602052604090206001015490565b6040519081526020016101ab565b6101fd610219366004611bc2565b6109b4565b61018a61022c366004611bc2565b610a11565b6101fd61023f366004611c0c565b610a3c565b61018a610252366004611bc2565b610a6d565b61018a610265366004611baa565b610aeb565b61018a610278366004611c47565b610d40565b6101fd60035481565b61019f610294366004611baa565b61111d565b61018a6102a7366004611b3e565b61114f565b61018a6102ba366004611d08565b61115a565b6101fd6102cd366004611d08565b600560209081526000928352604080842090915290825290205481565b61019f6102f8366004611bc2565b611258565b61018a61030b366004611d08565b611283565b6101fd600081565b6101fd610326366004611bc2565b600160209081526000928352604080842090915290825290205481565b61018a610351366004611bc2565b6113b1565b6101fd610364366004611b58565b6113d7565b61037c610377366004611baa565b61140f565b6040516101ab9493929190611ee3565b60045461039f906001600160a01b031681565b6040516001600160a01b0390911681526020016101ab565b60005461039f906001600160a01b031681565b60006103d68133611506565b6003541561046957600380546000908152600660205260409020908101546002909101546104049190611f12565b85116104695760405162461bcd60e51b815260206004820152602960248201527f6e657720726f756e6473206861766520746f207374617274206166746572206f6044820152686c6420726f756e647360b81b60648201526084015b60405180910390fd5b428510156104c45760405162461bcd60e51b815260206004820152602260248201527f6e657720726f756e64732073686f756c6420626520696e207468652066757475604482015261726560f01b6064820152608401610460565b600380549060006104d483611fe2565b90915550506003805460008181526006602052604090206002810188905591820186905590610504908585611a3f565b506040518181527ff9465e09a9cd4cd6a0d6a75077f9781249102ba59ba6631015ceebee6616e0be9060200160405180910390a1505050505050565b60006001600160e01b03198216637965db0b60e01b148061057157506301ffc9a760e01b6001600160e01b03198316145b92915050565b6105826000826113b1565b50565b8460008111801561059857506003548111155b6105b45760405162461bcd60e51b815260040161046090611e58565b6000818152600660205260409020600381015460029091015442916105d891611f12565b116106215760405162461bcd60e51b815260206004820152601960248201527810d85b89dd081cdd185ad9481bdb881d1a1a5cc81c9bdd5b99603a1b6044820152606401610460565b8382146106705760405162461bcd60e51b815260206004820152601860248201527f556e657175616c20757365727320616e6420616d6f756e7400000000000000006044820152606401610460565b6000805b858110156108b657600087878381811061069e57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106b39190611b3e565b905060008686848181106106d757634e487b7160e01b600052603260045260246000fd5b905060200201359050600081116107465760405162461bcd60e51b815260206004820152602d60248201527f596f752063616e2774207374616b65206e6f7468696e67206f6e20612073656c60448201526c6563746564206164647265737360981b6064820152608401610460565b6001600160a01b03821661079c5760405162461bcd60e51b815260206004820152601c60248201527f63616e2774207374616b6520746865207a65726f2061646472657373000000006044820152606401610460565b6001600160a01b0382163314156108015760405162461bcd60e51b8152602060048201526024808201527f596f752063616e2774207374616b65206f6e20796f75722061646472657373206044820152636865726560e01b6064820152608401610460565b60008a8152600560205260408120829161081b33866113d7565b815260200190815260200160002060008282546108389190611f12565b9091555061084890508185611f12565b604080518c81523360208201526001600160a01b03851681830152606081018490526001608082015290519195507f178123d39dce6e2b64dc524173d382bbaa21eeb3f2e27ecf9d5ff72e10e6eb03919081900360a00190a1505080806108ae90611fe2565b915050610674565b506000546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b15801561090957600080fd5b505af115801561091d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109419190611b8a565b6109855760405162461bcd60e51b8152602060048201526015602482015274756e61626c6520746f207374616b6520757365727360581b6044820152606401610460565b600087815260066020526040812060010180548392906109a6908490611f12565b909155505050505050505050565b6000826000811180156109c957506003548111155b6109e55760405162461bcd60e51b815260040161046090611e58565b60008481526001602090815260408083206001600160a01b03871684529091529020545b949350505050565b600082815260026020526040902060010154610a2d8133611506565b610a37838361156a565b505050565b600083815260056020526040812081610a5585856113d7565b81526020019081526020016000205490509392505050565b6001600160a01b0381163314610add5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610460565b610ae782826115f0565b5050565b80600081118015610afe57506003548111155b610b1a5760405162461bcd60e51b815260040161046090611e58565b600081815260066020526040902060038101546002909101544291610b3e91611f12565b10610b5b5760405162461bcd60e51b815260040161046090611e86565b600354808310610bb85760405162461bcd60e51b815260206004820152602260248201527f43616e2774206d6967726174652066726f6d20616e2061637469766520726f756044820152611b9960f21b6064820152608401610460565b600083815260016020908152604080832033845290915290205480610c1f5760405162461bcd60e51b815260206004820152601d60248201527f4e6f7420656e6f7567682062616c616e636520746f206d6967726174650000006044820152606401610460565b60008481526006602052604081206001018054839290610c40908490611f49565b90915550506000848152600160208181526040808420338552825280842084905585845260069091528220018054839290610c7c908490611f12565b909155505060008281526001602090815260408083203380855292528083208490555160008051602061201483398151915292610cbe92889290918691611ebd565b60405180910390a16000805160206120148339815191528233836001604051610cea9493929190611ebd565b60405180910390a16040805133815260208101839052908101859052606081018390527f98d2b1d29e5031a0e15170f32c6a62e031a004cdaa9ed8273c35d24a6b4256059060800160405180910390a150505050565b82600081118015610d5357506003548111155b610d6f5760405162461bcd60e51b815260040161046090611e58565b600081815260066020526040902060038101546002909101544291610d9391611f12565b10610db05760405162461bcd60e51b815260040161046090611e86565b6000805b8381101561101f57848482818110610ddc57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610df19190611b3e565b6001600160a01b0316610e465760405162461bcd60e51b815260206004820152601e60248201527f63616e277420756e7374616b6520746865207a65726f206164647265737300006044820152606401610460565b33858583818110610e6757634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610e7c9190611b3e565b6001600160a01b03161415610ee25760405162461bcd60e51b815260206004820152602660248201527f596f752063616e277420756e7374616b65206f6e20796f75722061646472657360448201526573206865726560d01b6064820152608401610460565b6000610f1d33878785818110610f0857634e487b7160e01b600052603260045260246000fd5b90506020020160208101906103649190611b3e565b6000888152600560209081526040808320848452909152902054909150801561100a57600088815260056020908152604080832085845290915281208054839290610f69908490611f49565b90915550610f7990508185611f12565b93507f178123d39dce6e2b64dc524173d382bbaa21eeb3f2e27ecf9d5ff72e10e6eb038833898987818110610fbe57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610fd39190611b3e565b604080519384526001600160a01b039283166020850152911690820152606081018390526000608082015260a00160405180910390a15b5050808061101790611fe2565b915050610db4565b5060008581526006602052604081206001018054839290611041908490611f49565b909155505060005460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561109257600080fd5b505af11580156110a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ca9190611b8a565b6111165760405162461bcd60e51b815260206004820152601760248201527f756e61626c6520746f20756e7374616b652075736572730000000000000000006044820152606401610460565b5050505050565b600080600061112b8461140f565b5050915091504282108015610a095750426111468284611f12565b11949350505050565b610582600082610a11565b8160008111801561116d57506003548111155b6111895760405162461bcd60e51b815260040161046090611e58565b6000818152600660205260409020600381015460029091015442916111ad91611f12565b116111f65760405162461bcd60e51b815260206004820152601960248201527810d85b89dd081cdd185ad9481bdb881d1a1a5cc81c9bdd5b99603a1b6044820152606401610460565b6112008383611657565b60008381526006602052604081206001018054849290611221908490611f12565b90915550506040516000805160206120148339815191529061124b90859033908690600190611ebd565b60405180910390a1505050565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b8160008111801561129657506003548111155b6112b25760405162461bcd60e51b815260040161046090611e58565b6000818152600660205260409020600381015460029091015442916112d691611f12565b106112f35760405162461bcd60e51b815260040161046090611e86565b600083815260016020908152604080832033845290915290205482111561135c5760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f7567682062616c616e636520746f20776974686472617700006044820152606401610460565b6000838152600660205260408120600101805484929061137d908490611f49565b9091555061138d90508383611758565b600080516020612014833981519152833384600060405161124b9493929190611ebd565b6000828152600260205260409020600101546113cd8133611506565b610a3783836115f0565b604080516001600160a01b03938416602080830191909152929093168382015280518084038201815260609093019052815191012090565b600080600060608460008111801561142957506003548111155b6114455760405162461bcd60e51b815260040161046090611e58565b6000868152600660205260409020600281015460038201546001830154835492939192909190819061147690611fa7565b80601f01602080910402602001604051908101604052809291908181526020018280546114a290611fa7565b80156114ef5780601f106114c4576101008083540402835291602001916114ef565b820191906000526020600020905b8154815290600101906020018083116114d257829003601f168201915b505050505090509450945094509450509193509193565b6115108282611258565b610ae757611528816001600160a01b03166014611856565b611533836020611856565b604051602001611544929190611dd0565b60408051601f198184030181529082905262461bcd60e51b825261046091600401611e45565b6115748282611258565b610ae75760008281526002602090815260408083206001600160a01b03851684529091529020805460ff191660011790556115ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6115fa8282611258565b15610ae75760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156116a957600080fd5b505af11580156116bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e19190611b8a565b6117265760405162461bcd60e51b81526020600482015260166024820152751d5b98589b19481d1bc81cdd185ad948185b5bdd5b9d60521b6044820152606401610460565b60008281526001602090815260408083203384529091528120805483929061174f908490611f12565b90915550505050565b600082815260016020908152604080832033845290915281208054839290611781908490611f49565b909155505060005460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b1580156117d257600080fd5b505af11580156117e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180a9190611b8a565b610ae75760405162461bcd60e51b815260206004820152601860248201527f756e61626c6520746f20756e7374616b6520616d6f756e7400000000000000006044820152606401610460565b60606000611865836002611f2a565b611870906002611f12565b67ffffffffffffffff81111561189657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156118c0576020820181803683370190505b509050600360fc1b816000815181106118e957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061192657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061194a846002611f2a565b611955906001611f12565b90505b60018111156119e9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061199757634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106119bb57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936119e281611f90565b9050611958565b508315611a385760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610460565b9392505050565b828054611a4b90611fa7565b90600052602060002090601f016020900481019282611a6d5760008555611ab3565b82601f10611a865782800160ff19823516178555611ab3565b82800160010185558215611ab3579182015b82811115611ab3578235825591602001919060010190611a98565b50611abf929150611ac3565b5090565b5b80821115611abf5760008155600101611ac4565b80356001600160a01b0381168114611aef57600080fd5b919050565b60008083601f840112611b05578182fd5b50813567ffffffffffffffff811115611b1c578182fd5b6020830191508360208260051b8501011115611b3757600080fd5b9250929050565b600060208284031215611b4f578081fd5b611a3882611ad8565b60008060408385031215611b6a578081fd5b611b7383611ad8565b9150611b8160208401611ad8565b90509250929050565b600060208284031215611b9b578081fd5b81518015158114611a38578182fd5b600060208284031215611bbb578081fd5b5035919050565b60008060408385031215611bd4578182fd5b82359150611b8160208401611ad8565b600060208284031215611bf5578081fd5b81356001600160e01b031981168114611a38578182fd5b600080600060608486031215611c20578081fd5b83359250611c3060208501611ad8565b9150611c3e60408501611ad8565b90509250925092565b600080600060408486031215611c5b578283fd5b83359250602084013567ffffffffffffffff811115611c78578283fd5b611c8486828701611af4565b9497909650939450505050565b600080600080600060608688031215611ca8578081fd5b85359450602086013567ffffffffffffffff80821115611cc6578283fd5b611cd289838a01611af4565b90965094506040880135915080821115611cea578283fd5b50611cf788828901611af4565b969995985093965092949392505050565b60008060408385031215611d1a578182fd5b50508035926020909101359150565b60008060008060608587031215611d3e578384fd5b8435935060208501359250604085013567ffffffffffffffff80821115611d63578384fd5b818701915087601f830112611d76578384fd5b813581811115611d84578485fd5b886020828501011115611d95578485fd5b95989497505060200194505050565b60008151808452611dbc816020860160208601611f60565b601f01601f19169290920160200192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611e08816017850160208801611f60565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611e39816028840160208801611f60565b01602801949350505050565b602081526000611a386020830184611da4565b602080825260149082015273149bdd5b9908191bd95cc81b9bdd08195e1a5cdd60621b604082015260600190565b6020808252601d908201527f43616e277420756e7374616b6520616e2061637469766520726f756e64000000604082015260600190565b9384526001600160a01b0392909216602084015260408301521515606082015260800190565b848152836020820152826040820152608060608201526000611f086080830184611da4565b9695505050505050565b60008219821115611f2557611f25611ffd565b500190565b6000816000190483118215151615611f4457611f44611ffd565b500290565b600082821015611f5b57611f5b611ffd565b500390565b60005b83811015611f7b578181015183820152602001611f63565b83811115611f8a576000848401525b50505050565b600081611f9f57611f9f611ffd565b506000190190565b600181811c90821680611fbb57607f821691505b60208210811415611fdc57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415611ff657611ff6611ffd565b5060010190565b634e487b7160e01b600052601160045260246000fdfedcf891885e788b94db6de05809e1c074e1396e919fa3ef010342de9dfbdd8361a26469706673582212204cc70b1bbc8f43b14456e6859b29671b8574b55744b24d2eac1da16a72e845e764736f6c63430008040033

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

000000000000000000000000de30da39c46104798bb5aa3fe8b9e0e1f348163f

-----Decoded View---------------
Arg [0] : _token (address): 0xDe30da39c46104798bB5aA3fe8B9e0e1F348163F

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000de30da39c46104798bb5aa3fe8b9e0e1f348163f


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.