ETH Price: $2,492.62 (-1.12%)

Contract

0x7a68e3dfa9819DAA688D2e5DD9697EE93fbd1FBc
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Migrate182000382023-09-23 17:35:11345 days ago1695490511IN
0x7a68e3df...93fbd1FBc
0 ETH0.0011073610.32021322
Migrate170777542023-04-19 2:39:23503 days ago1681871963IN
0x7a68e3df...93fbd1FBc
0 ETH0.0046996143.77638668
Migrate170607442023-04-16 16:53:11505 days ago1681663991IN
0x7a68e3df...93fbd1FBc
0 ETH0.002834526.40604355
Migrate169001442023-03-24 21:51:23528 days ago1679694683IN
0x7a68e3df...93fbd1FBc
0 ETH0.003432331.98168402
Migrate167034422023-02-25 6:11:11556 days ago1677305471IN
0x7a68e3df...93fbd1FBc
0 ETH0.0126983521.59976771
Migrate166582412023-02-18 21:39:47562 days ago1676756387IN
0x7a68e3df...93fbd1FBc
0 ETH0.0021564620.08868527
Migrate166582212023-02-18 21:35:47562 days ago1676756147IN
0x7a68e3df...93fbd1FBc
0 ETH0.0023739122.11192166
Migrate165386922023-02-02 4:19:23579 days ago1675311563IN
0x7a68e3df...93fbd1FBc
0 ETH0.0176310222.28481146
Migrate164967622023-01-27 7:49:11585 days ago1674805751IN
0x7a68e3df...93fbd1FBc
0 ETH0.0124224815.70165194
Migrate164602192023-01-22 5:21:11590 days ago1674364871IN
0x7a68e3df...93fbd1FBc
0 ETH0.0123937317.20130831
Migrate164446632023-01-20 1:15:11592 days ago1674177311IN
0x7a68e3df...93fbd1FBc
0 ETH0.0098438216.58580895
Migrate164176382023-01-16 6:43:59596 days ago1673851439IN
0x7a68e3df...93fbd1FBc
0 ETH0.0019158517.81773853
Migrate164010262023-01-13 23:01:47598 days ago1673650907IN
0x7a68e3df...93fbd1FBc
0 ETH0.0041279338.43268443
Migrate163831892023-01-11 11:11:23601 days ago1673435483IN
0x7a68e3df...93fbd1FBc
0 ETH0.0018487317.21054101
Migrate163831772023-01-11 11:08:59601 days ago1673435339IN
0x7a68e3df...93fbd1FBc
0 ETH0.0122843915.52734798
Migrate163769672023-01-10 14:20:47601 days ago1673360447IN
0x7a68e3df...93fbd1FBc
0 ETH0.0025289523.54330307
Migrate163486992023-01-06 15:40:59605 days ago1673019659IN
0x7a68e3df...93fbd1FBc
0 ETH0.0021878320.75803353
Migrate162989942022-12-30 17:11:23612 days ago1672420283IN
0x7a68e3df...93fbd1FBc
0 ETH0.0027747825.86609863
Migrate162952002022-12-30 4:28:47613 days ago1672374527IN
0x7a68e3df...93fbd1FBc
0 ETH0.0108669714.23849578
Migrate162951522022-12-30 4:19:11613 days ago1672373951IN
0x7a68e3df...93fbd1FBc
0 ETH0.0020728719.27557903
Migrate162922732022-12-29 18:41:59613 days ago1672339319IN
0x7a68e3df...93fbd1FBc
0 ETH0.0018452117.18123041
Migrate162922652022-12-29 18:40:23613 days ago1672339223IN
0x7a68e3df...93fbd1FBc
0 ETH0.0021237919.76895349
Migrate162922572022-12-29 18:38:47613 days ago1672339127IN
0x7a68e3df...93fbd1FBc
0 ETH0.0021061219.62304306
Migrate162922522022-12-29 18:37:47613 days ago1672339067IN
0x7a68e3df...93fbd1FBc
0 ETH0.0018822117.53593178
Migrate162922112022-12-29 18:29:35613 days ago1672338575IN
0x7a68e3df...93fbd1FBc
0 ETH0.0136601817.12757291
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
XBE2XB3Migrator

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 14 : XBE2XB3Migrator.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";


import "./interfaces/IVeToken.sol";
import "./interfaces/IMint.sol";

