Contract 0x6c20EE3bCdE467352F935Ac86014F393a1588BBF

Contract Overview

Balance:
0 Ether
Txn Hash
Method
Block
From
To
Value
0xaf3564457a918011186e68545f29cb07ca3358378e008ca8ee1f58690ad3e6c2Set Revest FNFT106602062022-05-11 23:54:11140 days 13 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether0.00002906 1
0xd4397b9635df99850ecf3a3026225bb50a6288b91639ca55cfe736460109d5f7Set Revest106602042022-05-11 23:53:41140 days 13 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether0.000029 1
0x75b61ae33353236120493b81b0c5d0ef9ed365b09f770f66f1c1ce34a953bad7Set Revest106599332022-05-11 22:45:43140 days 15 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether0.00005305 2.02370062
0xe0fbd256e6772ead6e07a23ce80837ca58a32bd0c0039bb0208a190956e37449Set Revest106599262022-05-11 22:43:57140 days 15 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether0.00006357 2.42504593
0x946890baa03624e91ea172bc99f5f8d4c31253db6bedf2ce868c943796316081Set Revest106598982022-05-11 22:36:56140 days 15 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether0.00002653 1.01194703
0x8192093c449a4cd8d67660d8f96d65f9aedb8c6033389b59daa0826297cd2c1fSet Revest106598962022-05-11 22:36:26140 days 15 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether0.00086516 32.99998991
0xc4e854131b3af90eff1d2620c88c5e356e1bdedfc6d152246f81f03d8028b8f2Set Revest106598912022-05-11 22:35:11140 days 15 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether0.00007865 2.99998682
0x1e1e794a6bdf682fdc0585aba489a1e55a6f287be9d7000804d7de8fe1692a30Set Revest106598822022-05-11 22:32:56140 days 15 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether0.00003933 1.50025602
0x7329e7e2337c89aea19374fd566442fb539cb5a5c6ba95f4a87b93b03967e8e5Set Revest106598662022-05-11 22:28:55140 days 15 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether0.00006555 2.50049583
0x104fa4760e761cab1a95ec76c03aa10d96aaf0f1c8564b273e34419aaa2cf891Set Revest106598652022-05-11 22:28:40140 days 15 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether0.00005405 1.8629926
0x9ca5fe021e5e649cde95fe15a35e05ab6b1fa3d78317a536e7640793e6364b9dSet Revest106419902022-05-08 19:02:21143 days 18 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether0.00022107 7.62189755
0x21b1887b00b84fcc9c0a79247ac987827578644813bc6edec3ebb02b76bd5029Break Glass106419832022-05-08 19:00:35143 days 18 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether0.00022699 7.91492149
0xb110ddf2d3c73b0e59d7c0aa9663b947a62ac2ae235297196b3e91bc3cfe3f1cGrant Role106419802022-05-08 18:59:50143 days 18 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether0.00039749 7.77818083
0xbd4083fcbe048e63f710ad632b6ab7d188c7cf43c3fd597d9ec8ce966d3ddadfSet Legacy Token...106200102022-05-04 23:03:54147 days 14 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether0.00004613 1.00000001
0xbe941b750cff834630ffdd4aabb384c9cd2d824a60133a71733be93b9523156fInitialize106196702022-05-04 21:38:45147 days 16 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether0.00052314 2.30520544
0xff109ca2b3e1249f242b015103ea36dcfa3a11e782ef2b309a57ec590be1f07e0x60806040106196662022-05-04 21:37:45147 days 16 hrs ago0x4cfa5768ca9567b922052a61fcfbd31f8d828fa1 IN  Create: RevestAddressRegistry0 Ether0.00595188 2.50000052
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x4ea0bcbf8b5de81f624df437d591e379e8cbb0c315410735d7103c4cdf8647ee114530862022-09-27 11:25:122 days 2 hrs ago 0x5c2b4e751266ca7d6356f03d8923663f288fdeb7 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0x4ea0bcbf8b5de81f624df437d591e379e8cbb0c315410735d7103c4cdf8647ee114530862022-09-27 11:25:122 days 2 hrs ago 0x44d5a15abb2c73cb145a5d6e53699978e7e700bc 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0x4ea0bcbf8b5de81f624df437d591e379e8cbb0c315410735d7103c4cdf8647ee114530862022-09-27 11:25:122 days 2 hrs ago 0x279e10507fe7ae9ef0c991fdaedc8ed51f8fd2ce 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0x4ea0bcbf8b5de81f624df437d591e379e8cbb0c315410735d7103c4cdf8647ee114530862022-09-27 11:25:122 days 2 hrs ago 0x279e10507fe7ae9ef0c991fdaedc8ed51f8fd2ce 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0x4ea0bcbf8b5de81f624df437d591e379e8cbb0c315410735d7103c4cdf8647ee114530862022-09-27 11:25:122 days 2 hrs ago 0x44d5a15abb2c73cb145a5d6e53699978e7e700bc 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0x4ea0bcbf8b5de81f624df437d591e379e8cbb0c315410735d7103c4cdf8647ee114530862022-09-27 11:25:122 days 2 hrs ago 0xc98efd91fa3e07efe53563c44fcd6bf7ef7fc63e 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0x4ea0bcbf8b5de81f624df437d591e379e8cbb0c315410735d7103c4cdf8647ee114530862022-09-27 11:25:122 days 2 hrs ago 0xc98efd91fa3e07efe53563c44fcd6bf7ef7fc63e 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0x4ea0bcbf8b5de81f624df437d591e379e8cbb0c315410735d7103c4cdf8647ee114530862022-09-27 11:25:122 days 2 hrs ago 0xc98efd91fa3e07efe53563c44fcd6bf7ef7fc63e 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0x4ea0bcbf8b5de81f624df437d591e379e8cbb0c315410735d7103c4cdf8647ee114530862022-09-27 11:25:122 days 2 hrs ago 0xc98efd91fa3e07efe53563c44fcd6bf7ef7fc63e 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0x4ea0bcbf8b5de81f624df437d591e379e8cbb0c315410735d7103c4cdf8647ee114530862022-09-27 11:25:122 days 2 hrs ago 0x44d5a15abb2c73cb145a5d6e53699978e7e700bc 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0x4ea0bcbf8b5de81f624df437d591e379e8cbb0c315410735d7103c4cdf8647ee114530862022-09-27 11:25:122 days 2 hrs ago 0x44d5a15abb2c73cb145a5d6e53699978e7e700bc 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0xbeba84095f4a2762abc2f077c21847a05cf81c514a64e1250007286a5e169a79112369672022-08-20 18:29:5639 days 19 hrs ago 0x5c2b4e751266ca7d6356f03d8923663f288fdeb7 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0xbeba84095f4a2762abc2f077c21847a05cf81c514a64e1250007286a5e169a79112369672022-08-20 18:29:5639 days 19 hrs ago 0x44d5a15abb2c73cb145a5d6e53699978e7e700bc 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0xbeba84095f4a2762abc2f077c21847a05cf81c514a64e1250007286a5e169a79112369672022-08-20 18:29:5639 days 19 hrs ago 0x279e10507fe7ae9ef0c991fdaedc8ed51f8fd2ce 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0xbeba84095f4a2762abc2f077c21847a05cf81c514a64e1250007286a5e169a79112369672022-08-20 18:29:5639 days 19 hrs ago 0x279e10507fe7ae9ef0c991fdaedc8ed51f8fd2ce 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0xbeba84095f4a2762abc2f077c21847a05cf81c514a64e1250007286a5e169a79112369672022-08-20 18:29:5639 days 19 hrs ago 0x44d5a15abb2c73cb145a5d6e53699978e7e700bc 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0xbeba84095f4a2762abc2f077c21847a05cf81c514a64e1250007286a5e169a79112369672022-08-20 18:29:5639 days 19 hrs ago 0xc98efd91fa3e07efe53563c44fcd6bf7ef7fc63e 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0xbeba84095f4a2762abc2f077c21847a05cf81c514a64e1250007286a5e169a79112369672022-08-20 18:29:5639 days 19 hrs ago 0xc98efd91fa3e07efe53563c44fcd6bf7ef7fc63e 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0xbeba84095f4a2762abc2f077c21847a05cf81c514a64e1250007286a5e169a79112369672022-08-20 18:29:5639 days 19 hrs ago 0xc98efd91fa3e07efe53563c44fcd6bf7ef7fc63e 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0xbeba84095f4a2762abc2f077c21847a05cf81c514a64e1250007286a5e169a79112369672022-08-20 18:29:5639 days 19 hrs ago 0xc98efd91fa3e07efe53563c44fcd6bf7ef7fc63e 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0xbeba84095f4a2762abc2f077c21847a05cf81c514a64e1250007286a5e169a79112369672022-08-20 18:29:5639 days 19 hrs ago 0x44d5a15abb2c73cb145a5d6e53699978e7e700bc 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0xbeba84095f4a2762abc2f077c21847a05cf81c514a64e1250007286a5e169a79112369672022-08-20 18:29:5639 days 19 hrs ago 0x44d5a15abb2c73cb145a5d6e53699978e7e700bc 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0x1f63de868b37404152e9af938c93841285ea4abf93de145fd605dfeca86e691a110296572022-07-15 16:45:2875 days 21 hrs ago 0x5c2b4e751266ca7d6356f03d8923663f288fdeb7 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0x1f63de868b37404152e9af938c93841285ea4abf93de145fd605dfeca86e691a110296572022-07-15 16:45:2875 days 21 hrs ago 0x44d5a15abb2c73cb145a5d6e53699978e7e700bc 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
0x1f63de868b37404152e9af938c93841285ea4abf93de145fd605dfeca86e691a110296572022-07-15 16:45:2875 days 21 hrs ago 0x279e10507fe7ae9ef0c991fdaedc8ed51f8fd2ce 0x6c20ee3bcde467352f935ac86014f393a1588bbf0 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RevestAddressRegistry

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
File 1 of 29 : RevestAddressRegistry.sol
// SPDX-License-Identifier: GNU-GPL v3.0 or later

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./interfaces/IAddressRegistryV2.sol";
import "./RevestToken.sol";

