Contract 0xb13610b4e7168f664fcef2c6ebc58990ae835ff1 1

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xc7f35b1771e4eae4507e889e7af7cf49cafd5eec45f7705dd8bc74348696a327Claim All633031682023-05-29 22:51:141 hr 33 mins ago0x33e2cc3095eafd4fec5d148b3c1a16ffa8db6ca1 IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM2.050385470221
0xdf0b55fbfdc1ecd70d130e31c0c829eb1eca2784790e1b78ab8d8a13513217a0Claim633031552023-05-29 22:50:341 hr 33 mins ago0x33e2cc3095eafd4fec5d148b3c1a16ffa8db6ca1 IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.110610612624
0x5ca9b998c2ee9b65c4a71af77bb4f7a3ac79b0554ef6692cd185f0eaba05e4deClaim All633030762023-05-29 22:47:211 hr 36 mins ago0x481fe0ffe63260386a3fca2c84d19fd7e0af7bed IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.05985147431
0xa875cdb644ec0dc4106d6e0b6be764119dc5a7abcc25566f9c550638732bd110Claim633030602023-05-29 22:46:301 hr 37 mins ago0x481fe0ffe63260386a3fca2c84d19fd7e0af7bed IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.006473929386
0x0847ecdb9f21a29b7890ab871f9cba9428d2a5ae78cdc7ecfe9441dd087afa37Claim All633030252023-05-29 22:45:161 hr 39 mins ago0x481fe0ffe63260386a3fca2c84d19fd7e0af7bed IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.072363044248
0xaddca2532365107f55612ffa00d327fc7116732896210566f8c93ca750a83da4Claim633029982023-05-29 22:44:171 hr 40 mins ago0x481fe0ffe63260386a3fca2c84d19fd7e0af7bed IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.006473929386
0xc9cea498fe9f9740776a861dd20692ee50b95b921b3528e92cc49750218da134Stake633008312023-05-29 21:20:473 hrs 3 mins ago0x9c7909d2dedc045ee8d0d45e4ce2589103238dde IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.031114273618
0x373ed205053939b41edc522527a349c496f953f05badde25e599ef2a789c57caClaim All633007922023-05-29 21:19:323 hrs 4 mins ago0x0485c4912668538c1e5cc9b25e0e9d97775f83d0 IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.139116873989
0x81219f1345f1d33cf4ef0836e282a086ff5fd4b3030e0ddf5d8bfa346d1819d4Claim633007802023-05-29 21:19:013 hrs 5 mins ago0x9c7909d2dedc045ee8d0d45e4ce2589103238dde IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.006570921679
0x2d96790b49edf28b324cd48d72e59ee37bc043b7c16da409dd3fbed857cb9c4fClaim633007772023-05-29 21:18:543 hrs 5 mins ago0x0485c4912668538c1e5cc9b25e0e9d97775f83d0 IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.120505240384
0x72dc79709af9c32dc1507d01826d6b6d80b4e6aa8ef7bbb1a69d57fe866a8177Claim633007752023-05-29 21:18:503 hrs 5 mins ago0x9c7909d2dedc045ee8d0d45e4ce2589103238dde IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.006678816122
0x45309025c8859f50b38471f714672b86d0f49ee56bee89eaece723fbc16e6862Claim632955162023-05-29 18:16:056 hrs 8 mins ago0x7d13cf5cbbcff7e486fdbad944e07b2986b543e8 IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.129418328578
0x61088be14b5b93012d2a08fa89057b5b7eea2deb75298810a5448c72eef24a19Claim All632943612023-05-29 17:35:596 hrs 48 mins ago0xf950b45478b7106765a3c7665a46189863793afe IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.36504864
0x08451867305a5c2bb66eca5c9ac06f80fa39ca717e56dd083ab9cbc9dcbecf79Claim632943532023-05-29 17:35:366 hrs 48 mins ago0xf950b45478b7106765a3c7665a46189863793afe IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.15278604
0xa5b1a6bfd115b99c31a1494a6844efb2dd7972d92ae62d7aa802d0e7baee49deStake632936922023-05-29 17:12:137 hrs 12 mins ago0xa2c12dd46eb80ad3ebfb9f07b0293b2e076bfc5b IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.478928488292
0x102213be5830357cf6b338059635ac0b7f83663daeeacd83dde1a5413438da17Claim All632935782023-05-29 17:08:207 hrs 15 mins ago0xa2c12dd46eb80ad3ebfb9f07b0293b2e076bfc5b IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.471213463369
0x9a881e36d03bec10fd2c98cd4c74b7d78c709a0edb45e53c98eecdf0378b213eClaim632935702023-05-29 17:08:017 hrs 16 mins ago0xa2c12dd46eb80ad3ebfb9f07b0293b2e076bfc5b IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.100054030465
0x6ec76da3f6e428f8399541c40c592c9c640da3eeb6e7909124e626f9ab5872baClaim632827822023-05-29 10:49:0213 hrs 35 mins ago0x053ac328a48f875494e39b4bfb00c2b3466fc419 IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.109249668
0xd27675dad0a317a6469f8e16fdb3d66a2345e8488c5893bd385bdf39cd5c0075Claim All632827672023-05-29 10:48:4113 hrs 35 mins ago0x053ac328a48f875494e39b4bfb00c2b3466fc419 IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.209065428
0x2f7d1d3a5a66121df4cd6cd547143ecbfabe80010a432bae569629632c18e51eClaim632827642023-05-29 10:48:3013 hrs 35 mins ago0x053ac328a48f875494e39b4bfb00c2b3466fc419 IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.109249668
0x76e5085705d447d002712b425606a2e579aa456a237263954d618fa1991eb205Claim All632821862023-05-29 10:28:4813 hrs 55 mins ago0x07f4295e38489df2afda3a397e45cade74569ad6 IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.134984185179
0xfcaa0c0436ee44556f591fb9989e0dcb2b5d6c02152958fc8e09e293053a945bClaim632821742023-05-29 10:28:2913 hrs 55 mins ago0x07f4295e38489df2afda3a397e45cade74569ad6 IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.104978932217
0x99c14a44242c3d79c489f9c29aa2c7bae51cfa8f738bf768a9094586e96acc7aClaim All632804762023-05-29 9:28:1014 hrs 56 mins ago0xc4f55c93adf2295740202e77d29c6d058ddc2a72 IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.325576666294
0x42b14ace93034a55bd6b39103208aceb08d389279b9f190448f105e173ed6389Claim632804712023-05-29 9:27:4614 hrs 56 mins ago0xc4f55c93adf2295740202e77d29c6d058ddc2a72 IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.095408077291
0x16e892a585529b3c8f60836288f0f6a2dc86f4f5df6ea94b2aa42cdf445054bcStake632796942023-05-29 9:02:4015 hrs 21 mins ago0x1cdbf1f8e9f6d336a23fb4782c7ebd604027b4ce IN  0xb13610b4e7168f664fcef2c6ebc58990ae835ff10 FTM0.393377219694
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xadb5c29ded968fcfe36cab5a087286a4b5423c59f4c735d72e2e4ff57b1865ac531032502023-01-02 14:26:24147 days 9 hrs ago 0xbf014a15198edcfcb2921de7099bf256db31c4ba  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LockFarm

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 20 : LockFarm.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.7;