contract XBE2XB3Migrator is Pausable, Ownable, ReentrancyGuard {

    struct MigrateInfo {
        address account;
        uint256 xbeBalance;
        uint256 vsrStaked;
        uint256 vsrReward;
        uint256 bcStaked;
        uint256 bcReward;
        uint256 referralReward;
        uint256 vexbeLockedAmount;
        uint256 vexbeLockedEnd;
        uint256 sushiVaultEarned;
        uint256 fraxVaultEarned;
        uint256 crvCvxVaultEarned;
    }

    IERC20 public newToken;
    IVeToken public newVeToken;
    bytes32 public merkleRoot;
    address public ico;
    uint256 public feeBpsOnClaim;

    mapping(address => bool) public migrated;

    event Migrated(address user);

    constructor(
        address _ico,
        IERC20 _newToken,
        IVeToken _newVeToken,
        uint256 _feeBpsOnClaim,
        bytes32 _root
    ) {
        ico = _ico;
        newToken = _newToken;
        newVeToken = _newVeToken;
        _newToken.approve(address(_newVeToken), type(uint256).max);
        merkleRoot = _root;
        feeBpsOnClaim = _feeBpsOnClaim;

    }

    function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
        merkleRoot = _merkleRoot;
    }

    function setNewToken(IERC20 _newToken) external onlyOwner {
        newToken = _newToken;
        _newToken.approve(address(newVeToken), type(uint256).max);
    }

    function setVeNewToken(IVeToken _newVeToken) external onlyOwner {
        newVeToken = _newVeToken;
        newToken.approve(address(_newVeToken), type(uint256).max);
    }

    function migrateForIco(uint256 _amount) external onlyOwner {
        address icoAddress = ico;
        require(!migrated[icoAddress], "already migrated");
        IMint(address(newToken)).mint(icoAddress, _amount);
        emit Migrated(icoAddress);
    }   

    function migrateForTreasury(address _treasury, uint256 _amount) external onlyOwner {
        IMint(address(newToken)).mint(_treasury, _amount);
        emit Migrated(_treasury);
    }  

    function migrate(
        MigrateInfo memory _info,
        bytes32[] memory _proof
    ) external whenNotPaused nonReentrant {
        require(!migrated[_info.account], "already migrated");   
        require(msg.sender == _info.account, "cannot migrate other account");    
        require(
            _verify(
                _leaf(
                    _info.account,
                    _info.xbeBalance,
                    _info.vsrStaked,
                    _info.vsrReward,
                    _info.bcStaked,
                    _info.bcReward,
                    _info.referralReward,
                    _info.vexbeLockedAmount,
                    _info.vexbeLockedEnd,
                    _info.sushiVaultEarned,
                    _info.fraxVaultEarned,
                    _info.crvCvxVaultEarned
                ), 
                _proof
            ),
             "incorrect proof"
        );

        address newTokenAddress = address(newToken);

        if (_info.vexbeLockedAmount != 0) IMint(newTokenAddress).mint(address(this), _info.vexbeLockedAmount);

        if (_info.bcStaked != 0) {  // if user is in the BC, lock for max time
            uint256 maxtime = newVeToken.MAXTIME();
            _lockFunds(_info.account, _info.bcStaked, block.timestamp + maxtime);
        }
        
        if (_info.vexbeLockedEnd != 0) { // if user has locked XBEs, lock for the same term
            _lockFunds(_info.account, _info.vexbeLockedAmount - _info.bcStaked, _info.vexbeLockedEnd);
        }

        uint256 fromVaults = 
            _info.sushiVaultEarned + 
            _info.fraxVaultEarned +
            _info.crvCvxVaultEarned;

        uint256 toMint = 
            _info.xbeBalance + 
            (_info.vsrStaked - _info.vexbeLockedAmount) + 
            _info.vsrReward + 
            _info.bcReward + 
            _info.referralReward + 
            fromVaults * (10000 - feeBpsOnClaim) / 10000;

        IMint(newTokenAddress).mint(_info.account, toMint);

        migrated[_info.account] = true;
        emit Migrated(_info.account);
    }

    function _lockFunds(
        address _account,
        uint256 _unlockAmount,
        uint256 _unlockTime
    ) internal {
        IVeToken newVeToken_ = newVeToken;

        uint256 newUnlockTime = newVeToken_.lockedEnd(_account);

        uint256 maxtime = newVeToken.MAXTIME();
        _unlockTime = _unlockTime <= block.timestamp ? block.timestamp + maxtime : _unlockTime; // if old lock is expired, lock for the max time
        if (newUnlockTime == 0) {   // if user hasn't locked XB3, just create lock
            newVeToken_.createLockFor(_account, _unlockAmount, _unlockTime);
        } else {
            require(newUnlockTime >= block.timestamp, "withdraw your lock first");  // if user has expired XB3 lock, he/she must withdraw it first
            if (newUnlockTime < _unlockTime) newVeToken_.increaseUnlockTimeFor(_account, _unlockTime);  // if the current XB3s lock time is less than old XBEs' one, increase the current XB3 lock time
            newVeToken_.increaseAmountFor(_account, _unlockAmount);
        }
    }

    function pause() public onlyOwner {
        _pause();
    }

    function unpause() public onlyOwner {
        _unpause();
    }
    /*
    * @dev Returns the leaf for Merkle tree
    * @param _account Address of the user
    * @param _userId ID of the user
    */
    function _leaf(
        address _account,
        uint256 xbeBalance,
        uint256 vsrStaked,
        uint256 vsrReward,
        uint256 bcStaked,
        uint256 bcReward,
        uint256 referralReward,
        uint256 vexbeLockedAmount,
        uint256 vexbeLockedEnd,
        uint256 sushiVaultEarned,
        uint256 fraxVaultEarned,
        uint256 crvCvxVaultEarned
    ) internal view returns (bytes32)
    {

        return keccak256(
            abi.encodePacked(
                _account,
                xbeBalance,
                vsrStaked,
                vsrReward,
                bcStaked,
                bcReward,
                referralReward,
                vexbeLockedAmount,
                vexbeLockedEnd,
                sushiVaultEarned,
                fraxVaultEarned,
                crvCvxVaultEarned
            )
        );
    }

    /*
    * @dev Verifies if the proof is valid or not
    * @param _leaf The leaf for the user
    * @param _proof Proof for the user
    */
    function _verify(bytes32 _leaf, bytes32[] memory _proof)
    internal view returns (bool)
    {
        return MerkleProof.verify(_proof, merkleRoot, _leaf);
    }

}

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

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