contract RevestAddressRegistry is Ownable, IAddressRegistryV2, AccessControl {
    bytes32 public constant ADMIN = "ADMIN";
    bytes32 public constant LOCK_MANAGER = "LOCK_MANAGER";
    bytes32 public constant REVEST_TOKEN = "REVEST_TOKEN";
    bytes32 public constant TOKEN_VAULT = "TOKEN_VAULT";
    bytes32 public constant REVEST = "REVEST";
    bytes32 public constant FNFT = "FNFT";
    bytes32 public constant METADATA = "METADATA";
    bytes32 public constant ESCROW = 'ESCROW';
    bytes32 public constant LIQUIDITY_TOKENS = "LIQUIDITY_TOKENS";
    bytes32 public constant BREAKER = 'BREAKER';    
    bytes32 public constant PAUSER = 'PAUSER';
    bytes32 public constant LEGACY_VAULT = 'LEGACY_VAULT';

    uint public next_dex = 0;

    mapping(bytes32 => address) public _addresses;
    mapping(uint => address) public _dex;


    constructor() Ownable() {
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
    }

    // Set up all addresses for the registry.
    function initialize_with_legacy(
        address lock_manager_,
        address liquidity_,
        address revest_token_,
        address token_vault_,
        address legacy_vault_,
        address revest_,
        address fnft_,
        address metadata_,
        address admin_,
        address rewards_
    ) external override onlyOwner {
        _addresses[ADMIN] = admin_;
        _addresses[LOCK_MANAGER] = lock_manager_;
        _addresses[REVEST_TOKEN] = revest_token_;
        _addresses[TOKEN_VAULT] = token_vault_;
        _addresses[LEGACY_VAULT] = legacy_vault_;
        _addresses[REVEST] = revest_;
        _addresses[FNFT] = fnft_;
        _addresses[METADATA] = metadata_;
        _addresses[LIQUIDITY_TOKENS] = liquidity_;
        _addresses[ESCROW]=rewards_;
    }

    function initialize(
        address lock_manager_,
        address liquidity_,
        address revest_token_,
        address token_vault_,
        address revest_,
        address fnft_,
        address metadata_,
        address admin_,
        address rewards_
    ) external override onlyOwner {
        _addresses[ADMIN] = admin_;
        _addresses[LOCK_MANAGER] = lock_manager_;
        _addresses[REVEST_TOKEN] = revest_token_;
        _addresses[TOKEN_VAULT] = token_vault_;
        _addresses[REVEST] = revest_;
        _addresses[FNFT] = fnft_;
        _addresses[METADATA] = metadata_;
        _addresses[LIQUIDITY_TOKENS] = liquidity_;
        _addresses[ESCROW]=rewards_;
    }

    ///
    /// EMERGENCY FUNCTIONS
    ///

    /// This function breaks the Revest Protocol, temporarily
    /// For use in emergency situations to offline deposits and withdrawals
    /// While making all value stored within totally inaccessible 
    /// Only requires one person to 'throw the switch' to disable entire protocol
    function breakGlass() external override {
        require(hasRole(BREAKER, _msgSender()), 'E042');
        _addresses[REVEST] = address(0x000000000000000000000000000000000000dEaD);
    }

    /// This method will allow the token to paused once this contract is granted the pauser role
    /// Only requires one person to 'throw the switch'
    function pauseToken() external override {
        require(hasRole(PAUSER, _msgSender()), 'E043');
        //TODO: Implement in interface form
        RevestToken(_addresses[REVEST_TOKEN]).pause();
    }

    /// Unpauses the token when the danger has passed
    /// Requires multisig governance system to agree to unpause
    function unpauseToken() external override onlyOwner {
        //TODO: Implement in interface form
        RevestToken(_addresses[REVEST_TOKEN]).unpause();
    }
    
    /// Admin function for adding or removing breakers
    function modifyBreaker(address breaker, bool grant) external override onlyOwner {
        if(grant) {
            // Add to list
            grantRole(BREAKER, breaker);
        } else {
            // Remove from list
            revokeRole(BREAKER, breaker);
        }
    }

    /// Admin function for adding or removing pausers
    function modifyPauser(address pauser, bool grant) external override onlyOwner {
        if(grant) {
            // Add to list
            grantRole(PAUSER, pauser);
        } else {
            // Remove from list
            revokeRole(PAUSER, pauser);
        }
    }


    ///
    /// SETTERS
    ///

    function setAdmin(address admin) external override onlyOwner {
        _addresses[ADMIN] = admin;
    }

    function setLockManager(address manager) external override onlyOwner {
        _addresses[LOCK_MANAGER] = manager;
    }

    function setTokenVault(address vault) external override onlyOwner {
        _addresses[TOKEN_VAULT] = vault;
    }
   
    function setRevest(address revest) external override onlyOwner {
        _addresses[REVEST] = revest;
    }

    function setRevestFNFT(address fnft) external override onlyOwner {
        _addresses[FNFT] = fnft;
    }

    function setMetadataHandler(address metadata) external override onlyOwner {
        _addresses[METADATA] = metadata;
    }

    function setDex(address dex) external override onlyOwner {
        _dex[next_dex] = dex;
        next_dex = next_dex + 1;
    }

    function setRevestToken(address token) external override onlyOwner {
        _addresses[REVEST_TOKEN] = token;
    }

    function setRewardsHandler(address esc) external override onlyOwner {
        _addresses[ESCROW] = esc;
    }

    function setLPs(address liquidToken) external override onlyOwner {
        _addresses[LIQUIDITY_TOKENS] = liquidToken;
    }

    function setLegacyTokenVault(address legacyVault) external override onlyOwner {
        _addresses[LEGACY_VAULT] = legacyVault;
    }

    ///
    /// GETTERS
    ///

    function getAdmin() external view override returns (address) {
        return _addresses[ADMIN];
    }

    function getLockManager() external view override returns (address) {
        return getAddress(LOCK_MANAGER);
    }

    function getTokenVault() external view override returns (address) {
        return getAddress(TOKEN_VAULT);
    }

    function getLegacyTokenVault() external view returns (address legacy) {
        legacy = getAddress(LEGACY_VAULT);
    }

    function getRevest() external view override returns (address) {
        return getAddress(REVEST);
    }

    function getRevestFNFT() external view override returns (address) {
        return _addresses[FNFT];
    }

    function getMetadataHandler() external view override returns (address) {
        return _addresses[METADATA];
    }

    function getRevestToken() external view override returns (address) {
        return _addresses[REVEST_TOKEN];
    }

    function getDEX(uint index) external view override returns (address) {
        return _dex[index];
    }

    function getRewardsHandler() external view override returns(address) {
        return _addresses[ESCROW];
    }

    function getLPs() external view override returns (address) {
        return _addresses[LIQUIDITY_TOKENS];
    }

    /**
     * @dev Returns an address by id
     * @return The address
     */
    function getAddress(bytes32 id) public view override returns (address) {
        return _addresses[id];
    }



}

