Contract 0xC687806Cfd11B5330d7c3aE6f18B18DC71e1083e

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xb010b4d3a03170641fd3f6482b5a74a0d8711ee8b937ffb556774d1d92c70392Panic Recover Fu...469714002022-09-15 5:18:3411 days 1 hr ago0xf2db3a12c8e7dc3d4f9003f367def5e1882e8c0f IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.022124935277
0xd22638f3a7bd1757f6dab4bec447a58875950acd9c72ee5ea91c55f3f84f1a3aApprove466070232022-09-08 20:11:2317 days 10 hrs ago0x60ed561867184086462b1df2f37b2ddd3a5bbe93 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.002686123231
0xff5cca0cd0eb6db0d9c5c73bb532b3e04fa0973c7dddab4a8a3cb41b06b7b390Panic Recover Fu...464815652022-09-06 15:35:0319 days 14 hrs ago0x06a52a3147a71321c5918f43749b810e074b6e8f IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.009910999644
0x5d1522e9d0618395c8a976641748725186e2ca920ede7e75303ea7c09e67cfa8Approve463955462022-09-05 8:34:3220 days 21 hrs ago0xb0d3c59dc47708f8356718e6d1d0f8da76b0a4e1 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.0024585952
0x4576b683b83d065358d2c89990954923dd7344a81cd907a26644777ef55f2eb7Approve459266032022-08-29 11:17:2027 days 19 hrs ago0xa072b92bedb5cd02e13596aefea9ae0c40e04f87 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000102470878
0x2d3f33e16d3e538875c27ef250bc0367adb04a5a001d338434e9c26bb719c76cPanic Recover Fu...458699682022-08-28 15:03:5928 days 15 hrs ago0xc740d49eedce4db3db0bd17363e58ccbc2fa3f18 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000171139051
0x376eba8100e39fe1ccc18828bf21ccedc8c7c34ecd7fb3cd5c2dad52aea6314fPanic Recover Fu...454788472022-08-23 0:23:1534 days 6 hrs ago0xa419489219dc5fa1ecec3749db45767aa9f8e912 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000196189672
0x355fa4569da342f51bd31dcdc0af2f1aa88dc9b25a2deae1918e3202e8688881Approve451748142022-08-18 15:14:2238 days 15 hrs ago0x38d6f4ecc2e507c168b4924bf288cca651c4f7fe IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.00012943305
0x1cc538c3f024e7ad9aa596fb79ccaed7f4fd584ee5c7475da39cbf298d9efc8eApprove450590212022-08-16 23:12:0040 days 7 hrs ago0x1074e7f0c37e84aa407434862ad4580a01345bb1 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000066335075
0x7738187cc4c7aa465067c4df29266e028ca7f2f2e66ba7470d31ef3fc6c994e8Panic Recover Fu...449989032022-08-16 2:36:0041 days 3 hrs ago0x3ad03f6408d8f4158f9fe26567d4e98be0ab92c6 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.005101317394
0x6b930d236c54ad51d3757c77d04f963805d71d8619445f1f67cdb8351e6c7822Panic Recover Fu...449162962022-08-14 21:54:5242 days 8 hrs ago0xa88bc35174614094508f229045f2e2a582abec7f IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000191897431
0xf36c27107108050788eb9e6f9d39357273fda834f2c4738adcaf2e5e551a28cdPanic Recover Fu...446890942022-08-11 16:29:4845 days 13 hrs ago0x1d5495ffd1e99a47632bc10cae1871b2fcc0b1f2 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.00029077885
0x5cd27c960da7c43e867a612899605b10c4b7a7000c0f90ea8435d12dec74761bPanic Recover Fu...445021192022-08-08 22:01:4648 days 8 hrs ago0x0b997e226b63fded87673bc8b43ba24477b8147a IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000592968577
0x51cd1c6f4802c86356245bedf7480b6a961ac787dcbc41880b92e008c90385b4Panic Recover Fu...444592082022-08-08 6:09:1349 days 19 mins ago0x1f1fb057d00dfe2baad3caeffeec31746d3887e0 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000482024949
0xb50f14e742f32b29ec51ddc71ffab2dffe45d5e9ea3e3b710a0bd1fca9a53939Approve443908342022-08-07 5:49:0150 days 39 mins ago0xc80c40f6222659589cfb4ec66502561e5209fbb8 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000090363
0x3b340290b2fbf656c1a929f36430771540e2ea2f30324f44cf6fead6688910b6Approve443512922022-08-06 15:58:1450 days 14 hrs ago0x2c44c68f897f771bace5fe9c856217b95372d478 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000070666276
0xe9b1af9830e9dfd460e8262b7f0eb51ff13e742a8fa612ff324728fba00e1f83Panic Recover Fu...441875102022-08-04 5:44:2353 days 43 mins ago0x40368c0e35ad52f3fcdd5770434c9096e5aa6b29 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000185822948
0x8877f757acb8b8e1ada8e305310af390f8842d198591e2dc94fb0833c06903fePanic Recover Fu...441873992022-08-04 5:42:0753 days 46 mins ago0xb7b387a1eac704d7b2c7626a1b892f517809d407 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000226060128
0x980f358fee3c9f7b29d1aa914d492d780a469d785f378bce5331014840ed29edPanic Recover Fu...437719572022-07-29 5:03:4559 days 1 hr ago0xcc61dc4aa3e48e18fb5a0d9a8dbe39615208b1ef IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000173098731
0x9c9caf256a1ca7a10b45c1e74fdfccb794dbaaa275866f765c2bac4601515fd3Panic Recover Fu...436132452022-07-26 21:19:5861 days 9 hrs ago0x6f66ca1988c3b264ea602ccec60b75c8e5ed97db IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.005613885431
0xc038726bf9d33e43cfa4b95ff715a7c487537f33d96b3362383f51fe0b98445cPanic Recover Fu...434521712022-07-24 14:00:3363 days 16 hrs ago0xa072b92bedb5cd02e13596aefea9ae0c40e04f87 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.0001916275
0x8dc9992e2d8254e79a4d8b76c97c5de3dadfe401e5d21193754c84a8e34ba9b3Approve432438742022-07-21 14:20:0966 days 16 hrs ago0xfaef331d30764566cbe5da00b5f0c921c73ccbe5 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000102373998
0x197a885cb587da52258acaa7a48184d41dfb720cb76560a8fa4e957ca6a5fd3aApprove431198822022-07-19 19:20:0768 days 11 hrs ago0xfd739cc53b8e0aa37599d0421c92056ba6dc1634 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000424740634
0x34e46674f1e0d08db105cd21676e0adc5798532a0b28e1df5348b933b29154bfPanic Recover Fu...427657142022-07-14 20:08:4273 days 10 hrs ago0x2a0ff176e1891f66ae8193ea49c8931a5428f616 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000460528621
0xfe31aac215353fdb1aad352b7bbb6d828d112b777e7a7e063b02dc5080e0d9c4Approve418965832022-07-03 6:09:5285 days 18 mins ago0x76ea324fb5333a0a16bbc148226ab13b16cc9b67 IN  0xc687806cfd11b5330d7c3ae6f18b18dc71e1083e0 FTM0.000059381348
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x8d78b4fedc7e131f68765cad94ed9ca27f0e4b4421bba4bc08384d53d8514ced306916842022-02-12 0:28:31226 days 5 hrs ago Summit DeFi: Deployer  Contract Creation0 FTM
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x62bEe799deaF58c3ED689D296E2C47f08732d6D6

Contract Name:
EverestToken

Compiler Version
v0.8.2+commit.661d1103

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 20 : EverestToken.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.2;

import "./BaseEverestExtension.sol";
import "./PresetPausable.sol";
import "./libs/SummitMath.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";