import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/utils/math/Math.sol';

import './RewardReceiver.sol';
import './LockAccessControl.sol';

import './interfaces/ILockFarm.sol';
import './interfaces/ITokenVault.sol';
import './interfaces/IFNFT.sol';
import './interfaces/IEmissionor.sol';

contract LockFarm is
    ILockFarm,
    RewardReceiver,
    LockAccessControl,
    ReentrancyGuard,
    Pausable
{
    using SafeERC20 for IERC20;

    string public name;
    IERC20 public immutable stakingToken;

    uint256 public totalReward;
    uint256 public totalTokenSupply;
    uint256 public totalTokenBoostedSupply;
    uint256 public accTokenPerShare;
    uint256 public periodFinish;
    uint256 public rewardRate;
    uint256 public lastUpdateTime;

    uint256 public lockedStakeMaxMultiplier = 3e6; // 6 decimals of precision. 1x = 1000000
    uint256 public lockedStakeTimeForMaxMultiplier = 3 * 365 * 86400; // 3 years
    uint256 public constant lockedStakeMinTime = 5 minutes;

    mapping(uint256 => FNFTInfo) public fnfts;
    mapping(address => uint256) public userRemainingRewards;

    uint256 private constant MULTIPLIER_BASE = 1e6;
    uint256 private constant PRICE_PRECISION = 1e6;
    uint256 private constant SHARE_MULTIPLIER = 1e12;

    /* ======= CONSTRUCTOR ======= */

    constructor(
        address provider,
        string memory _name,
        address _stakingToken,
        address _rewardToken
    ) LockAccessControl(provider) {
        require(_stakingToken != address(0), 'Farm: Invalid staking token');

        name = _name;
        stakingToken = IERC20(_stakingToken);
        rewardToken = _rewardToken;
    }

    ///////////////////////////////////////////////////////
    //               USER CALLED FUNCTIONS               //
    ///////////////////////////////////////////////////////

    function stake(uint256 amount, uint256 secs)
        external
        nonReentrant
        whenNotPaused
    {
        require(amount > 0, 'Farm: Invalid amount');
        require(
            secs >= lockedStakeMinTime &&
                secs <= lockedStakeTimeForMaxMultiplier,
            'Farm: Invalid secs'
        );

        updateFarm();

        uint256 multiplier = stakingMultiplier(secs);
        uint256 boostedAmount = (amount * multiplier) / PRICE_PRECISION;

        totalTokenSupply += amount;
        totalTokenBoostedSupply += boostedAmount;

        uint256 fnftId = getTokenVault().mint(
            msg.sender,
            ITokenVault.FNFTConfig({
                asset: address(stakingToken),
                depositAmount: amount,
                endTime: block.timestamp + secs
            })
        );

        FNFTInfo storage info = fnfts[fnftId];
        info.id = fnftId;
        info.amount = amount;
        info.startTime = block.timestamp;
        info.secs = secs;
        info.multiplier = multiplier;
        info.rewardDebt = (boostedAmount * accTokenPerShare) / SHARE_MULTIPLIER;
        info.pendingReward = 0;

        emit Stake(msg.sender, fnftId, amount, secs);
    }

    function withdraw(uint256 fnftId) external nonReentrant whenNotPaused {
        require(getFNFT().ownerOf(fnftId) == msg.sender, 'Farm: Invalid owner');

        updateFarm();

        getTokenVault().withdraw(msg.sender, fnftId);
        FNFTInfo memory info = fnfts[fnftId];

        uint256 boostedAmount = processReward(msg.sender, fnftId);

        userRemainingRewards[msg.sender] += info.pendingReward;

        totalTokenSupply -= info.amount;
        totalTokenBoostedSupply -= boostedAmount;

        delete fnfts[fnftId];

        emit Withdraw(msg.sender, fnftId, info.amount);
    }

    function claim(uint256 fnftId) external nonReentrant whenNotPaused {
        require(getFNFT().ownerOf(fnftId) == msg.sender, 'Farm: Invalid owner');

        updateFarm();

        processReward(msg.sender, fnftId);
    }

    function claim() external nonReentrant whenNotPaused {
        uint256 amount = userRemainingRewards[msg.sender];
        require(amount > 0, 'Farm: no remaining rewards');

        userRemainingRewards[msg.sender] =
            amount -
            safeRewardTransfer(msg.sender, amount);
    }

    function claimAll() external nonReentrant whenNotPaused {
        _claimAll(msg.sender);
    }

    function claimAll(address owner)
        external
        override
        onlyRegistry
        nonReentrant
        whenNotPaused
    {
        _claimAll(owner);
    }

    ///////////////////////////////////////////////////////
    //                  VIEW FUNCTIONS                   //
    ///////////////////////////////////////////////////////

    function lastTimeRewardApplicable() public view returns (uint256) {
        return block.timestamp < periodFinish ? block.timestamp : periodFinish;
    }

    function rewardPerToken() public view returns (uint256) {
        if (totalTokenBoostedSupply == 0) {
            return accTokenPerShare;
        }

        uint256 multiplier = lastTimeRewardApplicable() - lastUpdateTime;
        uint256 tokenReward = rewardRate * multiplier;

        return
            accTokenPerShare +
            ((tokenReward * SHARE_MULTIPLIER) / totalTokenBoostedSupply);
    }

    function stakingMultiplier(uint256 secs)
        public
        view
        returns (uint256 multiplier)
    {
        multiplier =
            MULTIPLIER_BASE +
            (secs * (lockedStakeMaxMultiplier - MULTIPLIER_BASE)) /
            lockedStakeTimeForMaxMultiplier;
        if (multiplier > lockedStakeMaxMultiplier)
            multiplier = lockedStakeMaxMultiplier;
    }

    function pendingReward(uint256 fnftId)
        external
        view
        returns (uint256 reward)
    {
        FNFTInfo memory info = fnfts[fnftId];
        uint256 boostedAmount = (info.amount * info.multiplier) /
            PRICE_PRECISION;

        reward =
            (boostedAmount * rewardPerToken()) /
            SHARE_MULTIPLIER +
            info.pendingReward -
            info.rewardDebt;
    }

    function getFnfts(address owner)
        external
        view
        returns (FNFTInfo[] memory infos)
    {
        uint256 balance = getFNFT().balanceOf(owner);

        infos = new FNFTInfo[](balance);

        for (uint256 i = 0; i < balance; i++) {
            uint256 fnftId = getFNFT().tokenOfOwnerByIndex(owner, i);
            infos[i] = fnfts[fnftId];
        }
    }

    function getAllFnfts(uint256 offset, uint256 size)
        external
        view
        returns (FNFTInfo[] memory infos)
    {
        uint256 totalSupply = getFNFT().totalSupply();
        uint256 size_ = size;

        if (offset + size > totalSupply) {
            size_ = totalSupply - offset;
        }

        infos = new FNFTInfo[](size_);

        for (uint256 i = 0; i < size_; i++) {
            uint256 fnftId = getFNFT().tokenByIndex(i + offset);
            infos[i] = fnfts[fnftId];
        }
    }

    function getAPR() external view returns (uint256) {
        if (totalTokenSupply == 0) {
            return 0;
        }

        return
            (365 * 24 * 3600 * rewardRate * MULTIPLIER_BASE) / totalTokenSupply;
    }

    ///////////////////////////////////////////////////////
    //               MANAGER CALLED FUNCTIONS            //
    ///////////////////////////////////////////////////////

    function pause() external onlyOwner whenNotPaused {
        return _pause();
    }

    function unpause() external onlyOwner whenPaused {
        return _unpause();
    }

    function setName(string memory _name) external onlyOwner whenNotPaused {
        name = _name;
    }

    function setMultipliers(
        uint256 _lockedStakeMaxMultiplier,
        uint256 _lockedStakeTimeForMaxMultiplier
    ) external onlyOwner whenNotPaused {
        require(
            _lockedStakeMaxMultiplier > MULTIPLIER_BASE,
            'Farm: Invalid multiplier'
        );
        require(
            _lockedStakeTimeForMaxMultiplier >= 1,
            'Farm: Invalid multiplier'
        );

        lockedStakeMaxMultiplier = _lockedStakeMaxMultiplier;
        lockedStakeTimeForMaxMultiplier = _lockedStakeTimeForMaxMultiplier;

        emit MultipliersUpdated(
            lockedStakeMaxMultiplier,
            lockedStakeTimeForMaxMultiplier
        );
    }

    ///////////////////////////////////////////////////////
    //                  INTERNAL FUNCTIONS               //
    ///////////////////////////////////////////////////////

    function onRewardReceived(uint256 amount) internal virtual override {
        updateFarm();

        uint256 endTime = getEmissionor().getEndTime();
        uint256 rewardsDuration;

        if (periodFinish > 0) {
            rewardsDuration = endTime - periodFinish;
        } else {
            rewardsDuration = endTime - block.timestamp + 1;
        }

        if (block.timestamp >= periodFinish) {
            rewardRate = amount / rewardsDuration;
            periodFinish = endTime;
        } else {
            uint256 remaining = periodFinish - block.timestamp;
            uint256 leftover = remaining * rewardRate;
            rewardRate = (amount + leftover) / remaining;
        }

        lastUpdateTime = block.timestamp;
        totalReward += amount;
    }

    function processReward(address to, uint256 fnftId)
        internal
        returns (uint256)
    {
        FNFTInfo storage info = fnfts[fnftId];
        uint256 boostedAmount = (info.amount * info.multiplier) /
            PRICE_PRECISION;
        uint256 pending = (boostedAmount * accTokenPerShare) /
            SHARE_MULTIPLIER -
            info.rewardDebt;

        if (pending > 0) {
            info.pendingReward += pending;

            uint256 claimedAmount = safeRewardTransfer(to, info.pendingReward);
            emit Claim(to, fnftId, claimedAmount);

            info.pendingReward -= claimedAmount;
        }

        info.rewardDebt = (boostedAmount * accTokenPerShare) / SHARE_MULTIPLIER;

        return boostedAmount;
    }

    function safeRewardTransfer(address to, uint256 amount)
        internal
        returns (uint256)
    {
        uint256 rewardTokenBal = IERC20(rewardToken).balanceOf(address(this));

        if (rewardTokenBal == 0) {
            return 0;
        }

        if (amount > rewardTokenBal) {
            IERC20(rewardToken).safeTransfer(to, rewardTokenBal);
            return rewardTokenBal;
        } else {
            IERC20(rewardToken).safeTransfer(to, amount);
            return amount;
        }
    }

    function updateFarm() internal {
        accTokenPerShare = rewardPerToken();
        lastUpdateTime = lastTimeRewardApplicable();
    }

    function _claimAll(address owner) internal {
        updateFarm();

        uint256 balance = getFNFT().balanceOf(owner);

        for (uint256 i = 0; i < balance; i++) {
            uint256 fnftId = getFNFT().tokenOfOwnerByIndex(owner, i);
            processReward(owner, fnftId);
        }
    }
}