File 3 of 14 : 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 14 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

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

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 5 of 14 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.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 Pausable is Context {
    /**
     * @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.
     */
    constructor() {
        _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());
    }
}

File 6 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 10 of 14 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

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

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

File 11 of 14 : 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 12 of 14 : 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 13 of 14 : IMint.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

interface IMint {
    function mint(address account, uint256 amount) external;
}

File 14 of 14 : IVeToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

interface IVeToken {

    struct Point {
        int128 bias;
        int128 slope; // - dweight / dt
        uint256 ts;
        uint256 blk; // block
    }
    function pointHistory(uint256 index) external view returns(Point memory);

    function createLockFor(address addr, uint256 amount, uint256 lockEnd) external;

    function depositFor(address _addr, uint256 _value) external;

    function increaseAmountFor(address _account, uint256 _value) external;

    function increaseUnlockTimeFor(address _account, uint256 _unlockTime) external;

    function getLastUserSlope(address addr) external view returns (int128);

    function lockedEnd(address addr) external view returns (uint256);

    function lockedAmount(address addr) external view returns (uint256);

    function userPointEpoch(address addr) external view returns (uint256);

    function userPointHistoryTs(address addr, uint256 epoch)
        external
        view
        returns (uint256);

    function balanceOfAt(address addr, uint256 _block)
        external
        view
        returns (uint256);

    function balanceOf(address addr) external view returns (uint256);

    function balanceOf(address addr, uint256 timestamp)
        external
        view
        returns (uint256);

    function totalSupply() external view returns (uint256);

    function lockedSupply() external view returns (uint256);

    function lockStarts(address addr) external view returns (uint256);

    function totalSupplyAt(uint256 _block) external view returns (uint256);

    function MAXTIME() external view returns (uint256);