File 2 of 29 : 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 3 of 29 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

File 4 of 29 : IAddressRegistryV2.sol
// SPDX-License-Identifier: GNU-GPL v3.0 or later

pragma solidity >=0.8.0;

import "./IAddressRegistry.sol";

/**
 * @title Provider interface for Revest FNFTs
 * @dev
 *
 */
interface IAddressRegistryV2 is IAddressRegistry {

        function initialize_with_legacy(
        address lock_manager_,
        address liquidity_,
        address revest_token_,
        address token_vault_,
        address legacy_vault_,
        address revest_,
        address fnft_,
        address metadata_,
        address admin_,
        address rewards_
    ) external;

    function getLegacyTokenVault() external view returns (address legacy);

    function setLegacyTokenVault(address legacyVault) external;

    function breakGlass() external;

    function pauseToken() external;

    function unpauseToken() external;

    function modifyPauser(address pauser, bool grant) external;

    function modifyBreaker(address breaker, bool grant) external;
}

File 5 of 29 : RevestToken.sol
// SPDX-License-Identifier: GNU-GPL v3.0 or later

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./interfaces/IRevest.sol";
import "./interfaces/IAddressRegistry.sol";
import "./interfaces/ILockManager.sol";
import "./interfaces/ITokenVault.sol";
import "./interfaces/IRevestToken.sol";
import "./utils/RevestAccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";


