Contract 0x57eB1b68F2ae0F77bf54F5EE6133bE80d6381d1B

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x31ee274bb4b172cb78724570f21309e700764dd175e1de2a97dca84cedaebf4aClaim285633342022-05-20 21:39:111 hr 42 mins ago0x274a264feee36f09b5900ff280087bacea4235be IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.004500302118 33.119679998
0xbef4ad4c3bb10d33852b1083404f2cc9363b18ee434f7c061d6911a9492b2bbeClaim285625562022-05-20 21:10:152 hrs 10 mins ago0x83e299c6f9710f47d5318aa947f3cf67928b42e3 IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.00392888606 33.077000004
0x3678d32ce3546e2352579a11e205a7a355a4f0167008f92c80435bb065de9f45Claim285618752022-05-20 20:45:332 hrs 35 mins ago0x6e931b3a9ae97e821c27382001889ef2079ec8c9 IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.003928886055 33.07699996
0x822af167ea5055886d2e4c5b6812727af2b6307254f7b275aa9c737301a24229Deposit From285617772022-05-20 20:41:412 hrs 39 mins ago0x47033ac48fbedfcf36f54a43ed3725256a1a7b29 IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.005092667277 33.07700032
0x4f0ddac95a522e2297661016926757ba081c2de9bd23417717cac0fa746d4a5dClaim285617222022-05-20 20:38:072 hrs 43 mins ago0x47033ac48fbedfcf36f54a43ed3725256a1a7b29 IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.00392888606 33.077000001
0xf69599080acac6a20f80f2a4a342da48c021541c09141d7bf199e2ac097baa4cClaim285604402022-05-20 19:51:553 hrs 29 mins ago0x351356843a8cfdb726c757014b47e1291315217f IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.003963920804 33.371954914
0x0abad13a34410deceee333e8f9ea5126ddbe949f1e92542b5222faf15c145fcaClaim285600162022-05-20 19:35:153 hrs 45 mins ago0xe7338d734397bfcc345b83600525f074af0e3ab6 IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.003927870824 33.068452805
0x63a8aafad40cc8262a9f7c62202b01825ec6c3c58b525a9c3dee468169cb6333Claim285592842022-05-20 19:07:554 hrs 13 mins ago0x1d1b104cd940f16830b180eef2d207a18a897f12 IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.003927869084 33.068438161
0xf04ec012c33bf4460080050c78be1a0a17fece06a3afb24ec8b21c94a6c1328dClaim285564392022-05-20 17:25:455 hrs 55 mins ago0x739ba4be0a3ced83add3f9883a79b7343b1ceae5 IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.003968022575 33.406487414
0xb2bc050443109e37047d40979328bbef69d973eea62b7df15d717c9b3ea6016bClaim285551112022-05-20 16:37:506 hrs 43 mins ago0xe4be496cf9307052e06ae0e999d5119327750329 IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.005827982814 49.065354555
0x72c3b19ed75132442b9562e04cee8544bb81333d75db7e1eaf1df2aa231b62faClaim285545262022-05-20 16:17:437 hrs 3 mins ago0x5ba393a21baf111ca14f5cf73643333a13f3272f IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.001499769762 42.125997491
0x56c20ab2a87aefa471cc3a4f1c0ec356430f23337fd5e96846df63b1bac88fa2Claim285545262022-05-20 16:17:437 hrs 3 mins ago0x5ba393a21baf111ca14f5cf73643333a13f3272f IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.001499769762 42.125997491
0x584f8177cf3d9091cae3ec7edd62a1f6997d506b0d4ab4cb4af42b3e379c087eClaim285545262022-05-20 16:17:437 hrs 3 mins ago0x5ba393a21baf111ca14f5cf73643333a13f3272f IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.005724080539 42.125997491
0x4fd7d21440862f59bed553e88112dc117c4f60478727e5e0d426cdbd069e45b9Claim285530332022-05-20 15:24:177 hrs 56 mins ago0xc33d3546f19977dccabe4b4fd7fb13d4f8478448 IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.005447637535 40.09153323
0x7565fdf10fb8f7eb65ada826a08e70c377c54b5fab916c80263faee2420ec0b0Claim285503272022-05-20 13:46:579 hrs 34 mins ago0x49a1a7099be4d4d271b789534d3b74181047259a IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.003957896718 33.321238577
0x766c5556361acacc97978a3eaa95c4a641de5a2d357bb9f112ab2fba065c528bDeposit From285475602022-05-20 12:04:3611 hrs 16 mins ago0x18f43a59d698ea7a4f5a0c11e7aa50973f5b396b IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.004933897059 33.07699619
0xfb41ad59b12d2ebbef8f1eb746d30f60534542db41cac4485d2ce754fdd0e541Claim285475352022-05-20 12:03:4611 hrs 17 mins ago0x18f43a59d698ea7a4f5a0c11e7aa50973f5b396b IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.003928885608 33.076996198
0x8a43977213e7a8143bb21ab9b021590e5e439cf9535ad97dc5323b2afd8cb1d6Deposit From285468242022-05-20 11:37:1211 hrs 44 mins ago0x9bd45ec412e3a8548f85a94c67ebf416c81764de IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.004933896003 33.076989111
0xff66211c1595bc95476cf2ff1dc73694205c46e7a204a4bc5df9f187c9c5bc09Claim285467702022-05-20 11:35:2011 hrs 45 mins ago0x9bd45ec412e3a8548f85a94c67ebf416c81764de IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.003928884778 33.076989209
0xc8df1ef3818f3b54b3b0d2176b199e2fe013cfcd2eb97e44e31e23918a3d47aeDeposit From285466942022-05-20 11:32:4411 hrs 48 mins ago0x1228d5ef1c1a0e1fd84e81b019cec6f5cfc3e866 IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.004933896242 33.076990712
0x8c142810a96fe0e82101c96d68472acc36c2c2ab2238b8ee1dc826bb0308081aDeposit From285466412022-05-20 11:30:5411 hrs 50 mins ago0x85e549313f9cfdbcc75cbfef355c0032b6cda287 IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.004933103601 33.076998803
0xd3d0c532e9db9cd8b7285ec5463fe2a5bf1160ceefe485dae0db6bef1c7d1321Claim285465482022-05-20 11:27:4011 hrs 53 mins ago0x85e549313f9cfdbcc75cbfef355c0032b6cda287 IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.003928886346 33.077002416
0xff4c8ef475646c183964b0f80036a33373c59479f10abad216781e4cfac85139Claim285440492022-05-20 9:53:1213 hrs 28 mins ago0x1d1b104cd940f16830b180eef2d207a18a897f12 IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.003920426146 33.005776618
0xb6cef19107c5ab00acaa8e1e077973db40da7a7eb1d50dbf3eade5e3e422d3b9Claim285435552022-05-20 9:36:1413 hrs 44 mins ago0x5b2daa876cfbb4fe17a7b06795730423aa4717ca IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.00392042615 33.005776653
0x0fdc771481426a03057fca154801c9445450aee13606633a4208ea4fb4dddf6dDeposit From285422032022-05-20 8:44:4914 hrs 36 mins ago0xf8f726dfd844b1d86c8da4ec731bc62d27f04fae IN  0x57eb1b68f2ae0f77bf54f5ee6133be80d6381d1b0 MATIC0.004922444099 33.000215198
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TutellusFarming