// EverestToken, governance token of Summit DeFi
contract EverestToken is ERC20('EverestToken', 'EVEREST'), Ownable, ReentrancyGuard, PresetPausable {
    using SafeERC20 for IERC20;
    using EnumerableSet for EnumerableSet.AddressSet;

    // ---------------------------------------
    // --   V A R I A B L E S
    // ---------------------------------------

    IERC20 public summit;

    bool public panic = false;

    uint256 public constant daySeconds = 24 * 3600;

    uint256 public minLockTime = 7 days;
    uint256 public inflectionLockTime = 30 days;
    uint256 public maxLockTime = 365 days;
    
    uint256 public minEverestLockMult = 1000;
    uint256 public inflectionEverestLockMult = 10000;
    uint256 public maxEverestLockMult = 25000;

    uint256 public totalSummitLocked;
    uint256 public weightedAvgSummitLockDurations;

    EnumerableSet.AddressSet whitelistedTransferAddresses;

    struct UserEverestInfo {
        address userAdd;

        uint256 everestOwned;
        uint256 everestLockMultiplier;
        uint256 lockDuration;
        uint256 lockRelease;
        uint256 summitLocked;
    }
    mapping(address => UserEverestInfo) public userEverestInfo;

    // Other contracts that hook into the user's amount of everest, max 3 extensions
    // Will be used for the DAO, as well as everest pools in the future
    EnumerableSet.AddressSet everestExtensions;


    constructor(address _summit) {
        require(_summit != address(0), "SummitToken missing");
        summit = IERC20(_summit);

        // Add burn / mintFrom address as whitelisted address
        whitelistedTransferAddresses.add(address(0));
        // Add this address as a whitelisted address
        whitelistedTransferAddresses.add(address(this));
    }
    
    
    // ---------------------------------------
    // --   E V E N T S
    // ---------------------------------------

    event SummitLocked(address indexed user, uint256 _summitLocked, uint256 _lockDuration, uint256 _everestAwarded);
    event LockDurationIncreased(address indexed user, uint256 _lockDuration, uint256 _additionalEverestAwarded);
    event LockedSummitIncreased(address indexed user, bool indexed _increasedWithClaimableWinnings, uint256 _summitLocked, uint256 _everestAwarded);
    event LockedSummitWithdrawn(address indexed user, uint256 _summitRemoved, uint256 _everestBurned);
    event PanicFundsRecovered(address indexed user, uint256 _summitRecovered);

    event SetMinLockTime(uint256 _lockTimeDays);
    event SetInflectionLockTime(uint256 _lockTimeDays);
    event SetMaxLockTime(uint256 _lockTimeDays);
    event SetMinEverestLockMult(uint256 _lockMult);
    event SetInflectionEverestLockMult(uint256 _lockMult);
    event SetMaxEverestLockMult(uint256 _lockMult);
    event SetLockTimeRequiredForTaxlessSummitWithdraw(uint256 _lockTimeDays);
    event SetLockTimeRequiredForLockedSummitDeposit(uint256 _lockTimeDays);
    event AddWhitelistedTransferAddress(address _transferAddress);
    event SetPanic(bool _panic);

    event EverestExtensionAdded(address indexed extension);
    event EverestExtensionRemoved(address indexed extension);



    // ------------------------------------------------------
    // --   M O D I F I E R S 
    // ------------------------------------------------------

    modifier validLockDuration(uint256 _lockDuration) {
        require (_lockDuration >= minLockTime && _lockDuration <= maxLockTime, "Invalid lock duration");
        _;
    }
    modifier userNotAlreadyLockingSummit() {
        require (userEverestInfo[msg.sender].everestOwned == 0, "Already locking summit");
        _;
    }
    modifier userLockDurationSatisfied() {
        require(userEverestInfo[msg.sender].lockRelease != 0, "User doesnt have a lock release");
        require(block.timestamp >= userEverestInfo[msg.sender].lockRelease, "Lock still in effect");
        _;
    }
    modifier userEverestInfoExists(address _userAdd) {
        require(userEverestInfo[_userAdd].userAdd == _userAdd, "User doesnt exist");
        _;
    }
    modifier userOwnsEverest(address _userAdd) {
        require (userEverestInfo[_userAdd].everestOwned > 0, "Must own everest");
        _;
    }
    modifier validEverestAmountToBurn(uint256 _everestAmount) {
        require (_everestAmount > 0 && _everestAmount <= userEverestInfo[msg.sender].everestOwned, "Bad withdraw");
        _;
    }
    modifier onlyPanic() {
        require(panic, "Not in panic");
        _;
    }
    modifier notPanic() {
        require(!panic, "Not available during panic");
        _;
    }


    // ---------------------------------------
    // --   A D J U S T M E N T S
    // ---------------------------------------



    function setMinLockTime(uint256 _lockTimeDays) public onlyOwner {
        require(_lockTimeDays <= inflectionLockTime && _lockTimeDays >= 1 && _lockTimeDays <= 30, "Invalid minimum lock time (1-30 days)");
        minLockTime = _lockTimeDays * daySeconds;
        emit SetMinLockTime(_lockTimeDays);
    }
    function setInflectionLockTime(uint256 _lockTimeDays) public onlyOwner {
        require(_lockTimeDays >= minLockTime && _lockTimeDays <= maxLockTime && _lockTimeDays >= 7 && _lockTimeDays <= 365, "Invalid inflection lock time (7-365 days)");
        inflectionLockTime = _lockTimeDays * daySeconds;
        emit SetInflectionLockTime(_lockTimeDays);
    }
    function setMaxLockTime(uint256 _lockTimeDays) public onlyOwner {
        require(_lockTimeDays >= inflectionLockTime && _lockTimeDays >= 7 && _lockTimeDays <= 730, "Invalid maximum lock time (7-730 days)");
        maxLockTime = _lockTimeDays * daySeconds;
        emit SetMaxLockTime(_lockTimeDays);
    }
    function setMinEverestLockMult(uint256 _lockMult) public onlyOwner {
        require(_lockMult >= 100 && _lockMult <= 50000, "Invalid lock mult");
        minEverestLockMult = _lockMult;
        emit SetMinEverestLockMult(_lockMult);
    }
    function setInflectionEverestLockMult(uint256 _lockMult) public onlyOwner {
        require(_lockMult >= 100 && _lockMult <= 50000, "Invalid lock mult");
        inflectionEverestLockMult = _lockMult;
        emit SetInflectionEverestLockMult(_lockMult);
    }
    function setMaxEverestLockMult(uint256 _lockMult) public onlyOwner {
        require(_lockMult >= 100 && _lockMult <= 50000, "Invalid lock mult");
        maxEverestLockMult = _lockMult;
        emit SetMaxEverestLockMult(_lockMult);
    }





    // ------------------------------------------------------------
    // --   F U N C T I O N A L I T Y
    // ------------------------------------------------------------


    /// @dev Update the average lock duration
    function _updateAvgSummitLockDuration(uint256 _amount, uint256 _lockDuration, bool _isLocking)
        internal
    {
        // The weighted average of the change being applied
        uint256 deltaWeightedAvg = _amount * _lockDuration;

        // Update the lock multiplier and the total amount locked
        if (_isLocking) {
            totalSummitLocked += _amount;
            weightedAvgSummitLockDurations += deltaWeightedAvg;
        } else {
            totalSummitLocked -= _amount;
            weightedAvgSummitLockDurations -= deltaWeightedAvg;
        }
    }
    function avgSummitLockDuration()
        public view
        returns (uint256)
    {
        // Early escape if div/0
        if (totalSummitLocked == 0) return 0;

        // Return the average from the weighted average lock duration 
        return weightedAvgSummitLockDurations / totalSummitLocked;
    }

    /// @dev Lock period multiplier
    function _lockDurationMultiplier(uint256 _lockDuration)
        internal view
        returns (uint256)
    {
        if (_lockDuration <= inflectionLockTime) {
            return SummitMath.scaledValue(
                _lockDuration,
                minLockTime, inflectionLockTime,
                minEverestLockMult, inflectionEverestLockMult
            );
        }
        return SummitMath.scaledValue(
            _lockDuration,
            inflectionLockTime, maxLockTime,
            inflectionEverestLockMult, maxEverestLockMult
        );
    }

    /// @dev Transfer everest to the burn address.
    function _burnEverest(address _userAdd, uint256 _everestAmount)
        internal
    {
        IERC20(address(this)).safeTransferFrom(_userAdd, address(this), _everestAmount);
        _burn(address(this), _everestAmount);
    }

    /// @dev Lock Summit for a duration and earn everest
    /// @param _summitAmount Amount of SUMMIT to deposit
    /// @param _lockDuration Duration the SUMMIT will be locked for
    function lockSummit(uint256 _summitAmount, uint256 _lockDuration)
        public whenNotPaused
        nonReentrant notPanic userNotAlreadyLockingSummit validLockDuration(_lockDuration)
    {
        // Validate and deposit user's SUMMIT
        require(_summitAmount <= summit.balanceOf(msg.sender), "Exceeds balance");
        if (_summitAmount > 0) {    
            summit.safeTransferFrom(msg.sender, address(this), _summitAmount);
        }

        // Calculate the lock multiplier and EVEREST award
        uint256 everestLockMultiplier = _lockDurationMultiplier(_lockDuration);
        uint256 everestAward = (_summitAmount * everestLockMultiplier) / 10000;
        
        // Mint EVEREST to the user's wallet
        _mint(msg.sender, everestAward);

        // Create and initialize the user's everestInfo
        UserEverestInfo storage everestInfo = userEverestInfo[msg.sender];
        everestInfo.userAdd = msg.sender;
        everestInfo.everestOwned = everestAward;
        everestInfo.everestLockMultiplier = everestLockMultiplier;
        everestInfo.lockRelease = block.timestamp + _lockDuration;
        everestInfo.lockDuration = _lockDuration;
        everestInfo.summitLocked = _summitAmount;

        // Update average lock duration with new summit locked
        _updateAvgSummitLockDuration(_summitAmount, _lockDuration, true);

        // Update the EVEREST in the expedition
        _updateEverestExtensionsUserEverestOwned(everestInfo);

        emit SummitLocked(msg.sender, _summitAmount, _lockDuration, everestAward);
    }


    /// @dev Increase the lock duration of user's locked SUMMIT
    function increaseLockDuration(uint256 _lockDuration)
        public whenNotPaused
        nonReentrant notPanic userEverestInfoExists(msg.sender) userOwnsEverest(msg.sender) validLockDuration(_lockDuration)
    {
        uint256 additionalEverestAward = _increaseLockDuration(_lockDuration, msg.sender);
        emit LockDurationIncreased(msg.sender, _lockDuration, additionalEverestAward);
    }
    function _increaseLockDuration(uint256 _lockDuration, address _userAdd)
        internal
        returns (uint256)
    {
        UserEverestInfo storage everestInfo = userEverestInfo[_userAdd];
        require(_lockDuration > everestInfo.lockDuration, "Lock duration must strictly increase");

        // Update average lock duration by removing existing lock duration, and adding new duration
        _updateAvgSummitLockDuration(everestInfo.summitLocked, everestInfo.lockDuration, false);
        _updateAvgSummitLockDuration(everestInfo.summitLocked, _lockDuration, true);

        // Calculate and validate the new everest lock multiplier
        uint256 everestLockMultiplier = _lockDurationMultiplier(_lockDuration);
        require(everestLockMultiplier >= everestInfo.everestLockMultiplier, "New lock duration must be greater");

        // Calculate the additional EVEREST awarded by the extended lock duration
        uint256 additionalEverestAward = ((everestInfo.summitLocked * everestLockMultiplier) / 10000) - everestInfo.everestOwned;

        // Increase the lock release
        uint256 lockRelease = block.timestamp + _lockDuration;

        // Mint EVEREST to the user's address
        _mint(_userAdd, additionalEverestAward);

        // Update the user's running state
        everestInfo.everestOwned += additionalEverestAward;
        everestInfo.everestLockMultiplier = everestLockMultiplier;
        everestInfo.lockRelease = lockRelease;
        everestInfo.lockDuration = _lockDuration;

        // Update the expedition with the user's new EVEREST amount
        _updateEverestExtensionsUserEverestOwned(everestInfo);

        return additionalEverestAward;
    }


    /// @dev Internal locked SUMMIT amount increase, returns the extra EVEREST earned by the increased lock duration
    function _increaseLockedSummit(uint256 _summitAmount, UserEverestInfo storage everestInfo, address _summitOriginAdd)
        internal
        returns (uint256)
    {
        // Validate and deposit user's funds
        require(_summitAmount <= summit.balanceOf(_summitOriginAdd), "Exceeds balance");
        if (_summitAmount > 0) {
            summit.safeTransferFrom(_summitOriginAdd, address(this), _summitAmount);
        }

        // Calculate the extra EVEREST that is awarded by the deposited SUMMIT
        uint256 additionalEverestAward = (_summitAmount * everestInfo.everestLockMultiplier) / 10000;
        
        // Mint EVEREST to the user's address
        _mint(everestInfo.userAdd, additionalEverestAward);

        // Increase running balances of EVEREST and SUMMIT
        everestInfo.everestOwned += additionalEverestAward;
        everestInfo.summitLocked += _summitAmount;

        // Update average lock duration with new summit locked
        _updateAvgSummitLockDuration(_summitAmount, everestInfo.lockDuration, true);

        // Update the expedition with the users new EVEREST info
        _updateEverestExtensionsUserEverestOwned(everestInfo);

        return additionalEverestAward;
    }

    /// @dev Increase the duration of already locked SUMMIT, exit early if user is already locked for a longer duration
    /// @return Amount of additional everest earned by this increase of lock duration
    function _increaseLockDurationAndReleaseIfNecessary(UserEverestInfo storage everestInfo, uint256 _lockDuration)
        internal
        returns (uint256)
    {
        // Early escape if lock release already satisfies requirement
        if ((block.timestamp + _lockDuration) <= everestInfo.lockRelease) return 0;

        // If required lock duration is satisfied, but lock release needs to be extended: Update lockRelease exclusively
        if (_lockDuration <= everestInfo.lockDuration) {
            everestInfo.lockRelease = block.timestamp + _lockDuration;
            return 0;
        }

        // Lock duration increased: earn additional EVEREST and update lockDuration and lockRelease
        return _increaseLockDuration(_lockDuration, everestInfo.userAdd);
    }

    /// @dev Lock additional summit and extend duration to arbitrary duration
    function lockAndExtendLockDuration(uint256 _summitAmount, uint256 _lockDuration, address _userAdd)
        public whenNotPaused
        nonReentrant notPanic userEverestInfoExists(_userAdd) userOwnsEverest(_userAdd) validLockDuration(_lockDuration)
    {
        UserEverestInfo storage everestInfo = userEverestInfo[_userAdd];

        // Increase the lock duration of the current locked SUMMIT
        uint256 additionalEverestAward = _increaseLockDurationAndReleaseIfNecessary(everestInfo, _lockDuration);

        // Increase the amount of locked summit by {_summitAmount} and increase the EVEREST award
        additionalEverestAward += _increaseLockedSummit(
            _summitAmount,
            everestInfo,
            msg.sender
        );
        
        emit LockedSummitIncreased(_userAdd, true, _summitAmount, additionalEverestAward);
    }

    /// @dev Increase the users Locked Summit and earn everest
    function increaseLockedSummit(uint256 _summitAmount)
        public whenNotPaused
        nonReentrant notPanic userEverestInfoExists(msg.sender) userOwnsEverest(msg.sender)
    {
        uint256 additionalEverestAward = _increaseLockedSummit(
            _summitAmount,
            userEverestInfo[msg.sender],
            msg.sender
        );

        emit LockedSummitIncreased(msg.sender, false, _summitAmount, additionalEverestAward);
    }

    /// @dev Decrease the Summit and burn everest
    function withdrawLockedSummit(uint256 _everestAmount)
        public whenNotPaused
        nonReentrant notPanic userEverestInfoExists(msg.sender) userOwnsEverest(msg.sender) userLockDurationSatisfied validEverestAmountToBurn(_everestAmount)
    {
        UserEverestInfo storage everestInfo = userEverestInfo[msg.sender];
        require (_everestAmount <= everestInfo.everestOwned, "Bad withdraw");

        uint256 summitToWithdraw = _everestAmount * 10000 / everestInfo.everestLockMultiplier;

        everestInfo.everestOwned -= _everestAmount;
        everestInfo.summitLocked -= summitToWithdraw;

        // Update average summit lock duration with removed summit
        _updateAvgSummitLockDuration(summitToWithdraw, everestInfo.lockDuration, false);

        summit.safeTransfer(msg.sender, summitToWithdraw);
        _burnEverest(msg.sender, _everestAmount);

        _updateEverestExtensionsUserEverestOwned(everestInfo);

        emit LockedSummitWithdrawn(msg.sender, summitToWithdraw, _everestAmount);
    }

    
    
    
    
    
    // ----------------------------------------------------------------------
    // --   W H I T E L I S T E D   T R A N S F E R
    // ----------------------------------------------------------------------

    function addWhitelistedTransferAddress(address _whitelistedAddress) public onlyOwner {
        require(_whitelistedAddress != address(0), "Whitelisted Address missing");
        whitelistedTransferAddresses.add(_whitelistedAddress);
        emit AddWhitelistedTransferAddress(_whitelistedAddress);
    }

    function getWhitelistedTransferAddresses() public view returns (address[] memory) {
        return whitelistedTransferAddresses.values();
    }

    function _beforeTokenTransfer(address sender, address recipient, uint256) internal view override {
        require(whitelistedTransferAddresses.contains(sender) || whitelistedTransferAddresses.contains(recipient), "Not a whitelisted transfer");
    }

    
    
    
    // ----------------------------------------------------------------------
    // --   E V E R E S T   E X T E N S I O N S
    // ----------------------------------------------------------------------



    /// @dev Add an everest extension
    function addEverestExtension(address _extension)
        public
        onlyOwner
    {
        require(_extension != address(0), "Missing extension");
        require(everestExtensions.length() < 5, "Max extension cap reached");
        require(!everestExtensions.contains(_extension), "Extension already exists");
        everestExtensions.add(_extension);

        emit EverestExtensionAdded(_extension);
    }

    /// @dev Remove an everest extension
    function removeEverestExtension(address _extension)
        public
        onlyOwner
    {
        require(_extension != address(0), "Missing extension");
        require(everestExtensions.contains(_extension), "Extension doesnt exist");

        everestExtensions.remove(_extension);

        emit EverestExtensionRemoved(_extension);
    }

    /// @dev Return list of everest extensions
    function getEverestExtensions()
        public view
        returns (address[] memory)
    {
        return everestExtensions.values();
    }

    /// @dev Get user everest owned
    function getUserEverestOwned(address _userAdd)
        public view
        returns (uint256)
    {
        return userEverestInfo[_userAdd].everestOwned;
    }

    function _updateEverestExtensionsUserEverestOwned(UserEverestInfo storage user)
        internal
    {
        // Iterate through and update each extension with the user's everest amount
        for (uint8 extensionIndex = 0; extensionIndex < everestExtensions.length(); extensionIndex++) {
            BaseEverestExtension(everestExtensions.at(extensionIndex)).updateUserEverest(user.everestOwned, user.userAdd);
        }
    }





    // -------------------------------------
    // --   P A N I C
    // -------------------------------------



    /// @dev Turn on or off panic mode
    function setPanic(bool _panic)
        public
        onlyOwner
    {
        panic = _panic;
        emit SetPanic(_panic);
    }


    /// @dev Panic recover locked SUMMIT if something has gone wrong
    function panicRecoverFunds()
        public
        nonReentrant userEverestInfoExists(msg.sender) onlyPanic
    {
        UserEverestInfo storage everestInfo = userEverestInfo[msg.sender];

        uint256 recoverableSummit = everestInfo.summitLocked;
        summit.safeTransfer(msg.sender, recoverableSummit);

        everestInfo.userAdd = address(0);
        everestInfo.everestOwned = 0;
        everestInfo.summitLocked = 0;
        everestInfo.lockRelease = 0;
        everestInfo.lockDuration = 0;
        everestInfo.everestLockMultiplier = 0;

        emit PanicFundsRecovered(msg.sender, recoverableSummit);
    }

}

