FTM Price: $0.42 (-1.84%)
Gas: 15 Gwei

Contract

0x24Dce9214bA5B93B4ee7F1A7A00c9BeB1c8F709C
 

Overview

FTM Balance

Fantom LogoFantom LogoFantom Logo0 FTM

FTM Value

$0.00

Token Holdings

Sponsored

Transaction Hash
Method
Block
From
To
Value
0xc8cc3cd8759959902024-02-20 14:54:588 hrs ago1708440898IN
0x24Dce9...1c8F709C
0 FTM0.0164575228.0056111
0x3b8505a3759959742024-02-20 14:54:368 hrs ago1708440876IN
0x24Dce9...1c8F709C
0 FTM0.0076200539.19741354
0xc8cc3cd8752134512024-02-06 18:10:5714 days 4 hrs ago1707243057IN
0x24Dce9...1c8F709C
0 FTM0.0072860813.38491129
0x3b8505a3752134362024-02-06 18:10:3614 days 4 hrs ago1707243036IN
0x24Dce9...1c8F709C
0 FTM0.0020176713.78274867
0xc8cc3cd8746753062024-01-23 16:10:4828 days 6 hrs ago1706026248IN
0x24Dce9...1c8F709C
0 FTM0.0475914374.8674457
0x3b8505a3746752782024-01-23 16:10:1628 days 6 hrs ago1706026216IN
0x24Dce9...1c8F709C
0 FTM0.0109609574.87452583
0xc8cc3cd8743297072024-01-17 10:09:0834 days 12 hrs ago1705486148IN
0x24Dce9...1c8F709C
0 FTM0.003704919.00711287
0x3b8505a3742893342024-01-16 14:00:2235 days 8 hrs ago1705413622IN
0x24Dce9...1c8F709C
0 FTM0.0035574723.01590016
0xc8cc3cd8739769432024-01-09 15:53:5742 days 7 hrs ago1704815637IN
0x24Dce9...1c8F709C
0 FTM0.0311380855.65082961
0x3b8505a3739756732024-01-09 15:27:5742 days 7 hrs ago1704814077IN
0x24Dce9...1c8F709C
0 FTM0.0085019958.07731673
0xc8cc3cd8734410772023-12-29 13:22:3553 days 9 hrs ago1703856155IN
0x24Dce9...1c8F709C
0 FTM0.0164461794.23119802
0xc8cc3cd8732314662023-12-26 14:59:0956 days 7 hrs ago1703602749IN
0x24Dce9...1c8F709C
0 FTM0.0534603892.36640451
0xc8cc3cd8724740352023-12-13 8:34:0369 days 14 hrs ago1702456443IN
0x24Dce9...1c8F709C
0 FTM0.0347130574.1432531
0x3b8505a3724740272023-12-13 8:33:3169 days 14 hrs ago1702456411IN
0x24Dce9...1c8F709C
0 FTM0.008417157.49741629
0xc8cc3cd8716459722023-11-28 14:17:5084 days 8 hrs ago1701181070IN
0x24Dce9...1c8F709C
0 FTM0.05519201189.51478456
0x3b8505a3716459582023-11-28 14:17:0484 days 8 hrs ago1701181024IN
0x24Dce9...1c8F709C
0 FTM0.05919562244.21745182
0xc8cc3cd8707090512023-11-16 15:21:1796 days 7 hrs ago1700148077IN
0x24Dce9...1c8F709C
0 FTM0.0068904739.47744799
0xc8cc3cd8706231322023-11-14 20:11:3198 days 2 hrs ago1699992691IN
0x24Dce9...1c8F709C
0 FTM0.0130241329.40727815
0xc8cc3cd8700146512023-10-31 15:27:33112 days 7 hrs ago1698766053IN
0x24Dce9...1c8F709C
0 FTM0.0238293761.63417982
0xc8cc3cd8694366712023-10-17 17:37:54126 days 5 hrs ago1697564274IN
0x24Dce9...1c8F709C
0 FTM0.0125336728.29988314
0xc8cc3cd8689366682023-10-03 13:29:05140 days 9 hrs ago1696339745IN
0x24Dce9...1c8F709C
0 FTM0.14774798356.22267236
0xc8cc3cd8683458932023-09-19 15:38:16154 days 7 hrs ago1695137896IN
0x24Dce9...1c8F709C
0 FTM0.011584824
0xc8cc3cd8681418742023-09-13 10:57:25160 days 11 hrs ago1694602645IN
0x24Dce9...1c8F709C
0 FTM0.09983727599.3748894
0xc8cc3cd8678756272023-09-05 16:23:09168 days 6 hrs ago1693930989IN
0x24Dce9...1c8F709C
0 FTM0.30222298615.64956484
0xc8cc3cd8672927052023-08-22 12:21:38182 days 10 hrs ago1692706898IN
0x24Dce9...1c8F709C
0 FTM0.0195556153.32834745
View all transactions

Latest 1 internal transaction

Parent Txn Hash Block From To Value
296941102022-02-01 15:27:15749 days 7 hrs ago1643729235  Contract Creation0 FTM
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MasterChefOperator

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 13 : MasterChefOperator.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "./Timelock.sol";
import "../interfaces/IRewarder.sol";

