ETH Price: $3,698.18 (+2.83%)

Contract

0x507053b6729C8B73046e70fBd94958225F4bfE07
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim212927032024-11-29 10:17:4734 hrs ago1732875467IN
0x507053b6...25F4bfE07
0 ETH0.0009872511.92124058
Restake212639272024-11-25 9:38:115 days ago1732527491IN
0x507053b6...25F4bfE07
0 ETH0.0022393313.21228451
Claim212587422024-11-24 16:16:476 days ago1732465007IN
0x507053b6...25F4bfE07
0 ETH0.00069629.49722702
Unstake212569452024-11-24 10:15:236 days ago1732443323IN
0x507053b6...25F4bfE07
0 ETH0.000662698.74552398
Stake212550242024-11-24 3:49:356 days ago1732420175IN
0x507053b6...25F4bfE07
0 ETH0.001706319.30715727
Claim212546502024-11-24 2:34:356 days ago1732415675IN
0x507053b6...25F4bfE07
0 ETH0.000744839.53625244
Claim212378492024-11-21 18:18:599 days ago1732213139IN
0x507053b6...25F4bfE07
0 ETH0.0019404321.46360077
Claim212186242024-11-19 1:55:2311 days ago1731981323IN
0x507053b6...25F4bfE07
0 ETH0.0009720910.75253107
Claim212008462024-11-16 14:26:2314 days ago1731767183IN
0x507053b6...25F4bfE07
0 ETH0.0010848214.79854687
Stake211921302024-11-15 9:13:5915 days ago1731662039IN
0x507053b6...25F4bfE07
0 ETH0.0032992417.99581716
Stake211774062024-11-13 7:54:1117 days ago1731484451IN
0x507053b6...25F4bfE07
0 ETH0.0032359721.41299423
Claim211772782024-11-13 7:28:3517 days ago1731482915IN
0x507053b6...25F4bfE07
0 ETH0.0014611518.70727531
Restake211655372024-11-11 16:08:2319 days ago1731341303IN
0x507053b6...25F4bfE07
0 ETH0.0069498941.00501665
Stake211597332024-11-10 20:42:4720 days ago1731271367IN
0x507053b6...25F4bfE07
0 ETH0.0037599124.11405178
Stake211597272024-11-10 20:41:3520 days ago1731271295IN
0x507053b6...25F4bfE07
0 ETH0.0040546423.05950053
Claim211597182024-11-10 20:39:4720 days ago1731271187IN
0x507053b6...25F4bfE07
0 ETH0.0016604121.25847544
Claim211597132024-11-10 20:38:4720 days ago1731271127IN
0x507053b6...25F4bfE07
0 ETH0.0015652520.04016562
Claim211597112024-11-10 20:38:2320 days ago1731271103IN
0x507053b6...25F4bfE07
0 ETH0.0015405919.7244189
Claim211582992024-11-10 15:54:4720 days ago1731254087IN
0x507053b6...25F4bfE07
0 ETH0.0017282323.57569575
Claim211556952024-11-10 7:12:3520 days ago1731222755IN
0x507053b6...25F4bfE07
0 ETH0.0007699810.50376762
Restake211547112024-11-10 3:55:1120 days ago1731210911IN
0x507053b6...25F4bfE07
0 ETH0.0016951310.36849978
Claim211511872024-11-09 16:07:3521 days ago1731168455IN
0x507053b6...25F4bfE07
0 ETH0.0008618411.75685195
Claim211340362024-11-07 6:38:3523 days ago1730961515IN
0x507053b6...25F4bfE07
0 ETH0.00073149.9774327
Claim211251062024-11-06 0:43:5924 days ago1730853839IN
0x507053b6...25F4bfE07
0 ETH0.0011526815.7242639
Claim211108092024-11-04 0:50:3526 days ago1730681435IN
0x507053b6...25F4bfE07
0 ETH0.000244243.12704719
VIEW ADVANCED FILTER

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FixedStaking

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 9 : FixedStaking.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.12;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";