    function WEEK() external view returns (uint256);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_ico","type":"address"},{"internalType":"contract IERC20","name":"_newToken","type":"address"},{"internalType":"contract IVeToken","name":"_newVeToken","type":"address"},{"internalType":"uint256","name":"_feeBpsOnClaim","type":"uint256"},{"internalType":"bytes32","name":"_root","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"}],"name":"Migrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"feeBpsOnClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ico","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"xbeBalance","type":"uint256"},{"internalType":"uint256","name":"vsrStaked","type":"uint256"},{"internalType":"uint256","name":"vsrReward","type":"uint256"},{"internalType":"uint256","name":"bcStaked","type":"uint256"},{"internalType":"uint256","name":"bcReward","type":"uint256"},{"internalType":"uint256","name":"referralReward","type":"uint256"},{"internalType":"uint256","name":"vexbeLockedAmount","type":"uint256"},{"internalType":"uint256","name":"vexbeLockedEnd","type":"uint256"},{"internalType":"uint256","name":"sushiVaultEarned","type":"uint256"},{"internalType":"uint256","name":"fraxVaultEarned","type":"uint256"},{"internalType":"uint256","name":"crvCvxVaultEarned","type":"uint256"}],"internalType":"struct XBE2XB3Migrator.MigrateInfo","name":"_info","type":"tuple"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"migrateForIco","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"migrateForTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"migrated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newVeToken","outputs":[{"internalType":"contract IVeToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_newToken","type":"address"}],"name":"setNewToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IVeToken","name":"_newVeToken","type":"address"}],"name":"setVeNewToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620017033803806200170383398101604081905262000034916200017b565b6000805460ff19169055620000493362000109565b60018055600580546001600160a01b038781166001600160a01b0319928316179092556002805487841690831681179091556003805493871693909216831790915560405163095ea7b360e01b8152600481019290925260001960248301529063095ea7b3906044016020604051808303816000875af1158015620000d2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000f89190620001e0565b50600455600655506200020b915050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6001600160a01b03811681146200017857600080fd5b50565b600080600080600060a086880312156200019457600080fd5b8551620001a18162000162565b6020870151909550620001b48162000162565b6040870151909450620001c78162000162565b6060870151608090970151959894975095949392505050565b600060208284031215620001f357600080fd5b815180151581146200020457600080fd5b9392505050565b6114e8806200021b6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063715018a6116100a25780638da5cb5b116100715780638da5cb5b14610222578063be68564f14610238578063c42bd05a1461024b578063c8a696c31461025e578063f2fde38b1461027157600080fd5b8063715018a6146101ec5780637cb64759146101f45780638456cb591461020757806388ec65df1461020f57600080fd5b80634ba0a5ee116100e95780634ba0a5ee1461015d578063563084c5146101905780635c975abb146101a35780635d452201146101ae5780635ed411e5146101d957600080fd5b80630921b7b91461011b5780630ff290e9146101375780632eb4a7ab1461014c5780633f4ba83a14610155575b600080fd5b61012460065481565b6040519081526020015b60405180910390f35b61014a61014536600461118a565b610284565b005b61012460045481565b61014a610351565b61018061016b36600461118a565b60076020526000908152604090205460ff1681565b604051901515815260200161012e565b61014a61019e3660046111b7565b61038b565b60005460ff16610180565b6005546101c1906001600160a01b031681565b6040516001600160a01b03909116815260200161012e565b61014a6101e736600461118a565b610463565b61014a6104e0565b61014a6102023660046111e3565b61051a565b61014a61054f565b61014a61021d3660046111e3565b610587565b60005461010090046001600160a01b03166101c1565b61014a6102463660046112d7565b6106b5565b6002546101c1906001600160a01b031681565b6003546101c1906001600160a01b031681565b61014a61027f36600461118a565b610bf2565b6000546001600160a01b036101009091041633146102bd5760405162461bcd60e51b81526004016102b4906113b4565b60405180910390fd5b600380546001600160a01b0319166001600160a01b0383811691821790925560025460405163095ea7b360e01b8152600481019290925260001960248301529091169063095ea7b3906044015b6020604051808303816000875af1158015610329573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034d91906113e9565b5050565b6000546001600160a01b036101009091041633146103815760405162461bcd60e51b81526004016102b4906113b4565b610389610c93565b565b6000546001600160a01b036101009091041633146103bb5760405162461bcd60e51b81526004016102b4906113b4565b6002546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f1990604401600060405180830381600087803b15801561040957600080fd5b505af115801561041d573d6000803e3d6000fd5b50506040516001600160a01b03851681527fa2e7361c23d7820040603b83c0cd3f494d377bac69736377d75bb56c651a5098925060200190505b60405180910390a15050565b6000546001600160a01b036101009091041633146104935760405162461bcd60e51b81526004016102b4906113b4565b600280546001600160a01b0319166001600160a01b0383811691821790925560035460405163095ea7b360e01b81529216600483015260001960248301529063095ea7b39060440161030a565b6000546001600160a01b036101009091041633146105105760405162461bcd60e51b81526004016102b4906113b4565b6103896000610d26565b6000546001600160a01b0361010090910416331461054a5760405162461bcd60e51b81526004016102b4906113b4565b600455565b6000546001600160a01b0361010090910416331461057f5760405162461bcd60e51b81526004016102b4906113b4565b610389610d7f565b6000546001600160a01b036101009091041633146105b75760405162461bcd60e51b81526004016102b4906113b4565b6005546001600160a01b031660008181526007602052604090205460ff16156106155760405162461bcd60e51b815260206004820152601060248201526f185b1c9958591e481b5a59dc985d195960821b60448201526064016102b4565b6002546040516340c10f1960e01b81526001600160a01b03838116600483015260248201859052909116906340c10f1990604401600060405180830381600087803b15801561066357600080fd5b505af1158015610677573d6000803e3d6000fd5b50506040516001600160a01b03841681527fa2e7361c23d7820040603b83c0cd3f494d377bac69736377d75bb56c651a509892506020019050610457565b60005460ff16156106fb5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016102b4565b6002600154141561074e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102b4565b600260015581516001600160a01b031660009081526007602052604090205460ff16156107b05760405162461bcd60e51b815260206004820152601060248201526f185b1c9958591e481b5a59dc985d195960821b60448201526064016102b4565b81516001600160a01b031633146108095760405162461bcd60e51b815260206004820152601c60248201527f63616e6e6f74206d696772617465206f74686572206163636f756e740000000060448201526064016102b4565b6108e26108dc836000015184602001518560400151866060015187608001518860a001518960c001518a60e001518b61010001518c61012001518d61014001518e61016001516040805160609d909d1b6bffffffffffffffffffffffff19166020808f019190915260348e019c909c5260548d019a909a5260748c019890985260948b019690965260b48a019490945260d489019290925260f488015261011487015261013486015261015485015261017480850191909152815180850390910181526101949093019052815191012090565b82610dfa565b6109205760405162461bcd60e51b815260206004820152600f60248201526e34b731b7b93932b1ba10383937b7b360891b60448201526064016102b4565b60025460e08301516001600160a01b0390911690156109a05760e08301516040516340c10f1960e01b815230600482015260248101919091526001600160a01b038216906340c10f1990604401600060405180830381600087803b15801561098757600080fd5b505af115801561099b573d6000803e3d6000fd5b505050505b608083015115610a375760035460408051637700779d60e11b815290516000926001600160a01b03169163ee00ef3a9160048083019260209291908290030181865afa1580156109f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a18919061140b565b84516080860151919250610a3591610a30844261143a565b610e10565b505b61010083015115610a67578251608084015160e0850151610a679291610a5c91611452565b856101000151610e10565b6000836101600151846101400151856101200151610a85919061143a565b610a8f919061143a565b90506000612710600654612710610aa69190611452565b610ab09084611469565b610aba9190611488565b8560c001518660a0015187606001518860e001518960400151610add9190611452565b8960200151610aec919061143a565b610af6919061143a565b610b00919061143a565b610b0a919061143a565b610b14919061143a565b85516040516340c10f1960e01b81526001600160a01b039182166004820152602481018390529192508416906340c10f1990604401600060405180830381600087803b158015610b6357600080fd5b505af1158015610b77573d6000803e3d6000fd5b505086516001600160a01b031660009081526007602052604090819020805460ff19166001179055875190517fa2e7361c23d7820040603b83c0cd3f494d377bac69736377d75bb56c651a50989350610bdf92506001600160a01b0391909116815260200190565b60405180910390a1505060018055505050565b6000546001600160a01b03610100909104163314610c225760405162461bcd60e51b81526004016102b4906113b4565b6001600160a01b038116610c875760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102b4565b610c9081610d26565b50565b60005460ff16610cdc5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016102b4565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60005460ff1615610dc55760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016102b4565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d093390565b6000610e0982600454856110b3565b9392505050565b6003546040516326f57e5760e11b81526001600160a01b038581166004830152909116906000908290634deafcae90602401602060405180830381865afa158015610e5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e83919061140b565b90506000600360009054906101000a90046001600160a01b03166001600160a01b031663ee00ef3a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610eda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610efe919061140b565b905042841115610f0e5783610f18565b610f18814261143a565b935081610f8d576040516329b55ca760e01b81526001600160a01b03878116600483015260248201879052604482018690528416906329b55ca790606401600060405180830381600087803b158015610f7057600080fd5b505af1158015610f84573d6000803e3d6000fd5b505050506110ab565b42821015610fdd5760405162461bcd60e51b815260206004820152601860248201527f776974686472617720796f7572206c6f636b206669727374000000000000000060448201526064016102b4565b8382101561104857604051639ab77eff60e01b81526001600160a01b03878116600483015260248201869052841690639ab77eff90604401600060405180830381600087803b15801561102f57600080fd5b505af1158015611043573d6000803e3d6000fd5b505050505b60405163ca2f8d9360e01b81526001600160a01b0387811660048301526024820187905284169063ca2f8d9390604401600060405180830381600087803b15801561109257600080fd5b505af11580156110a6573d6000803e3d6000fd5b505050505b505050505050565b6000826110c085846110c9565b14949350505050565b600081815b845181101561116d5760008582815181106110eb576110eb6114aa565b6020026020010151905080831161112d57604080516020810185905290810182905260600160405160208183030381529060405280519060200120925061115a565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080611165816114c0565b9150506110ce565b509392505050565b6001600160a01b0381168114610c9057600080fd5b60006020828403121561119c57600080fd5b8135610e0981611175565b80356111b281611175565b919050565b600080604083850312156111ca57600080fd5b82356111d581611175565b946020939093013593505050565b6000602082840312156111f557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051610180810167ffffffffffffffff81118282101715611236576112366111fc565b60405290565b600082601f83011261124d57600080fd5b8135602067ffffffffffffffff8083111561126a5761126a6111fc565b8260051b604051601f19603f8301168101818110848211171561128f5761128f6111fc565b6040529384528581018301938381019250878511156112ad57600080fd5b83870191505b848210156112cc578135835291830191908301906112b3565b979650505050505050565b6000808284036101a08112156112ec57600080fd5b610180808212156112fc57600080fd5b611304611212565b915061130f856111a7565b82526020858101359083015260408086013590830152606080860135908301526080808601359083015260a0808601359083015260c0808601359083015260e08086013590830152610100808601359083015261012080860135908301526101408086013590830152610160808601359083015290925083013567ffffffffffffffff81111561139e57600080fd5b6113aa8582860161123c565b9150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156113fb57600080fd5b81518015158114610e0957600080fd5b60006020828403121561141d57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561144d5761144d611424565b500190565b60008282101561146457611464611424565b500390565b600081600019048311821515161561148357611483611424565b500290565b6000826114a557634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60006000198214156114d4576114d4611424565b506001019056fea164736f6c634300080b000a000000000000000000000000ae27566433975e82cb72bb89038bf43006d39de300000000000000000000000056bb5d139ecc91992587cedba55794d7feea489e0000000000000000000000002ed2b0880c931173d05080a0fd6e80cf021bcaa00000000000000000000000000000000000000000000000000000000000000834079ca423fbba67bd848a7f180ee3ee67df41ed181f26d37e109fb37b71373f03

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063715018a6116100a25780638da5cb5b116100715780638da5cb5b14610222578063be68564f14610238578063c42bd05a1461024b578063c8a696c31461025e578063f2fde38b1461027157600080fd5b8063715018a6146101ec5780637cb64759146101f45780638456cb591461020757806388ec65df1461020f57600080fd5b80634ba0a5ee116100e95780634ba0a5ee1461015d578063563084c5146101905780635c975abb146101a35780635d452201146101ae5780635ed411e5146101d957600080fd5b80630921b7b91461011b5780630ff290e9146101375780632eb4a7ab1461014c5780633f4ba83a14610155575b600080fd5b61012460065481565b6040519081526020015b60405180910390f35b61014a61014536600461118a565b610284565b005b61012460045481565b61014a610351565b61018061016b36600461118a565b60076020526000908152604090205460ff1681565b604051901515815260200161012e565b61014a61019e3660046111b7565b61038b565b60005460ff16610180565b6005546101c1906001600160a01b031681565b6040516001600160a01b03909116815260200161012e565b61014a6101e736600461118a565b610463565b61014a6104e0565b61014a6102023660046111e3565b61051a565b61014a61054f565b61014a61021d3660046111e3565b610587565b60005461010090046001600160a01b03166101c1565b61014a6102463660046112d7565b6106b5565b6002546101c1906001600160a01b031681565b6003546101c1906001600160a01b031681565b61014a61027f36600461118a565b610bf2565b6000546001600160a01b036101009091041633146102bd5760405162461bcd60e51b81526004016102b4906113b4565b60405180910390fd5b600380546001600160a01b0319166001600160a01b0383811691821790925560025460405163095ea7b360e01b8152600481019290925260001960248301529091169063095ea7b3906044015b6020604051808303816000875af1158015610329573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034d91906113e9565b5050565b6000546001600160a01b036101009091041633146103815760405162461bcd60e51b81526004016102b4906113b4565b610389610c93565b565b6000546001600160a01b036101009091041633146103bb5760405162461bcd60e51b81526004016102b4906113b4565b6002546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f1990604401600060405180830381600087803b15801561040957600080fd5b505af115801561041d573d6000803e3d6000fd5b50506040516001600160a01b03851681527fa2e7361c23d7820040603b83c0cd3f494d377bac69736377d75bb56c651a5098925060200190505b60405180910390a15050565b6000546001600160a01b036101009091041633146104935760405162461bcd60e51b81526004016102b4906113b4565b600280546001600160a01b0319166001600160a01b0383811691821790925560035460405163095ea7b360e01b81529216600483015260001960248301529063095ea7b39060440161030a565b6000546001600160a01b036101009091041633146105105760405162461bcd60e51b81526004016102b4906113b4565b6103896000610d26565b6000546001600160a01b0361010090910416331461054a5760405162461bcd60e51b81526004016102b4906113b4565b600455565b6000546001600160a01b0361010090910416331461057f5760405162461bcd60e51b81526004016102b4906113b4565b610389610d7f565b6000546001600160a01b036101009091041633146105b75760405162461bcd60e51b81526004016102b4906113b4565b6005546001600160a01b031660008181526007602052604090205460ff16156106155760405162461bcd60e51b815260206004820152601060248201526f185b1c9958591e481b5a59dc985d195960821b60448201526064016102b4565b6002546040516340c10f1960e01b81526001600160a01b03838116600483015260248201859052909116906340c10f1990604401600060405180830381600087803b15801561066357600080fd5b505af1158015610677573d6000803e3d6000fd5b50506040516001600160a01b03841681527fa2e7361c23d7820040603b83c0cd3f494d377bac69736377d75bb56c651a509892506020019050610457565b60005460ff16156106fb5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016102b4565b6002600154141561074e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102b4565b600260015581516001600160a01b031660009081526007602052604090205460ff16156107b05760405162461bcd60e51b815260206004820152601060248201526f185b1c9958591e481b5a59dc985d195960821b60448201526064016102b4565b81516001600160a01b031633146108095760405162461bcd60e51b815260206004820152601c60248201527f63616e6e6f74206d696772617465206f74686572206163636f756e740000000060448201526064016102b4565b6108e26108dc836000015184602001518560400151866060015187608001518860a001518960c001518a60e001518b61010001518c61012001518d61014001518e61016001516040805160609d909d1b6bffffffffffffffffffffffff19166020808f019190915260348e019c909c5260548d019a909a5260748c019890985260948b019690965260b48a019490945260d489019290925260f488015261011487015261013486015261015485015261017480850191909152815180850390910181526101949093019052815191012090565b82610dfa565b6109205760405162461bcd60e51b815260206004820152600f60248201526e34b731b7b93932b1ba10383937b7b360891b60448201526064016102b4565b60025460e08301516001600160a01b0390911690156109a05760e08301516040516340c10f1960e01b815230600482015260248101919091526001600160a01b038216906340c10f1990604401600060405180830381600087803b15801561098757600080fd5b505af115801561099b573d6000803e3d6000fd5b505050505b608083015115610a375760035460408051637700779d60e11b815290516000926001600160a01b03169163ee00ef3a9160048083019260209291908290030181865afa1580156109f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a18919061140b565b84516080860151919250610a3591610a30844261143a565b610e10565b505b61010083015115610a67578251608084015160e0850151610a679291610a5c91611452565b856101000151610e10565b6000836101600151846101400151856101200151610a85919061143a565b610a8f919061143a565b90506000612710600654612710610aa69190611452565b610ab09084611469565b610aba9190611488565b8560c001518660a0015187606001518860e001518960400151610add9190611452565b8960200151610aec919061143a565b610af6919061143a565b610b00919061143a565b610b0a919061143a565b610b14919061143a565b85516040516340c10f1960e01b81526001600160a01b039182166004820152602481018390529192508416906340c10f1990604401600060405180830381600087803b158015610b6357600080fd5b505af1158015610b77573d6000803e3d6000fd5b505086516001600160a01b031660009081526007602052604090819020805460ff19166001179055875190517fa2e7361c23d7820040603b83c0cd3f494d377bac69736377d75bb56c651a50989350610bdf92506001600160a01b0391909116815260200190565b60405180910390a1505060018055505050565b6000546001600160a01b03610100909104163314610c225760405162461bcd60e51b81526004016102b4906113b4565b6001600160a01b038116610c875760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102b4565b610c9081610d26565b50565b60005460ff16610cdc5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016102b4565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60005460ff1615610dc55760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016102b4565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d093390565b6000610e0982600454856110b3565b9392505050565b6003546040516326f57e5760e11b81526001600160a01b038581166004830152909116906000908290634deafcae90602401602060405180830381865afa158015610e5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e83919061140b565b90506000600360009054906101000a90046001600160a01b03166001600160a01b031663ee00ef3a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610eda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610efe919061140b565b905042841115610f0e5783610f18565b610f18814261143a565b935081610f8d576040516329b55ca760e01b81526001600160a01b03878116600483015260248201879052604482018690528416906329b55ca790606401600060405180830381600087803b158015610f7057600080fd5b505af1158015610f84573d6000803e3d6000fd5b505050506110ab565b42821015610fdd5760405162461bcd60e51b815260206004820152601860248201527f776974686472617720796f7572206c6f636b206669727374000000000000000060448201526064016102b4565b8382101561104857604051639ab77eff60e01b81526001600160a01b03878116600483015260248201869052841690639ab77eff90604401600060405180830381600087803b15801561102f57600080fd5b505af1158015611043573d6000803e3d6000fd5b505050505b60405163ca2f8d9360e01b81526001600160a01b0387811660048301526024820187905284169063ca2f8d9390604401600060405180830381600087803b15801561109257600080fd5b505af11580156110a6573d6000803e3d6000fd5b505050505b505050505050565b6000826110c085846110c9565b14949350505050565b600081815b845181101561116d5760008582815181106110eb576110eb6114aa565b6020026020010151905080831161112d57604080516020810185905290810182905260600160405160208183030381529060405280519060200120925061115a565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080611165816114c0565b9150506110ce565b509392505050565b6001600160a01b0381168114610c9057600080fd5b60006020828403121561119c57600080fd5b8135610e0981611175565b80356111b281611175565b919050565b600080604083850312156111ca57600080fd5b82356111d581611175565b946020939093013593505050565b6000602082840312156111f557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051610180810167ffffffffffffffff81118282101715611236576112366111fc565b60405290565b600082601f83011261124d57600080fd5b8135602067ffffffffffffffff8083111561126a5761126a6111fc565b8260051b604051601f19603f8301168101818110848211171561128f5761128f6111fc565b6040529384528581018301938381019250878511156112ad57600080fd5b83870191505b848210156112cc578135835291830191908301906112b3565b979650505050505050565b6000808284036101a08112156112ec57600080fd5b610180808212156112fc57600080fd5b611304611212565b915061130f856111a7565b82526020858101359083015260408086013590830152606080860135908301526080808601359083015260a0808601359083015260c0808601359083015260e08086013590830152610100808601359083015261012080860135908301526101408086013590830152610160808601359083015290925083013567ffffffffffffffff81111561139e57600080fd5b6113aa8582860161123c565b9150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156113fb57600080fd5b81518015158114610e0957600080fd5b60006020828403121561141d57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561144d5761144d611424565b500190565b60008282101561146457611464611424565b500390565b600081600019048311821515161561148357611483611424565b500290565b6000826114a557634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60006000198214156114d4576114d4611424565b506001019056fea164736f6c634300080b000a

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

000000000000000000000000ae27566433975e82cb72bb89038bf43006d39de300000000000000000000000056bb5d139ecc91992587cedba55794d7feea489e0000000000000000000000002ed2b0880c931173d05080a0fd6e80cf021bcaa00000000000000000000000000000000000000000000000000000000000000834079ca423fbba67bd848a7f180ee3ee67df41ed181f26d37e109fb37b71373f03

-----Decoded View---------------
Arg [0] : _ico (address): 0xAE27566433975e82cB72bB89038bF43006D39DE3
Arg [1] : _newToken (address): 0x56Bb5D139ECC91992587CedBA55794d7FEea489E
Arg [2] : _newVeToken (address): 0x2ED2b0880c931173d05080A0fd6E80Cf021BCaA0
Arg [3] : _feeBpsOnClaim (uint256): 2100
Arg [4] : _root (bytes32): 0x079ca423fbba67bd848a7f180ee3ee67df41ed181f26d37e109fb37b71373f03

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000ae27566433975e82cb72bb89038bf43006d39de3
Arg [1] : 00000000000000000000000056bb5d139ecc91992587cedba55794d7feea489e
Arg [2] : 0000000000000000000000002ed2b0880c931173d05080a0fd6e80cf021bcaa0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000834
Arg [4] : 079ca423fbba67bd848a7f180ee3ee67df41ed181f26d37e109fb37b71373f03


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.