contract MasterChefOperator is AccessControl {
    using EnumerableSet for EnumerableSet.UintSet;

    bytes32 public constant STAGE_ROLE = keccak256("STAGING");
    bytes32 public constant COMMIT_ROLE = keccak256("COMMITTING");

    struct FarmModification {
        uint256 pid;
        uint256 allocationPoints;
        IRewarder rewarder;
        bool overwriteRewarder;
    }

    struct FarmAddition {
        IERC20 lpToken;
        uint256 allocationPoints;
        IRewarder rewarder;
    }

    enum TransactionType {
        QUEUE,
        EXECUTE
    }

    // mapping eta => changes
    mapping(uint256 => FarmAddition[]) public farmAdditions;
    mapping(uint256 => FarmModification[]) public farmModifications;

    // eta's which have already been used
    mapping(uint256 => bool) public usedFarmChangeEtas;

    EnumerableSet.UintSet private _queuedFarmChangeEtas;

    Timelock public immutable timelock;
    address public immutable masterChef;

    constructor(
        Timelock _timelock,
        address _masterChef,
        address admin,
        address stagingAdmin
    ) {
        timelock = _timelock;
        masterChef = _masterChef;
        _setupRole(DEFAULT_ADMIN_ROLE, admin);
        _setupRole(COMMIT_ROLE, admin);
        _setupRole(STAGE_ROLE, stagingAdmin);
    }

    function acceptTimelockAdmin() external onlyRole(COMMIT_ROLE) {
        timelock.acceptAdmin();
    }

    function commitSetPendingTimelockAdmin(
        address admin,
        uint256 eta,
        TransactionType txType
    ) external onlyRole(COMMIT_ROLE) {
        if (txType == TransactionType.QUEUE) {
            timelock.queueTransaction(
                address(timelock),
                0,
                "setPendingAdmin(address)",
                abi.encode(admin),
                eta
            );
        } else {
            timelock.executeTransaction(
                address(timelock),
                0,
                "setPendingAdmin(address)",
                abi.encode(admin),
                eta
            );
        }
    }

    function commitSetTreasuryAddress(
        address treasury,
        uint256 eta,
        TransactionType txType
    ) external onlyRole(COMMIT_ROLE) {
        if (txType == TransactionType.QUEUE) {
            timelock.queueTransaction(
                masterChef,
                0,
                "treasury(address)",
                abi.encode(treasury),
                eta
            );
        } else {
            timelock.executeTransaction(
                masterChef,
                0,
                "treasury(address)",
                abi.encode(treasury),
                eta
            );
        }
    }

    function commitEmissionChange(
        uint256 beetsPerBlock,
        uint256 eta,
        TransactionType txType
    ) external onlyRole(COMMIT_ROLE) {
        if (txType == TransactionType.QUEUE) {
            timelock.queueTransaction(
                masterChef,
                0,
                "updateEmissionRate(uint256)",
                abi.encode(beetsPerBlock),
                eta
            );
        } else {
            timelock.executeTransaction(
                masterChef,
                0,
                "updateEmissionRate(uint256)",
                abi.encode(beetsPerBlock),
                eta
            );
        }
    }

    function stageFarmAdditions(FarmAddition[] calldata farmsToAdd, uint256 eta)
        external
        updateEtas(eta)
        onlyRole(STAGE_ROLE)
    {
        for (uint256 i = 0; i < farmsToAdd.length; i++) {
            farmAdditions[eta].push(farmsToAdd[i]);
        }
    }

    function stageFarmModifications(
        FarmModification[] calldata farmsToEdit,
        uint256 eta
    ) external updateEtas(eta) onlyRole(STAGE_ROLE) {
        for (uint256 i = 0; i < farmsToEdit.length; i++) {
            farmModifications[eta].push(farmsToEdit[i]);
        }
    }

    function commitFarmChanges(uint256 eta, TransactionType txType)
        external
        onlyRole(COMMIT_ROLE)
    {
        if (txType == TransactionType.QUEUE) {
            queueFarmModifications(eta);
        } else {
            executeFarmModifications(eta);
        }
    }

    function queueFarmModifications(uint256 eta) internal {
        FarmModification[] storage farmEditTxs = farmModifications[eta];
        for (uint256 i = 0; i < farmEditTxs.length; i++) {
            timelock.queueTransaction(
                masterChef,
                0,
                "set(uint256,uint256,address,bool)",
                abi.encode(
                    farmEditTxs[i].pid,
                    farmEditTxs[i].allocationPoints,
                    farmEditTxs[i].rewarder,
                    farmEditTxs[i].overwriteRewarder
                ),
                eta
            );
        }
        FarmAddition[] storage farmAddTxs = farmAdditions[eta];
        for (uint256 i = 0; i < farmAddTxs.length; i++) {
            timelock.queueTransaction(
                masterChef,
                0,
                "add(uint256,address,address)",
                abi.encode(
                    farmAddTxs[i].allocationPoints,
                    farmAddTxs[i].lpToken,
                    farmAddTxs[i].rewarder
                ),
                eta
            );
        }

        usedFarmChangeEtas[eta] = true;
    }

    function executeFarmModifications(uint256 eta) internal {
        FarmModification[] storage farmEditTxs = farmModifications[eta];
        for (uint256 i = 0; i < farmEditTxs.length; i++) {
            timelock.executeTransaction(
                masterChef,
                0,
                "set(uint256,uint256,address,bool)",
                abi.encode(
                    farmEditTxs[i].pid,
                    farmEditTxs[i].allocationPoints,
                    farmEditTxs[i].rewarder,
                    farmEditTxs[i].overwriteRewarder
                ),
                eta
            );
        }

        FarmAddition[] storage farmAddTxs = farmAdditions[eta];
        for (uint256 i = 0; i < farmAddTxs.length; i++) {
            timelock.executeTransaction(
                masterChef,
                0,
                "add(uint256,address,address)",
                abi.encode(
                    farmAddTxs[i].allocationPoints,
                    farmAddTxs[i].lpToken,
                    farmAddTxs[i].rewarder
                ),
                eta
            );
        }
    }

    function queuedFarmChangeEtas() external view returns (uint256[] memory) {
        return _queuedFarmChangeEtas.values();
    }

    function farmAdditionsForEta(uint256 eta)
        external
        view
        returns (FarmAddition[] memory)
    {
        return farmAdditions[eta];
    }

    function farmModificationsForEta(uint256 eta)
        external
        view
        returns (FarmModification[] memory)
    {
        return farmModifications[eta];
    }


    function queueTransaction(
        address target,
        uint256 value,
        string memory signature,
        bytes memory data,
        uint256 eta
    ) public onlyRole(COMMIT_ROLE) returns (bytes32) {
        return timelock.queueTransaction(target, value, signature, data, eta);
    }

    function cancelTransaction(
        address target,
        uint256 value,
        string memory signature,
        bytes memory data,
        uint256 eta
    ) public onlyRole(COMMIT_ROLE) {
        return timelock.cancelTransaction(target, value, signature, data, eta);
    }

    function executeTransaction(
        address target,
        uint256 value,
        string memory signature,
        bytes memory data,
        uint256 eta
    ) public payable onlyRole(COMMIT_ROLE) returns (bytes memory) {
        return timelock.executeTransaction(target, value, signature, data, eta);
    }

    modifier updateEtas(uint256 eta) {
        require(!usedFarmChangeEtas[eta], "ETA already used, chose other eta");
        _queuedFarmChangeEtas.add(eta);
        _;
    }
}

File 2 of 13 : 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 3 of 13 : 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 4 of 13 : Timelock.sol
// SPDX-License-Identifier: MIT

// COPIED FROM https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/GovernorAlpha.sol
// Copyright 2020 Compound Labs, Inc.
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Ctrl+f for XXX to see all the modifications.

// XXX: pragma solidity ^0.5.16;
pragma solidity 0.8.7;