File 2 of 20 : RewardReceiver.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.7;

import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';

import './interfaces/IRewardReceiver.sol';

abstract contract RewardReceiver is IRewardReceiver, Ownable {
    address public rewardToken;

    function receiveReward(uint256 amount) external override {
        require(rewardToken != address(0), 'rewardToken is not set');
        IERC20(rewardToken).transferFrom(msg.sender, address(this), amount);
        onRewardReceived(amount);
    }

    function onRewardReceived(uint256 amount) internal virtual;

    function setRewardToken(address _rewardToken) external onlyOwner {
        require(
            rewardToken == address(0) && _rewardToken != address(0),
            'rewardToken can be set only once to non-zero address'
        );
        rewardToken = _rewardToken;
    }
}

File 3 of 20 : LockAccessControl.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.7;

import '@openzeppelin/contracts/access/Ownable.sol';

import './interfaces/ILockAddressRegistry.sol';
import './interfaces/IEmissionor.sol';
import './interfaces/ITokenVault.sol';
import './interfaces/IFNFT.sol';

contract LockAccessControl is Ownable {
    ILockAddressRegistry internal addressProvider;

    /* ======= CONSTRUCTOR ======= */

    constructor(address provider) {
        addressProvider = ILockAddressRegistry(provider);
    }

    /* ======= MODIFIER ======= */

    modifier onlyTokenVault() {
        require(
            _msgSender() == addressProvider.getTokenVault(),
            'AccessControl: Invalid token vault'
        );
        _;
    }

    modifier onlyFarm() {
        require(
            addressProvider.isFarm(_msgSender()),
            'AccessControl: Invalid farm'
        );
        _;
    }

    modifier onlyRegistry() {
        require(
            _msgSender() == address(addressProvider),
            'AccessControl: Invalid registry'
        );
        _;
    }

    ///////////////////////////////////////////////////////
    //               MANAGER CALLED FUNCTIONS            //
    ///////////////////////////////////////////////////////

    function setAddressProvider(address provider) external onlyOwner {
        addressProvider = ILockAddressRegistry(provider);
    }

    ///////////////////////////////////////////////////////
    //                INTERNAL FUNCTIONS                 //
    ///////////////////////////////////////////////////////

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

    function getFNFT() internal view returns (IFNFT) {
        return IFNFT(addressProvider.getFNFT());
    }

    function getEmissionor() internal view returns (IEmissionor) {
        return IEmissionor(addressProvider.getEmissionor());
    }
}