Compiler Version
v0.8.2+commit.661d1103

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 9 : TutellusFarming.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "./utils/AccessControlProxyPausable.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/ITutellusRewardsVault.sol";

contract TutellusFarming is AccessControlProxyPausable {

    address public token;
    address public vault;

    bool public autoreward;

    uint256 public balance;
    uint256 public accRewardsPerShare;
    uint256 private _released; 

    uint public lastUpdate;
    uint public stakers;

    struct UserInfo {
      uint256 amount;
      uint256 rewardDebt;
      uint256 notClaimed;
    }

    mapping(address=>UserInfo) private _userInfo;

    event Claim(address account);
    event Deposit(address account, uint256 amount);
    event Withdraw(address account, uint256 amount);
    event Rewards(address account, uint256 amount);
    event SyncBalance(address account, uint256 amount);
    event ToggleAutoreward(bool autoreward);
    event Update(uint256 balance, uint256 accRewardsPerShare, uint lastUpdate, uint stakers);
    event UpdateUserInfo(address account, uint256 amount, uint256 rewardDebt, uint256 notClaimed);
    event Migrate(address from, address to, address account, uint256 amount, bytes response);

    function _update() internal {
      if (block.number <= lastUpdate) {
        return;
      }
      ITutellusRewardsVault rewardsInterface = ITutellusRewardsVault(vault);
      uint256 released = rewardsInterface.releasedId(address(this)) - _released;
      _released += released;
      if(balance > 0) {
        accRewardsPerShare += (released * 1e18 / balance);
      }
      lastUpdate = block.number;
    }

    // Updates rewards for an account
    function _updateRewards(address account) internal {
      UserInfo storage user = _userInfo[account];
      uint256 diff = accRewardsPerShare - user.rewardDebt;
      user.notClaimed = diff * user.amount / 1e18;
      user.rewardDebt = accRewardsPerShare;
    }

    // Deposits tokens for staking
    function depositFrom(address account, uint256 amount) public whenNotPaused {
      require(amount > 0, "TutellusFarming: amount must be over zero");

      UserInfo storage user = _userInfo[account];

      _update();
      _updateRewards(account);

      if(user.amount == 0) {
        stakers += 1;
      }

      user.amount += amount;
      balance += amount;

      IERC20 tokenInterface = IERC20(token);

      require(tokenInterface.balanceOf(account) >= amount, "TutellusFarming: user has not enough balance");
      require(tokenInterface.allowance(account, address(this)) >= amount, "TutellusFarming: amount exceeds allowance");

      if(autoreward) {
        _reward(account);
      }

      require(tokenInterface.transferFrom(account, address(this), amount), "TutellusFarming: deposit transfer failed");

      emit Update(balance, accRewardsPerShare, lastUpdate, stakers);
      emit UpdateUserInfo(account, user.amount, user.rewardDebt, user.notClaimed);
      emit Deposit(account, amount);
    }

    // Withdraws tokens from staking
    function withdraw(uint256 amount) public whenNotPaused returns (uint256) {
      require(amount > 0, "TutellusFarming: amount must be over zero");

      address account = msg.sender;
      UserInfo storage user = _userInfo[account];

      require(amount <= user.amount, "TutellusFarming: user has not enough staking balance");

      _update();
      _updateRewards(account);

      user.rewardDebt = accRewardsPerShare;
      user.amount -= amount;
      balance -= amount;

      if(user.amount == 0) {
        stakers -= 1;
      }

      IERC20 tokenInterface = IERC20(token);

      if(autoreward) {
        _reward(account);
      }

      require(tokenInterface.transfer(account, amount), "TutellusFarming: withdraw transfer failed");

      emit Update(balance, accRewardsPerShare, lastUpdate, stakers);
      emit UpdateUserInfo(account, user.amount, user.rewardDebt, user.notClaimed);
      emit Withdraw(account, amount);
      return amount;
    }

    // Claims rewards
    function claim() public whenNotPaused {
      address account = msg.sender;
      UserInfo storage user = _userInfo[account];

      _update();
      _updateRewards(account);

      require(user.notClaimed > 0, "TutellusFarming: nothing to claim");

      _reward(account);

      emit Update(balance, accRewardsPerShare, lastUpdate, stakers);
      emit UpdateUserInfo(account, user.amount, user.rewardDebt, user.notClaimed);
      emit Claim(account);
    }

    // Toggles autoreward
    function toggleAutoreward() public onlyRole(DEFAULT_ADMIN_ROLE) {
      autoreward = !autoreward;
      emit ToggleAutoreward(autoreward);
    }

    function _reward(address account) internal {
      ITutellusRewardsVault rewardsInterface = ITutellusRewardsVault(vault);
      uint256 amount = _userInfo[account].notClaimed;
      if(amount > 0) {
        _userInfo[account].notClaimed = 0;
        rewardsInterface.distributeTokens(account, amount);
        emit Rewards(account, amount);
      }
    }


    // Gets user pending rewards
    function pendingRewards(address user_) public view returns(uint256) {
        UserInfo memory user = _userInfo[user_];
        uint256 rewards = user.notClaimed;
        if(balance > 0){
          ITutellusRewardsVault rewardsInterface = ITutellusRewardsVault(vault);
          uint256 released = rewardsInterface.releasedId(address(this)) - _released;
          uint256 total = (released * 1e18 / balance);
          rewards += (accRewardsPerShare - user.rewardDebt + total) * user.amount / 1e18;
        }
        return rewards;
    }

    constructor (address token_, address rolemanager_, address vault_) {
      __TutellusFarming_init(token_, rolemanager_, vault_);
    }

    function __TutellusFarming_init(address token_, address rolemanager_, address vault_) internal initializer {
      __AccessControlProxyPausable_init(rolemanager_);
      __TutellusFarming_init_unchained(token_, vault_);
    }

    function __TutellusFarming_init_unchained(address token_, address vault_) internal initializer {
      token = token_;
      vault = vault_;
      autoreward = true;
      lastUpdate = block.number;
    }

        // Gets token gap
    function getTokenGap() public view returns (uint256) {
      IERC20 tokenInterface = IERC20(token);
      uint256 tokenBalance = tokenInterface.balanceOf(address(this));
      if(tokenBalance > balance) {
        return tokenBalance - balance;
      } else {
        return 0;
      }
    }

        // Synchronizes balance, transfering the gap to an external account
    function syncBalance(address account) public onlyRole(DEFAULT_ADMIN_ROLE) {
      IERC20 tokenInterface = IERC20(token);
      uint256 gap = getTokenGap();
      require(gap > 0, "TutellusFarming: there is no gap");
      tokenInterface.transfer(account, gap);
      emit SyncBalance(account, gap);
    }

        // Gets user staking balance
    function getUserBalance(address user_) public view returns(uint256){
      UserInfo memory user = _userInfo[user_];
      return user.amount;
    }

    function migrate(address to) public returns (bytes memory){
      address account = msg.sender;
      uint256 amount = withdraw(_userInfo[account].amount);
      (bool success, bytes memory response) = to.call(
            abi.encodeWithSignature("depositFrom(address,uint256)", account, amount)
        );
      require(success, 'TutellusStaking: migration failed');
      emit Migrate(address(this), to, account, amount, response);
      return response;
    }
}