contract Timelock {
    event NewAdmin(address indexed newAdmin);
    event NewPendingAdmin(address indexed newPendingAdmin);
    event NewDelay(uint256 indexed newDelay);
    event CancelTransaction(
        bytes32 indexed txHash,
        address indexed target,
        uint256 value,
        string signature,
        bytes data,
        uint256 eta
    );
    event ExecuteTransaction(
        bytes32 indexed txHash,
        address indexed target,
        uint256 value,
        string signature,
        bytes data,
        uint256 eta
    );
    event QueueTransaction(
        bytes32 indexed txHash,
        address indexed target,
        uint256 value,
        string signature,
        bytes data,
        uint256 eta
    );

    uint256 public constant GRACE_PERIOD = 14 days;
    uint256 public constant MINIMUM_DELAY = 5 minutes;
    uint256 public constant MAXIMUM_DELAY = 30 days;

    address public admin;
    address public pendingAdmin;
    uint256 public delay;
    bool public admin_initialized;

    mapping(bytes32 => bool) public queuedTransactions;

    constructor(address admin_, uint256 delay_) {
        require(
            delay_ >= MINIMUM_DELAY,
            "Timelock::constructor: Delay must exceed minimum delay."
        );
        require(
            delay_ <= MAXIMUM_DELAY,
            "Timelock::constructor: Delay must not exceed maximum delay."
        );

        admin = admin_;
        delay = delay_;
        admin_initialized = false;
    }

    // XXX: function() external payable { }
    receive() external payable {}

    function setDelay(uint256 delay_) public {
        require(
            msg.sender == address(this),
            "Timelock::setDelay: Call must come from Timelock."
        );
        require(
            delay_ >= MINIMUM_DELAY,
            "Timelock::setDelay: Delay must exceed minimum delay."
        );
        require(
            delay_ <= MAXIMUM_DELAY,
            "Timelock::setDelay: Delay must not exceed maximum delay."
        );
        delay = delay_;

        emit NewDelay(delay);
    }

    function acceptAdmin() public {
        require(
            msg.sender == pendingAdmin,
            "Timelock::acceptAdmin: Call must come from pendingAdmin."
        );
        admin = msg.sender;
        pendingAdmin = address(0);

        emit NewAdmin(admin);
    }

    function setPendingAdmin(address pendingAdmin_) public {
        // allows one time setting of admin for deployment purposes
        if (admin_initialized) {
            require(
                msg.sender == address(this),
                "Timelock::setPendingAdmin: Call must come from Timelock."
            );
        } else {
            require(
                msg.sender == admin,
                "Timelock::setPendingAdmin: First call must come from admin."
            );
            admin_initialized = true;
        }
        pendingAdmin = pendingAdmin_;

        emit NewPendingAdmin(pendingAdmin);
    }

    function queueTransaction(
        address target,
        uint256 value,
        string memory signature,
        bytes memory data,
        uint256 eta
    ) public returns (bytes32) {
        require(
            msg.sender == admin,
            "Timelock::queueTransaction: Call must come from admin."
        );
        require(
            eta >= getBlockTimestamp() + delay,
            "Timelock::queueTransaction: Estimated execution block must satisfy delay."
        );

        bytes32 txHash = keccak256(
            abi.encode(target, value, signature, data, eta)
        );
        queuedTransactions[txHash] = true;

        emit QueueTransaction(txHash, target, value, signature, data, eta);
        return txHash;
    }

    function cancelTransaction(
        address target,
        uint256 value,
        string memory signature,
        bytes memory data,
        uint256 eta
    ) public {
        require(
            msg.sender == admin,
            "Timelock::cancelTransaction: Call must come from admin."
        );

        bytes32 txHash = keccak256(
            abi.encode(target, value, signature, data, eta)
        );
        queuedTransactions[txHash] = false;

        emit CancelTransaction(txHash, target, value, signature, data, eta);
    }

    function executeTransaction(
        address target,
        uint256 value,
        string memory signature,
        bytes memory data,
        uint256 eta
    ) public payable returns (bytes memory) {
        require(
            msg.sender == admin,
            "Timelock::executeTransaction: Call must come from admin."
        );

        bytes32 txHash = keccak256(
            abi.encode(target, value, signature, data, eta)
        );
        require(
            queuedTransactions[txHash],
            "Timelock::executeTransaction: Transaction hasn't been queued."
        );
        require(
            getBlockTimestamp() >= eta,
            "Timelock::executeTransaction: Transaction hasn't surpassed time lock."
        );
        require(
            getBlockTimestamp() <= eta + GRACE_PERIOD,
            "Timelock::executeTransaction: Transaction is stale."
        );

        queuedTransactions[txHash] = false;

        bytes memory callData;

        if (bytes(signature).length == 0) {
            callData = data;
        } else {
            callData = abi.encodePacked(
                bytes4(keccak256(bytes(signature))),
                data
            );
        }

        // solium-disable-next-line security/no-call-value
        (bool success, bytes memory returnData) = target.call{value: value}(
            callData
        );
        require(
            success,
            "Timelock::executeTransaction: Transaction execution reverted."
        );

        emit ExecuteTransaction(txHash, target, value, signature, data, eta);

        return returnData;
    }

    function getBlockTimestamp() internal view returns (uint256) {
        // solium-disable-next-line security/no-block-members
        return block.timestamp;
    }
}

File 5 of 13 : IRewarder.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.7;

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

interface IRewarder {
    function onBeetsReward(
        uint256 pid,
        address user,
        address recipient,
        uint256 beetsAmount,
        uint256 newLpAmount
    ) external;

    function pendingTokens(
        uint256 pid,
        address user,
        uint256 beetsAmount
    ) external view returns (IERC20[] memory, uint256[] memory);
}