File 4 of 20 : ITokenVault.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.7;

interface ITokenVault {
    event FNFTMinted(
        address indexed asset,
        address indexed from,
        uint256 indexed fnftId,
        uint256 depositAmount,
        uint256 endTime
    );

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

    struct FNFTConfig {
        address asset; // The token being stored
        uint256 depositAmount; // How many tokens
        uint256 endTime; // Time lock expiry
    }

    function getFNFT(uint256 fnftId) external view returns (FNFTConfig memory);

    function mint(address recipient, FNFTConfig memory fnftConfig)
        external
        returns (uint256);

    function withdraw(address recipient, uint256 fnftId) external;
}

File 5 of 20 : ILockFarm.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.7;

interface ILockFarm {
    struct FNFTInfo {
        uint256 id;
        uint256 amount;
        uint256 startTime;
        uint256 secs;
        uint256 multiplier;
        uint256 rewardDebt;
        uint256 pendingReward;
    }

    event Stake(
        address indexed account,
        uint256 indexed fnftId,
        uint256 amount,
        uint256 secs
    );
    event Withdraw(
        address indexed account,
        uint256 indexed fnftId,
        uint256 amount
    );
    event Claim(
        address indexed account,
        uint256 indexed fnftId,
        uint256 amount
    );
    event MultipliersUpdated(
        uint256 lockedStakeMaxMultiplier,
        uint256 lockedStakeTimeForMaxMultiplier
    );

    function claimAll(address owner) external;
}

File 6 of 20 : IEmissionor.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.7;

interface IEmissionor {
    function getBeginTime() external view returns (uint256);

    function getEndTime() external view returns (uint256);

    function distributionRemainingTime() external view returns (uint256);

    function isEmissionActive() external view returns (bool);
}

File 7 of 20 : IFNFT.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.7;

import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol';

interface IFNFT is IERC721Enumerable {
    function mint(address to) external returns (uint256 fnftId);