File 2 of 20 : BaseEverestExtension.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.2;

import "./EverestToken.sol";

abstract contract BaseEverestExtension {

    EverestToken public everest;

    modifier onlyEverestToken() {
        require(msg.sender == address(everest), "Only callable by ExpeditionV2");
        _;
    }

    function _getUserEverest(address _userAdd)
        internal view
        returns (uint256)
    {
        return everest.getUserEverestOwned(_userAdd);
    }

    function updateUserEverest(uint256 _everestAmount, address _userAdd)
        external virtual;
}

File 3 of 20 : PresetPausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.2;

import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";

contract PresetPausable is AccessControlEnumerable {
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
    bool public paused;

    constructor() {
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _setupRole(PAUSER_ROLE, msg.sender);
        paused = false;
    }

    event Paused(address account);
    event Unpaused(address account);

    function _whenNotPaused() internal view {
        require(!paused, "Pausable: paused");
    }
    modifier whenNotPaused() {
        _whenNotPaused();
        _;
    }
    
    modifier whenPaused() {
        require(paused, "Pausable: not paused");
        _;
    }

    function pause() public virtual whenNotPaused {
        require(hasRole(PAUSER_ROLE, msg.sender), "Must have pauser role");
        paused = true;
        emit Paused(_msgSender());
    }

    function unpause() public virtual whenPaused {
        require(hasRole(PAUSER_ROLE, msg.sender), "Must have pauser role");
        paused = false;
        emit Unpaused(_msgSender());
    }
}