File 6 of 13 : 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 7 of 13 : 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 8 of 13 : 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 9 of 13 : 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 10 of 13 : 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 11 of 13 : 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 12 of 13 : 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 13 of 13 : 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);
}

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":"contract Timelock","name":"_timelock","type":"address"},{"internalType":"address","name":"_masterChef","type":"address"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"address","name":"stagingAdmin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"COMMIT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAGE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptTimelockAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"string","name":"signature","type":"string"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"eta","type":"uint256"}],"name":"cancelTransaction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"beetsPerBlock","type":"uint256"},{"internalType":"uint256","name":"eta","type":"uint256"},{"internalType":"enum MasterChefOperator.TransactionType","name":"txType","type":"uint8"}],"name":"commitEmissionChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"eta","type":"uint256"},{"internalType":"enum MasterChefOperator.TransactionType","name":"txType","type":"uint8"}],"name":"commitFarmChanges","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"uint256","name":"eta","type":"uint256"},{"internalType":"enum MasterChefOperator.TransactionType","name":"txType","type":"uint8"}],"name":"commitSetPendingTimelockAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"treasury","type":"address"},{"internalType":"uint256","name":"eta","type":"uint256"},{"internalType":"enum MasterChefOperator.TransactionType","name":"txType","type":"uint8"}],"name":"commitSetTreasuryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"string","name":"signature","type":"string"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"eta","type":"uint256"}],"name":"executeTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"farmAdditions","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocationPoints","type":"uint256"},{"internalType":"contract IRewarder","name":"rewarder","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"eta","type":"uint256"}],"name":"farmAdditionsForEta","outputs":[{"components":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocationPoints","type":"uint256"},{"internalType":"contract IRewarder","name":"rewarder","type":"address"}],"internalType":"struct MasterChefOperator.FarmAddition[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"farmModifications","outputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"allocationPoints","type":"uint256"},{"internalType":"contract IRewarder","name":"rewarder","type":"address"},{"internalType":"bool","name":"overwriteRewarder","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"eta","type":"uint256"}],"name":"farmModificationsForEta","outputs":[{"components":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"allocationPoints","type":"uint256"},{"internalType":"contract IRewarder","name":"rewarder","type":"address"},{"internalType":"bool","name":"overwriteRewarder","type":"bool"}],"internalType":"struct MasterChefOperator.FarmModification[]","name":"","type":"tuple[]"}],"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":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterChef","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"string","name":"signature","type":"string"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"eta","type":"uint256"}],"name":"queueTransaction","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"queuedFarmChangeEtas","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocationPoints","type":"uint256"},{"internalType":"contract IRewarder","name":"rewarder","type":"address"}],"internalType":"struct MasterChefOperator.FarmAddition[]","name":"farmsToAdd","type":"tuple[]"},{"internalType":"uint256","name":"eta","type":"uint256"}],"name":"stageFarmAdditions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"allocationPoints","type":"uint256"},{"internalType":"contract IRewarder","name":"rewarder","type":"address"},{"internalType":"bool","name":"overwriteRewarder","type":"bool"}],"internalType":"struct MasterChefOperator.FarmModification[]","name":"farmsToEdit","type":"tuple[]"},{"internalType":"uint256","name":"eta","type":"uint256"}],"name":"stageFarmModifications","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timelock","outputs":[{"internalType":"contract Timelock","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"usedFarmChangeEtas","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60c06040523480156200001157600080fd5b5060405162002a0e38038062002a0e83398101604081905262000034916200016d565b6001600160601b0319606085811b821660805284901b1660a0526200005b600083620000bd565b620000877fe45b434bcfde811526e7334d79c75e8125145dc4bd8aaa77fc5136da39bcc1cc83620000bd565b620000b37fcf3de51d0ce58d8a600927b020b8dc8548f0bc17d5c26d3c9d584f3901a4e04c82620000bd565b50505050620001ee565b620000c98282620000cd565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000c9576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001293390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600080600080608085870312156200018457600080fd5b84516200019181620001d5565b6020860151909450620001a481620001d5565b6040860151909350620001b781620001d5565b6060860151909250620001ca81620001d5565b939692955090935050565b6001600160a01b0381168114620001eb57600080fd5b50565b60805160601c60a05160601c61275a620002b46000396000818161037801528181610bd501528181610cbf01528181610f2501528181610fb9015281816113e9015281816115ac0152818161177a015261194101526000818161053b015281816106450152818161086b01528181610a9501528181610bac01528181610c9601528181610dca01528181610e3c01528181610ef601528181610f8a01528181611178015281816113ba0152818161157d0152818161174b0152611912015261275a6000f3fe60806040526004361061019c5760003560e01c80635ffc71b8116100ec578063ab6989571161008a578063d33219b411610064578063d33219b414610529578063d547741f1461055d578063eeaba75d1461057d578063fde9b2261461059257600080fd5b8063ab698957146104b9578063c8cc3cd8146104d9578063cae5984b146104f957600080fd5b80638a1d28f1116100c65780638a1d28f11461044457806391d14854146104645780639c2826ef14610484578063a217fddf146104a457600080fd5b80635ffc71b8146103d25780636f3e6f341461040257806374d510f71461042257600080fd5b806336568abe1161015957806341065e0e1161013357806341065e0e14610317578063441e7d5814610344578063575a86b214610366578063591fcdfe146103b257600080fd5b806336568abe146102b75780633a66f901146102d75780633b8505a3146102f757600080fd5b806301ffc9a7146101a15780630825f38f146101d6578063248a9ca3146101f657806325e06309146102345780632f2ff15d1461026857806333c9ef9f1461028a575b600080fd5b3480156101ad57600080fd5b506101c16101bc366004611f77565b6105dc565b60405190151581526020015b60405180910390f35b6101e96101e4366004611d82565b610613565b6040516101cd9190612474565b34801561020257600080fd5b50610226610211366004611f15565b60009081526020819052604090206001015490565b6040519081526020016101cd565b34801561024057600080fd5b506102267fcf3de51d0ce58d8a600927b020b8dc8548f0bc17d5c26d3c9d584f3901a4e04c81565b34801561027457600080fd5b50610288610283366004611f47565b6106e3565b005b34801561029657600080fd5b506102aa6102a5366004611f15565b61070e565b6040516101cd91906123ce565b3480156102c357600080fd5b506102886102d2366004611f47565b6107b6565b3480156102e357600080fd5b506102266102f2366004611d82565b610839565b34801561030357600080fd5b50610288610312366004611e35565b6108fa565b34801561032357600080fd5b50610337610332366004611f15565b6109d8565b6040516101cd9190612368565b34801561035057600080fd5b5061022660008051602061270583398151915281565b34801561037257600080fd5b5061039a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101cd565b3480156103be57600080fd5b506102886103cd366004611d82565b610a65565b3480156103de57600080fd5b506103f26103ed366004612044565b610b0c565b6040516101cd94939291906124c8565b34801561040e57600080fd5b5061028861041d366004611d44565b610b63565b34801561042e57600080fd5b50610437610d70565b6040516101cd9190612430565b34801561045057600080fd5b5061028861045f366004611d44565b610d81565b34801561047057600080fd5b506101c161047f366004611f47565b610e98565b34801561049057600080fd5b5061028861049f366004612066565b610ec1565b3480156104b057600080fd5b50610226600081565b3480156104c557600080fd5b506102886104d4366004612018565b61101c565b3480156104e557600080fd5b506102886104f4366004611eb0565b611061565b34801561050557600080fd5b506101c1610514366004611f15565b60036020526000908152604090205460ff1681565b34801561053557600080fd5b5061039a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561056957600080fd5b50610288610578366004611f47565b611137565b34801561058957600080fd5b5061028861115d565b34801561059e57600080fd5b506105b26105ad366004612044565b6111e5565b604080516001600160a01b03948516815260208101939093529216918101919091526060016101cd565b60006001600160e01b03198216637965db0b60e01b148061060d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060008051602061270583398151915261062e8133611232565b604051630825f38f60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690630825f38f90610682908a908a908a908a908a9060040161231c565b600060405180830381600087803b15801561069c57600080fd5b505af11580156106b0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106d89190810190611fa1565b979650505050505050565b6000828152602081905260409020600101546106ff8133611232565b6107098383611296565b505050565b606060026000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156107ab576000848152602090819020604080516080810182526003860290920180548352600180820154848601526002909101546001600160a01b03811692840192909252600160a01b90910460ff16151560608301529083529092019101610743565b505050509050919050565b6001600160a01b038116331461082b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610835828261131a565b5050565b60006000805160206127058339815191526108548133611232565b604051633a66f90160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633a66f901906108a8908a908a908a908a908a9060040161231c565b602060405180830381600087803b1580156108c257600080fd5b505af11580156108d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d89190611f2e565b600081815260036020526040902054819060ff161561092b5760405162461bcd60e51b815260040161082290612487565b61093660048261137f565b507fcf3de51d0ce58d8a600927b020b8dc8548f0bc17d5c26d3c9d584f3901a4e04c6109628133611232565b60005b848110156109d057600084815260016020526040902086868381811061098d5761098d612608565b8354600181018555600094855260209094206060909102929092019260030290910190506109bb8282612654565b505080806109c8906125c1565b915050610965565b505050505050565b606060016000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156107ab576000848152602090819020604080516060810182526003860290920180546001600160a01b0390811684526001808301548587015260029092015416918301919091529083529092019101610a0d565b600080516020612705833981519152610a7e8133611232565b604051632c8fe6ff60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063591fcdfe90610ad2908990899089908990899060040161231c565b600060405180830381600087803b158015610aec57600080fd5b505af1158015610b00573d6000803e3d6000fd5b50505050505050505050565b60026020528160005260406000208181548110610b2857600080fd5b60009182526020909120600390910201805460018201546002909201549093509091506001600160a01b03811690600160a01b900460ff1684565b600080516020612705833981519152610b7c8133611232565b6000826001811115610b9057610b906125f2565b1415610c8057604080516001600160a01b0386811660208301527f00000000000000000000000000000000000000000000000000000000000000001691633a66f901917f00000000000000000000000000000000000000000000000000000000000000009160009101604051602081830303815290604052876040518563ffffffff1660e01b8152600401610c28949392919061219f565b602060405180830381600087803b158015610c4257600080fd5b505af1158015610c56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7a9190611f2e565b50610d6a565b604080516001600160a01b0386811660208301527f00000000000000000000000000000000000000000000000000000000000000001691630825f38f917f00000000000000000000000000000000000000000000000000000000000000009160009101604051602081830303815290604052876040518563ffffffff1660e01b8152600401610d12949392919061219f565b600060405180830381600087803b158015610d2c57600080fd5b505af1158015610d40573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d689190810190611fa1565b505b50505050565b6060610d7c6004611392565b905090565b600080516020612705833981519152610d9a8133611232565b6000826001811115610dae57610dae6125f2565b1415610e2657604080516001600160a01b0386811660208301527f000000000000000000000000000000000000000000000000000000000000000090811692633a66f9019260009101604051602081830303815290604052876040518563ffffffff1660e01b8152600401610c2894939291906121ee565b604080516001600160a01b0386811660208301527f000000000000000000000000000000000000000000000000000000000000000090811692630825f38f9260009101604051602081830303815290604052876040518563ffffffff1660e01b8152600401610d1294939291906121ee565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020612705833981519152610eda8133611232565b6000826001811115610eee57610eee6125f2565b1415610f88577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633a66f9017f0000000000000000000000000000000000000000000000000000000000000000600087604051602001610f5991815260200190565b604051602081830303815290604052876040518563ffffffff1660e01b8152600401610c289493929190612133565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630825f38f7f0000000000000000000000000000000000000000000000000000000000000000600087604051602001610fed91815260200190565b604051602081830303815290604052876040518563ffffffff1660e01b8152600401610d129493929190612133565b6000805160206127058339815191526110358133611232565b6000826001811115611049576110496125f2565b1415611058576107098361139f565b61070983611730565b600081815260036020526040902054819060ff16156110925760405162461bcd60e51b815260040161082290612487565b61109d60048261137f565b507fcf3de51d0ce58d8a600927b020b8dc8548f0bc17d5c26d3c9d584f3901a4e04c6110c98133611232565b60005b848110156109d05760008481526002602052604090208686838181106110f4576110f4612608565b835460018101855560009485526020909420608090910292909201926003029091019050611122828261268f565b5050808061112f906125c1565b9150506110cc565b6000828152602081905260409020600101546111538133611232565b610709838361131a565b6000805160206127058339815191526111768133611232565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630e18b6816040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156111d157600080fd5b505af1158015610d68573d6000803e3d6000fd5b6001602052816000526040600020818154811061120157600080fd5b60009182526020909120600390910201805460018201546002909201546001600160a01b0391821694509192501683565b61123c8282610e98565b61083557611254816001600160a01b03166014611aab565b61125f836020611aab565b6040516020016112709291906120be565b60408051601f198184030181529082905262461bcd60e51b825261082291600401612474565b6112a08282610e98565b610835576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556112d63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6113248282610e98565b15610835576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061138b8383611c47565b9392505050565b6060600061138b83611c96565b6000818152600260205260408120905b8154811015611561577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633a66f9017f0000000000000000000000000000000000000000000000000000000000000000600085858154811061141c5761141c612608565b90600052602060002090600302016000015486868154811061144057611440612608565b90600052602060002090600302016001015487878154811061146457611464612608565b906000526020600020906003020160020160009054906101000a90046001600160a01b031688888154811061149b5761149b612608565b906000526020600020906003020160020160149054906101000a900460ff166040516020016114cd94939291906124c8565b604051602081830303815290604052876040518563ffffffff1660e01b81526004016114fc9493929190612249565b602060405180830381600087803b15801561151657600080fd5b505af115801561152a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154e9190611f2e565b5080611559816125c1565b9150506113af565b506000828152600160205260408120905b8154811015611712577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633a66f9017f000000000000000000000000000000000000000000000000000000000000000060008585815481106115df576115df612608565b90600052602060002090600302016001015486868154811061160357611603612608565b600091825260209091206003909102015487546001600160a01b039091169088908890811061163457611634612608565b60009182526020918290206002600390920201015460405161167e9493926001600160a01b0390921691019283526001600160a01b03918216602084015216604082015260600190565b604051602081830303815290604052886040518563ffffffff1660e01b81526004016116ad94939291906122c1565b602060405180830381600087803b1580156116c757600080fd5b505af11580156116db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ff9190611f2e565b508061170a816125c1565b915050611572565b5050506000908152600360205260409020805460ff19166001179055565b6000818152600260205260408120905b81548110156118f6577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630825f38f7f000000000000000000000000000000000000000000000000000000000000000060008585815481106117ad576117ad612608565b9060005260206000209060030201600001548686815481106117d1576117d1612608565b9060005260206000209060030201600101548787815481106117f5576117f5612608565b906000526020600020906003020160020160009054906101000a90046001600160a01b031688888154811061182c5761182c612608565b906000526020600020906003020160020160149054906101000a900460ff1660405160200161185e94939291906124c8565b604051602081830303815290604052876040518563ffffffff1660e01b815260040161188d9493929190612249565b600060405180830381600087803b1580156118a757600080fd5b505af11580156118bb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118e39190810190611fa1565b50806118ee816125c1565b915050611740565b506000828152600160205260408120905b8154811015610d6a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630825f38f7f0000000000000000000000000000000000000000000000000000000000000000600085858154811061197457611974612608565b90600052602060002090600302016001015486868154811061199857611998612608565b600091825260209091206003909102015487546001600160a01b03909116908890889081106119c9576119c9612608565b600091825260209182902060026003909202010154604051611a139493926001600160a01b0390921691019283526001600160a01b03918216602084015216604082015260600190565b604051602081830303815290604052886040518563ffffffff1660e01b8152600401611a4294939291906122c1565b600060405180830381600087803b158015611a5c57600080fd5b505af1158015611a70573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611a989190810190611fa1565b5080611aa3816125c1565b915050611907565b60606000611aba83600261255f565b611ac5906002612547565b67ffffffffffffffff811115611add57611add61261e565b6040519080825280601f01601f191660200182016040528015611b07576020820181803683370190505b509050600360fc1b81600081518110611b2257611b22612608565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611b5157611b51612608565b60200101906001600160f81b031916908160001a9053506000611b7584600261255f565b611b80906001612547565b90505b6001811115611bf8576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611bb457611bb4612608565b1a60f81b828281518110611bca57611bca612608565b60200101906001600160f81b031916908160001a90535060049490941c93611bf1816125aa565b9050611b83565b50831561138b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610822565b6000818152600183016020526040812054611c8e5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561060d565b50600061060d565b606081600001805480602002602001604051908101604052809291908181526020018280548015611ce657602002820191906000526020600020905b815481526020019060010190808311611cd2575b50505050509050919050565b6000611d05611d008461251f565b6124ee565b9050828152838383011115611d1957600080fd5b828260208301376000602084830101529392505050565b803560028110611d3f57600080fd5b919050565b600080600060608486031215611d5957600080fd5b8335611d64816126ec565b925060208401359150611d7960408501611d30565b90509250925092565b600080600080600060a08688031215611d9a57600080fd5b8535611da5816126ec565b945060208601359350604086013567ffffffffffffffff80821115611dc957600080fd5b818801915088601f830112611ddd57600080fd5b611dec89833560208501611cf2565b94506060880135915080821115611e0257600080fd5b508601601f81018813611e1457600080fd5b611e2388823560208401611cf2565b95989497509295608001359392505050565b600080600060408486031215611e4a57600080fd5b833567ffffffffffffffff80821115611e6257600080fd5b818601915086601f830112611e7657600080fd5b813581811115611e8557600080fd5b876020606083028501011115611e9a57600080fd5b6020928301989097509590910135949350505050565b600080600060408486031215611ec557600080fd5b833567ffffffffffffffff80821115611edd57600080fd5b818601915086601f830112611ef157600080fd5b813581811115611f0057600080fd5b8760208260071b8501011115611e9a57600080fd5b600060208284031215611f2757600080fd5b5035919050565b600060208284031215611f4057600080fd5b5051919050565b60008060408385031215611f5a57600080fd5b823591506020830135611f6c816126ec565b809150509250929050565b600060208284031215611f8957600080fd5b81356001600160e01b03198116811461138b57600080fd5b600060208284031215611fb357600080fd5b815167ffffffffffffffff811115611fca57600080fd5b8201601f81018413611fdb57600080fd5b8051611fe9611d008261251f565b818152856020838501011115611ffe57600080fd5b61200f82602083016020860161257e565b95945050505050565b6000806040838503121561202b57600080fd5b8235915061203b60208401611d30565b90509250929050565b6000806040838503121561205757600080fd5b50508035926020909101359150565b60008060006060848603121561207b57600080fd5b8335925060208401359150611d7960408501611d30565b600081518084526120aa81602086016020860161257e565b601f01601f19169290920160200192915050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516120f681601785016020880161257e565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161212781602884016020880161257e565b01602801949350505050565b60018060a01b038516815283602082015260a06040820152601b60a08201527f757064617465456d697373696f6e526174652875696e7432353629000000000060c082015260e06060820152600061218e60e0830185612092565b905082608083015295945050505050565b60018060a01b038516815283602082015260a06040820152601160a082015270747265617375727928616464726573732960781b60c082015260e06060820152600061218e60e0830185612092565b60018060a01b038516815283602082015260a06040820152601860a08201527f73657450656e64696e6741646d696e286164647265737329000000000000000060c082015260e06060820152600061218e60e0830185612092565b60018060a01b038516815283602082015260a06040820152602160a08201527f7365742875696e743235362c75696e743235362c616464726573732c626f6f6c60c0820152602960f81b60e082015260006101008060608401526122af81840186612092565b91505082608083015295945050505050565b60018060a01b038516815283602082015260a06040820152601c60a08201527f6164642875696e743235362c616464726573732c61646472657373290000000060c082015260e06060820152600061218e60e0830185612092565b60018060a01b038616815284602082015260a06040820152600061234360a0830186612092565b82810360608401526123558186612092565b9150508260808301529695505050505050565b602080825282518282018190526000919060409081850190868401855b828110156123c157815180516001600160a01b039081168652878201518887015290860151168585015260609093019290850190600101612385565b5091979650505050505050565b602080825282518282018190526000919060409081850190868401855b828110156123c1578151805185528681015187860152858101516001600160a01b031686860152606090810151151590850152608090930192908501906001016123eb565b6020808252825182820181905260009190848201906040850190845b818110156124685783518352928401929184019160010161244c565b50909695505050505050565b60208152600061138b6020830184612092565b60208082526021908201527f45544120616c726561647920757365642c2063686f7365206f746865722065746040820152606160f81b606082015260800190565b93845260208401929092526001600160a01b031660408301521515606082015260800190565b604051601f8201601f1916810167ffffffffffffffff811182821017156125175761251761261e565b604052919050565b600067ffffffffffffffff8211156125395761253961261e565b50601f01601f191660200190565b6000821982111561255a5761255a6125dc565b500190565b6000816000190483118215151615612579576125796125dc565b500290565b60005b83811015612599578181015183820152602001612581565b83811115610d6a5750506000910152565b6000816125b9576125b96125dc565b506000190190565b60006000198214156125d5576125d56125dc565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80546001600160a01b0319166001600160a01b0392909216919091179055565b813561265f816126ec565b6126698183612634565b50602082013560018201556040820135612682816126ec565b6107098160028401612634565b81358155602082013560018201556002810160408301356126af816126ec565b6126b98183612634565b5060608301358015158082146126ce57600080fd5b825460ff60a01b191660a09190911b60ff60a01b1617909155505050565b6001600160a01b038116811461270157600080fd5b5056fee45b434bcfde811526e7334d79c75e8125145dc4bd8aaa77fc5136da39bcc1cca2646970667358221220010fec53633f6359396c061df224b1612b455feea106a05ab76cdb55c4450c1c64736f6c63430008070033000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c64710000000000000000000000008166994d9ebbe5829ec86bd81258149b87facfd30000000000000000000000003fa5c411857455e0e876412010be600f4658dddd000000000000000000000000fd5a3ec3e69ff2b44b6f1fbc168ba2147e241d24

Deployed Bytecode

0x60806040526004361061019c5760003560e01c80635ffc71b8116100ec578063ab6989571161008a578063d33219b411610064578063d33219b414610529578063d547741f1461055d578063eeaba75d1461057d578063fde9b2261461059257600080fd5b8063ab698957146104b9578063c8cc3cd8146104d9578063cae5984b146104f957600080fd5b80638a1d28f1116100c65780638a1d28f11461044457806391d14854146104645780639c2826ef14610484578063a217fddf146104a457600080fd5b80635ffc71b8146103d25780636f3e6f341461040257806374d510f71461042257600080fd5b806336568abe1161015957806341065e0e1161013357806341065e0e14610317578063441e7d5814610344578063575a86b214610366578063591fcdfe146103b257600080fd5b806336568abe146102b75780633a66f901146102d75780633b8505a3146102f757600080fd5b806301ffc9a7146101a15780630825f38f146101d6578063248a9ca3146101f657806325e06309146102345780632f2ff15d1461026857806333c9ef9f1461028a575b600080fd5b3480156101ad57600080fd5b506101c16101bc366004611f77565b6105dc565b60405190151581526020015b60405180910390f35b6101e96101e4366004611d82565b610613565b6040516101cd9190612474565b34801561020257600080fd5b50610226610211366004611f15565b60009081526020819052604090206001015490565b6040519081526020016101cd565b34801561024057600080fd5b506102267fcf3de51d0ce58d8a600927b020b8dc8548f0bc17d5c26d3c9d584f3901a4e04c81565b34801561027457600080fd5b50610288610283366004611f47565b6106e3565b005b34801561029657600080fd5b506102aa6102a5366004611f15565b61070e565b6040516101cd91906123ce565b3480156102c357600080fd5b506102886102d2366004611f47565b6107b6565b3480156102e357600080fd5b506102266102f2366004611d82565b610839565b34801561030357600080fd5b50610288610312366004611e35565b6108fa565b34801561032357600080fd5b50610337610332366004611f15565b6109d8565b6040516101cd9190612368565b34801561035057600080fd5b5061022660008051602061270583398151915281565b34801561037257600080fd5b5061039a7f0000000000000000000000008166994d9ebbe5829ec86bd81258149b87facfd381565b6040516001600160a01b0390911681526020016101cd565b3480156103be57600080fd5b506102886103cd366004611d82565b610a65565b3480156103de57600080fd5b506103f26103ed366004612044565b610b0c565b6040516101cd94939291906124c8565b34801561040e57600080fd5b5061028861041d366004611d44565b610b63565b34801561042e57600080fd5b50610437610d70565b6040516101cd9190612430565b34801561045057600080fd5b5061028861045f366004611d44565b610d81565b34801561047057600080fd5b506101c161047f366004611f47565b610e98565b34801561049057600080fd5b5061028861049f366004612066565b610ec1565b3480156104b057600080fd5b50610226600081565b3480156104c557600080fd5b506102886104d4366004612018565b61101c565b3480156104e557600080fd5b506102886104f4366004611eb0565b611061565b34801561050557600080fd5b506101c1610514366004611f15565b60036020526000908152604090205460ff1681565b34801561053557600080fd5b5061039a7f000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c647181565b34801561056957600080fd5b50610288610578366004611f47565b611137565b34801561058957600080fd5b5061028861115d565b34801561059e57600080fd5b506105b26105ad366004612044565b6111e5565b604080516001600160a01b03948516815260208101939093529216918101919091526060016101cd565b60006001600160e01b03198216637965db0b60e01b148061060d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060008051602061270583398151915261062e8133611232565b604051630825f38f60e01b81526001600160a01b037f000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c64711690630825f38f90610682908a908a908a908a908a9060040161231c565b600060405180830381600087803b15801561069c57600080fd5b505af11580156106b0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106d89190810190611fa1565b979650505050505050565b6000828152602081905260409020600101546106ff8133611232565b6107098383611296565b505050565b606060026000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156107ab576000848152602090819020604080516080810182526003860290920180548352600180820154848601526002909101546001600160a01b03811692840192909252600160a01b90910460ff16151560608301529083529092019101610743565b505050509050919050565b6001600160a01b038116331461082b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610835828261131a565b5050565b60006000805160206127058339815191526108548133611232565b604051633a66f90160e01b81526001600160a01b037f000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c64711690633a66f901906108a8908a908a908a908a908a9060040161231c565b602060405180830381600087803b1580156108c257600080fd5b505af11580156108d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d89190611f2e565b600081815260036020526040902054819060ff161561092b5760405162461bcd60e51b815260040161082290612487565b61093660048261137f565b507fcf3de51d0ce58d8a600927b020b8dc8548f0bc17d5c26d3c9d584f3901a4e04c6109628133611232565b60005b848110156109d057600084815260016020526040902086868381811061098d5761098d612608565b8354600181018555600094855260209094206060909102929092019260030290910190506109bb8282612654565b505080806109c8906125c1565b915050610965565b505050505050565b606060016000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156107ab576000848152602090819020604080516060810182526003860290920180546001600160a01b0390811684526001808301548587015260029092015416918301919091529083529092019101610a0d565b600080516020612705833981519152610a7e8133611232565b604051632c8fe6ff60e11b81526001600160a01b037f000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c6471169063591fcdfe90610ad2908990899089908990899060040161231c565b600060405180830381600087803b158015610aec57600080fd5b505af1158015610b00573d6000803e3d6000fd5b50505050505050505050565b60026020528160005260406000208181548110610b2857600080fd5b60009182526020909120600390910201805460018201546002909201549093509091506001600160a01b03811690600160a01b900460ff1684565b600080516020612705833981519152610b7c8133611232565b6000826001811115610b9057610b906125f2565b1415610c8057604080516001600160a01b0386811660208301527f000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c64711691633a66f901917f0000000000000000000000008166994d9ebbe5829ec86bd81258149b87facfd39160009101604051602081830303815290604052876040518563ffffffff1660e01b8152600401610c28949392919061219f565b602060405180830381600087803b158015610c4257600080fd5b505af1158015610c56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7a9190611f2e565b50610d6a565b604080516001600160a01b0386811660208301527f000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c64711691630825f38f917f0000000000000000000000008166994d9ebbe5829ec86bd81258149b87facfd39160009101604051602081830303815290604052876040518563ffffffff1660e01b8152600401610d12949392919061219f565b600060405180830381600087803b158015610d2c57600080fd5b505af1158015610d40573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d689190810190611fa1565b505b50505050565b6060610d7c6004611392565b905090565b600080516020612705833981519152610d9a8133611232565b6000826001811115610dae57610dae6125f2565b1415610e2657604080516001600160a01b0386811660208301527f000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c647190811692633a66f9019260009101604051602081830303815290604052876040518563ffffffff1660e01b8152600401610c2894939291906121ee565b604080516001600160a01b0386811660208301527f000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c647190811692630825f38f9260009101604051602081830303815290604052876040518563ffffffff1660e01b8152600401610d1294939291906121ee565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020612705833981519152610eda8133611232565b6000826001811115610eee57610eee6125f2565b1415610f88577f000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c64716001600160a01b0316633a66f9017f0000000000000000000000008166994d9ebbe5829ec86bd81258149b87facfd3600087604051602001610f5991815260200190565b604051602081830303815290604052876040518563ffffffff1660e01b8152600401610c289493929190612133565b7f000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c64716001600160a01b0316630825f38f7f0000000000000000000000008166994d9ebbe5829ec86bd81258149b87facfd3600087604051602001610fed91815260200190565b604051602081830303815290604052876040518563ffffffff1660e01b8152600401610d129493929190612133565b6000805160206127058339815191526110358133611232565b6000826001811115611049576110496125f2565b1415611058576107098361139f565b61070983611730565b600081815260036020526040902054819060ff16156110925760405162461bcd60e51b815260040161082290612487565b61109d60048261137f565b507fcf3de51d0ce58d8a600927b020b8dc8548f0bc17d5c26d3c9d584f3901a4e04c6110c98133611232565b60005b848110156109d05760008481526002602052604090208686838181106110f4576110f4612608565b835460018101855560009485526020909420608090910292909201926003029091019050611122828261268f565b5050808061112f906125c1565b9150506110cc565b6000828152602081905260409020600101546111538133611232565b610709838361131a565b6000805160206127058339815191526111768133611232565b7f000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c64716001600160a01b0316630e18b6816040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156111d157600080fd5b505af1158015610d68573d6000803e3d6000fd5b6001602052816000526040600020818154811061120157600080fd5b60009182526020909120600390910201805460018201546002909201546001600160a01b0391821694509192501683565b61123c8282610e98565b61083557611254816001600160a01b03166014611aab565b61125f836020611aab565b6040516020016112709291906120be565b60408051601f198184030181529082905262461bcd60e51b825261082291600401612474565b6112a08282610e98565b610835576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556112d63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6113248282610e98565b15610835576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061138b8383611c47565b9392505050565b6060600061138b83611c96565b6000818152600260205260408120905b8154811015611561577f000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c64716001600160a01b0316633a66f9017f0000000000000000000000008166994d9ebbe5829ec86bd81258149b87facfd3600085858154811061141c5761141c612608565b90600052602060002090600302016000015486868154811061144057611440612608565b90600052602060002090600302016001015487878154811061146457611464612608565b906000526020600020906003020160020160009054906101000a90046001600160a01b031688888154811061149b5761149b612608565b906000526020600020906003020160020160149054906101000a900460ff166040516020016114cd94939291906124c8565b604051602081830303815290604052876040518563ffffffff1660e01b81526004016114fc9493929190612249565b602060405180830381600087803b15801561151657600080fd5b505af115801561152a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154e9190611f2e565b5080611559816125c1565b9150506113af565b506000828152600160205260408120905b8154811015611712577f000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c64716001600160a01b0316633a66f9017f0000000000000000000000008166994d9ebbe5829ec86bd81258149b87facfd360008585815481106115df576115df612608565b90600052602060002090600302016001015486868154811061160357611603612608565b600091825260209091206003909102015487546001600160a01b039091169088908890811061163457611634612608565b60009182526020918290206002600390920201015460405161167e9493926001600160a01b0390921691019283526001600160a01b03918216602084015216604082015260600190565b604051602081830303815290604052886040518563ffffffff1660e01b81526004016116ad94939291906122c1565b602060405180830381600087803b1580156116c757600080fd5b505af11580156116db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ff9190611f2e565b508061170a816125c1565b915050611572565b5050506000908152600360205260409020805460ff19166001179055565b6000818152600260205260408120905b81548110156118f6577f000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c64716001600160a01b0316630825f38f7f0000000000000000000000008166994d9ebbe5829ec86bd81258149b87facfd360008585815481106117ad576117ad612608565b9060005260206000209060030201600001548686815481106117d1576117d1612608565b9060005260206000209060030201600101548787815481106117f5576117f5612608565b906000526020600020906003020160020160009054906101000a90046001600160a01b031688888154811061182c5761182c612608565b906000526020600020906003020160020160149054906101000a900460ff1660405160200161185e94939291906124c8565b604051602081830303815290604052876040518563ffffffff1660e01b815260040161188d9493929190612249565b600060405180830381600087803b1580156118a757600080fd5b505af11580156118bb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118e39190810190611fa1565b50806118ee816125c1565b915050611740565b506000828152600160205260408120905b8154811015610d6a577f000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c64716001600160a01b0316630825f38f7f0000000000000000000000008166994d9ebbe5829ec86bd81258149b87facfd3600085858154811061197457611974612608565b90600052602060002090600302016001015486868154811061199857611998612608565b600091825260209091206003909102015487546001600160a01b03909116908890889081106119c9576119c9612608565b600091825260209182902060026003909202010154604051611a139493926001600160a01b0390921691019283526001600160a01b03918216602084015216604082015260600190565b604051602081830303815290604052886040518563ffffffff1660e01b8152600401611a4294939291906122c1565b600060405180830381600087803b158015611a5c57600080fd5b505af1158015611a70573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611a989190810190611fa1565b5080611aa3816125c1565b915050611907565b60606000611aba83600261255f565b611ac5906002612547565b67ffffffffffffffff811115611add57611add61261e565b6040519080825280601f01601f191660200182016040528015611b07576020820181803683370190505b509050600360fc1b81600081518110611b2257611b22612608565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611b5157611b51612608565b60200101906001600160f81b031916908160001a9053506000611b7584600261255f565b611b80906001612547565b90505b6001811115611bf8576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611bb457611bb4612608565b1a60f81b828281518110611bca57611bca612608565b60200101906001600160f81b031916908160001a90535060049490941c93611bf1816125aa565b9050611b83565b50831561138b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610822565b6000818152600183016020526040812054611c8e5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561060d565b50600061060d565b606081600001805480602002602001604051908101604052809291908181526020018280548015611ce657602002820191906000526020600020905b815481526020019060010190808311611cd2575b50505050509050919050565b6000611d05611d008461251f565b6124ee565b9050828152838383011115611d1957600080fd5b828260208301376000602084830101529392505050565b803560028110611d3f57600080fd5b919050565b600080600060608486031215611d5957600080fd5b8335611d64816126ec565b925060208401359150611d7960408501611d30565b90509250925092565b600080600080600060a08688031215611d9a57600080fd5b8535611da5816126ec565b945060208601359350604086013567ffffffffffffffff80821115611dc957600080fd5b818801915088601f830112611ddd57600080fd5b611dec89833560208501611cf2565b94506060880135915080821115611e0257600080fd5b508601601f81018813611e1457600080fd5b611e2388823560208401611cf2565b95989497509295608001359392505050565b600080600060408486031215611e4a57600080fd5b833567ffffffffffffffff80821115611e6257600080fd5b818601915086601f830112611e7657600080fd5b813581811115611e8557600080fd5b876020606083028501011115611e9a57600080fd5b6020928301989097509590910135949350505050565b600080600060408486031215611ec557600080fd5b833567ffffffffffffffff80821115611edd57600080fd5b818601915086601f830112611ef157600080fd5b813581811115611f0057600080fd5b8760208260071b8501011115611e9a57600080fd5b600060208284031215611f2757600080fd5b5035919050565b600060208284031215611f4057600080fd5b5051919050565b60008060408385031215611f5a57600080fd5b823591506020830135611f6c816126ec565b809150509250929050565b600060208284031215611f8957600080fd5b81356001600160e01b03198116811461138b57600080fd5b600060208284031215611fb357600080fd5b815167ffffffffffffffff811115611fca57600080fd5b8201601f81018413611fdb57600080fd5b8051611fe9611d008261251f565b818152856020838501011115611ffe57600080fd5b61200f82602083016020860161257e565b95945050505050565b6000806040838503121561202b57600080fd5b8235915061203b60208401611d30565b90509250929050565b6000806040838503121561205757600080fd5b50508035926020909101359150565b60008060006060848603121561207b57600080fd5b8335925060208401359150611d7960408501611d30565b600081518084526120aa81602086016020860161257e565b601f01601f19169290920160200192915050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516120f681601785016020880161257e565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161212781602884016020880161257e565b01602801949350505050565b60018060a01b038516815283602082015260a06040820152601b60a08201527f757064617465456d697373696f6e526174652875696e7432353629000000000060c082015260e06060820152600061218e60e0830185612092565b905082608083015295945050505050565b60018060a01b038516815283602082015260a06040820152601160a082015270747265617375727928616464726573732960781b60c082015260e06060820152600061218e60e0830185612092565b60018060a01b038516815283602082015260a06040820152601860a08201527f73657450656e64696e6741646d696e286164647265737329000000000000000060c082015260e06060820152600061218e60e0830185612092565b60018060a01b038516815283602082015260a06040820152602160a08201527f7365742875696e743235362c75696e743235362c616464726573732c626f6f6c60c0820152602960f81b60e082015260006101008060608401526122af81840186612092565b91505082608083015295945050505050565b60018060a01b038516815283602082015260a06040820152601c60a08201527f6164642875696e743235362c616464726573732c61646472657373290000000060c082015260e06060820152600061218e60e0830185612092565b60018060a01b038616815284602082015260a06040820152600061234360a0830186612092565b82810360608401526123558186612092565b9150508260808301529695505050505050565b602080825282518282018190526000919060409081850190868401855b828110156123c157815180516001600160a01b039081168652878201518887015290860151168585015260609093019290850190600101612385565b5091979650505050505050565b602080825282518282018190526000919060409081850190868401855b828110156123c1578151805185528681015187860152858101516001600160a01b031686860152606090810151151590850152608090930192908501906001016123eb565b6020808252825182820181905260009190848201906040850190845b818110156124685783518352928401929184019160010161244c565b50909695505050505050565b60208152600061138b6020830184612092565b60208082526021908201527f45544120616c726561647920757365642c2063686f7365206f746865722065746040820152606160f81b606082015260800190565b93845260208401929092526001600160a01b031660408301521515606082015260800190565b604051601f8201601f1916810167ffffffffffffffff811182821017156125175761251761261e565b604052919050565b600067ffffffffffffffff8211156125395761253961261e565b50601f01601f191660200190565b6000821982111561255a5761255a6125dc565b500190565b6000816000190483118215151615612579576125796125dc565b500290565b60005b83811015612599578181015183820152602001612581565b83811115610d6a5750506000910152565b6000816125b9576125b96125dc565b506000190190565b60006000198214156125d5576125d56125dc565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80546001600160a01b0319166001600160a01b0392909216919091179055565b813561265f816126ec565b6126698183612634565b50602082013560018201556040820135612682816126ec565b6107098160028401612634565b81358155602082013560018201556002810160408301356126af816126ec565b6126b98183612634565b5060608301358015158082146126ce57600080fd5b825460ff60a01b191660a09190911b60ff60a01b1617909155505050565b6001600160a01b038116811461270157600080fd5b5056fee45b434bcfde811526e7334d79c75e8125145dc4bd8aaa77fc5136da39bcc1cca2646970667358221220010fec53633f6359396c061df224b1612b455feea106a05ab76cdb55c4450c1c64736f6c63430008070033

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

000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c64710000000000000000000000008166994d9ebbe5829ec86bd81258149b87facfd30000000000000000000000003fa5c411857455e0e876412010be600f4658dddd000000000000000000000000fd5a3ec3e69ff2b44b6f1fbc168ba2147e241d24

-----Decoded View---------------
Arg [0] : _timelock (address): 0xB5CaEe3CD5d86c138f879B3abC5B1bebB63c6471
Arg [1] : _masterChef (address): 0x8166994d9ebBe5829EC86Bd81258149B87faCfd3
Arg [2] : admin (address): 0x3Fa5c411857455e0E876412010BE600F4658Dddd
Arg [3] : stagingAdmin (address): 0xfd5A3ec3E69ff2B44B6f1fbC168bA2147e241D24

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000b5caee3cd5d86c138f879b3abc5b1bebb63c6471
Arg [1] : 0000000000000000000000008166994d9ebbe5829ec86bd81258149b87facfd3
Arg [2] : 0000000000000000000000003fa5c411857455e0e876412010be600f4658dddd
Arg [3] : 000000000000000000000000fd5a3ec3e69ff2b44b6f1fbc168ba2147e241d24


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.