contract FixedStaking is AccessControl {
    struct Stake {
        uint256 amount;
        uint256 stakeAt;
        uint256 stakeType;
        address wallet;
        bool active;
        uint256 canceledAt;
    }

    struct StakeType {
        uint256 duration;
        uint256 interest;
        bool active;
    }

    Stake[] public stakes;
    StakeType[] public stakeTypes;
    IERC20 public token;
    uint256 public poolSize;
    uint256 public minStakeAmount;
    uint256 public maxStakeAmount;
    uint256 public penalty;
    uint256 public stakedToken;
    uint256 public penaltyDuration;

    mapping(address => uint256) public stakedPerWallet;
    event StakeAdded(
        uint256 amount,
        uint256 stakeType,
        address wallet,
        uint256 duration,
        uint256 stakeId
    );
    event StakeClaimed(
        uint256 amount,
        uint256 stakeType,
        address wallet,
        uint256 stakeId
    );
    event StakeUnstaked(
        uint256 amount,
        uint256 stakeType,
        address wallet,
        uint256 stakeId
    );

    event Fund(uint256 amount, address wallet);

    constructor(address _token) {
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
        token = IERC20(_token);
        minStakeAmount = 10 ** 19;
        maxStakeAmount = 25 * 10 ** 21;
        penalty = 70;
        penaltyDuration = 5 * 24 * 60 * 60;
    }

    struct ContractView {
        uint256 poolSize;
        uint256 minStakeAmount;
        uint256 maxStakeAmount;
        uint256 penalty;
        uint256 stakedToken;
        uint256 stakesLength;
        uint256 penaltyDuration;
        StakeType[] stakeTypes;
    }

    function contractView() public view returns (ContractView memory) {
        return
            ContractView({
                poolSize: poolSize,
                minStakeAmount: minStakeAmount,
                maxStakeAmount: maxStakeAmount,
                penalty: penalty,
                penaltyDuration: penaltyDuration,
                stakedToken: stakedToken,
                stakesLength: stakes.length,
                stakeTypes: stakeTypes
            });
    }

    function stake(
        uint256 _amount,
        uint256 _stakeType
    ) public returns (uint256) {
        require(
            _amount >= minStakeAmount,
            "Amount should be greater than minStakeAmount"
        );
        require(
            stakedPerWallet[_msgSender()] + _amount <= maxStakeAmount,
            "Amount should be less than maxStakeAmount"
        );
        // stakeType is a number that represents the type of stake
        require(stakeTypes.length > _stakeType, "Invalid stake type");
        StakeType memory _stake = stakeTypes[_stakeType];
        require(_stake.active, "Stake type is not active");

        Stake memory newStake = Stake({
            amount: _amount,
            stakeAt: block.timestamp,
            stakeType: _stakeType,
            wallet: _msgSender(),
            active: true,
            canceledAt: 0
        });
        uint256 reward = computeReward(newStake);
        require(poolSize >= reward, "Not enough rewards in the pool");
        poolSize -= reward;
        stakedToken += _amount;
        stakedPerWallet[_msgSender()] += _amount;
        token.transferFrom(_msgSender(), address(this), _amount);

        stakes.push(newStake);
        emit StakeAdded(
            _amount,
            _stakeType,
            _msgSender(),
            _stake.duration,
            stakes.length - 1
        );
        return stakes.length - 1;
    }

    function claim(uint256 _stakeId) public {
        Stake memory _stake = stakes[_stakeId];
        StakeType memory stakeType = stakeTypes[_stake.stakeType];
        require(_stake.wallet == _msgSender(), "Not your stake");
        require(_stake.active, "Stake is not active");
        if (_stake.canceledAt > 0) {
            require(
                _stake.canceledAt + penaltyDuration < block.timestamp,
                "Stake is canceled. Wait 5 days to claim"
            );
        } else {
            require(
                _stake.stakeAt + stakeType.duration < block.timestamp,
                "Stake is not complete"
            );
        }

        uint256 reward = computeReward(_stake);
        uint256 amount = _stake.amount + reward;

        stakes[_stakeId].active = false;
        stakedToken -= _stake.amount;
        stakedPerWallet[_msgSender()] -= _stake.amount;
        token.transfer(_msgSender(), amount);
        emit StakeClaimed(reward, _stake.stakeType, _msgSender(), _stakeId);
    }

    function computeReward(Stake memory _stake) private view returns (uint256) {
        StakeType memory stakeType = stakeTypes[_stake.stakeType];
        uint256 reward = (_stake.amount * stakeType.interest) / 1000;
        if (_stake.canceledAt > 0) {
            // scale the reward based on amount of time staked
            reward =
                (reward * (_stake.canceledAt - _stake.stakeAt)) /
                stakeType.duration;
            // reduce rewards by penalty
            reward = reward - (reward * penalty) / 100;
        }

        return reward;
    }

    function unstake(uint256 _stakeId) public {
        Stake memory _stake = stakes[_stakeId];
        StakeType memory stakeType = stakeTypes[_stake.stakeType];

        require(_stake.wallet == _msgSender(), "Not your stake");
        require(_stake.active, "Stake is not active");
        require(_stake.canceledAt == 0, "Stake is already canceled");
        require(
            _stake.stakeAt + stakeType.duration > block.timestamp,
            "Stake is completed. Claim it"
        );
        uint256 totalReward = computeReward(_stake);
        _stake.canceledAt = block.timestamp;
        stakes[_stakeId] = _stake;
        uint256 reward = computeReward(_stake);
        poolSize += totalReward - reward;
        emit StakeUnstaked(reward, _stake.stakeType, _msgSender(), _stakeId);
    }

    function restake(uint256 _stakeId, uint256 _newStakeTypeId) public returns (uint256) {
        Stake memory _stake = stakes[_stakeId];
        StakeType memory stakeType = stakeTypes[_stake.stakeType];
        StakeType memory newStakeType = stakeTypes[_newStakeTypeId];
        require(_stake.wallet == _msgSender(), "Not your stake");
        require(_stake.active, "Stake is not active");
        require(stakeTypes.length > _newStakeTypeId, "Invalid stake type");
        require(
            _stake.stakeAt + stakeType.duration < block.timestamp,
            "Stake is not mature"
        );

        uint256 reward = computeReward(_stake);
        uint256 newAmount = _stake.amount + reward;
        stakes[_stakeId].active = false;
        emit StakeClaimed(reward, _stake.stakeType, _msgSender(), _stakeId);
        Stake memory newStake = Stake({
            amount: newAmount,
            stakeAt: block.timestamp,
            stakeType: _newStakeTypeId,
            wallet: _msgSender(),
            active: true,
            canceledAt: 0
        });
        uint256 newReward = computeReward(newStake);
        require(poolSize >= newReward, "Not enough rewards in the pool");
        poolSize -= newReward;
        stakedToken += reward;
        stakedPerWallet[_msgSender()] += reward;
        stakes.push(newStake);
        emit StakeAdded(
            newAmount,
            _newStakeTypeId,
            _msgSender(),
            newStakeType.duration,
            stakes.length - 1
        );
        return stakes.length - 1;
    }

    function addStakeType(
        uint256 _duration,
        uint256 _interest,
        bool _active
    ) public onlyRole(DEFAULT_ADMIN_ROLE) {
        stakeTypes.push(
            StakeType({
                duration: _duration,
                interest: _interest,
                active: _active
            })
        );
    }

    function setActive(
        uint256 _stakeId,
        bool _active
    ) public onlyRole(DEFAULT_ADMIN_ROLE) {
        stakeTypes[_stakeId].active = _active;
    }

    function setPenalty(uint256 _penalty) public onlyRole(DEFAULT_ADMIN_ROLE) {
        require(_penalty > 0, "penalty should be greater than 0");
        require(_penalty <= 100, "penalty should be less than 100");
        penalty = _penalty;
    }

    function setPenaltyDuration(
        uint256 _penaltyDuration
    ) public onlyRole(DEFAULT_ADMIN_ROLE) {
        require(_penaltyDuration > 0, "penalty should be greater than 0");
        penaltyDuration = _penaltyDuration;
    }

    function setStakeLimits(
        uint256 _minStakeAmount,
        uint256 _maxStakeAmount
    ) public onlyRole(DEFAULT_ADMIN_ROLE) {
        require (
            _minStakeAmount > 0,
            "min stake amount should be greater than 0"
        );
        require(
            _maxStakeAmount > _minStakeAmount,
            "max stake amount should be greater than min stake amount");
        minStakeAmount = _minStakeAmount;
        maxStakeAmount = _maxStakeAmount;
    }

    function fund(uint256 _amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
        token.transferFrom(_msgSender(), address(this), _amount);
        poolSize += _amount;
        emit Fund(_amount, _msgSender());
    }

    function emergencyWithdrawStake(uint256 _stakeId) public onlyRole(DEFAULT_ADMIN_ROLE) {
        Stake memory _stake = stakes[_stakeId];
        stakes[_stakeId].active = false;
        stakedToken -= _stake.amount;
        stakedPerWallet[_stake.wallet] -= _stake.amount;
        uint256 reward = computeReward(_stake);
        poolSize += reward;
        token.transfer(_stake.wallet, _stake.amount);
    }

    function emergencyWithdrawRewards(uint256 _amount) public onlyRole(DEFAULT_ADMIN_ROLE) {
        require(_amount <= poolSize, "Not enough rewards in the pool");
        token.transfer(_msgSender(), _amount);
        poolSize -= _amount;
    }
}