contract RevestToken is AccessControlEnumerable, ReentrancyGuard, RevestAccessControl, ERC20Burnable, ERC20Pausable, IRevestToken {
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");

    /**
     * @dev Mints `initialSupply` amount of token and transfers them to `owner`.
     *
     * See {ERC20-constructor}.
     */
    constructor(
        string memory name,
        string memory symbol,
        uint initialSupply,
        address owner,
        address provider
    ) ERC20(name, symbol) RevestAccessControl(provider) {
        _mint(owner, initialSupply);
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _setupRole(PAUSER_ROLE, _msgSender());
    }

    /**
     * @dev Pauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_pause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function pause() external {
        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to pause");
        _pause();
    }

    /**
     * @dev Unpauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_unpause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function unpause() external {
        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to unpause");
        _unpause();
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint amount
    ) internal virtual override(ERC20, ERC20Pausable) {
        super._beforeTokenTransfer(from, to, amount);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 8 of 29 : 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 9 of 29 : 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 10 of 29 : 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 11 of 29 : IAddressRegistry.sol
// SPDX-License-Identifier: GNU-GPL v3.0 or later

pragma solidity >=0.8.0;

/**
 * @title Provider interface for Revest FNFTs
 * @dev
 *
 */
interface IAddressRegistry {

    function initialize(
        address lock_manager_,
        address liquidity_,
        address revest_token_,
        address token_vault_,
        address revest_,
        address fnft_,
        address metadata_,
        address admin_,
        address rewards_
    ) external;

    function getAdmin() external view returns (address);

    function setAdmin(address admin) external;

    function getLockManager() external view returns (address);

    function setLockManager(address manager) external;

    function getTokenVault() external view returns (address);

    function setTokenVault(address vault) external;

    function getRevestFNFT() external view returns (address);

    function setRevestFNFT(address fnft) external;

    function getMetadataHandler() external view returns (address);

    function setMetadataHandler(address metadata) external;

    function getRevest() external view returns (address);

    function setRevest(address revest) external;

    function getDEX(uint index) external view returns (address);

    function setDex(address dex) external;

    function getRevestToken() external view returns (address);

    function setRevestToken(address token) external;

    function getRewardsHandler() external view returns(address);

    function setRewardsHandler(address esc) external;

    function getAddress(bytes32 id) external view returns (address);

    function getLPs() external view returns (address);

    function setLPs(address liquidToken) external;

}

File 12 of 29 : AccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;

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

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override {
        super._grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override {
        super._revokeRole(role, account);
        _roleMembers[role].remove(account);
    }
}

File 13 of 29 : 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 14 of 29 : IRevest.sol
// SPDX-License-Identifier: GNU-GPL v3.0 or later

pragma solidity >=0.8.0;

interface IRevest {
    event FNFTTimeLockMinted(
        address indexed asset,
        address indexed from,
        uint indexed fnftId,
        uint endTime,
        uint[] quantities,
        FNFTConfig fnftConfig
    );

    event FNFTValueLockMinted(
        address indexed asset,
        address indexed from,
        uint indexed fnftId,
        address compareTo,
        address oracleDispatch,
        uint[] quantities,
        FNFTConfig fnftConfig
    );

    event FNFTAddressLockMinted(
        address indexed asset,
        address indexed from,
        uint indexed fnftId,
        address trigger,
        uint[] quantities,
        FNFTConfig fnftConfig
    );

    event FNFTWithdrawn(
        address indexed from,
        uint indexed fnftId,
        uint indexed quantity
    );

    event FNFTSplit(
        address indexed from,
        uint[] indexed newFNFTId,
        uint[] indexed proportions,
        uint quantity
    );

    event FNFTUnlocked(
        address indexed from,
        uint indexed fnftId
    );

    event FNFTMaturityExtended(
        address indexed from,
        uint indexed fnftId,
        uint indexed newExtendedTime
    );

    event FNFTAddionalDeposited(
        address indexed from,
        uint indexed newFNFTId,
        uint indexed quantity,
        uint amount
    );

    struct FNFTConfig {
        address asset; // The token being stored
        address pipeToContract; // Indicates if FNFT will pipe to another contract
        uint depositAmount; // How many tokens
        uint depositMul; // Deposit multiplier
        uint split; // Number of splits remaining
        uint depositStopTime; //
        bool maturityExtension; // Maturity extensions remaining
        bool isMulti; //
        bool nontransferrable; // False by default (transferrable) //
    }

    // Refers to the global balance for an ERC20, encompassing possibly many FNFTs
    struct TokenTracker {
        uint lastBalance;
        uint lastMul;
    }

    enum LockType {
        DoesNotExist,
        TimeLock,
        ValueLock,
        AddressLock
    }

    struct LockParam {
        address addressLock;
        uint timeLockExpiry;
        LockType lockType;
        ValueLock valueLock;
    }

    struct Lock {
        address addressLock;
        LockType lockType;
        ValueLock valueLock;
        uint timeLockExpiry;
        uint creationTime;
        bool unlocked;
    }

    struct ValueLock {
        address asset;
        address compareTo;
        address oracle;
        uint unlockValue;
        bool unlockRisingEdge;
    }

    function mintTimeLock(
        uint endTime,
        address[] memory recipients,
        uint[] memory quantities,
        IRevest.FNFTConfig memory fnftConfig
    ) external payable returns (uint);

    function mintValueLock(
        address primaryAsset,
        address compareTo,
        uint unlockValue,
        bool unlockRisingEdge,
        address oracleDispatch,
        address[] memory recipients,
        uint[] memory quantities,
        IRevest.FNFTConfig memory fnftConfig
    ) external payable returns (uint);

    function mintAddressLock(
        address trigger,
        bytes memory arguments,
        address[] memory recipients,
        uint[] memory quantities,
        IRevest.FNFTConfig memory fnftConfig
    ) external payable returns (uint);

    function withdrawFNFT(uint tokenUID, uint quantity) external;

    function unlockFNFT(uint tokenUID) external;

    function splitFNFT(
        uint fnftId,
        uint[] memory proportions,
        uint quantity
    ) external returns (uint[] memory newFNFTIds);

    function depositAdditionalToFNFT(
        uint fnftId,
        uint amount,
        uint quantity
    ) external returns (uint);

    function extendFNFTMaturity(
        uint fnftId,
        uint endTime
    ) external returns (uint);

    function setFlatWeiFee(uint wethFee) external;

    function setERC20Fee(uint erc20) external;

    function getFlatWeiFee() external view returns (uint);

    function getERC20Fee() external view returns (uint);


}

File 15 of 29 : ILockManager.sol
// SPDX-License-Identifier: GNU-GPL v3.0 or later

pragma solidity >=0.8.0;

import "./IRevest.sol";

interface ILockManager {

    function createLock(uint fnftId, IRevest.LockParam memory lock) external returns (uint);

    function getLock(uint lockId) external view returns (IRevest.Lock memory);

    function fnftIdToLockId(uint fnftId) external view returns (uint);

    function fnftIdToLock(uint fnftId) external view returns (IRevest.Lock memory);

    function pointFNFTToLock(uint fnftId, uint lockId) external;

    function lockTypes(uint tokenId) external view returns (IRevest.LockType);

    function unlockFNFT(uint fnftId, address sender) external returns (bool);

    function getLockMaturity(uint fnftId) external view returns (bool);
}

File 16 of 29 : ITokenVault.sol
// SPDX-License-Identifier: GNU-GPL v3.0 or later

pragma solidity >=0.8.0;

import "./IRevest.sol";

interface ITokenVault {

    function createFNFT(
        uint fnftId,
        IRevest.FNFTConfig memory fnftConfig,
        uint quantity,
        address from
    ) external;

    function withdrawToken(
        uint fnftId,
        uint quantity,
        address user
    ) external;

    function depositToken(
        uint fnftId,
        uint amount,
        uint quantity
    ) external;

    function cloneFNFTConfig(IRevest.FNFTConfig memory old) external returns (IRevest.FNFTConfig memory);

    function mapFNFTToToken(
        uint fnftId,
        IRevest.FNFTConfig memory fnftConfig
    ) external;

    function handleMultipleDeposits(
        uint fnftId,
        uint newFNFTId,
        uint amount
    ) external;

    function splitFNFT(
        uint fnftId,
        uint[] memory newFNFTIds,
        uint[] memory proportions,
        uint quantity
    ) external;

    function getFNFT(uint fnftId) external view returns (IRevest.FNFTConfig memory);
    function getFNFTCurrentValue(uint fnftId) external view returns (uint);
    function getNontransferable(uint fnftId) external view returns (bool);
    function getSplitsRemaining(uint fnftId) external view returns (uint);

    
}

File 17 of 29 : IRevestToken.sol
// SPDX-License-Identifier: GNU-GPL v3.0 or later

pragma solidity >=0.8.0;

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

interface IRevestToken is IERC20 {

}

File 18 of 29 : RevestAccessControl.sol
// SPDX-License-Identifier: GNU-GPL v3.0 or later

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "../interfaces/IAddressRegistryV2.sol";
import "../interfaces/ILockManager.sol";
import "../interfaces/IRewardsHandler.sol";
import "../interfaces/ITokenVault.sol";
import "../interfaces/IRevestToken.sol";
import "../interfaces/IFNFTHandler.sol";
import "../lib/uniswap/IUniswapV2Factory.sol";


contract RevestAccessControl is Ownable {
    IAddressRegistryV2 internal addressesProvider;

    constructor(address provider) Ownable() {
        addressesProvider = IAddressRegistryV2(provider);
    }

    modifier onlyRevest() {
        require(_msgSender() != address(0), "E004");
        require(
                _msgSender() == addressesProvider.getLockManager() ||
                _msgSender() == addressesProvider.getRewardsHandler() ||
                _msgSender() == addressesProvider.getTokenVault() ||
                _msgSender() == addressesProvider.getRevest() ||
                _msgSender() == addressesProvider.getRevestToken(),
            "E016"
        );
        _;
    }

    modifier onlyRevestController() {
        require(_msgSender() != address(0), "E004");
        require(_msgSender() == addressesProvider.getRevest(), "E017");
        _;
    }

    modifier onlyTokenVault() {
        require(_msgSender() != address(0), "E004");
        require(_msgSender() == addressesProvider.getTokenVault(), "E017");
        _;
    }

    function setAddressRegistry(address registry) external onlyOwner {
        addressesProvider = IAddressRegistryV2(registry);
    }

    function getAdmin() internal view returns (address) {
        return addressesProvider.getAdmin();
    }

    function getRevest() internal view returns (IRevest) {
        return IRevest(addressesProvider.getRevest());
    }

    function getRevestToken() internal view returns (IRevestToken) {
        return IRevestToken(addressesProvider.getRevestToken());
    }

    function getLockManager() internal view returns (ILockManager) {
        return ILockManager(addressesProvider.getLockManager());
    }

    function getTokenVault() internal view returns (ITokenVault) {
        return ITokenVault(addressesProvider.getTokenVault());
    }

    function getUniswapV2() internal view returns (IUniswapV2Factory) {
        return IUniswapV2Factory(addressesProvider.getDEX(0));
    }

    function getFNFTHandler() internal view returns (IFNFTHandler) {
        return IFNFTHandler(addressesProvider.getRevestFNFT());
    }

    function getRewardsHandler() internal view returns (IRewardsHandler) {
        return IRewardsHandler(addressesProvider.getRewardsHandler());
    }
}

File 19 of 29 : ERC20Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        _spendAllowance(account, _msgSender(), amount);
        _burn(account, amount);
    }
}