File 2 of 9 : AccessControlProxyPausable.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";

abstract contract AccessControlProxyPausable is PausableUpgradeable {

    address private _manager;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");

    modifier onlyRole(bytes32 role) {
        address account = msg.sender;
        require(hasRole(role, account), string(
                    abi.encodePacked(
                        "AccessControlProxyPausable: account ",
                        StringsUpgradeable.toHexString(uint160(account), 20),
                        " is missing role ",
                        StringsUpgradeable.toHexString(uint256(role), 32)
                    )
                ));
        _;
    }

    function hasRole(bytes32 role, address account) public view returns (bool) {
        IAccessControlUpgradeable manager = IAccessControlUpgradeable(_manager);
        return manager.hasRole(role, account);
    }

    function __AccessControlProxyPausable_init(address manager) internal initializer {
        __Pausable_init();
        __AccessControlProxyPausable_init_unchained(manager);
    }

    function __AccessControlProxyPausable_init_unchained(address manager) internal initializer {
        _manager = manager;
    }

    function pause() public onlyRole(PAUSER_ROLE){
        _pause();
    }
    
    function unpause() public onlyRole(PAUSER_ROLE){
        _unpause();
    }

    function updateManager(address manager) public onlyRole(DEFAULT_ADMIN_ROLE) {
        _manager = manager;
    }
}