File 2 of 9 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (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);
        _;
    }

    /**
     * @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 virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @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 virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " 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 virtual 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.
     *
     * May emit a {RoleGranted} event.
     */
    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.
     *
     * May emit a {RoleRevoked} event.
     */
    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`.
     *
     * May emit a {RoleRevoked} event.
     */
    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.
     *
     * May emit a {RoleGranted} event.
     *
     * [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.
     *
     * May emit a {RoleGranted} event.
     */
    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.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 9 : 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 4 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

File 5 of 9 : 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 6 of 9 : 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 7 of 9 : 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);
}

File 8 of 9 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 9 of 9 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"wallet","type":"address"}],"name":"Fund","type":"event"},{"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":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakeType","type":"uint256"},{"indexed":false,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakeId","type":"uint256"}],"name":"StakeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakeType","type":"uint256"},{"indexed":false,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"stakeId","type":"uint256"}],"name":"StakeClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakeType","type":"uint256"},{"indexed":false,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"stakeId","type":"uint256"}],"name":"StakeUnstaked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"uint256","name":"_interest","type":"uint256"},{"internalType":"bool","name":"_active","type":"bool"}],"name":"addStakeType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stakeId","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractView","outputs":[{"components":[{"internalType":"uint256","name":"poolSize","type":"uint256"},{"internalType":"uint256","name":"minStakeAmount","type":"uint256"},{"internalType":"uint256","name":"maxStakeAmount","type":"uint256"},{"internalType":"uint256","name":"penalty","type":"uint256"},{"internalType":"uint256","name":"stakedToken","type":"uint256"},{"internalType":"uint256","name":"stakesLength","type":"uint256"},{"internalType":"uint256","name":"penaltyDuration","type":"uint256"},{"components":[{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"interest","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"}],"internalType":"struct FixedStaking.StakeType[]","name":"stakeTypes","type":"tuple[]"}],"internalType":"struct FixedStaking.ContractView","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyWithdrawRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stakeId","type":"uint256"}],"name":"emergencyWithdrawStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"fund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":[],"name":"maxStakeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minStakeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"penalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"penaltyDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stakeId","type":"uint256"},{"internalType":"uint256","name":"_newStakeTypeId","type":"uint256"}],"name":"restake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"_stakeId","type":"uint256"},{"internalType":"bool","name":"_active","type":"bool"}],"name":"setActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_penalty","type":"uint256"}],"name":"setPenalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_penaltyDuration","type":"uint256"}],"name":"setPenaltyDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minStakeAmount","type":"uint256"},{"internalType":"uint256","name":"_maxStakeAmount","type":"uint256"}],"name":"setStakeLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_stakeType","type":"uint256"}],"name":"stake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakeTypes","outputs":[{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"interest","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakedPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakedToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakes","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"stakeAt","type":"uint256"},{"internalType":"uint256","name":"stakeType","type":"uint256"},{"internalType":"address","name":"wallet","type":"address"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"canceledAt","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":[{"internalType":"uint256","name":"_stakeId","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620027b2380380620027b283398101604081905262000034916200013d565b620000416000336200008d565b600380546001600160a01b0319166001600160a01b0392909216919091179055678ac7230489e8000060055569054b40b1f852bda000006006556046600755620697806009556200016f565b6200009982826200009d565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000099576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620000f93390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000602082840312156200015057600080fd5b81516001600160a01b03811681146200016857600080fd5b9392505050565b612633806200017f6000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c806377fccf3211610104578063cc7a262e116100a2578063e60a955d11610071578063e60a955d14610429578063f18876841461043c578063fa8105ff14610445578063fc0c546a1461045857600080fd5b8063cc7a262e14610392578063cf251c921461039b578063d547741f146103cb578063d5a44f86146103de57600080fd5b806391d14854116100de57806391d1485414610351578063a217fddf14610364578063b8e7023d1461036c578063ca1d209d1461037f57600080fd5b806377fccf32146103185780637b0472f01461032b5780638c9bd1b51461033e57600080fd5b80632f2ff15d1161017c5780634a4b674a1161014b5780634a4b674a146102ea5780634ec18db9146102fd5780635aa1326c146103065780635d80ca321461030f57600080fd5b80632f2ff15d1461029e57806330409c85146102b157806336568abe146102c4578063379607f5146102d757600080fd5b80631b75c9fa116101b85780631b75c9fa14610233578063248a9ca31461025357806325d6a898146102765780632e17de781461028b57600080fd5b806301ffc9a7146101df5780630edd2ffc146102075780631372e0261461021e575b600080fd5b6101f26101ed3660046121d9565b610483565b60405190151581526020015b60405180910390f35b61021060075481565b6040519081526020016101fe565b61023161022c366004612203565b6104ba565b005b610210610241366004612238565b600a6020526000908152604090205481565b610210610261366004612203565b60009081526020819052604090206001015490565b61027e610520565b6040516101fe9190612253565b610231610299366004612203565b61062d565b6102316102ac36600461230b565b610932565b6102316102bf366004612203565b61095c565b6102316102d236600461230b565b610a28565b6102316102e5366004612203565b610aa6565b6102316102f8366004612203565b610dfd565b61021060045481565b61021060095481565b61021060065481565b610231610326366004612203565b610eaf565b610210610339366004612337565b61106d565b61023161034c366004612337565b61151b565b6101f261035f36600461230b565b611609565b610210600081565b61021061037a366004612337565b611632565b61023161038d366004612203565b611b63565b61021060085481565b6103ae6103a9366004612203565b611c4d565b6040805193845260208401929092521515908201526060016101fe565b6102316103d936600461230b565b611c83565b6103f16103ec366004612203565b611ca8565b604080519687526020870195909552938501929092526001600160a01b031660608401521515608083015260a082015260c0016101fe565b610231610437366004612367565b611cff565b61021060055481565b610231610453366004612397565b611d45565b60035461046b906001600160a01b031681565b6040516001600160a01b0390911681526020016101fe565b60006001600160e01b03198216637965db0b60e01b14806104b457506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006104c581611e06565b6000821161051a5760405162461bcd60e51b815260206004820181905260248201527f70656e616c74792073686f756c642062652067726561746572207468616e203060448201526064015b60405180910390fd5b50600955565b61056860405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081525090565b60405180610100016040528060045481526020016005548152602001600654815260200160075481526020016008548152602001600180549050815260200160095481526020016002805480602002602001604051908101604052809291908181526020016000905b828210156106225760008481526020908190206040805160608101825260038602909201805483526001808201548486015260029091015460ff1615159183019190915290835290920191016105d1565b505050915250919050565b600060018281548110610642576106426123d0565b600091825260208083206040805160c08101825260059094029091018054845260018101549284019290925260028083015491840182905260038301546001600160a01b038116606086015260ff600160a01b909104161515608085015260049092015460a08401528154929450909181106106c0576106c06123d0565b60009182526020918290206040805160608101825260039093029091018054835260018101549383019390935260029092015460ff1615159181019190915290506107083390565b6001600160a01b031682606001516001600160a01b03161461073c5760405162461bcd60e51b8152600401610511906123e6565b816080015161075d5760405162461bcd60e51b81526004016105119061240e565b60a0820151156107af5760405162461bcd60e51b815260206004820152601960248201527f5374616b6520697320616c72656164792063616e63656c6564000000000000006044820152606401610511565b8051602083015142916107c191612451565b1161080e5760405162461bcd60e51b815260206004820152601c60248201527f5374616b6520697320636f6d706c657465642e20436c61696d206974000000006044820152606401610511565b600061081983611e13565b4260a085015260018054919250849186908110610838576108386123d0565b600091825260208083208451600590930201918255830151600182015560408301516002820155606083015160038201805460808601511515600160a01b026001600160a81b03199091166001600160a01b039093169290921791909117905560a0909201516004909201919091556108b084611e13565b90506108bc8183612464565b600460008282546108cd9190612451565b909155505060408401517fbc6b295186169c2d1a54d537ff48eaa2d60db600dcf3ab7646cf4620d9a9a872908290335b6040805193845260208401929092526001600160a01b0316908201526060810187905260800160405180910390a15050505050565b60008281526020819052604090206001015461094d81611e06565b6109578383611ee9565b505050565b600061096781611e06565b6004548211156109895760405162461bcd60e51b815260040161051190612477565b6003546001600160a01b031663a9059cbb336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018590526044016020604051808303816000875af11580156109e8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0c91906124ae565b508160046000828254610a1f9190612464565b90915550505050565b6001600160a01b0381163314610a985760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610511565b610aa28282611f6d565b5050565b600060018281548110610abb57610abb6123d0565b600091825260208083206040805160c08101825260059094029091018054845260018101549284019290925260028083015491840182905260038301546001600160a01b038116606086015260ff600160a01b909104161515608085015260049092015460a0840152815492945090918110610b3957610b396123d0565b60009182526020918290206040805160608101825260039093029091018054835260018101549383019390935260029092015460ff161515918101919091529050610b813390565b6001600160a01b031682606001516001600160a01b031614610bb55760405162461bcd60e51b8152600401610511906123e6565b8160800151610bd65760405162461bcd60e51b81526004016105119061240e565b60a082015115610c5557426009548360a00151610bf39190612451565b10610c505760405162461bcd60e51b815260206004820152602760248201527f5374616b652069732063616e63656c65642e20576169742035206461797320746044820152666f20636c61696d60c81b6064820152608401610511565b610cac565b805160208301514291610c6791612451565b10610cac5760405162461bcd60e51b81526020600482015260156024820152745374616b65206973206e6f7420636f6d706c65746560581b6044820152606401610511565b6000610cb783611e13565b90506000818460000151610ccb9190612451565b9050600060018681548110610ce257610ce26123d0565b906000526020600020906005020160030160146101000a81548160ff021916908315150217905550836000015160086000828254610d209190612464565b90915550508351336000908152600a602052604081208054909190610d46908490612464565b90915550506003546001600160a01b031663a9059cbb336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015610daa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dce91906124ae565b507f53c211d2ede1f66579447fe50d66423aa8828dff1888bcc94e37af0d0be20c1d8285604001516108fd3390565b6000610e0881611e06565b60008211610e585760405162461bcd60e51b815260206004820181905260248201527f70656e616c74792073686f756c642062652067726561746572207468616e20306044820152606401610511565b6064821115610ea95760405162461bcd60e51b815260206004820152601f60248201527f70656e616c74792073686f756c64206265206c657373207468616e20313030006044820152606401610511565b50600755565b6000610eba81611e06565b600060018381548110610ecf57610ecf6123d0565b600091825260208083206040805160c0810182526005909402909101805484526001808201549385019390935260028101549184019190915260038101546001600160a01b038116606085015260ff600160a01b90910416151560808401526004015460a083015280549193509085908110610f4d57610f4d6123d0565b906000526020600020906005020160030160146101000a81548160ff021916908315150217905550806000015160086000828254610f8b9190612464565b9091555050805160608201516001600160a01b03166000908152600a602052604081208054909190610fbe908490612464565b9091555060009050610fcf82611e13565b90508060046000828254610fe39190612451565b90915550506003546060830151835160405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915291169063a9059cbb906044016020604051808303816000875af1158015611042573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106691906124ae565b5050505050565b60006005548310156110d65760405162461bcd60e51b815260206004820152602c60248201527f416d6f756e742073686f756c642062652067726561746572207468616e206d6960448201526b1b94dd185ad9505b5bdd5b9d60a21b6064820152608401610511565b600654336000908152600a60205260409020546110f4908590612451565b11156111545760405162461bcd60e51b815260206004820152602960248201527f416d6f756e742073686f756c64206265206c657373207468616e206d61785374604482015268185ad9505b5bdd5b9d60ba1b6064820152608401610511565b600254821061119a5760405162461bcd60e51b8152602060048201526012602482015271496e76616c6964207374616b65207479706560701b6044820152606401610511565b6000600283815481106111af576111af6123d0565b60009182526020918290206040805160608101825260039093029091018054835260018101549383019390935260029092015460ff161515918101829052915061123b5760405162461bcd60e51b815260206004820152601860248201527f5374616b652074797065206973206e6f742061637469766500000000000000006044820152606401610511565b60006040518060c001604052808681526020014281526020018581526020016112613390565b6001600160a01b0316815260200160011515815260200160008152509050600061128a82611e13565b90508060045410156112ae5760405162461bcd60e51b815260040161051190612477565b80600460008282546112c09190612464565b9250508190555085600860008282546112d99190612451565b9091555050336000908152600a6020526040812080548892906112fd908490612451565b90915550506003546001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018990526064016020604051808303816000875af1158015611367573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138b91906124ae565b5060018054808201825560009190915282517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf660059092029182015560208301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf782015560408301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf882015560608301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf98201805460808601516001600160a01b039093166001600160a81b031990911617600160a01b9215159290920291909117905560a08301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cfa909101557f2e1efeb2397fe40394252127b95f60c6685c09b76653bcdf6aac43da69cdfe428686338651600180546114d09190612464565b6040805195865260208601949094526001600160a01b03929092168484015260608401526080830152519081900360a00190a1600180546115119190612464565b9695505050505050565b600061152681611e06565b600083116115885760405162461bcd60e51b815260206004820152602960248201527f6d696e207374616b6520616d6f756e742073686f756c6420626520677265617460448201526806572207468616e20360bc1b6064820152608401610511565b8282116115fd5760405162461bcd60e51b815260206004820152603860248201527f6d6178207374616b6520616d6f756e742073686f756c6420626520677265617460448201527f6572207468616e206d696e207374616b6520616d6f756e7400000000000000006064820152608401610511565b50600591909155600655565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008060018481548110611648576116486123d0565b600091825260208083206040805160c08101825260059094029091018054845260018101549284019290925260028083015491840182905260038301546001600160a01b038116606086015260ff600160a01b909104161515608085015260049092015460a08401528154929450909181106116c6576116c66123d0565b600091825260208083206040805160608101825260039094029091018054845260018101549284019290925260029182015460ff1615159083015280549193509086908110611717576117176123d0565b60009182526020918290206040805160608101825260039093029091018054835260018101549383019390935260029092015460ff16151591810191909152905061175f3390565b6001600160a01b031683606001516001600160a01b0316146117935760405162461bcd60e51b8152600401610511906123e6565b82608001516117b45760405162461bcd60e51b81526004016105119061240e565b60025485106117fa5760405162461bcd60e51b8152602060048201526012602482015271496e76616c6964207374616b65207479706560701b6044820152606401610511565b81516020840151429161180c91612451565b1061184f5760405162461bcd60e51b81526020600482015260136024820152725374616b65206973206e6f74206d617475726560681b6044820152606401610511565b600061185a84611e13565b9050600081856000015161186e9190612451565b9050600060018981548110611885576118856123d0565b906000526020600020906005020160030160146101000a81548160ff0219169083151502179055507f53c211d2ede1f66579447fe50d66423aa8828dff1888bcc94e37af0d0be20c1d8286604001516118db3390565b6040805193845260208401929092526001600160a01b031690820152606081018a905260800160405180910390a160006040518060c0016040528083815260200142815260200189815260200161192f3390565b6001600160a01b0316815260200160011515815260200160008152509050600061195882611e13565b905080600454101561197c5760405162461bcd60e51b815260040161051190612477565b806004600082825461198e9190612464565b9250508190555083600860008282546119a79190612451565b9091555050336000908152600a6020526040812080548692906119cb908490612451565b909155505060018054808201825560009190915282517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf660059092029182015560208301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf782015560408301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf882015560608301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf98201805460808601516001600160a01b039093166001600160a81b031990911617600160a01b9215159290920291909117905560a08301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cfa909101557f2e1efeb2397fe40394252127b95f60c6685c09b76653bcdf6aac43da69cdfe42838a33885160018054611b149190612464565b6040805195865260208601949094526001600160a01b03929092168484015260608401526080830152519081900360a00190a160018054611b559190612464565b9a9950505050505050505050565b6000611b6e81611e06565b6003546001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018590526064016020604051808303816000875af1158015611bd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf791906124ae565b508160046000828254611c0a9190612451565b90915550506040805183815233602082015281517f4cbf32782e2854c8080e9af69f02b587ea4b47b4de68d74f3faeadd396801d5c929181900390910190a15050565b60028181548110611c5d57600080fd5b600091825260209091206003909102018054600182015460029092015490925060ff1683565b600082815260208190526040902060010154611c9e81611e06565b6109578383611f6d565b60018181548110611cb857600080fd5b600091825260209091206005909102018054600182015460028301546003840154600490940154929450909290916001600160a01b03821691600160a01b900460ff169086565b6000611d0a81611e06565b8160028481548110611d1e57611d1e6123d0565b60009182526020909120600390910201600201805460ff1916911515919091179055505050565b6000611d5081611e06565b5060408051606081018252938452602084019283529015159083019081526002805460018101825560009190915292517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace60039094029384015590517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf830155517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad0909101805460ff1916911515919091179055565b611e108133611fd2565b50565b6000806002836040015181548110611e2d57611e2d6123d0565b600091825260208083206040805160608101825260039094029091018054845260018101549284018390526002015460ff1615159083015285519193506103e891611e7891906124cb565b611e8291906124e2565b60a085015190915015611ee2578151602085015160a0860151611ea59190612464565b611eaf90836124cb565b611eb991906124e2565b9050606460075482611ecb91906124cb565b611ed591906124e2565b611edf9082612464565b90505b9392505050565b611ef38282611609565b610aa2576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611f293390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611f778282611609565b15610aa2576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b611fdc8282611609565b610aa257611fe98161202b565b611ff483602061203d565b604051602001612005929190612528565b60408051601f198184030181529082905262461bcd60e51b82526105119160040161259d565b60606104b46001600160a01b03831660145b6060600061204c8360026124cb565b612057906002612451565b67ffffffffffffffff81111561206f5761206f6125d0565b6040519080825280601f01601f191660200182016040528015612099576020820181803683370190505b509050600360fc1b816000815181106120b4576120b46123d0565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106120e3576120e36123d0565b60200101906001600160f81b031916908160001a90535060006121078460026124cb565b612112906001612451565b90505b600181111561218a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612146576121466123d0565b1a60f81b82828151811061215c5761215c6123d0565b60200101906001600160f81b031916908160001a90535060049490941c93612183816125e6565b9050612115565b508315611ee25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610511565b6000602082840312156121eb57600080fd5b81356001600160e01b031981168114611ee257600080fd5b60006020828403121561221557600080fd5b5035919050565b80356001600160a01b038116811461223357600080fd5b919050565b60006020828403121561224a57600080fd5b611ee28261221c565b600060208083526101208301845182850152818501516040818187015280870151915060608281880152808801516080880152608088015160a088015260a088015160c088015260c088015160e088015260e08801519250610100808189015250838351808652610140890191508685019550600094505b808510156122fe5785518051835287810151888401528401511515848301529486019460019490940193908201906122cb565b5098975050505050505050565b6000806040838503121561231e57600080fd5b8235915061232e6020840161221c565b90509250929050565b6000806040838503121561234a57600080fd5b50508035926020909101359150565b8015158114611e1057600080fd5b6000806040838503121561237a57600080fd5b82359150602083013561238c81612359565b809150509250929050565b6000806000606084860312156123ac57600080fd5b833592506020840135915060408401356123c581612359565b809150509250925092565b634e487b7160e01b600052603260045260246000fd5b6020808252600e908201526d4e6f7420796f7572207374616b6560901b604082015260600190565b6020808252601390820152725374616b65206973206e6f742061637469766560681b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b808201808211156104b4576104b461243b565b818103818111156104b4576104b461243b565b6020808252601e908201527f4e6f7420656e6f756768207265776172647320696e2074686520706f6f6c0000604082015260600190565b6000602082840312156124c057600080fd5b8151611ee281612359565b80820281158282048414176104b4576104b461243b565b6000826124ff57634e487b7160e01b600052601260045260246000fd5b500490565b60005b8381101561251f578181015183820152602001612507565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612560816017850160208801612504565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612591816028840160208801612504565b01602801949350505050565b60208152600082518060208401526125bc816040850160208701612504565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b6000816125f5576125f561243b565b50600019019056fea264697066735822122086374b0f1f19ff43971c32055ea79b8962345d360476edb029a70abc487bb32c64736f6c63430008120033000000000000000000000000bbc2ae13b23d715c30720f079fcd9b4a74093505

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101da5760003560e01c806377fccf3211610104578063cc7a262e116100a2578063e60a955d11610071578063e60a955d14610429578063f18876841461043c578063fa8105ff14610445578063fc0c546a1461045857600080fd5b8063cc7a262e14610392578063cf251c921461039b578063d547741f146103cb578063d5a44f86146103de57600080fd5b806391d14854116100de57806391d1485414610351578063a217fddf14610364578063b8e7023d1461036c578063ca1d209d1461037f57600080fd5b806377fccf32146103185780637b0472f01461032b5780638c9bd1b51461033e57600080fd5b80632f2ff15d1161017c5780634a4b674a1161014b5780634a4b674a146102ea5780634ec18db9146102fd5780635aa1326c146103065780635d80ca321461030f57600080fd5b80632f2ff15d1461029e57806330409c85146102b157806336568abe146102c4578063379607f5146102d757600080fd5b80631b75c9fa116101b85780631b75c9fa14610233578063248a9ca31461025357806325d6a898146102765780632e17de781461028b57600080fd5b806301ffc9a7146101df5780630edd2ffc146102075780631372e0261461021e575b600080fd5b6101f26101ed3660046121d9565b610483565b60405190151581526020015b60405180910390f35b61021060075481565b6040519081526020016101fe565b61023161022c366004612203565b6104ba565b005b610210610241366004612238565b600a6020526000908152604090205481565b610210610261366004612203565b60009081526020819052604090206001015490565b61027e610520565b6040516101fe9190612253565b610231610299366004612203565b61062d565b6102316102ac36600461230b565b610932565b6102316102bf366004612203565b61095c565b6102316102d236600461230b565b610a28565b6102316102e5366004612203565b610aa6565b6102316102f8366004612203565b610dfd565b61021060045481565b61021060095481565b61021060065481565b610231610326366004612203565b610eaf565b610210610339366004612337565b61106d565b61023161034c366004612337565b61151b565b6101f261035f36600461230b565b611609565b610210600081565b61021061037a366004612337565b611632565b61023161038d366004612203565b611b63565b61021060085481565b6103ae6103a9366004612203565b611c4d565b6040805193845260208401929092521515908201526060016101fe565b6102316103d936600461230b565b611c83565b6103f16103ec366004612203565b611ca8565b604080519687526020870195909552938501929092526001600160a01b031660608401521515608083015260a082015260c0016101fe565b610231610437366004612367565b611cff565b61021060055481565b610231610453366004612397565b611d45565b60035461046b906001600160a01b031681565b6040516001600160a01b0390911681526020016101fe565b60006001600160e01b03198216637965db0b60e01b14806104b457506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006104c581611e06565b6000821161051a5760405162461bcd60e51b815260206004820181905260248201527f70656e616c74792073686f756c642062652067726561746572207468616e203060448201526064015b60405180910390fd5b50600955565b61056860405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081525090565b60405180610100016040528060045481526020016005548152602001600654815260200160075481526020016008548152602001600180549050815260200160095481526020016002805480602002602001604051908101604052809291908181526020016000905b828210156106225760008481526020908190206040805160608101825260038602909201805483526001808201548486015260029091015460ff1615159183019190915290835290920191016105d1565b505050915250919050565b600060018281548110610642576106426123d0565b600091825260208083206040805160c08101825260059094029091018054845260018101549284019290925260028083015491840182905260038301546001600160a01b038116606086015260ff600160a01b909104161515608085015260049092015460a08401528154929450909181106106c0576106c06123d0565b60009182526020918290206040805160608101825260039093029091018054835260018101549383019390935260029092015460ff1615159181019190915290506107083390565b6001600160a01b031682606001516001600160a01b03161461073c5760405162461bcd60e51b8152600401610511906123e6565b816080015161075d5760405162461bcd60e51b81526004016105119061240e565b60a0820151156107af5760405162461bcd60e51b815260206004820152601960248201527f5374616b6520697320616c72656164792063616e63656c6564000000000000006044820152606401610511565b8051602083015142916107c191612451565b1161080e5760405162461bcd60e51b815260206004820152601c60248201527f5374616b6520697320636f6d706c657465642e20436c61696d206974000000006044820152606401610511565b600061081983611e13565b4260a085015260018054919250849186908110610838576108386123d0565b600091825260208083208451600590930201918255830151600182015560408301516002820155606083015160038201805460808601511515600160a01b026001600160a81b03199091166001600160a01b039093169290921791909117905560a0909201516004909201919091556108b084611e13565b90506108bc8183612464565b600460008282546108cd9190612451565b909155505060408401517fbc6b295186169c2d1a54d537ff48eaa2d60db600dcf3ab7646cf4620d9a9a872908290335b6040805193845260208401929092526001600160a01b0316908201526060810187905260800160405180910390a15050505050565b60008281526020819052604090206001015461094d81611e06565b6109578383611ee9565b505050565b600061096781611e06565b6004548211156109895760405162461bcd60e51b815260040161051190612477565b6003546001600160a01b031663a9059cbb336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018590526044016020604051808303816000875af11580156109e8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0c91906124ae565b508160046000828254610a1f9190612464565b90915550505050565b6001600160a01b0381163314610a985760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610511565b610aa28282611f6d565b5050565b600060018281548110610abb57610abb6123d0565b600091825260208083206040805160c08101825260059094029091018054845260018101549284019290925260028083015491840182905260038301546001600160a01b038116606086015260ff600160a01b909104161515608085015260049092015460a0840152815492945090918110610b3957610b396123d0565b60009182526020918290206040805160608101825260039093029091018054835260018101549383019390935260029092015460ff161515918101919091529050610b813390565b6001600160a01b031682606001516001600160a01b031614610bb55760405162461bcd60e51b8152600401610511906123e6565b8160800151610bd65760405162461bcd60e51b81526004016105119061240e565b60a082015115610c5557426009548360a00151610bf39190612451565b10610c505760405162461bcd60e51b815260206004820152602760248201527f5374616b652069732063616e63656c65642e20576169742035206461797320746044820152666f20636c61696d60c81b6064820152608401610511565b610cac565b805160208301514291610c6791612451565b10610cac5760405162461bcd60e51b81526020600482015260156024820152745374616b65206973206e6f7420636f6d706c65746560581b6044820152606401610511565b6000610cb783611e13565b90506000818460000151610ccb9190612451565b9050600060018681548110610ce257610ce26123d0565b906000526020600020906005020160030160146101000a81548160ff021916908315150217905550836000015160086000828254610d209190612464565b90915550508351336000908152600a602052604081208054909190610d46908490612464565b90915550506003546001600160a01b031663a9059cbb336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015610daa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dce91906124ae565b507f53c211d2ede1f66579447fe50d66423aa8828dff1888bcc94e37af0d0be20c1d8285604001516108fd3390565b6000610e0881611e06565b60008211610e585760405162461bcd60e51b815260206004820181905260248201527f70656e616c74792073686f756c642062652067726561746572207468616e20306044820152606401610511565b6064821115610ea95760405162461bcd60e51b815260206004820152601f60248201527f70656e616c74792073686f756c64206265206c657373207468616e20313030006044820152606401610511565b50600755565b6000610eba81611e06565b600060018381548110610ecf57610ecf6123d0565b600091825260208083206040805160c0810182526005909402909101805484526001808201549385019390935260028101549184019190915260038101546001600160a01b038116606085015260ff600160a01b90910416151560808401526004015460a083015280549193509085908110610f4d57610f4d6123d0565b906000526020600020906005020160030160146101000a81548160ff021916908315150217905550806000015160086000828254610f8b9190612464565b9091555050805160608201516001600160a01b03166000908152600a602052604081208054909190610fbe908490612464565b9091555060009050610fcf82611e13565b90508060046000828254610fe39190612451565b90915550506003546060830151835160405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915291169063a9059cbb906044016020604051808303816000875af1158015611042573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106691906124ae565b5050505050565b60006005548310156110d65760405162461bcd60e51b815260206004820152602c60248201527f416d6f756e742073686f756c642062652067726561746572207468616e206d6960448201526b1b94dd185ad9505b5bdd5b9d60a21b6064820152608401610511565b600654336000908152600a60205260409020546110f4908590612451565b11156111545760405162461bcd60e51b815260206004820152602960248201527f416d6f756e742073686f756c64206265206c657373207468616e206d61785374604482015268185ad9505b5bdd5b9d60ba1b6064820152608401610511565b600254821061119a5760405162461bcd60e51b8152602060048201526012602482015271496e76616c6964207374616b65207479706560701b6044820152606401610511565b6000600283815481106111af576111af6123d0565b60009182526020918290206040805160608101825260039093029091018054835260018101549383019390935260029092015460ff161515918101829052915061123b5760405162461bcd60e51b815260206004820152601860248201527f5374616b652074797065206973206e6f742061637469766500000000000000006044820152606401610511565b60006040518060c001604052808681526020014281526020018581526020016112613390565b6001600160a01b0316815260200160011515815260200160008152509050600061128a82611e13565b90508060045410156112ae5760405162461bcd60e51b815260040161051190612477565b80600460008282546112c09190612464565b9250508190555085600860008282546112d99190612451565b9091555050336000908152600a6020526040812080548892906112fd908490612451565b90915550506003546001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018990526064016020604051808303816000875af1158015611367573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138b91906124ae565b5060018054808201825560009190915282517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf660059092029182015560208301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf782015560408301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf882015560608301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf98201805460808601516001600160a01b039093166001600160a81b031990911617600160a01b9215159290920291909117905560a08301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cfa909101557f2e1efeb2397fe40394252127b95f60c6685c09b76653bcdf6aac43da69cdfe428686338651600180546114d09190612464565b6040805195865260208601949094526001600160a01b03929092168484015260608401526080830152519081900360a00190a1600180546115119190612464565b9695505050505050565b600061152681611e06565b600083116115885760405162461bcd60e51b815260206004820152602960248201527f6d696e207374616b6520616d6f756e742073686f756c6420626520677265617460448201526806572207468616e20360bc1b6064820152608401610511565b8282116115fd5760405162461bcd60e51b815260206004820152603860248201527f6d6178207374616b6520616d6f756e742073686f756c6420626520677265617460448201527f6572207468616e206d696e207374616b6520616d6f756e7400000000000000006064820152608401610511565b50600591909155600655565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008060018481548110611648576116486123d0565b600091825260208083206040805160c08101825260059094029091018054845260018101549284019290925260028083015491840182905260038301546001600160a01b038116606086015260ff600160a01b909104161515608085015260049092015460a08401528154929450909181106116c6576116c66123d0565b600091825260208083206040805160608101825260039094029091018054845260018101549284019290925260029182015460ff1615159083015280549193509086908110611717576117176123d0565b60009182526020918290206040805160608101825260039093029091018054835260018101549383019390935260029092015460ff16151591810191909152905061175f3390565b6001600160a01b031683606001516001600160a01b0316146117935760405162461bcd60e51b8152600401610511906123e6565b82608001516117b45760405162461bcd60e51b81526004016105119061240e565b60025485106117fa5760405162461bcd60e51b8152602060048201526012602482015271496e76616c6964207374616b65207479706560701b6044820152606401610511565b81516020840151429161180c91612451565b1061184f5760405162461bcd60e51b81526020600482015260136024820152725374616b65206973206e6f74206d617475726560681b6044820152606401610511565b600061185a84611e13565b9050600081856000015161186e9190612451565b9050600060018981548110611885576118856123d0565b906000526020600020906005020160030160146101000a81548160ff0219169083151502179055507f53c211d2ede1f66579447fe50d66423aa8828dff1888bcc94e37af0d0be20c1d8286604001516118db3390565b6040805193845260208401929092526001600160a01b031690820152606081018a905260800160405180910390a160006040518060c0016040528083815260200142815260200189815260200161192f3390565b6001600160a01b0316815260200160011515815260200160008152509050600061195882611e13565b905080600454101561197c5760405162461bcd60e51b815260040161051190612477565b806004600082825461198e9190612464565b9250508190555083600860008282546119a79190612451565b9091555050336000908152600a6020526040812080548692906119cb908490612451565b909155505060018054808201825560009190915282517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf660059092029182015560208301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf782015560408301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf882015560608301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf98201805460808601516001600160a01b039093166001600160a81b031990911617600160a01b9215159290920291909117905560a08301517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cfa909101557f2e1efeb2397fe40394252127b95f60c6685c09b76653bcdf6aac43da69cdfe42838a33885160018054611b149190612464565b6040805195865260208601949094526001600160a01b03929092168484015260608401526080830152519081900360a00190a160018054611b559190612464565b9a9950505050505050505050565b6000611b6e81611e06565b6003546001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018590526064016020604051808303816000875af1158015611bd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf791906124ae565b508160046000828254611c0a9190612451565b90915550506040805183815233602082015281517f4cbf32782e2854c8080e9af69f02b587ea4b47b4de68d74f3faeadd396801d5c929181900390910190a15050565b60028181548110611c5d57600080fd5b600091825260209091206003909102018054600182015460029092015490925060ff1683565b600082815260208190526040902060010154611c9e81611e06565b6109578383611f6d565b60018181548110611cb857600080fd5b600091825260209091206005909102018054600182015460028301546003840154600490940154929450909290916001600160a01b03821691600160a01b900460ff169086565b6000611d0a81611e06565b8160028481548110611d1e57611d1e6123d0565b60009182526020909120600390910201600201805460ff1916911515919091179055505050565b6000611d5081611e06565b5060408051606081018252938452602084019283529015159083019081526002805460018101825560009190915292517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace60039094029384015590517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf830155517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad0909101805460ff1916911515919091179055565b611e108133611fd2565b50565b6000806002836040015181548110611e2d57611e2d6123d0565b600091825260208083206040805160608101825260039094029091018054845260018101549284018390526002015460ff1615159083015285519193506103e891611e7891906124cb565b611e8291906124e2565b60a085015190915015611ee2578151602085015160a0860151611ea59190612464565b611eaf90836124cb565b611eb991906124e2565b9050606460075482611ecb91906124cb565b611ed591906124e2565b611edf9082612464565b90505b9392505050565b611ef38282611609565b610aa2576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611f293390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611f778282611609565b15610aa2576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b611fdc8282611609565b610aa257611fe98161202b565b611ff483602061203d565b604051602001612005929190612528565b60408051601f198184030181529082905262461bcd60e51b82526105119160040161259d565b60606104b46001600160a01b03831660145b6060600061204c8360026124cb565b612057906002612451565b67ffffffffffffffff81111561206f5761206f6125d0565b6040519080825280601f01601f191660200182016040528015612099576020820181803683370190505b509050600360fc1b816000815181106120b4576120b46123d0565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106120e3576120e36123d0565b60200101906001600160f81b031916908160001a90535060006121078460026124cb565b612112906001612451565b90505b600181111561218a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612146576121466123d0565b1a60f81b82828151811061215c5761215c6123d0565b60200101906001600160f81b031916908160001a90535060049490941c93612183816125e6565b9050612115565b508315611ee25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610511565b6000602082840312156121eb57600080fd5b81356001600160e01b031981168114611ee257600080fd5b60006020828403121561221557600080fd5b5035919050565b80356001600160a01b038116811461223357600080fd5b919050565b60006020828403121561224a57600080fd5b611ee28261221c565b600060208083526101208301845182850152818501516040818187015280870151915060608281880152808801516080880152608088015160a088015260a088015160c088015260c088015160e088015260e08801519250610100808189015250838351808652610140890191508685019550600094505b808510156122fe5785518051835287810151888401528401511515848301529486019460019490940193908201906122cb565b5098975050505050505050565b6000806040838503121561231e57600080fd5b8235915061232e6020840161221c565b90509250929050565b6000806040838503121561234a57600080fd5b50508035926020909101359150565b8015158114611e1057600080fd5b6000806040838503121561237a57600080fd5b82359150602083013561238c81612359565b809150509250929050565b6000806000606084860312156123ac57600080fd5b833592506020840135915060408401356123c581612359565b809150509250925092565b634e487b7160e01b600052603260045260246000fd5b6020808252600e908201526d4e6f7420796f7572207374616b6560901b604082015260600190565b6020808252601390820152725374616b65206973206e6f742061637469766560681b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b808201808211156104b4576104b461243b565b818103818111156104b4576104b461243b565b6020808252601e908201527f4e6f7420656e6f756768207265776172647320696e2074686520706f6f6c0000604082015260600190565b6000602082840312156124c057600080fd5b8151611ee281612359565b80820281158282048414176104b4576104b461243b565b6000826124ff57634e487b7160e01b600052601260045260246000fd5b500490565b60005b8381101561251f578181015183820152602001612507565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612560816017850160208801612504565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612591816028840160208801612504565b01602801949350505050565b60208152600082518060208401526125bc816040850160208701612504565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b6000816125f5576125f561243b565b50600019019056fea264697066735822122086374b0f1f19ff43971c32055ea79b8962345d360476edb029a70abc487bb32c64736f6c63430008120033

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

000000000000000000000000bbc2ae13b23d715c30720f079fcd9b4a74093505

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

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


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.