File 20 of 29 : ERC20Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Pausable.sol)

pragma solidity ^0.8.0;

import "../ERC20.sol";
import "../../../security/Pausable.sol";

/**
 * @dev ERC20 token with pausable token transfers, minting and burning.
 *
 * Useful for scenarios such as preventing trades until the end of an evaluation
 * period, or having an emergency switch for freezing all token transfers in the
 * event of a large bug.
 */
abstract contract ERC20Pausable is ERC20, Pausable {
    /**
     * @dev See {ERC20-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, amount);

        require(!paused(), "ERC20Pausable: token transfer while paused");
    }
}

File 21 of 29 : IAccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

File 22 of 29 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 23 of 29 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

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

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

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

    /**
     * @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 24 of 29 : IRewardsHandler.sol
// SPDX-License-Identifier: GNU-GPL v3.0 or later

pragma solidity >=0.8.0;

interface IRewardsHandler {

    struct UserBalance {
        uint allocPoint; // Allocation points
        uint lastMul;
    }

    function receiveFee(address token, uint amount) external;

    function updateLPShares(uint fnftId, uint newShares) external;

    function updateBasicShares(uint fnftId, uint newShares) external;

    function getAllocPoint(uint fnftId, address token, bool isBasic) external view returns (uint);

    function claimRewards(uint fnftId, address caller) external returns (uint);

    function setStakingContract(address stake) external;

    function getRewards(uint fnftId, address token) external view returns (uint);
}

File 25 of 29 : IFNFTHandler.sol
// SPDX-License-Identifier: GNU-GPL v3.0 or later

pragma solidity >=0.8.0;


interface IFNFTHandler  {
    function mint(address account, uint id, uint amount, bytes memory data) external;

    function mintBatchRec(address[] memory recipients, uint[] memory quantities, uint id, uint newSupply, bytes memory data) external;

    function mintBatch(address to, uint[] memory ids, uint[] memory amounts, bytes memory data) external;

    function setURI(string memory newuri) external;

    function burn(address account, uint id, uint amount) external;

    function burnBatch(address account, uint[] memory ids, uint[] memory amounts) external;

    function getBalance(address tokenHolder, uint id) external view returns (uint);

    function getSupply(uint fnftId) external view returns (uint);

    function getNextId() external view returns (uint);
}

File 26 of 29 : IUniswapV2Factory.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.0;

interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);

    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);

    function allPairs(uint) external view returns (address pair);

    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;

    function setFeeToSetter(address) external;
}

File 27 of 29 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, _allowances[owner][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = _allowances[owner][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Spend `amount` form the allowance of `owner` toward `spender`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 28 of 29 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 29 of 29 : 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());
    }
}

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

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BREAKER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ESCROW","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FNFT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LEGACY_VAULT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LIQUIDITY_TOKENS","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCK_MANAGER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"METADATA","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REVEST","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REVEST_TOKEN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_VAULT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"_addresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_dex","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"breakGlass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"getAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getDEX","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLPs","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLegacyTokenVault","outputs":[{"internalType":"address","name":"legacy","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLockManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMetadataHandler","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRevest","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRevestFNFT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRevestToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRewardsHandler","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lock_manager_","type":"address"},{"internalType":"address","name":"liquidity_","type":"address"},{"internalType":"address","name":"revest_token_","type":"address"},{"internalType":"address","name":"token_vault_","type":"address"},{"internalType":"address","name":"revest_","type":"address"},{"internalType":"address","name":"fnft_","type":"address"},{"internalType":"address","name":"metadata_","type":"address"},{"internalType":"address","name":"admin_","type":"address"},{"internalType":"address","name":"rewards_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"lock_manager_","type":"address"},{"internalType":"address","name":"liquidity_","type":"address"},{"internalType":"address","name":"revest_token_","type":"address"},{"internalType":"address","name":"token_vault_","type":"address"},{"internalType":"address","name":"legacy_vault_","type":"address"},{"internalType":"address","name":"revest_","type":"address"},{"internalType":"address","name":"fnft_","type":"address"},{"internalType":"address","name":"metadata_","type":"address"},{"internalType":"address","name":"admin_","type":"address"},{"internalType":"address","name":"rewards_","type":"address"}],"name":"initialize_with_legacy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"breaker","type":"address"},{"internalType":"bool","name":"grant","type":"bool"}],"name":"modifyBreaker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pauser","type":"address"},{"internalType":"bool","name":"grant","type":"bool"}],"name":"modifyPauser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"next_dex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"dex","type":"address"}],"name":"setDex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"liquidToken","type":"address"}],"name":"setLPs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"legacyVault","type":"address"}],"name":"setLegacyTokenVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"manager","type":"address"}],"name":"setLockManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"metadata","type":"address"}],"name":"setMetadataHandler","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"revest","type":"address"}],"name":"setRevest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"fnft","type":"address"}],"name":"setRevestFNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"setRevestToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"esc","type":"address"}],"name":"setRewardsHandler","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"setTokenVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405260006002553480156200001657600080fd5b50620000223362000035565b6200002f60003362000085565b6200011d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b62000091828262000095565b5050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16620000915760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b61296a806200012d6000396000f3fe608060405234801561001057600080fd5b506004361061036d5760003560e01c80637378c2cf116101d3578063d547741f11610104578063f2fde38b116100a2578063f97e7d741161007c578063f97e7d7414610aca578063f9f5e1dd14610b23578063fe40330414610b7c578063fe76202414610ba557600080fd5b8063f2fde38b14610a91578063f5e95acb14610aa4578063f95eb48214610ab757600080fd5b8063dd9795c6116100de578063dd9795c614610a09578063deedfdbd14610a30578063e681c4aa14610a43578063ee66292214610a6a57600080fd5b8063d547741f14610976578063d59e296e14610989578063d9dc8694146109e257600080fd5b80639bb363a911610171578063b38221ff1161014b578063b38221ff146108ba578063b61657f7146108cd578063c8aa6ad614610926578063cb4966fb1461094f57600080fd5b80639bb363a91461088c578063a217fddf1461089f578063afbc0cc6146108a757600080fd5b80638da5cb5b116101ad5780638da5cb5b146107f457806391d148541461080557806399ee24c61461083e5780639ad925241461086557600080fd5b80637378c2cf146107935780637f407235146107ba57806387f7f696146107e157600080fd5b806336568abe116102ad578063578299631161024b5780636a2b505a116102255780636a2b505a1461070c5780636e9960c31461071f578063704b6c0214610778578063715018a61461078b57600080fd5b8063578299631461068d57806358ef3998146106e65780636497a8a0146106f957600080fd5b8063447fa8b711610287578063447fa8b7146106105780634a6c92351461062357806350669a031461062c57806354f2f7af1461063457600080fd5b806336568abe146105c3578063382b5e07146105d657806338c3df07146105e957600080fd5b806321f8a7211161031a5780632a7b941a116102f45780632a7b941a146105585780632c349627146105815780632e73ad50146105895780632f2ff15d146105b057600080fd5b806321f8a721146104d6578063248a9ca3146104ff5780632a0acc6a1461053157600080fd5b8063035d0c691161034b578063035d0c691461046057806305cbd0b2146104b957806312cf6ff1146104ce57600080fd5b8063016abd2c1461037257806301ffc9a7146103e4578063025e3c6114610407575b600080fd5b7f5245564553545f544f4b454e000000000000000000000000000000000000000060005260036020527f8f8e0b887c551af10de774da3af80475e37d3a68404022ae2847a8b14c35d734546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b6103f76103f23660046124ec565b610bb8565b60405190151581526020016103db565b7f4d4554414441544100000000000000000000000000000000000000000000000060005260036020527ffda63e209b585edff97aec93763baa01039676d4d2071447baffc7685edc32e4546001600160a01b03166103c7565b7f4c4f434b5f4d414e41474552000000000000000000000000000000000000000060005260036020527f0341dd3e9c29363f412ce470dedcfc17c3665625caacd03f35d36de2b9cfd70c546001600160a01b03166103c7565b6104cc6104c736600461254a565b610c51565b005b6104cc610ec7565b6103c76104e4366004612604565b6000908152600360205260409020546001600160a01b031690565b61052361050d366004612604565b6000908152600160208190526040909120015490565b6040519081526020016103db565b6105237f41444d494e00000000000000000000000000000000000000000000000000000081565b6103c7610566366004612604565b6000908152600460205260409020546001600160a01b031690565b6104cc610faa565b6105237f425245414b45520000000000000000000000000000000000000000000000000081565b6104cc6105be36600461261d565b6110df565b6104cc6105d136600461261d565b61110b565b6104cc6105e4366004612649565b611197565b6105237f4d4554414441544100000000000000000000000000000000000000000000000081565b6104cc61061e366004612649565b611268565b61052360025481565b6104cc61130c565b7f544f4b454e5f5641554c5400000000000000000000000000000000000000000060005260036020527f87100d26dc5fdb8db4e949c7cbcadc7ebdd192eb152e0ca0a5b74932d801b104546001600160a01b03166103c7565b7f4c45474143595f5641554c54000000000000000000000000000000000000000060005260036020527f63c605f4ccd47ed84204a87584a23b5b7e9d25d9de7e0196a434d927ba8e27b6546001600160a01b03166103c7565b6104cc6106f4366004612649565b611409565b6104cc610707366004612649565b6114da565b6104cc61071a366004612664565b6115ab565b7f41444d494e00000000000000000000000000000000000000000000000000000060005260036020527f63f6944974ed01e0c77f5fd425d412bc87a2a97469803ba02a51ba75d9154da4546001600160a01b03166103c7565b6104cc610786366004612649565b61165f565b6104cc611730565b6105237f464e46540000000000000000000000000000000000000000000000000000000081565b6105237f4c4f434b5f4d414e41474552000000000000000000000000000000000000000081565b6104cc6107ef366004612649565b611796565b6000546001600160a01b03166103c7565b6103f761081336600461261d565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6105237f5245564553545f544f4b454e000000000000000000000000000000000000000081565b6105237f4c45474143595f5641554c54000000000000000000000000000000000000000081565b6104cc61089a366004612649565b611867565b610523600081565b6104cc6108b5366004612664565b611938565b6104cc6108c8366004612649565b6119ec565b7f4c49515549444954595f544f4b454e530000000000000000000000000000000060005260036020527fe7caf8d650493dd36a24444b98858c70490469d40da0206b1f9bf6924f80cfc3546001600160a01b03166103c7565b6103c7610934366004612604565b6003602052600090815260409020546001600160a01b031681565b6105237f524556455354000000000000000000000000000000000000000000000000000081565b6104cc61098436600461261d565b611abd565b7f464e46540000000000000000000000000000000000000000000000000000000060005260036020527f7225e6236819d062f9f52e0a15597eb55b2b06d35b8b8a812879e4627f1c7698546001600160a01b03166103c7565b6105237f504155534552000000000000000000000000000000000000000000000000000081565b6105237f544f4b454e5f5641554c5400000000000000000000000000000000000000000081565b6104cc610a3e366004612649565b611ae4565b6105237f455343524f57000000000000000000000000000000000000000000000000000081565b6105237f4c49515549444954595f544f4b454e530000000000000000000000000000000081565b6104cc610a9f366004612649565b611bb5565b6104cc610ab23660046126a0565b611c97565b6104cc610ac5366004612649565b611ed9565b7f524556455354000000000000000000000000000000000000000000000000000060005260036020527fb1011f53f3ce5d0207a5d799f68085942ddd7ab18c5cf63469ce50d599c3ff8b546001600160a01b03166103c7565b7f455343524f57000000000000000000000000000000000000000000000000000060005260036020527fc2e37fdcd9ce731805691045aa8c90b639f21d49c30e2f936e85297fa585a7ca546001600160a01b03166103c7565b6103c7610b8a366004612604565b6004602052600090815260409020546001600160a01b031681565b6104cc610bb3366004612649565b611faa565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610c4b57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6000546001600160a01b03163314610cb05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b60036020527f63f6944974ed01e0c77f5fd425d412bc87a2a97469803ba02a51ba75d9154da4805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b03948516179091557f0341dd3e9c29363f412ce470dedcfc17c3665625caacd03f35d36de2b9cfd70c805482169b84169b909b17909a557f8f8e0b887c551af10de774da3af80475e37d3a68404022ae2847a8b14c35d73480548b16988316989098179097557f87100d26dc5fdb8db4e949c7cbcadc7ebdd192eb152e0ca0a5b74932d801b10480548a16968216969096179095557f63c605f4ccd47ed84204a87584a23b5b7e9d25d9de7e0196a434d927ba8e27b680548916948616949094179093557fb1011f53f3ce5d0207a5d799f68085942ddd7ab18c5cf63469ce50d599c3ff8b80548816928516929092179091557f7225e6236819d062f9f52e0a15597eb55b2b06d35b8b8a812879e4627f1c7698805487169184169190911790557ffda63e209b585edff97aec93763baa01039676d4d2071447baffc7685edc32e4805486169183169190911790557fe7caf8d650493dd36a24444b98858c70490469d40da0206b1f9bf6924f80cfc380548516938216939093179092557f455343524f5700000000000000000000000000000000000000000000000000006000527fc2e37fdcd9ce731805691045aa8c90b639f21d49c30e2f936e85297fa585a7ca80549093169116179055565b610ef17f425245414b45520000000000000000000000000000000000000000000000000033610813565b610f3f5760405162461bcd60e51b8152600401610ca79060208082526004908201527f4530343200000000000000000000000000000000000000000000000000000000604082015260600190565b7f524556455354000000000000000000000000000000000000000000000000000060005260036020527fb1011f53f3ce5d0207a5d799f68085942ddd7ab18c5cf63469ce50d599c3ff8b805473ffffffffffffffffffffffffffffffffffffffff191661dead179055565b610fd47f504155534552000000000000000000000000000000000000000000000000000033610813565b6110225760405162461bcd60e51b8152600401610ca79060208082526004908201527f4530343300000000000000000000000000000000000000000000000000000000604082015260600190565b7f5245564553545f544f4b454e0000000000000000000000000000000000000000600090815260036020527f8f8e0b887c551af10de774da3af80475e37d3a68404022ae2847a8b14c35d73454604080517f8456cb5900000000000000000000000000000000000000000000000000000000815290516001600160a01b0390921692638456cb599260048084019382900301818387803b1580156110c557600080fd5b505af11580156110d9573d6000803e3d6000fd5b50505050565b600082815260016020819052604090912001546110fc813361207b565b6111068383612119565b505050565b6001600160a01b03811633146111895760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610ca7565b61119382826121be565b5050565b6000546001600160a01b031633146111f15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b7f4c49515549444954595f544f4b454e530000000000000000000000000000000060005260036020527fe7caf8d650493dd36a24444b98858c70490469d40da0206b1f9bf6924f80cfc3805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b031633146112c25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b600280546000908152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841617905554611306906001612777565b60025550565b6000546001600160a01b031633146113665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b7f5245564553545f544f4b454e0000000000000000000000000000000000000000600090815260036020527f8f8e0b887c551af10de774da3af80475e37d3a68404022ae2847a8b14c35d73454604080517f3f4ba83a00000000000000000000000000000000000000000000000000000000815290516001600160a01b0390921692633f4ba83a9260048084019382900301818387803b1580156110c557600080fd5b6000546001600160a01b031633146114635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b7f4c45474143595f5641554c54000000000000000000000000000000000000000060005260036020527f63c605f4ccd47ed84204a87584a23b5b7e9d25d9de7e0196a434d927ba8e27b6805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b031633146115345760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b7f544f4b454e5f5641554c5400000000000000000000000000000000000000000060005260036020527f87100d26dc5fdb8db4e949c7cbcadc7ebdd192eb152e0ca0a5b74932d801b104805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b031633146116055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b8015611635576111937f5041555345520000000000000000000000000000000000000000000000000000836110df565b6111937f504155534552000000000000000000000000000000000000000000000000000083611abd565b6000546001600160a01b031633146116b95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b7f41444d494e00000000000000000000000000000000000000000000000000000060005260036020527f63f6944974ed01e0c77f5fd425d412bc87a2a97469803ba02a51ba75d9154da4805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461178a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b611794600061225f565b565b6000546001600160a01b031633146117f05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b7f5245564553545f544f4b454e000000000000000000000000000000000000000060005260036020527f8f8e0b887c551af10de774da3af80475e37d3a68404022ae2847a8b14c35d734805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b031633146118c15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b7f524556455354000000000000000000000000000000000000000000000000000060005260036020527fb1011f53f3ce5d0207a5d799f68085942ddd7ab18c5cf63469ce50d599c3ff8b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b031633146119925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b80156119c2576111937f425245414b455200000000000000000000000000000000000000000000000000836110df565b6111937f425245414b45520000000000000000000000000000000000000000000000000083611abd565b6000546001600160a01b03163314611a465760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b7f455343524f57000000000000000000000000000000000000000000000000000060005260036020527fc2e37fdcd9ce731805691045aa8c90b639f21d49c30e2f936e85297fa585a7ca805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60008281526001602081905260409091200154611ada813361207b565b61110683836121be565b6000546001600160a01b03163314611b3e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b7f4c4f434b5f4d414e41474552000000000000000000000000000000000000000060005260036020527f0341dd3e9c29363f412ce470dedcfc17c3665625caacd03f35d36de2b9cfd70c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611c0f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b6001600160a01b038116611c8b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610ca7565b611c948161225f565b50565b6000546001600160a01b03163314611cf15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b60036020527f63f6944974ed01e0c77f5fd425d412bc87a2a97469803ba02a51ba75d9154da4805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b03948516179091557f0341dd3e9c29363f412ce470dedcfc17c3665625caacd03f35d36de2b9cfd70c805482169a84169a909a179099557f8f8e0b887c551af10de774da3af80475e37d3a68404022ae2847a8b14c35d73480548a16978316979097179096557f87100d26dc5fdb8db4e949c7cbcadc7ebdd192eb152e0ca0a5b74932d801b10480548916958216959095179094557fb1011f53f3ce5d0207a5d799f68085942ddd7ab18c5cf63469ce50d599c3ff8b80548816938516939093179092557f7225e6236819d062f9f52e0a15597eb55b2b06d35b8b8a812879e4627f1c7698805487169184169190911790557ffda63e209b585edff97aec93763baa01039676d4d2071447baffc7685edc32e4805486169183169190911790557fe7caf8d650493dd36a24444b98858c70490469d40da0206b1f9bf6924f80cfc380548516938216939093179092557f455343524f5700000000000000000000000000000000000000000000000000006000527fc2e37fdcd9ce731805691045aa8c90b639f21d49c30e2f936e85297fa585a7ca80549093169116179055565b6000546001600160a01b03163314611f335760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b7f464e46540000000000000000000000000000000000000000000000000000000060005260036020527f7225e6236819d062f9f52e0a15597eb55b2b06d35b8b8a812879e4627f1c7698805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b031633146120045760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca7565b7f4d4554414441544100000000000000000000000000000000000000000000000060005260036020527ffda63e209b585edff97aec93763baa01039676d4d2071447baffc7685edc32e4805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16611193576120b9816001600160a01b031660146122bc565b6120c48360206122bc565b6040516020016120d59291906127bb565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905262461bcd60e51b8252610ca79160040161283c565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166111935760008281526001602081815260408084206001600160a01b038616808652925280842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16156111935760008281526001602090815260408083206001600160a01b038516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606060006122cb83600261288d565b6122d6906002612777565b67ffffffffffffffff8111156122ee576122ee6128ca565b6040519080825280601f01601f191660200182016040528015612318576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061234f5761234f6128f9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106123b2576123b26128f9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006123ee84600261288d565b6123f9906001612777565b90505b6001811115612496577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061243a5761243a6128f9565b1a60f81b828281518110612450576124506128f9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361248f81612928565b90506123fc565b5083156124e55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ca7565b9392505050565b6000602082840312156124fe57600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146124e557600080fd5b80356001600160a01b038116811461254557600080fd5b919050565b6000806000806000806000806000806101408b8d03121561256a57600080fd5b6125738b61252e565b995061258160208c0161252e565b985061258f60408c0161252e565b975061259d60608c0161252e565b96506125ab60808c0161252e565b95506125b960a08c0161252e565b94506125c760c08c0161252e565b93506125d560e08c0161252e565b92506125e46101008c0161252e565b91506125f36101208c0161252e565b90509295989b9194979a5092959850565b60006020828403121561261657600080fd5b5035919050565b6000806040838503121561263057600080fd5b823591506126406020840161252e565b90509250929050565b60006020828403121561265b57600080fd5b6124e58261252e565b6000806040838503121561267757600080fd5b6126808361252e565b91506020830135801515811461269557600080fd5b809150509250929050565b60008060008060008060008060006101208a8c0312156126bf57600080fd5b6126c88a61252e565b98506126d660208b0161252e565b97506126e460408b0161252e565b96506126f260608b0161252e565b955061270060808b0161252e565b945061270e60a08b0161252e565b935061271c60c08b0161252e565b925061272a60e08b0161252e565b91506127396101008b0161252e565b90509295985092959850929598565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561278a5761278a612748565b500190565b60005b838110156127aa578181015183820152602001612792565b838111156110d95750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516127f381601785016020880161278f565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161283081602884016020880161278f565b01602801949350505050565b602081526000825180602084015261285b81604085016020870161278f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156128c5576128c5612748565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008161293757612937612748565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea164736f6c6343000809000a

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading

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.