    function burn(uint256 fnftId) external;
}

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor () {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

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

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor () {
        _paused = false;
    }

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

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

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

File 11 of 20 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 13 of 20 : IRewardReceiver.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.7;

interface IRewardReceiver {
    function receiveReward(uint256 amount) external;
}

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

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

File 15 of 20 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 16 of 20 : ILockAddressRegistry.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.7;

interface ILockAddressRegistry {
    function initialize(
        address admin,
        address tokenVault,
        address fnft,
        address emissionor
    ) external;

    function getAdmin() external view returns (address);

    function setAdmin(address admin) external;

    function getTokenVault() external view returns (address);

    function setTokenVault(address vault) external;

    function getFNFT() external view returns (address);

    function setFNFT(address fnft) external;

    function getEmissionor() external view returns (address);

    function setEmissionor(address emissionor) external;

    function getFarm(uint256 index) external view returns (address);

    function addFarm(address farm) external;

    function setIsFarm(address farm, bool value) external;

    function isFarm(address farm) external view returns (bool);

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

File 17 of 20 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 18 of 20 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
      * @dev Safely transfers `tokenId` token from `from` to `to`.
      *
      * Requirements:
      *
      * - `from` cannot be the zero address.
      * - `to` cannot be the zero address.
      * - `tokenId` token must exist and be owned by `from`.
      * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
      * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
      *
      * Emits a {Transfer} event.
      */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
}

File 19 of 20 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

pragma solidity ^0.8.0;

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

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"provider","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint256","name":"fnftId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lockedStakeMaxMultiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockedStakeTimeForMaxMultiplier","type":"uint256"}],"name":"MultipliersUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint256","name":"fnftId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"secs","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint256","name":"fnftId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"accTokenPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fnftId","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"claimAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"fnfts","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"secs","type":"uint256"},{"internalType":"uint256","name":"multiplier","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"pendingReward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAPR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"getAllFnfts","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"secs","type":"uint256"},{"internalType":"uint256","name":"multiplier","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"pendingReward","type":"uint256"}],"internalType":"struct ILockFarm.FNFTInfo[]","name":"infos","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"getFnfts","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"secs","type":"uint256"},{"internalType":"uint256","name":"multiplier","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"pendingReward","type":"uint256"}],"internalType":"struct ILockFarm.FNFTInfo[]","name":"infos","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedStakeMaxMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedStakeMinTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedStakeTimeForMaxMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fnftId","type":"uint256"}],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"receiveReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"provider","type":"address"}],"name":"setAddressProvider","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockedStakeMaxMultiplier","type":"uint256"},{"internalType":"uint256","name":"_lockedStakeTimeForMaxMultiplier","type":"uint256"}],"name":"setMultipliers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"setRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"secs","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"secs","type":"uint256"}],"name":"stakingMultiplier","outputs":[{"internalType":"uint256","name":"multiplier","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokenBoostedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokenSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRemainingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fnftId","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a0604052622dc6c0600d556305a39a80600e553480156200002057600080fd5b5060405162002cb838038062002cb883398101604081905262000043916200021d565b600080546001600160a01b031916339081178255604051869282917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600280546001600160a01b0319166001600160a01b0392831617905560016003556004805460ff191690558216620001025760405162461bcd60e51b815260206004820152601b60248201527f4661726d3a20496e76616c6964207374616b696e6720746f6b656e0000000000604482015260640160405180910390fd5b82516200011790600590602086019062000144565b506001600160a01b03918216608052600180546001600160a01b0319169190921617905550620003729050565b828054620001529062000335565b90600052602060002090601f016020900481019282620001765760008555620001c1565b82601f106200019157805160ff1916838001178555620001c1565b82800160010185558215620001c1579182015b82811115620001c1578251825591602001919060010190620001a4565b50620001cf929150620001d3565b5090565b5b80821115620001cf5760008155600101620001d4565b80516001600160a01b03811681146200020257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156200023457600080fd5b6200023f85620001ea565b602086810151919550906001600160401b03808211156200025f57600080fd5b818801915088601f8301126200027457600080fd5b81518181111562000289576200028962000207565b604051601f8201601f19908116603f01168101908382118183101715620002b457620002b462000207565b816040528281528b86848701011115620002cd57600080fd5b600093505b82841015620002f15784840186015181850187015292850192620002d2565b82841115620003035760008684830101525b8098505050505050506200031a60408601620001ea565b91506200032a60608601620001ea565b905092959194509250565b600181811c908216806200034a57607f821691505b602082108114156200036c57634e487b7160e01b600052602260045260246000fd5b50919050565b6080516129236200039560003960008181610327015261105e01526129236000f3fe608060405234801561001057600080fd5b506004361061023d5760003560e01c80638456cb591161013b578063c47f0027116100b8578063d55eab951161007c578063d55eab95146104ef578063dedabc8b14610502578063ebe2b12b1461050b578063f2fde38b14610514578063f7c618c11461052757600080fd5b8063c47f0027146104bb578063c89d5b8b146104ce578063c8f33c91146104d6578063cd3daf9d146104df578063d1058e59146104e757600080fd5b8063ae10d5ea116100ff578063ae10d5ea14610456578063aedce40514610469578063b207021514610489578063b491a35b146104a9578063c38363a7146104b257600080fd5b80638456cb59146103a15780638aee8127146103a95780638da5cb5b146103bc5780638f662915146103cd578063a42306e3146103d657600080fd5b80634f232d50116101c9578063750142e61161018d578063750142e61461036157806377329f351461036a5780637b0472f01461037d5780637b0a47ee1461039057806380faa57d1461039957600080fd5b80634f232d50146102de5780635c975abb146102f15780636f50f50714610307578063715018a61461031a57806372f702f31461032257600080fd5b80632e1a7d4d116102105780632e1a7d4d1461029f578063379607f5146102b25780633b17c5ab146102c55780633f4ba83a146102ce5780634e71d92d146102d657600080fd5b806306fdde031461024257806312f7086c146102605780631a5fa2e3146102815780631ca8b6cb14610296575b600080fd5b61024a61053a565b6040516102579190612508565b60405180910390f35b61027361026e36600461253b565b6105c8565b604051908152602001610257565b61029461028f366004612569565b61068e565b005b61027360075481565b6102946102ad36600461253b565b6106e3565b6102946102c036600461253b565b6109b9565b610273600d5481565b610294610af1565b610294610b6e565b6102736102ec36600461253b565b610c42565b60045460ff166040519015158152602001610257565b610294610315366004612586565b610c8f565b610294610dbc565b6103497f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610257565b61027360065481565b610294610378366004612569565b610e30565b61029461038b366004612586565b610eef565b610273600b5481565b6102736111d8565b6102946111f1565b6102946103b7366004612569565b611246565b6000546001600160a01b0316610349565b61027360095481565b6104216103e436600461253b565b600f602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154949593949293919290919087565b604080519788526020880196909652948601939093526060850191909152608084015260a083015260c082015260e001610257565b61029461046436600461253b565b61131c565b610273610477366004612569565b60106020526000908152604090205481565b61049c610497366004612569565b611404565b60405161025791906125a8565b61027360085481565b610273600e5481565b6102946104c9366004612640565b61164f565b6102736116b3565b610273600c5481565b6102736116f3565b610294611763565b61049c6104fd366004612586565b6117be565b61027361012c81565b610273600a5481565b610294610522366004612569565b611a23565b600154610349906001600160a01b031681565b60058054610547906126f1565b80601f0160208091040260200160405190810160405280929190818152602001828054610573906126f1565b80156105c05780601f10610595576101008083540402835291602001916105c0565b820191906000526020600020905b8154815290600101906020018083116105a357829003601f168201915b505050505081565b6000818152600f60209081526040808320815160e08101835281548152600182015493810184905260028201549281019290925260038101546060830152600481015460808301819052600582015460a084015260069091015460c083015290918391620f42409161063a9190612742565b6106449190612761565b90508160a001518260c0015164e8d4a5100061065e6116f3565b6106689085612742565b6106729190612761565b61067c9190612783565b610686919061279b565b949350505050565b6000546001600160a01b031633146106c15760405162461bcd60e51b81526004016106b8906127b2565b60405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600260035414156107065760405162461bcd60e51b81526004016106b8906127e7565b600260035560045460ff161561072e5760405162461bcd60e51b81526004016106b89061281e565b33610737611b0d565b6001600160a01b0316636352211e836040518263ffffffff1660e01b815260040161076491815260200190565b60206040518083038186803b15801561077c57600080fd5b505afa158015610790573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b49190612848565b6001600160a01b0316146108005760405162461bcd60e51b81526020600482015260136024820152722330b9369d1024b73b30b634b21037bbb732b960691b60448201526064016106b8565b610808611b8a565b610810611ba2565b60405163f3fef3a360e01b8152336004820152602481018390526001600160a01b03919091169063f3fef3a390604401600060405180830381600087803b15801561085a57600080fd5b505af115801561086e573d6000803e3d6000fd5b5050506000828152600f60209081526040808320815160e081018352815481526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a08301526006015460c082015291506108d93384611be7565b60c0830151336000908152601060205260408120805493945091926108ff908490612783565b909155505060208201516007805460009061091b90849061279b565b925050819055508060086000828254610934919061279b565b90915550506000838152600f60209081526040808320838155600181018490556002810184905560038101849055600481018490556005810184905560060192909255838101519151918252849133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a35050600160035550565b600260035414156109dc5760405162461bcd60e51b81526004016106b8906127e7565b600260035560045460ff1615610a045760405162461bcd60e51b81526004016106b89061281e565b33610a0d611b0d565b6001600160a01b0316636352211e836040518263ffffffff1660e01b8152600401610a3a91815260200190565b60206040518083038186803b158015610a5257600080fd5b505afa158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190612848565b6001600160a01b031614610ad65760405162461bcd60e51b81526020600482015260136024820152722330b9369d1024b73b30b634b21037bbb732b960691b60448201526064016106b8565b610ade611b8a565b610ae83382611be7565b50506001600355565b6000546001600160a01b03163314610b1b5760405162461bcd60e51b81526004016106b8906127b2565b60045460ff16610b645760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106b8565b610b6c611d10565b565b60026003541415610b915760405162461bcd60e51b81526004016106b8906127e7565b600260035560045460ff1615610bb95760405162461bcd60e51b81526004016106b89061281e565b3360009081526010602052604090205480610c165760405162461bcd60e51b815260206004820152601a60248201527f4661726d3a206e6f2072656d61696e696e67207265776172647300000000000060448201526064016106b8565b610c203382611da3565b610c2a908261279b565b33600090815260106020526040902055506001600355565b6000600e54620f4240600d54610c58919061279b565b610c629084612742565b610c6c9190612761565b610c7990620f4240612783565b9050600d54811115610c8a5750600d545b919050565b6000546001600160a01b03163314610cb95760405162461bcd60e51b81526004016106b8906127b2565b60045460ff1615610cdc5760405162461bcd60e51b81526004016106b89061281e565b620f42408211610d295760405162461bcd60e51b81526020600482015260186024820152772330b9369d1024b73b30b634b21036bab63a34b83634b2b960411b60448201526064016106b8565b6001811015610d755760405162461bcd60e51b81526020600482015260186024820152772330b9369d1024b73b30b634b21036bab63a34b83634b2b960411b60448201526064016106b8565b600d829055600e81905560408051838152602081018390527f219f90e11a4510b226f7d1a841c135604734dd2a1559c0fd68a83f86c907fa37910160405180910390a15050565b6000546001600160a01b03163314610de65760405162461bcd60e51b81526004016106b8906127b2565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6002546001600160a01b0316336001600160a01b031614610e935760405162461bcd60e51b815260206004820152601f60248201527f416363657373436f6e74726f6c3a20496e76616c69642072656769737472790060448201526064016106b8565b60026003541415610eb65760405162461bcd60e51b81526004016106b8906127e7565b600260035560045460ff1615610ede5760405162461bcd60e51b81526004016106b89061281e565b610ee781611e7a565b506001600355565b60026003541415610f125760405162461bcd60e51b81526004016106b8906127e7565b600260035560045460ff1615610f3a5760405162461bcd60e51b81526004016106b89061281e565b60008211610f815760405162461bcd60e51b815260206004820152601460248201527311985c9b4e88125b9d985b1a5908185b5bdd5b9d60621b60448201526064016106b8565b61012c8110158015610f955750600e548111155b610fd65760405162461bcd60e51b81526020600482015260126024820152714661726d3a20496e76616c6964207365637360701b60448201526064016106b8565b610fde611b8a565b6000610fe982610c42565b90506000620f4240610ffb8386612742565b6110059190612761565b905083600760008282546110199190612783565b9250508190555080600860008282546110329190612783565b9091555060009050611042611ba2565b6001600160a01b0316631d4d6c413360405180606001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602001898152602001884261109d9190612783565b9052604080516001600160e01b031960e086901b1681526001600160a01b039384166004820152825190931660248401526020820151604484015201516064820152608401602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111349190612865565b6000818152600f602052604090208181556001810187905542600282015560038101869055600481018590556009549192509064e8d4a51000906111789085612742565b6111829190612761565b6005820155600060068201556040805187815260208101879052839133917ff556991011e831bcfac4f406d547e5e32cdd98267efab83935230d5f8d02c446910160405180910390a35050600160035550505050565b6000600a5442106111ea5750600a5490565b425b905090565b6000546001600160a01b0316331461121b5760405162461bcd60e51b81526004016106b8906127b2565b60045460ff161561123e5760405162461bcd60e51b81526004016106b89061281e565b610b6c611fc6565b6000546001600160a01b031633146112705760405162461bcd60e51b81526004016106b8906127b2565b6001546001600160a01b031615801561129157506001600160a01b03811615155b6112fa5760405162461bcd60e51b815260206004820152603460248201527f726577617264546f6b656e2063616e20626520736574206f6e6c79206f6e636560448201527320746f206e6f6e2d7a65726f206164647265737360601b60648201526084016106b8565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031661136d5760405162461bcd60e51b81526020600482015260166024820152751c995dd85c99151bdad95b881a5cc81b9bdd081cd95d60521b60448201526064016106b8565b6001546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156113bf57600080fd5b505af11580156113d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f7919061287e565b506114018161201e565b50565b60606000611410611b0d565b6040516370a0823160e01b81526001600160a01b03858116600483015291909116906370a082319060240160206040518083038186803b15801561145357600080fd5b505afa158015611467573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148b9190612865565b90508067ffffffffffffffff8111156114a6576114a661262a565b60405190808252806020026020018201604052801561151757816020015b6115046040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b8152602001906001900390816114c45790505b50915060005b8181101561164857600061152f611b0d565b604051632f745c5960e01b81526001600160a01b038781166004830152602482018590529190911690632f745c599060440160206040518083038186803b15801561157957600080fd5b505afa15801561158d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b19190612865565b9050600f60008281526020019081526020016000206040518060e0016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682015481525050848381518110611629576116296128a0565b6020026020010181905250508080611640906128b6565b91505061151d565b5050919050565b6000546001600160a01b031633146116795760405162461bcd60e51b81526004016106b8906127b2565b60045460ff161561169c5760405162461bcd60e51b81526004016106b89061281e565b80516116af90600590602084019061243f565b5050565b6000600754600014156116c65750600090565b600754620f4240600b546301e133806116df9190612742565b6116e99190612742565b6111ec9190612761565b600060085460001415611707575060095490565b6000600c546117146111d8565b61171e919061279b565b9050600081600b546117309190612742565b60085490915061174564e8d4a5100083612742565b61174f9190612761565b60095461175c9190612783565b9250505090565b600260035414156117865760405162461bcd60e51b81526004016106b8906127e7565b600260035560045460ff16156117ae5760405162461bcd60e51b81526004016106b89061281e565b6117b733611e7a565b6001600355565b606060006117ca611b0d565b6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561180257600080fd5b505afa158015611816573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183a9190612865565b905082816118488287612783565b111561185b57611858858361279b565b90505b8067ffffffffffffffff8111156118745761187461262a565b6040519080825280602002602001820160405280156118e557816020015b6118d26040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b8152602001906001900390816118925790505b50925060005b81811015611a1a5760006118fd611b0d565b6001600160a01b0316634f6ccce76119158985612783565b6040518263ffffffff1660e01b815260040161193391815260200190565b60206040518083038186803b15801561194b57600080fd5b505afa15801561195f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119839190612865565b9050600f60008281526020019081526020016000206040518060e00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820154815250508583815181106119fb576119fb6128a0565b6020026020010181905250508080611a12906128b6565b9150506118eb565b50505092915050565b6000546001600160a01b03163314611a4d5760405162461bcd60e51b81526004016106b8906127b2565b6001600160a01b038116611ab25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106b8565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60025460408051634d2678d560e11b815290516000926001600160a01b031691639a4cf1aa916004808301926020929190829003018186803b158015611b5257600080fd5b505afa158015611b66573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ec9190612848565b611b926116f3565b600955611b9d6111d8565b600c55565b600254604080516354f2f7af60e01b815290516000926001600160a01b0316916354f2f7af916004808301926020929190829003018186803b158015611b5257600080fd5b6000818152600f60205260408120600481015460018201548391620f424091611c109190612742565b611c1a9190612761565b90506000826005015464e8d4a5100060095484611c379190612742565b611c419190612761565b611c4b919061279b565b90508015611cdf5780836006016000828254611c679190612783565b925050819055506000611c7e878560060154611da3565b905085876001600160a01b03167f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf783604051611cbc91815260200190565b60405180910390a380846006016000828254611cd8919061279b565b9091555050505b64e8d4a5100060095483611cf39190612742565b611cfd9190612761565b6005909301929092559150505b92915050565b60045460ff16611d595760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106b8565b6004805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001546040516370a0823160e01b815230600482015260009182916001600160a01b03909116906370a082319060240160206040518083038186803b158015611deb57600080fd5b505afa158015611dff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e239190612865565b905080611e34576000915050611d0a565b80831115611e5a57600154611e53906001600160a01b0316858361215c565b9050611d0a565b600154611e71906001600160a01b0316858561215c565b82915050611d0a565b611e82611b8a565b6000611e8c611b0d565b6040516370a0823160e01b81526001600160a01b03848116600483015291909116906370a082319060240160206040518083038186803b158015611ecf57600080fd5b505afa158015611ee3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f079190612865565b905060005b81811015611fc1576000611f1e611b0d565b604051632f745c5960e01b81526001600160a01b038681166004830152602482018590529190911690632f745c599060440160206040518083038186803b158015611f6857600080fd5b505afa158015611f7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa09190612865565b9050611fac8482611be7565b50508080611fb9906128b6565b915050611f0c565b505050565b60045460ff1615611fe95760405162461bcd60e51b81526004016106b89061281e565b6004805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d863390565b612026611b8a565b60006120306121ae565b6001600160a01b031663439f5ac26040518163ffffffff1660e01b815260040160206040518083038186803b15801561206857600080fd5b505afa15801561207c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120a09190612865565b9050600080600a5411156120c257600a546120bb908361279b565b90506120da565b6120cc428361279b565b6120d7906001612783565b90505b600a5442106120fa576120ed8184612761565b600b55600a829055612139565b600042600a5461210a919061279b565b90506000600b548261211c9190612742565b9050816121298287612783565b6121339190612761565b600b5550505b42600c8190555082600660008282546121529190612783565b9091555050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611fc19084906121f3565b60025460408051631aea44c760e11b815290516000926001600160a01b0316916335d4898e916004808301926020929190829003018186803b158015611b5257600080fd5b6000612248826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166122c59092919063ffffffff16565b805190915015611fc15780806020019051810190612266919061287e565b611fc15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106b8565b60606122d484846000856122de565b90505b9392505050565b60608247101561233f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106b8565b843b61238d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106b8565b600080866001600160a01b031685876040516123a991906128d1565b60006040518083038185875af1925050503d80600081146123e6576040519150601f19603f3d011682016040523d82523d6000602084013e6123eb565b606091505b50915091506123fb828286612406565b979650505050505050565b606083156124155750816122d7565b8251156124255782518084602001fd5b8160405162461bcd60e51b81526004016106b89190612508565b82805461244b906126f1565b90600052602060002090601f01602090048101928261246d57600085556124b3565b82601f1061248657805160ff19168380011785556124b3565b828001600101855582156124b3579182015b828111156124b3578251825591602001919060010190612498565b506124bf9291506124c3565b5090565b5b808211156124bf57600081556001016124c4565b60005b838110156124f35781810151838201526020016124db565b83811115612502576000848401525b50505050565b60208152600082518060208401526125278160408501602087016124d8565b601f01601f19169190910160400192915050565b60006020828403121561254d57600080fd5b5035919050565b6001600160a01b038116811461140157600080fd5b60006020828403121561257b57600080fd5b81356122d781612554565b6000806040838503121561259957600080fd5b50508035926020909101359150565b602080825282518282018190526000919060409081850190868401855b8281101561261d5781518051855286810151878601528581015186860152606080820151908601526080808201519086015260a0808201519086015260c0908101519085015260e090930192908501906001016125c5565b5091979650505050505050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561265257600080fd5b813567ffffffffffffffff8082111561266a57600080fd5b818401915084601f83011261267e57600080fd5b8135818111156126905761269061262a565b604051601f8201601f19908116603f011681019083821181831017156126b8576126b861262a565b816040528281528760208487010111156126d157600080fd5b826020860160208301376000928101602001929092525095945050505050565b600181811c9082168061270557607f821691505b6020821081141561272657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561275c5761275c61272c565b500290565b60008261277e57634e487b7160e01b600052601260045260246000fd5b500490565b600082198211156127965761279661272c565b500190565b6000828210156127ad576127ad61272c565b500390565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60006020828403121561285a57600080fd5b81516122d781612554565b60006020828403121561287757600080fd5b5051919050565b60006020828403121561289057600080fd5b815180151581146122d757600080fd5b634e487b7160e01b600052603260045260246000fd5b60006000198214156128ca576128ca61272c565b5060010190565b600082516128e38184602087016124d8565b919091019291505056fea2646970667358221220d7cdeed282cac9a3a5db14f159c56598ea791c08477ecc84f83e38a86e5fe9f864736f6c6343000809003300000000000000000000000055639b1833ddc160c18ca60f5d0ec9286201f52500000000000000000000000000000000000000000000000000000000000000800000000000000000000000004339b475399ad7226be3ad2826e1d78bbfb9a0d90000000000000000000000005c4fdfc5233f935f20d2adba572f770c2e377ab0000000000000000000000000000000000000000000000000000000000000000c4845432d544f52204661726d0000000000000000000000000000000000000000

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

00000000000000000000000055639b1833ddc160c18ca60f5d0ec9286201f52500000000000000000000000000000000000000000000000000000000000000800000000000000000000000004339b475399ad7226be3ad2826e1d78bbfb9a0d90000000000000000000000005c4fdfc5233f935f20d2adba572f770c2e377ab0000000000000000000000000000000000000000000000000000000000000000c4845432d544f52204661726d0000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : provider (address): 0x55639b1833ddc160c18ca60f5d0ec9286201f525
Arg [1] : _name (string): HEC-TOR Farm
Arg [2] : _stakingToken (address): 0x4339b475399ad7226be3ad2826e1d78bbfb9a0d9
Arg [3] : _rewardToken (address): 0x5c4fdfc5233f935f20d2adba572f770c2e377ab0

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 00000000000000000000000055639b1833ddc160c18ca60f5d0ec9286201f525
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000004339b475399ad7226be3ad2826e1d78bbfb9a0d9
Arg [3] : 0000000000000000000000005c4fdfc5233f935f20d2adba572f770c2e377ab0
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [5] : 4845432d544f52204661726d0000000000000000000000000000000000000000


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

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

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