File 4 of 20 : SummitMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.2;

library SummitMath {

    function scaledValue(uint256 scalar, uint256 minBound, uint256 maxBound, uint256 minResult, uint256 maxResult)
        internal pure
        returns (uint256)
    {
        require(minBound <= maxBound, "Invalid scaling range");
        if (minResult == maxResult) return minResult;
        if (scalar <= minBound) return minResult;
        if (scalar >= maxBound) return maxResult;
        if (maxResult > minResult) {
            return (((scalar - minBound) * (maxResult - minResult) * 1e12) / (maxBound - minBound) / 1e12) + minResult;
        }
        return (((maxBound - scalar) * (minResult - maxResult) * 1e12) / (maxBound - minBound) / 1e12) + maxResult;
    }
}

File 5 of 20 : ERC20.sol
// SPDX-License-Identifier: MIT

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:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, 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}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), 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}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - 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) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][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) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), 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:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, 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 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 6 of 20 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 7 of 20 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 8 of 20 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

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 9 of 20 : Ownable.sol
// SPDX-License-Identifier: MIT

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() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 10 of 20 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

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 make 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 11 of 20 : AccessControlEnumerable.sol
// SPDX-License-Identifier: MIT

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 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 override returns (uint256) {
        return _roleMembers[role].length();
    }

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

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

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

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