File 3 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 4 of 9 : ITutellusRewardsVault.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

interface ITutellusRewardsVault {

    function add(address account, uint256[] memory allocation) external;

    function updateAllocation(uint256[] memory allocation) external;

    function released() external view returns (uint256);

    function availableId(address account) external view returns (uint256);

    function releasedRange(uint from, uint to) external view returns (uint256);

    function releasedId(address account) external view returns (uint256);

    function distributeTokens(address account, uint256 amount) external;

    function info(address account) external view;
}

File 5 of 9 : IAccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControlUpgradeable {
    /**
     * @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 6 of 9 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal initializer {
        __Context_init_unchained();
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal initializer {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
    uint256[49] private __gap;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 8 of 9 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract ContextUpgradeable is Initializable {
    function __Context_init() internal initializer {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal initializer {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
    uint256[50] private __gap;
}

File 9 of 9 : Initializable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"address","name":"rolemanager_","type":"address"},{"internalType":"address","name":"vault_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"response","type":"bytes"}],"name":"Migrate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Rewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SyncBalance","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"autoreward","type":"bool"}],"name":"ToggleAutoreward","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accRewardsPerShare","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastUpdate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakers","type":"uint256"}],"name":"Update","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"notClaimed","type":"uint256"}],"name":"UpdateUserInfo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accRewardsPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"autoreward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getTokenGap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user_","type":"address"}],"name":"getUserBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"lastUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"migrate","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user_","type":"address"}],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"syncBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleAutoreward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"manager","type":"address"}],"name":"updateManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620039e8380380620039e88339818101604052810190620000379190620007ee565b6200004a8383836200005360201b60201c565b5050506200093b565b600060019054906101000a900460ff16806200007a575060008054906101000a900460ff16155b620000bc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000b3906200086b565b60405180910390fd5b60008060019054906101000a900460ff1615905080156200010d576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6200011e836200015860201b60201c565b6200013084836200025960201b60201c565b8015620001525760008060016101000a81548160ff0219169083151502179055505b50505050565b600060019054906101000a900460ff16806200017f575060008054906101000a900460ff16155b620001c1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001b8906200086b565b60405180910390fd5b60008060019054906101000a900460ff16159050801562000212576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b62000222620003de60201b60201c565b6200023382620004dd60201b60201c565b8015620002555760008060016101000a81548160ff0219169083151502179055505b5050565b600060019054906101000a900460ff168062000280575060008054906101000a900460ff16155b620002c2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002b9906200086b565b60405180910390fd5b60008060019054906101000a900460ff16159050801562000313576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b82606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001606760146101000a81548160ff02191690831515021790555043606b819055508015620003d95760008060016101000a81548160ff0219169083151502179055505b505050565b600060019054906101000a900460ff168062000405575060008054906101000a900460ff16155b62000447576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200043e906200086b565b60405180910390fd5b60008060019054906101000a900460ff16159050801562000498576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b620004a8620005fe60201b60201c565b620004b8620006dd60201b60201c565b8015620004da5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff168062000504575060008054906101000a900460ff16155b62000546576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200053d906200086b565b60405180910390fd5b60008060019054906101000a900460ff16159050801562000597576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b81606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015620005fa5760008060016101000a81548160ff0219169083151502179055505b5050565b600060019054906101000a900460ff168062000625575060008054906101000a900460ff16155b62000667576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200065e906200086b565b60405180910390fd5b60008060019054906101000a900460ff161590508015620006b8576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8015620006da5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff168062000704575060008054906101000a900460ff16155b62000746576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200073d906200086b565b60405180910390fd5b60008060019054906101000a900460ff16159050801562000797576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6000603360006101000a81548160ff0219169083151502179055508015620007d45760008060016101000a81548160ff0219169083151502179055505b50565b600081519050620007e88162000921565b92915050565b6000806000606084860312156200080457600080fd5b60006200081486828701620007d7565b93505060206200082786828701620007d7565b92505060406200083a86828701620007d7565b9150509250925092565b600062000853602e836200088d565b91506200086082620008d2565b604082019050919050565b60006020820190508181036000830152620008868162000844565b9050919050565b600082825260208201905092915050565b6000620008ab82620008b2565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6200092c816200089e565b81146200093857600080fd5b50565b61309d806200094b6000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80637cbaccd5116100c3578063ce5494bb1161007c578063ce5494bb14610344578063e0adaca214610374578063e63ab1e914610390578063fbfa77cf146103ae578063fc0c546a146103cc578063fed1252a146103ea5761014d565b80637cbaccd5146102925780638456cb59146102b057806391d14854146102ba578063a217fddf146102ea578063b69ef8a814610308578063c0463711146103265761014d565b80634e71d92d116101155780634e71d92d146102085780635129338c1461021257806358aba00f146102305780635a3c978b1461024c5780635c975abb1461026a5780636ca569c1146102885761014d565b806315cc36f2146101525780632e1a7d4d1461016e57806331d7a2621461019e5780633f4ba83a146101ce57806347734892146101d8575b600080fd5b61016c600480360381019061016791906121f2565b610408565b005b61018860048036038101906101839190612293565b6108bc565b6040516101959190612996565b60405180910390f35b6101b860048036038101906101b391906121c9565b610c34565b6040516101c59190612996565b60405180910390f35b6101d6610df5565b005b6101f260048036038101906101ed91906121c9565b610ec2565b6040516101ff9190612996565b60405180910390f35b610210610f3c565b005b61021a6110f6565b6040516102279190612996565b60405180910390f35b61024a600480360381019061024591906121c9565b6111d6565b005b6102546112c0565b6040516102619190612773565b60405180910390f35b6102726112d3565b60405161027f9190612773565b60405180910390f35b6102906112ea565b005b61029a611402565b6040516102a79190612996565b60405180910390f35b6102b8611408565b005b6102d460048036038101906102cf9190612257565b6114d5565b6040516102e19190612773565b60405180910390f35b6102f2611591565b6040516102ff919061278e565b60405180910390f35b610310611598565b60405161031d9190612996565b60405180910390f35b61032e61159e565b60405161033b9190612996565b60405180910390f35b61035e600480360381019061035991906121c9565b6115a4565b60405161036b91906127d2565b60405180910390f35b61038e600480360381019061038991906121c9565b611783565b005b61039861196b565b6040516103a5919061278e565b60405180910390f35b6103b661198f565b6040516103c39190612630565b60405180910390f35b6103d46119b5565b6040516103e19190612630565b60405180910390f35b6103f26119db565b6040516103ff9190612996565b60405180910390f35b6104106112d3565b15610450576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610447906128b6565b60405180910390fd5b60008111610493576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048a90612976565b60405180910390fd5b6000606d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506104de6119e1565b6104e783611b1a565b60008160000154141561050f576001606c60008282546105079190612a44565b925050819055505b818160000160008282546105239190612a44565b92505081905550816068600082825461053c9190612a44565b925050819055506000606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828173ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b81526004016105a49190612630565b60206040518083038186803b1580156105bc57600080fd5b505afa1580156105d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f491906122bc565b1015610635576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062c90612936565b60405180910390fd5b828173ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e86306040518363ffffffff1660e01b815260040161067192919061264b565b60206040518083038186803b15801561068957600080fd5b505afa15801561069d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c191906122bc565b1015610702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f9906128d6565b60405180910390fd5b606760149054906101000a900460ff16156107215761072084611bae565b5b8073ffffffffffffffffffffffffffffffffffffffff166323b872dd8530866040518463ffffffff1660e01b815260040161075e939291906126ce565b602060405180830381600087803b15801561077857600080fd5b505af115801561078c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b0919061222e565b6107ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e690612896565b60405180910390fd5b7fce49b138f2621300a7043a61f472ccfd643162bdf3efb11354e22d5273b77a71606854606954606b54606c5460405161082c94939291906129b1565b60405180910390a17f85562ed8ea40250610547d7262031cfe1ce04565357d2efd0fd412d36fb05ebe84836000015484600101548560020154604051610875949392919061272e565b60405180910390a17fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c84846040516108ae929190612705565b60405180910390a150505050565b60006108c66112d3565b15610906576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108fd906128b6565b60405180910390fd5b60008211610949576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094090612976565b60405180910390fd5b60003390506000606d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905080600001548411156109d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109cf90612876565b60405180910390fd5b6109e06119e1565b6109e982611b1a565b606954816001018190555083816000016000828254610a089190612b25565b925050819055508360686000828254610a219190612b25565b92505081905550600081600001541415610a50576001606c6000828254610a489190612b25565b925050819055505b6000606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050606760149054906101000a900460ff1615610a9657610a9583611bae565b5b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84876040518363ffffffff1660e01b8152600401610ad1929190612705565b602060405180830381600087803b158015610aeb57600080fd5b505af1158015610aff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b23919061222e565b610b62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5990612816565b60405180910390fd5b7fce49b138f2621300a7043a61f472ccfd643162bdf3efb11354e22d5273b77a71606854606954606b54606c54604051610b9f94939291906129b1565b60405180910390a17f85562ed8ea40250610547d7262031cfe1ce04565357d2efd0fd412d36fb05ebe83836000015484600101548560020154604051610be8949392919061272e565b60405180910390a17f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243648386604051610c21929190612705565b60405180910390a1849350505050919050565b600080606d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060600160405290816000820154815260200160018201548152602001600282015481525050905060008160400151905060006068541115610deb576000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000606a548273ffffffffffffffffffffffffffffffffffffffff1663ae7928bf306040518263ffffffff1660e01b8152600401610d1a9190612630565b60206040518083038186803b158015610d3257600080fd5b505afa158015610d46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6a91906122bc565b610d749190612b25565b90506000606854670de0b6b3a764000083610d8f9190612acb565b610d999190612a9a565b9050670de0b6b3a76400008560000151828760200151606954610dbc9190612b25565b610dc69190612a44565b610dd09190612acb565b610dda9190612a9a565b84610de59190612a44565b93505050505b8092505050919050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6000339050610e2582826114d5565b610e468273ffffffffffffffffffffffffffffffffffffffff166014611d19565b610e548460001c6020611d19565b604051602001610e659291906125f6565b60405160208183030381529060405290610eb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eac91906127f4565b60405180910390fd5b50610ebe612013565b5050565b600080606d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020604051806060016040529081600082015481526020016001820154815260200160028201548152505090508060000151915050919050565b610f446112d3565b15610f84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7b906128b6565b60405180910390fd5b60003390506000606d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050610fd46119e1565b610fdd82611b1a565b6000816002015411611024576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101b90612916565b60405180910390fd5b61102d82611bae565b7fce49b138f2621300a7043a61f472ccfd643162bdf3efb11354e22d5273b77a71606854606954606b54606c5460405161106a94939291906129b1565b60405180910390a17f85562ed8ea40250610547d7262031cfe1ce04565357d2efd0fd412d36fb05ebe828260000154836001015484600201546040516110b3949392919061272e565b60405180910390a17f0c7ef932d3b91976772937f18d5ef9b39a9930bef486b576c374f047c4b512dc826040516110ea9190612630565b60405180910390a15050565b600080606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016111599190612630565b60206040518083038186803b15801561117157600080fd5b505afa158015611185573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a991906122bc565b90506068548111156111cc57606854816111c39190612b25565b925050506111d3565b6000925050505b90565b6000801b60003390506111e982826114d5565b61120a8273ffffffffffffffffffffffffffffffffffffffff166014611d19565b6112188460001c6020611d19565b6040516020016112299291906125f6565b60405160208183030381529060405290611279576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127091906127f4565b60405180910390fd5b5082606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b606760149054906101000a900460ff1681565b6000603360009054906101000a900460ff16905090565b6000801b60003390506112fd82826114d5565b61131e8273ffffffffffffffffffffffffffffffffffffffff166014611d19565b61132c8460001c6020611d19565b60405160200161133d9291906125f6565b6040516020818303038152906040529061138d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138491906127f4565b60405180910390fd5b50606760149054906101000a900460ff1615606760146101000a81548160ff0219169083151502179055507fbab7db190deaf2eccaf17b4e82ea10dce1e26f8a605ec9681ca8183b2de399fe606760149054906101000a900460ff166040516113f69190612773565b60405180910390a15050565b60695481565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a600033905061143882826114d5565b6114598273ffffffffffffffffffffffffffffffffffffffff166014611d19565b6114678460001c6020611d19565b6040516020016114789291906125f6565b604051602081830303815290604052906114c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114bf91906127f4565b60405180910390fd5b506114d16120b5565b5050565b600080606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166391d1485485856040518363ffffffff1660e01b81526004016115389291906127a9565b60206040518083038186803b15801561155057600080fd5b505afa158015611564573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611588919061222e565b91505092915050565b6000801b81565b60685481565b606b5481565b6060600033905060006115f8606d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546108bc565b90506000808573ffffffffffffffffffffffffffffffffffffffff168484604051602401611627929190612705565b6040516020818303038152906040527f15cc36f2000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516116b191906125df565b6000604051808303816000865af19150503d80600081146116ee576040519150601f19603f3d011682016040523d82523d6000602084013e6116f3565b606091505b509150915081611738576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172f90612956565b60405180910390fd5b7f6e05dc9f1838831eddd36138c9d51903718a470d488ca366c8469614074a97bd308786868560405161176f959493929190612674565b60405180910390a180945050505050919050565b6000801b600033905061179682826114d5565b6117b78273ffffffffffffffffffffffffffffffffffffffff166014611d19565b6117c58460001c6020611d19565b6040516020016117d69291906125f6565b60405160208183030381529060405290611826576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181d91906127f4565b60405180910390fd5b506000606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060006118586110f6565b90506000811161189d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611894906128f6565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86836040518363ffffffff1660e01b81526004016118d8929190612705565b602060405180830381600087803b1580156118f257600080fd5b505af1158015611906573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061192a919061222e565b507fd43c97094d4b3522923f3751f896fb88ef95d5e1d310aea58b936625fd7c5d0c858260405161195c929190612705565b60405180910390a15050505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606c5481565b606b5443116119ef57611b18565b6000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000606a548273ffffffffffffffffffffffffffffffffffffffff1663ae7928bf306040518263ffffffff1660e01b8152600401611a549190612630565b60206040518083038186803b158015611a6c57600080fd5b505afa158015611a80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa491906122bc565b611aae9190612b25565b905080606a6000828254611ac29190612a44565b9250508190555060006068541115611b0e57606854670de0b6b3a764000082611aeb9190612acb565b611af59190612a9a565b60696000828254611b069190612a44565b925050819055505b43606b8190555050505b565b6000606d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160010154606954611b719190612b25565b9050670de0b6b3a7640000826000015482611b8c9190612acb565b611b969190612a9a565b82600201819055506069548260010181905550505050565b6000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000606d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015490506000811115611d14576000606d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201819055508173ffffffffffffffffffffffffffffffffffffffff1663158a498884836040518363ffffffff1660e01b8152600401611ca8929190612705565b600060405180830381600087803b158015611cc257600080fd5b505af1158015611cd6573d6000803e3d6000fd5b505050507fc083a1647e3ee591bf42b82564ffb4d16fdbb26068f0080da911c8d8300fd84a8382604051611d0b929190612705565b60405180910390a15b505050565b606060006002836002611d2c9190612acb565b611d369190612a44565b67ffffffffffffffff811115611d75577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611da75781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611e05577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611e8f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002611ecf9190612acb565b611ed99190612a44565b90505b6001811115611fc5577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110611f41577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b1a60f81b828281518110611f7e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080611fbe90612bde565b9050611edc565b5060008414612009576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161200090612836565b60405180910390fd5b8091505092915050565b61201b6112d3565b61205a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205190612856565b60405180910390fd5b6000603360006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61209e612158565b6040516120ab9190612630565b60405180910390a1565b6120bd6112d3565b156120fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120f4906128b6565b60405180910390fd5b6001603360006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612141612158565b60405161214e9190612630565b60405180910390a1565b600033905090565b60008135905061216f8161300b565b92915050565b60008151905061218481613022565b92915050565b60008135905061219981613039565b92915050565b6000813590506121ae81613050565b92915050565b6000815190506121c381613050565b92915050565b6000602082840312156121db57600080fd5b60006121e984828501612160565b91505092915050565b6000806040838503121561220557600080fd5b600061221385828601612160565b92505060206122248582860161219f565b9150509250929050565b60006020828403121561224057600080fd5b600061224e84828501612175565b91505092915050565b6000806040838503121561226a57600080fd5b60006122788582860161218a565b925050602061228985828601612160565b9150509250929050565b6000602082840312156122a557600080fd5b60006122b38482850161219f565b91505092915050565b6000602082840312156122ce57600080fd5b60006122dc848285016121b4565b91505092915050565b6122ee81612b59565b82525050565b6122fd81612b6b565b82525050565b61230c81612b77565b82525050565b600061231d826129f6565b6123278185612a0c565b9350612337818560208601612bab565b61234081612c66565b840191505092915050565b6000612356826129f6565b6123608185612a1d565b9350612370818560208601612bab565b80840191505092915050565b600061238782612a01565b6123918185612a28565b93506123a1818560208601612bab565b6123aa81612c66565b840191505092915050565b60006123c082612a01565b6123ca8185612a39565b93506123da818560208601612bab565b80840191505092915050565b60006123f3602983612a28565b91506123fe82612c77565b604082019050919050565b6000612416602083612a28565b915061242182612cc6565b602082019050919050565b6000612439602483612a39565b915061244482612cef565b602482019050919050565b600061245c601483612a28565b915061246782612d3e565b602082019050919050565b600061247f603483612a28565b915061248a82612d67565b604082019050919050565b60006124a2602883612a28565b91506124ad82612db6565b604082019050919050565b60006124c5601083612a28565b91506124d082612e05565b602082019050919050565b60006124e8602983612a28565b91506124f382612e2e565b604082019050919050565b600061250b602083612a28565b915061251682612e7d565b602082019050919050565b600061252e602183612a28565b915061253982612ea6565b604082019050919050565b6000612551602c83612a28565b915061255c82612ef5565b604082019050919050565b6000612574602183612a28565b915061257f82612f44565b604082019050919050565b6000612597602983612a28565b91506125a282612f93565b604082019050919050565b60006125ba601183612a39565b91506125c582612fe2565b601182019050919050565b6125d981612ba1565b82525050565b60006125eb828461234b565b915081905092915050565b60006126018261242c565b915061260d82856123b5565b9150612618826125ad565b915061262482846123b5565b91508190509392505050565b600060208201905061264560008301846122e5565b92915050565b600060408201905061266060008301856122e5565b61266d60208301846122e5565b9392505050565b600060a08201905061268960008301886122e5565b61269660208301876122e5565b6126a360408301866122e5565b6126b060608301856125d0565b81810360808301526126c28184612312565b90509695505050505050565b60006060820190506126e360008301866122e5565b6126f060208301856122e5565b6126fd60408301846125d0565b949350505050565b600060408201905061271a60008301856122e5565b61272760208301846125d0565b9392505050565b600060808201905061274360008301876122e5565b61275060208301866125d0565b61275d60408301856125d0565b61276a60608301846125d0565b95945050505050565b600060208201905061278860008301846122f4565b92915050565b60006020820190506127a36000830184612303565b92915050565b60006040820190506127be6000830185612303565b6127cb60208301846122e5565b9392505050565b600060208201905081810360008301526127ec8184612312565b905092915050565b6000602082019050818103600083015261280e818461237c565b905092915050565b6000602082019050818103600083015261282f816123e6565b9050919050565b6000602082019050818103600083015261284f81612409565b9050919050565b6000602082019050818103600083015261286f8161244f565b9050919050565b6000602082019050818103600083015261288f81612472565b9050919050565b600060208201905081810360008301526128af81612495565b9050919050565b600060208201905081810360008301526128cf816124b8565b9050919050565b600060208201905081810360008301526128ef816124db565b9050919050565b6000602082019050818103600083015261290f816124fe565b9050919050565b6000602082019050818103600083015261292f81612521565b9050919050565b6000602082019050818103600083015261294f81612544565b9050919050565b6000602082019050818103600083015261296f81612567565b9050919050565b6000602082019050818103600083015261298f8161258a565b9050919050565b60006020820190506129ab60008301846125d0565b92915050565b60006080820190506129c660008301876125d0565b6129d360208301866125d0565b6129e060408301856125d0565b6129ed60608301846125d0565b95945050505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000612a4f82612ba1565b9150612a5a83612ba1565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612a8f57612a8e612c08565b5b828201905092915050565b6000612aa582612ba1565b9150612ab083612ba1565b925082612ac057612abf612c37565b5b828204905092915050565b6000612ad682612ba1565b9150612ae183612ba1565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612b1a57612b19612c08565b5b828202905092915050565b6000612b3082612ba1565b9150612b3b83612ba1565b925082821015612b4e57612b4d612c08565b5b828203905092915050565b6000612b6482612b81565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015612bc9578082015181840152602081019050612bae565b83811115612bd8576000848401525b50505050565b6000612be982612ba1565b91506000821415612bfd57612bfc612c08565b5b600182039050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f547574656c6c75734661726d696e673a207769746864726177207472616e736660008201527f6572206661696c65640000000000000000000000000000000000000000000000602082015250565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b7f416363657373436f6e74726f6c50726f78795061757361626c653a206163636f60008201527f756e742000000000000000000000000000000000000000000000000000000000602082015250565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f547574656c6c75734661726d696e673a207573657220686173206e6f7420656e60008201527f6f756768207374616b696e672062616c616e6365000000000000000000000000602082015250565b7f547574656c6c75734661726d696e673a206465706f736974207472616e73666560008201527f72206661696c6564000000000000000000000000000000000000000000000000602082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b7f547574656c6c75734661726d696e673a20616d6f756e7420657863656564732060008201527f616c6c6f77616e63650000000000000000000000000000000000000000000000602082015250565b7f547574656c6c75734661726d696e673a207468657265206973206e6f20676170600082015250565b7f547574656c6c75734661726d696e673a206e6f7468696e6720746f20636c616960008201527f6d00000000000000000000000000000000000000000000000000000000000000602082015250565b7f547574656c6c75734661726d696e673a207573657220686173206e6f7420656e60008201527f6f7567682062616c616e63650000000000000000000000000000000000000000602082015250565b7f547574656c6c75735374616b696e673a206d6967726174696f6e206661696c6560008201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b7f547574656c6c75734661726d696e673a20616d6f756e74206d7573742062652060008201527f6f766572207a65726f0000000000000000000000000000000000000000000000602082015250565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b61301481612b59565b811461301f57600080fd5b50565b61302b81612b6b565b811461303657600080fd5b50565b61304281612b77565b811461304d57600080fd5b50565b61305981612ba1565b811461306457600080fd5b5056fea26469706673582212203e5581508dad70f4c33d1fd307255567cdb45678fc9e1cd399a09306895c4c2764736f6c634300080200330000000000000000000000005d9ac8993b714df01d079d1b5b0b592e579ca0990000000000000000000000006c96591ead6daef54319310b90873b6e898936cd000000000000000000000000c7963fb87c365f67247f97d329d50b9ec5a374b8

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

0000000000000000000000005d9ac8993b714df01d079d1b5b0b592e579ca0990000000000000000000000006c96591ead6daef54319310b90873b6e898936cd000000000000000000000000c7963fb87c365f67247f97d329d50b9ec5a374b8

-----Decoded View---------------
Arg [0] : token_ (address): 0x5d9ac8993b714df01d079d1b5b0b592e579ca099
Arg [1] : rolemanager_ (address): 0x6c96591ead6daef54319310b90873b6e898936cd
Arg [2] : vault_ (address): 0xc7963fb87c365f67247f97d329d50b9ec5a374b8

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000005d9ac8993b714df01d079d1b5b0b592e579ca099
Arg [1] : 0000000000000000000000006c96591ead6daef54319310b90873b6e898936cd
Arg [2] : 000000000000000000000000c7963fb87c365f67247f97d329d50b9ec5a374b8


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.