File 12 of 20 : IAccessControlEnumerable.sol
// SPDX-License-Identifier: MIT

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 13 of 20 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `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}.
     * ====
     */
    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);
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 14 of 20 : IAccessControl.sol
// SPDX-License-Identifier: MIT

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 15 of 20 : Context.sol
// SPDX-License-Identifier: MIT

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 16 of 20 : Strings.sol
// SPDX-License-Identifier: MIT

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 17 of 20 : ERC165.sol
// SPDX-License-Identifier: MIT

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 18 of 20 : IERC165.sol
// SPDX-License-Identifier: MIT

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 19 of 20 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

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 20 of 20 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_summit","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_transferAddress","type":"address"}],"name":"AddWhitelistedTransferAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"}],"name":"EverestExtensionAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"}],"name":"EverestExtensionRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_lockDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_additionalEverestAwarded","type":"uint256"}],"name":"LockDurationIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"bool","name":"_increasedWithClaimableWinnings","type":"bool"},{"indexed":false,"internalType":"uint256","name":"_summitLocked","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_everestAwarded","type":"uint256"}],"name":"LockedSummitIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_summitRemoved","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_everestBurned","type":"uint256"}],"name":"LockedSummitWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_summitRecovered","type":"uint256"}],"name":"PanicFundsRecovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_lockMult","type":"uint256"}],"name":"SetInflectionEverestLockMult","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_lockTimeDays","type":"uint256"}],"name":"SetInflectionLockTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_lockTimeDays","type":"uint256"}],"name":"SetLockTimeRequiredForLockedSummitDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_lockTimeDays","type":"uint256"}],"name":"SetLockTimeRequiredForTaxlessSummitWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_lockMult","type":"uint256"}],"name":"SetMaxEverestLockMult","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_lockTimeDays","type":"uint256"}],"name":"SetMaxLockTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_lockMult","type":"uint256"}],"name":"SetMinEverestLockMult","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_lockTimeDays","type":"uint256"}],"name":"SetMinLockTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_panic","type":"bool"}],"name":"SetPanic","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_summitLocked","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_lockDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_everestAwarded","type":"uint256"}],"name":"SummitLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_extension","type":"address"}],"name":"addEverestExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_whitelistedAddress","type":"address"}],"name":"addWhitelistedTransferAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"avgSummitLockDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daySeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getEverestExtensions","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":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_userAdd","type":"address"}],"name":"getUserEverestOwned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWhitelistedTransferAddresses","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":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockDuration","type":"uint256"}],"name":"increaseLockDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_summitAmount","type":"uint256"}],"name":"increaseLockedSummit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"inflectionEverestLockMult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"inflectionLockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_summitAmount","type":"uint256"},{"internalType":"uint256","name":"_lockDuration","type":"uint256"},{"internalType":"address","name":"_userAdd","type":"address"}],"name":"lockAndExtendLockDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_summitAmount","type":"uint256"},{"internalType":"uint256","name":"_lockDuration","type":"uint256"}],"name":"lockSummit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxEverestLockMult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxLockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minEverestLockMult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minLockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"panic","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"panicRecoverFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_extension","type":"address"}],"name":"removeEverestExtension","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":"uint256","name":"_lockMult","type":"uint256"}],"name":"setInflectionEverestLockMult","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockTimeDays","type":"uint256"}],"name":"setInflectionLockTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockMult","type":"uint256"}],"name":"setMaxEverestLockMult","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockTimeDays","type":"uint256"}],"name":"setMaxLockTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockMult","type":"uint256"}],"name":"setMinEverestLockMult","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockTimeDays","type":"uint256"}],"name":"setMinLockTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_panic","type":"bool"}],"name":"setPanic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"summit","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSummitLocked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userEverestInfo","outputs":[{"internalType":"address","name":"userAdd","type":"address"},{"internalType":"uint256","name":"everestOwned","type":"uint256"},{"internalType":"uint256","name":"everestLockMultiplier","type":"uint256"},{"internalType":"uint256","name":"lockDuration","type":"uint256"},{"internalType":"uint256","name":"lockRelease","type":"uint256"},{"internalType":"uint256","name":"summitLocked","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weightedAvgSummitLockDurations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_everestAmount","type":"uint256"}],"name":"withdrawLockedSummit","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526009805460ff60a81b1916905562093a80600a5562278d00600b556301e13380600c556103e8600d55612710600e556161a8600f553480156200004657600080fd5b50604051620041a2380380620041a2833981016040819052620000699162000455565b604080518082018252600c81526b22bb32b932b9ba2a37b5b2b760a11b602080830191825283518085019094526007845266115591549154d560ca1b908401528151919291620000bc91600391620003af565b508051620000d2906004906020840190620003af565b505050620000ef620000e9620001f060201b60201c565b620001f4565b60016006556200010160003362000246565b6200012d7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3362000246565b6009805460ff191690556001600160a01b038116620001925760405162461bcd60e51b815260206004820152601360248201527f53756d6d6974546f6b656e206d697373696e6700000000000000000000000000604482015260640160405180910390fd5b60098054610100600160a81b0319166101006001600160a01b03841602179055620001cc6012600062000289602090811b6200215217901c565b50620001e83060126200028960201b620021521790919060201c565b5050620004c2565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200025d8282620002a960201b620021671760201c565b6000828152600860209081526040909120620002849183906200215262000289821b17901c565b505050565b6000620002a0836001600160a01b038416620002b9565b90505b92915050565b620002b582826200030b565b5050565b60008181526001830160205260408120546200030257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620002a3565b506000620002a3565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16620002b55760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200036b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b828054620003bd9062000485565b90600052602060002090601f016020900481019282620003e157600085556200042c565b82601f10620003fc57805160ff19168380011785556200042c565b828001600101855582156200042c579182015b828111156200042c5782518255916020019190600101906200040f565b506200043a9291506200043e565b5090565b5b808211156200043a57600081556001016200043f565b60006020828403121562000467578081fd5b81516001600160a01b03811681146200047e578182fd5b9392505050565b6002810460018216806200049a57607f821691505b60208210811415620004bc57634e487b7160e01b600052602260045260246000fd5b50919050565b613cd080620004d26000396000f3fe608060405234801561001057600080fd5b50600436106103995760003560e01c806382e5d1bc116101e9578063a457c2d71161010f578063d308e10e116100ad578063dd62ed3e1161007c578063dd62ed3e146107e5578063e63ab1e91461081e578063f2fde38b14610845578063fcc8e4661461085857610399565b8063d308e10e146107ad578063d547741f146107b6578063d6fdd2e3146107c9578063dd459bd3146107d257610399565b8063a8ce47e6116100e9578063a8ce47e614610752578063a9059cbb1461077e578063ca15c87314610791578063ce49b2fe146107a457610399565b8063a457c2d714610723578063a60ff76614610736578063a86d01d81461073f57610399565b80639010d07c1161018757806395d89b411161015657806395d89b41146106f15780639624e4ff146106f95780639fbcb9cb14610703578063a217fddf1461071b57610399565b80639010d07c146106ba57806391d14854146106cd5780639434a601146106e0578063943ee9c5146106e857610399565b80638a77f744116101c35780638a77f744146106645780638cce58b2146106795780638da5cb5b146106825780638ffe5e55146106a757610399565b806382e5d1bc146106365780638456cb5914610649578063865303e71461065157610399565b806336568abe116102ce57806366a138c21161026c578063715018a61161023b578063715018a61461060a5780637da0b752146106125780637dbe814a1461062557806382948be71461062e57610399565b806366a138c2146105a857806366d587b3146105bb5780636ff253fc146105ce57806370a08231146105e157610399565b806343e92ceb116102a857806343e92ceb1461056b5780634700d3051461057457806351591134146105885780635c975abb1461059b57610399565b806336568abe1461053d57806339509351146105505780633f4ba83a1461056357610399565b806323b872dd1161033b5780632ecf74e6116103155780632ecf74e6146104f55780632f2ff15d14610508578063313ce5671461051b57806332e939d31461052a57610399565b806323b872dd146104ac578063248a9ca3146104bf57806328265441146104e257610399565b80630a27008c116103775780630a27008c146103ee57806318160ddd14610472578063185063a2146104845780631a4dd48e1461049957610399565b806301ffc9a71461039e57806306fdde03146103c6578063095ea7b3146103db575b600080fd5b6103b16103ac366004613893565b610860565b60405190151581526020015b60405180910390f35b6103ce61088d565b6040516103bd91906139e5565b6103b16103e93660046137d7565b610920565b61043b6103fc366004613750565b6014602052600090815260409020805460018201546002830154600384015460048501546005909501546001600160a01b039094169492939192909186565b604080516001600160a01b0390971687526020870195909552938501929092526060840152608083015260a082015260c0016103bd565b6002545b6040519081526020016103bd565b6104976104923660046138d3565b610937565b005b6104976104a7366004613750565b610ad2565b6103b16104ba36600461379c565b610b9e565b6104766104cd366004613838565b60009081526007602052604090206001015490565b6104976104f0366004613872565b610c4a565b610497610503366004613750565b610ef4565b610497610516366004613850565b610ffb565b604051601281526020016103bd565b610497610538366004613800565b611022565b61049761054b366004613850565b611099565b6103b161055e3660046137d7565b6110bb565b6104976110f7565b61047660105481565b6009546103b190600160a81b900460ff1681565b610497610596366004613838565b6111f8565b6009546103b19060ff1681565b6104976105b6366004613838565b6114ed565b6104976105c9366004613838565b6115e4565b6104976105dc366004613750565b61172b565b6104766105ef366004613750565b6001600160a01b031660009081526020819052604090205490565b610497611893565b610497610620366004613838565b6118c9565b61047660115481565b610476611957565b610497610644366004613838565b611981565b610497611a65565b61049761065f366004613838565b611b10565b61066c611c38565b6040516103bd9190613998565b610476600d5481565b6005546001600160a01b03165b6040516001600160a01b0390911681526020016103bd565b6104976106b5366004613838565b611c44565b61068f6106c8366004613872565b611cd2565b6103b16106db366004613850565b611cea565b610497611d15565b610476600b5481565b6103ce611e61565b6104766201518081565b60095461068f9061010090046001600160a01b031681565b610476600081565b6103b16107313660046137d7565b611e70565b610476600a5481565b61049761074d366004613838565b611f09565b610476610760366004613750565b6001600160a01b031660009081526014602052604090206001015490565b6103b161078c3660046137d7565b611fef565b61047661079f366004613838565b611ffc565b610476600e5481565b610476600c5481565b6104976107c4366004613850565b612013565b610476600f5481565b6104976107e0366004613838565b61201d565b6104766107f336600461376a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6104767f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b610497610853366004613750565b6120ab565b61066c612146565b60006001600160e01b03198216635a05180f60e01b1480610885575061088582612175565b90505b919050565b60606003805461089c90613c1b565b80601f01602080910402602001604051908101604052809291908181526020018280546108c890613c1b565b80156109155780601f106108ea57610100808354040283529160200191610915565b820191906000526020600020905b8154815290600101906020018083116108f857829003601f168201915b505050505090505b90565b600061092d3384846121aa565b5060015b92915050565b61093f6122ce565b6002600654141561096b5760405162461bcd60e51b815260040161096290613b33565b60405180910390fd5b6002600655600954600160a81b900460ff161561099a5760405162461bcd60e51b815260040161096290613a47565b6001600160a01b03808216600081815260146020526040902054839216146109d45760405162461bcd60e51b815260040161096290613add565b6001600160a01b0382166000908152601460205260409020600101548290610a0e5760405162461bcd60e51b815260040161096290613a7e565b83600a548110158015610a235750600c548111155b610a3f5760405162461bcd60e51b815260040161096290613a18565b6001600160a01b038416600090815260146020526040812090610a628288612314565b9050610a6f88833361236b565b610a799082613b6a565b604080518a8152602081018390529192506001916001600160a01b038916917f14b6bba8d37258fcf6e1bdd20c65c646a106599dfb840ae13b8a8bd3e3920302910160405180910390a350506001600655505050505050565b6005546001600160a01b03163314610afc5760405162461bcd60e51b815260040161096290613aa8565b6001600160a01b038116610b525760405162461bcd60e51b815260206004820152601b60248201527f57686974656c69737465642041646472657373206d697373696e6700000000006044820152606401610962565b610b5d601282612152565b506040516001600160a01b03821681527ff3b18de5e7fa32c773e509bf3846bc89480cfe03e86daf9060abec4c0bc5b933906020015b60405180910390a150565b6000610bab8484846124e0565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610c305760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610962565b610c3d85338584036121aa565b60019150505b9392505050565b610c526122ce565b60026006541415610c755760405162461bcd60e51b815260040161096290613b33565b6002600655600954600160a81b900460ff1615610ca45760405162461bcd60e51b815260040161096290613a47565b3360009081526014602052604090206001015415610cfd5760405162461bcd60e51b8152602060048201526016602482015275105b1c9958591e481b1bd8dada5b99c81cdd5b5b5a5d60521b6044820152606401610962565b80600a548110158015610d125750600c548111155b610d2e5760405162461bcd60e51b815260040161096290613a18565b6009546040516370a0823160e01b81523360048201526101009091046001600160a01b0316906370a082319060240160206040518083038186803b158015610d7557600080fd5b505afa158015610d89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dad91906138bb565b831115610dee5760405162461bcd60e51b815260206004820152600f60248201526e457863656564732062616c616e636560881b6044820152606401610962565b8215610e1157600954610e119061010090046001600160a01b03163330866126bb565b6000610e1c83612726565b90506000612710610e2d8387613ba2565b610e379190613b82565b9050610e433382612762565b33600081815260146020526040902080546001600160a01b03191690911781556001810182905560028101839055610e7b8542613b6a565b60048201556003810185905560058101869055610e9a8686600161284e565b610ea3816128ce565b604080518781526020810187905290810183905233907f192ad0550659e04732428475278c3b3e5a0d502e36290568c6d294736baf0053906060015b60405180910390a25050600160065550505050565b6005546001600160a01b03163314610f1e5760405162461bcd60e51b815260040161096290613aa8565b6001600160a01b038116610f685760405162461bcd60e51b815260206004820152601160248201527026b4b9b9b4b7339032bc3a32b739b4b7b760791b6044820152606401610962565b610f73601582612972565b610fb85760405162461bcd60e51b8152602060048201526016602482015275115e1d195b9cda5bdb88191bd95cdb9d08195e1a5cdd60521b6044820152606401610962565b610fc3601582612994565b506040516001600160a01b038216907ffb8c1356abf7552b300ca7ce5216b5cbe3e815dcaad5c8f2c408b43da00180b590600090a250565b61100582826129a9565b600082815260086020526040902061101d9082612152565b505050565b6005546001600160a01b0316331461104c5760405162461bcd60e51b815260040161096290613aa8565b60098054821515600160a81b0260ff60a81b199091161790556040517fb97c60d0dd7ef7a99f100cabf6e2ac24a8475ce0eeb6f715bff81c6268796b7590610b9390831515815260200190565b6110a382826129d0565b600082815260086020526040902061101d9082612994565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161092d9185906110f2908690613b6a565b6121aa565b60095460ff166111405760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610962565b61116a7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33611cea565b6111ae5760405162461bcd60e51b81526020600482015260156024820152744d75737420686176652070617573657220726f6c6560581b6044820152606401610962565b6009805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6112006122ce565b600260065414156112235760405162461bcd60e51b815260040161096290613b33565b6002600655600954600160a81b900460ff16156112525760405162461bcd60e51b815260040161096290613a47565b336000818152601460205260409020546001600160a01b031681146112895760405162461bcd60e51b815260040161096290613add565b336000818152601460205260409020600101546112b85760405162461bcd60e51b815260040161096290613a7e565b336000908152601460205260409020600401546113175760405162461bcd60e51b815260206004820152601f60248201527f5573657220646f65736e7420686176652061206c6f636b2072656c65617365006044820152606401610962565b336000908152601460205260409020600401544210156113705760405162461bcd60e51b8152602060048201526014602482015273131bd8dac81cdd1a5b1b081a5b881959999958dd60621b6044820152606401610962565b826000811180156113935750336000908152601460205260409020600101548111155b6113ce5760405162461bcd60e51b815260206004820152600c60248201526b42616420776974686472617760a01b6044820152606401610962565b33600090815260146020526040902060018101548511156114205760405162461bcd60e51b815260206004820152600c60248201526b42616420776974686472617760a01b6044820152606401610962565b600281015460009061143487612710613ba2565b61143e9190613b82565b9050858260010160008282546114549190613bc1565b925050819055508082600501600082825461146f9190613bc1565b92505081905550611486818360030154600061284e565b6009546114a29061010090046001600160a01b03163383612a4a565b6114ac3387612a7a565b6114b5826128ce565b604080518281526020810188905233917f7c4b52501a12524ae0739a0f9dba702be0707fe53ed7c3fa63a2c71dfaef67b89101610edf565b6005546001600160a01b031633146115175760405162461bcd60e51b815260040161096290613aa8565b600a54811015801561152b5750600c548111155b8015611538575060078110155b8015611546575061016d8111155b6115a45760405162461bcd60e51b815260206004820152602960248201527f496e76616c696420696e666c656374696f6e206c6f636b2074696d652028372d60448201526833363520646179732960b81b6064820152608401610962565b6115b16201518082613ba2565b600b556040518181527f8b8e3ebca06f744fca65a7ee8652b97193ec1957e167f096ada537b8684a3d3a90602001610b93565b6115ec6122ce565b6002600654141561160f5760405162461bcd60e51b815260040161096290613b33565b6002600655600954600160a81b900460ff161561163e5760405162461bcd60e51b815260040161096290613a47565b336000818152601460205260409020546001600160a01b031681146116755760405162461bcd60e51b815260040161096290613add565b336000818152601460205260409020600101546116a45760405162461bcd60e51b815260040161096290613a7e565b82600a5481101580156116b95750600c548111155b6116d55760405162461bcd60e51b815260040161096290613a18565b60006116e18533612a90565b604080518781526020810183905291925033917f02eec75518fe40d6dbaa33a7514df068fed78b8c5544690bece483e0a1899aeb910160405180910390a250506001600655505050565b6005546001600160a01b031633146117555760405162461bcd60e51b815260040161096290613aa8565b6001600160a01b03811661179f5760405162461bcd60e51b815260206004820152601160248201527026b4b9b9b4b7339032bc3a32b739b4b7b760791b6044820152606401610962565b60056117ab6015612c1f565b106117f85760405162461bcd60e51b815260206004820152601960248201527f4d617820657874656e73696f6e206361702072656163686564000000000000006044820152606401610962565b611803601582612972565b156118505760405162461bcd60e51b815260206004820152601860248201527f457874656e73696f6e20616c72656164792065786973747300000000000000006044820152606401610962565b61185b601582612152565b506040516001600160a01b038216907f7b5b24d6e07a052ec28f04b77b6a6ca7aaf2a5e66b6220608c566702a545750590600090a250565b6005546001600160a01b031633146118bd5760405162461bcd60e51b815260040161096290613aa8565b6118c76000612c29565b565b6005546001600160a01b031633146118f35760405162461bcd60e51b815260040161096290613aa8565b60648110158015611906575061c3508111155b6119225760405162461bcd60e51b815260040161096290613b08565b600f8190556040518181527f3f1cd3267093a28de418211332bdbc3b586a5e2cd1bd111b5990c64ddbaa868890602001610b93565b60006010546000141561196c5750600061091d565b60105460115461197c9190613b82565b905090565b6005546001600160a01b031633146119ab5760405162461bcd60e51b815260040161096290613aa8565b600b5481111580156119be575060018110155b80156119cb5750601e8111155b611a255760405162461bcd60e51b815260206004820152602560248201527f496e76616c6964206d696e696d756d206c6f636b2074696d652028312d333020604482015264646179732960d81b6064820152608401610962565b611a326201518082613ba2565b600a556040518181527f6d75d7fa343cd4abb03ab6e4e818fa3d3189ea95066365738b5bcfbcdd6d189490602001610b93565b611a6d6122ce565b611a977f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33611cea565b611adb5760405162461bcd60e51b81526020600482015260156024820152744d75737420686176652070617573657220726f6c6560581b6044820152606401610962565b6009805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586111db3390565b611b186122ce565b60026006541415611b3b5760405162461bcd60e51b815260040161096290613b33565b6002600655600954600160a81b900460ff1615611b6a5760405162461bcd60e51b815260040161096290613a47565b336000818152601460205260409020546001600160a01b03168114611ba15760405162461bcd60e51b815260040161096290613add565b33600081815260146020526040902060010154611bd05760405162461bcd60e51b815260040161096290613a7e565b3360008181526014602052604081209091611bec91869161236b565b604080518681526020810183905291925060009133917f14b6bba8d37258fcf6e1bdd20c65c646a106599dfb840ae13b8a8bd3e3920302910160405180910390a3505060016006555050565b606061197c6012612c7b565b6005546001600160a01b03163314611c6e5760405162461bcd60e51b815260040161096290613aa8565b60648110158015611c81575061c3508111155b611c9d5760405162461bcd60e51b815260040161096290613b08565b600e8190556040518181527ff6b2ee5f7f1c02b0e3b71e17fdd2f820934557464ed3f88e2dac07f8ce73315790602001610b93565b6000828152600860205260408120610c439083612c88565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60026006541415611d385760405162461bcd60e51b815260040161096290613b33565b6002600655336000818152601460205260409020546001600160a01b03168114611d745760405162461bcd60e51b815260040161096290613add565b600954600160a81b900460ff16611dbc5760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420696e2070616e696360a01b6044820152606401610962565b336000818152601460205260409020600581015460095491929091611df1916101009091046001600160a01b03169083612a4a565b81546001600160a01b0319168255600060018301819055600583018190556004830181905560038301819055600283015560405181815233907f91b159c5713c7567a4333287524d4bfc38d16be9a018183cd5403ee31f4edb899060200160405180910390a25050600160065550565b60606004805461089c90613c1b565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015611ef25760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610962565b611eff33858584036121aa565b5060019392505050565b6005546001600160a01b03163314611f335760405162461bcd60e51b815260040161096290613aa8565b600b548110158015611f46575060078110155b8015611f5457506102da8111155b611faf5760405162461bcd60e51b815260206004820152602660248201527f496e76616c6964206d6178696d756d206c6f636b2074696d652028372d37333060448201526520646179732960d01b6064820152608401610962565b611fbc6201518082613ba2565b600c556040518181527f64a2c86a826b521169cbfba8217846317cc369b740aed5adaa78856897a4b2c290602001610b93565b600061092d3384846124e0565b600081815260086020526040812061088590612c1f565b6110a38282612c94565b6005546001600160a01b031633146120475760405162461bcd60e51b815260040161096290613aa8565b6064811015801561205a575061c3508111155b6120765760405162461bcd60e51b815260040161096290613b08565b600d8190556040518181527f7fe9120c872201f07ed38feb4a6d95d2cf55b2c2b265a88be3af30b2cb4d2d0690602001610b93565b6005546001600160a01b031633146120d55760405162461bcd60e51b815260040161096290613aa8565b6001600160a01b03811661213a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610962565b61214381612c29565b50565b606061197c6015612c7b565b6000610c43836001600160a01b038416612cba565b6121718282612d09565b5050565b60006001600160e01b03198216637965db0b60e01b148061088557506301ffc9a760e01b6001600160e01b0319831614610885565b6001600160a01b03831661220c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610962565b6001600160a01b03821661226d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610962565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60095460ff16156118c75760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610962565b60048201546000906123268342613b6a565b1161233357506000610931565b82600301548211612355576123488242613b6a565b6004840155506000610931565b8254610c439083906001600160a01b0316612a90565b6009546040516370a0823160e01b81526001600160a01b038381166004830152600092610100900416906370a082319060240160206040518083038186803b1580156123b657600080fd5b505afa1580156123ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123ee91906138bb565b84111561242f5760405162461bcd60e51b815260206004820152600f60248201526e457863656564732062616c616e636560881b6044820152606401610962565b8315612452576009546124529061010090046001600160a01b03168330876126bb565b60006127108460020154866124679190613ba2565b6124719190613b82565b8454909150612489906001600160a01b031682612762565b8084600101600082825461249d9190613b6a565b92505081905550848460050160008282546124b89190613b6a565b925050819055506124cf858560030154600161284e565b6124d8846128ce565b949350505050565b6001600160a01b0383166125445760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610962565b6001600160a01b0382166125a65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610962565b6125b1838383612d8f565b6001600160a01b038316600090815260208190526040902054818110156126295760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610962565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290612660908490613b6a565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516126ac91815260200190565b60405180910390a35b50505050565b6040516001600160a01b03808516602483015283166044820152606481018290526126b59085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612df7565b6000600b54821161274d5761274682600a54600b54600d54600e54612ec9565b9050610888565b61088582600b54600c54600e54600f54612ec9565b6001600160a01b0382166127b85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610962565b6127c460008383612d8f565b80600260008282546127d69190613b6a565b90915550506001600160a01b03821660009081526020819052604081208054839290612803908490613b6a565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3612171565b600061285a8385613ba2565b905081156128985783601060008282546128749190613b6a565b92505081905550806011600082825461288d9190613b6a565b909155506126b59050565b83601060008282546128aa9190613bc1565b9250508190555080601160008282546128c39190613bc1565b909155505050505050565b60005b6128db6015612c1f565b8160ff161015612171576128f3601560ff8316612c88565b6001830154835460405163891aa6f760e01b815260048101929092526001600160a01b039081166024830152919091169063891aa6f790604401600060405180830381600087803b15801561294757600080fd5b505af115801561295b573d6000803e3d6000fd5b50505050808061296a90613c56565b9150506128d1565b6001600160a01b03811660009081526001830160205260408120541515610c43565b6000610c43836001600160a01b038416613011565b6000828152600760205260409020600101546129c681335b61312e565b61101d8383612d09565b6001600160a01b0381163314612a405760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610962565b6121718282613192565b6040516001600160a01b03831660248201526044810182905261101d90849063a9059cbb60e01b906064016126ef565b612a86308381846126bb565b61217130826131f9565b6001600160a01b038116600090815260146020526040812060038101548411612b075760405162461bcd60e51b8152602060048201526024808201527f4c6f636b206475726174696f6e206d757374207374726963746c7920696e63726044820152636561736560e01b6064820152608401610962565b612b1b81600501548260030154600061284e565b612b2b816005015485600161284e565b6000612b3685612726565b90508160020154811015612b965760405162461bcd60e51b815260206004820152602160248201527f4e6577206c6f636b206475726174696f6e206d757374206265206772656174656044820152603960f91b6064820152608401610962565b60008260010154612710838560050154612bb09190613ba2565b612bba9190613b82565b612bc49190613bc1565b90506000612bd28742613b6a565b9050612bde8683612762565b81846001016000828254612bf29190613b6a565b9091555050600284018390556004840181905560038401879055612c15846128ce565b5095945050505050565b6000610885825490565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606000610c4383613353565b6000610c4383836133af565b600082815260076020526040902060010154612cb081336129c1565b61101d8383613192565b6000818152600183016020526040812054612d0157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610931565b506000610931565b612d138282611cea565b6121715760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055612d4b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612d9a601284612972565b80612dab5750612dab601283612972565b61101d5760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420612077686974656c6973746564207472616e736665720000000000006044820152606401610962565b6000612e4c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166133e79092919063ffffffff16565b80519091501561101d5780806020019051810190612e6a919061381c565b61101d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610962565b600083851115612f135760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964207363616c696e672072616e676560581b6044820152606401610962565b81831415612f22575081613008565b848611612f30575081613008565b838610612f3e575080613008565b82821115612fa9578264e8d4a51000612f578787613bc1565b612f618686613bc1565b612f6b898b613bc1565b612f759190613ba2565b612f849064e8d4a51000613ba2565b612f8e9190613b82565b612f989190613b82565b612fa29190613b6a565b9050613008565b8164e8d4a51000612fba8787613bc1565b612fc48587613bc1565b612fce8a89613bc1565b612fd89190613ba2565b612fe79064e8d4a51000613ba2565b612ff19190613b82565b612ffb9190613b82565b6130059190613b6a565b90505b95945050505050565b60008181526001830160205260408120548015613124576000613035600183613bc1565b855490915060009061304990600190613bc1565b90508181146130ca57600086600001828154811061307757634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106130a857634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b85548690806130e957634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610931565b6000915050610931565b6131388282611cea565b61217157613150816001600160a01b031660146133f6565b61315b8360206133f6565b60405160200161316c929190613923565b60408051601f198184030181529082905262461bcd60e51b8252610962916004016139e5565b61319c8282611cea565b156121715760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166132595760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610962565b61326582600083612d8f565b6001600160a01b038216600090815260208190526040902054818110156132d95760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610962565b6001600160a01b0383166000908152602081905260408120838303905560028054849290613308908490613bc1565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361101d565b6060816000018054806020026020016040519081016040528092919081815260200182805480156133a357602002820191906000526020600020905b81548152602001906001019080831161338f575b50505050509050919050565b60008260000182815481106133d457634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60606124d884846000856135d8565b60606000613405836002613ba2565b613410906002613b6a565b67ffffffffffffffff81111561343657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613460576020820181803683370190505b509050600360fc1b8160008151811061348957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106134c657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006134ea846002613ba2565b6134f5906001613b6a565b90505b6001811115613589576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061353757634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061355b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361358281613c04565b90506134f8565b508315610c435760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610962565b6060824710156136395760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610962565b843b6136875760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610962565b600080866001600160a01b031685876040516136a39190613907565b60006040518083038185875af1925050503d80600081146136e0576040519150601f19603f3d011682016040523d82523d6000602084013e6136e5565b606091505b50915091506136f5828286613700565b979650505050505050565b6060831561370f575081610c43565b82511561371f5782518084602001fd5b8160405162461bcd60e51b815260040161096291906139e5565b80356001600160a01b038116811461088857600080fd5b600060208284031215613761578081fd5b610c4382613739565b6000806040838503121561377c578081fd5b61378583613739565b915061379360208401613739565b90509250929050565b6000806000606084860312156137b0578081fd5b6137b984613739565b92506137c760208501613739565b9150604084013590509250925092565b600080604083850312156137e9578182fd5b6137f283613739565b946020939093013593505050565b600060208284031215613811578081fd5b8135610c4381613c8c565b60006020828403121561382d578081fd5b8151610c4381613c8c565b600060208284031215613849578081fd5b5035919050565b60008060408385031215613862578182fd5b8235915061379360208401613739565b60008060408385031215613884578182fd5b50508035926020909101359150565b6000602082840312156138a4578081fd5b81356001600160e01b031981168114610c43578182fd5b6000602082840312156138cc578081fd5b5051919050565b6000806000606084860312156138e7578283fd5b83359250602084013591506138fe60408501613739565b90509250925092565b60008251613919818460208701613bd8565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008252835161395b816017850160208801613bd8565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161398c816028840160208801613bd8565b01602801949350505050565b6020808252825182820181905260009190848201906040850190845b818110156139d95783516001600160a01b0316835292840192918401916001016139b4565b50909695505050505050565b6000602082528251806020840152613a04816040850160208701613bd8565b601f01601f19169190910160400192915050565b60208082526015908201527424b73b30b634b2103637b1b590323ab930ba34b7b760591b604082015260600190565b6020808252601a908201527f4e6f7420617661696c61626c6520647572696e672070616e6963000000000000604082015260600190565b60208082526010908201526f135d5cdd081bdddb88195d995c995cdd60821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602080825260119082015270155cd95c88191bd95cdb9d08195e1a5cdd607a1b604082015260600190565b602080825260119082015270125b9d985b1a59081b1bd8dac81b5d5b1d607a1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115613b7d57613b7d613c76565b500190565b600082613b9d57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615613bbc57613bbc613c76565b500290565b600082821015613bd357613bd3613c76565b500390565b60005b83811015613bf3578181015183820152602001613bdb565b838111156126b55750506000910152565b600081613c1357613c13613c76565b506000190190565b600281046001821680613c2f57607f821691505b60208210811415613c5057634e487b7160e01b600052602260045260246000fd5b50919050565b600060ff821660ff811415613c6d57613c6d613c76565b60010192915050565b634e487b7160e01b600052601160045260246000fd5b801515811461214357600080fdfea264697066735822122033b4e5d088dc303ec1073d497932ba4e7bc63d19af8898681ab1ee94caebd81764736f6c6343000802003300000000000000000000000001d0d22b654827113c1a85c30472c3a0f6ca6cd4

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.