Contract 0x54b6b0c79fd337aadb521845818fa73fa68ad65e

 

Contract Overview

Balance:
0 ETH

ETH Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xea0ee79d55ae42fd4bcafea8d5690e211d9c04f793ea9a1bda4798e494a46c76Get Reward674694582023-03-07 3:05:01388 days 4 hrs ago0x7aa7a54d58c8b2f2a8559301c880d3ced10b7e55 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00003657 0.1
0xa6a606abaa4d54b2734560052a788aede6ccd0cdb98a489420424a15fd378951Get Reward583468852023-02-05 23:03:11417 days 8 hrs ago0x296e0c21db4061ebf971e55d5db85011e7ff9797 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00003064 0.1
0x22fd8c7d8f865a040f4df261cb4b5215b2693ec6f177c66dc6a04c14549ef77bWithdraw581811872023-02-05 9:37:40417 days 21 hrs ago0x11218abe74f7423f42a0c2404402ee7c66924063 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00003316 0.1
0x631a798eb61c74f6bdfbf2bfb571dc6210d05186788cd0be776aef63a7e418bcGet Reward581809512023-02-05 9:36:30417 days 21 hrs ago0x11218abe74f7423f42a0c2404402ee7c66924063 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002808 0.1
0xa441b85b0990237cbb9b83a5123569c4b394b6bfc6d2bfba67576d1d1a875c81Get Reward581736732023-02-05 9:00:57417 days 22 hrs ago0x3b6732ac68fcb127f3c1cc988c4e5b356588d988 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002598 0.1
0x3fafd5b3384d91b2a68804835cf20a4d1885c6ee233fc1b0c449183e755a78efWithdraw581734922023-02-05 9:00:07417 days 22 hrs ago0x3b6732ac68fcb127f3c1cc988c4e5b356588d988 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00003253 0.1
0xa91464db4e2d3e2927a9b12e839a805a05be35fa1f5ad8913f0d62e81ab32c97Get Reward541129822023-01-19 14:32:45434 days 17 hrs ago0x8836571d0ba76b888702630a6a0a577e3f65d036 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002504 0.1
0x529dea5392690496cffdd37f1552f0304dbbd96d780ed9a5b627902f3eb5cc14Get Reward511686082023-01-06 7:36:45447 days 23 hrs ago0x846cd608de89c5575bbc9e8ea1051eae8ed3dbbe IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002396 0.1
0x8f5837896dcff6d28c11d468d9f00c38a517eece71ef7c5c01d53ff7e01ab52fGet Reward505856942023-01-03 16:32:38450 days 15 hrs ago0x24d86dc4e75979e9b57861b7a0944cdf38d73de0 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.000032150.1
0x88f33c28c9526dfe84fb527d558ef5e47221be7f32eda44d8dc62f90e04ab5c6Get Reward502314312023-01-01 23:54:09452 days 7 hrs ago0x800b0f324e4a7fbbdf99d1a793e2582bf3844976 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002479 0.1
0xcaa336f6aa36ddc764d9639a71abf7f16881c10c51d5810afc476259aa1fa803Get Reward499932442022-12-31 11:34:50453 days 20 hrs ago0x8c11e3af9c1d8718c40c51d4ff0958afcf77fd71 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002765 0.1
0xfa75632566c9b17e49328e58290c9369b8aaac256343673ac5f01c75da2224e2Get Reward488213242022-12-25 18:35:14459 days 13 hrs ago0x68c3494bad6011033d10745144b51890861422e9 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002156 0.1
0x34f58ec8e2a60edc692eef59a1e828c77f161796fad5b205341cded813111914Get Reward485612602022-12-24 16:55:51460 days 14 hrs ago0xffcfa5f7b994aeb4c6931e0a6cd95d8984e038ce IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002398 0.1
0x72433a3e537b8534af9acd796dcee1af826fb4156fafcabc1fe28ad6b134e216Get Reward484240332022-12-24 5:52:33461 days 1 hr ago0xbc2845c80bf9a9ee0a3699f3cd52ed861d62884b IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002036 0.1
0xa2eac5f5eeee8b7557a671fad1c9956b17e7f42b34873d9f1c716d5ecceea082Get Reward483537052022-12-23 20:05:40461 days 11 hrs ago0xa5aa9d62bec32b98606fccf9f727e3d6e8f1339d IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002815 0.1
0x54b81f4daf1f021408bd4644f2b40b66383e493f23bdcd59516187ee1c97aab7Get Reward483205682022-12-23 16:22:24461 days 15 hrs ago0xf26ac16798aced3606029a5f3803c79c7fce5644 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002322 0.1
0xf7df3d21ab6774537fef8329f90a016a7fadc006b3e2dc333e4138ff500da238Get Reward481644052022-12-23 1:50:45462 days 5 hrs ago0xd97a2f65f89f99ce03ca8f3fd2431d053d387e8f IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002229 0.1
0xecdf96e952ec2193865e2cc1c6497be2380dec978ac7794446fd9cb323c517caGet Reward481594512022-12-23 1:07:51462 days 6 hrs ago0x188c30e9a6527f5f0c3f7fe59b72ac7253c62f28 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002259 0.1
0x24eb336b3328bf8fb2a9b488fbcc13b7eb30dfeb5b4afc99a3e2e6bf3472cea3Get Reward480919352022-12-22 17:29:38462 days 14 hrs ago0xdc50f28826c6ff27239e244a1b6289fe90c42672 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.000028860.1
0xc0f6baddce38328876a0ee35b626dd466e5ac8cd6de1448bee4f0d9242e958dfGet Reward478882342022-12-21 19:59:16463 days 11 hrs ago0x7811df09c3415e99beb22122123932e2fe1ef0b0 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002651 0.1
0x36f8f3aec1b83ab146206cf232e9656bae900bbdefcc3eecd17e4ff7d2f41b28Get Reward478633382022-12-21 17:16:18463 days 14 hrs ago0xc39c214ff6941547734a20d7118b244ef89a700e IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00003143 0.1
0x58bd3c49c68fe4fa54785735ef126c425a2a8861f1bff256d7f80347158660f2Get Reward478431722022-12-21 15:27:14463 days 16 hrs ago0x30bf85e1d0bc7fdedcbeeff39225d8037cb0cb7c IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002497 0.1
0x435c88114787cd6d3f0ad854f4156f5c3c6ab1d4cbfde60623e8e64236e8ce56Get Reward478344812022-12-21 14:46:08463 days 16 hrs ago0x882e4ca7569d2ef6f2493a75d8f104a176777eff IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.0000226 0.1
0xa5bb6b2b6cbb0718b5160242033a9d3d45eb54a7f6bca2a7b583dcd219ad3369Get Reward478330362022-12-21 14:39:21463 days 16 hrs ago0x1cf6bff83de92a32cf0f1ed55485a0a081972be7 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002426 0.1
0x8d5875617feb21c0b85bff1d05e3e1e40e0c2af2d7143223dbb444941b80b99bGet Reward478156112022-12-21 13:15:04463 days 18 hrs ago0xdf610deca94686b0b9adad32c14d46758bad9d01 IN  0x54b6b0c79fd337aadb521845818fa73fa68ad65e0 ETH0.00002436 0.1
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xea0ee79d55ae42fd4bcafea8d5690e211d9c04f793ea9a1bda4798e494a46c76674694582023-03-07 3:05:01388 days 4 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0xa6a606abaa4d54b2734560052a788aede6ccd0cdb98a489420424a15fd378951583468852023-02-05 23:03:11417 days 8 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0x22fd8c7d8f865a040f4df261cb4b5215b2693ec6f177c66dc6a04c14549ef77b581811872023-02-05 9:37:40417 days 21 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e 0x3e42e8d8357d05c66674ceb34f47bd4536d5a2b60 ETH
0x631a798eb61c74f6bdfbf2bfb571dc6210d05186788cd0be776aef63a7e418bc581809512023-02-05 9:36:30417 days 21 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0xa441b85b0990237cbb9b83a5123569c4b394b6bfc6d2bfba67576d1d1a875c81581736732023-02-05 9:00:57417 days 22 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0x3fafd5b3384d91b2a68804835cf20a4d1885c6ee233fc1b0c449183e755a78ef581734922023-02-05 9:00:07417 days 22 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e 0x3e42e8d8357d05c66674ceb34f47bd4536d5a2b60 ETH
0xa91464db4e2d3e2927a9b12e839a805a05be35fa1f5ad8913f0d62e81ab32c97541129822023-01-19 14:32:45434 days 17 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0x529dea5392690496cffdd37f1552f0304dbbd96d780ed9a5b627902f3eb5cc14511686082023-01-06 7:36:45447 days 23 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0x8f5837896dcff6d28c11d468d9f00c38a517eece71ef7c5c01d53ff7e01ab52f505856942023-01-03 16:32:38450 days 15 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0x88f33c28c9526dfe84fb527d558ef5e47221be7f32eda44d8dc62f90e04ab5c6502314312023-01-01 23:54:09452 days 7 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0xcaa336f6aa36ddc764d9639a71abf7f16881c10c51d5810afc476259aa1fa803499932442022-12-31 11:34:50453 days 20 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0xfa75632566c9b17e49328e58290c9369b8aaac256343673ac5f01c75da2224e2488213242022-12-25 18:35:14459 days 13 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0x34f58ec8e2a60edc692eef59a1e828c77f161796fad5b205341cded813111914485612602022-12-24 16:55:51460 days 14 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0x72433a3e537b8534af9acd796dcee1af826fb4156fafcabc1fe28ad6b134e216484240332022-12-24 5:52:33461 days 1 hr ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0xa2eac5f5eeee8b7557a671fad1c9956b17e7f42b34873d9f1c716d5ecceea082483537052022-12-23 20:05:40461 days 11 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0x54b81f4daf1f021408bd4644f2b40b66383e493f23bdcd59516187ee1c97aab7483205682022-12-23 16:22:24461 days 15 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0xf7df3d21ab6774537fef8329f90a016a7fadc006b3e2dc333e4138ff500da238481644052022-12-23 1:50:45462 days 5 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0xecdf96e952ec2193865e2cc1c6497be2380dec978ac7794446fd9cb323c517ca481594512022-12-23 1:07:51462 days 6 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0x24eb336b3328bf8fb2a9b488fbcc13b7eb30dfeb5b4afc99a3e2e6bf3472cea3480919352022-12-22 17:29:38462 days 14 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0xc0f6baddce38328876a0ee35b626dd466e5ac8cd6de1448bee4f0d9242e958df478882342022-12-21 19:59:16463 days 11 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0x36f8f3aec1b83ab146206cf232e9656bae900bbdefcc3eecd17e4ff7d2f41b28478633382022-12-21 17:16:18463 days 14 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0x58bd3c49c68fe4fa54785735ef126c425a2a8861f1bff256d7f80347158660f2478431722022-12-21 15:27:14463 days 16 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0x435c88114787cd6d3f0ad854f4156f5c3c6ab1d4cbfde60623e8e64236e8ce56478344812022-12-21 14:46:08463 days 16 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0xa5bb6b2b6cbb0718b5160242033a9d3d45eb54a7f6bca2a7b583dcd219ad3369478330362022-12-21 14:39:21463 days 16 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
0x8d5875617feb21c0b85bff1d05e3e1e40e0c2af2d7143223dbb444941b80b99b478156112022-12-21 13:15:04463 days 18 hrs ago 0x54b6b0c79fd337aadb521845818fa73fa68ad65e Y2K Finance: Y2K Token0 ETH
[ Download CSV Export 
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x6f97534d9e35c924bb66d1f9cadc626ea61869b0
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
StakingRewards

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 16 : PausableStakingRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;

import {SafeMath} from "@openzeppelin/contracts/utils/math/SafeMath.sol";
import {SafeTransferLib} from "@solmate/utils/SafeTransferLib.sol";
import {
    ReentrancyGuard
} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";

// Inheritance
import {IStakingRewards} from "./IStakingRewards.sol";
import {RewardsDistributionRecipient} from "./RewardsDistributionRecipient.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";
import {
    ERC1155Holder
} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import {ERC20} from "@solmate/tokens/ERC20.sol";
import "./Owned.sol";

// https://docs.synthetix.io/contracts/source/contracts/stakingrewards

contract StakingRewards is
    IStakingRewards,
    RewardsDistributionRecipient,
    ReentrancyGuard,
    Pausable,
    ERC1155Holder
{
    using SafeMath for uint256;
    using SafeTransferLib for ERC20;

    /* ========== STATE VARIABLES ========== */

    ERC20 public immutable rewardsToken;
    IERC1155 public immutable stakingToken;
    uint256 public periodFinish = 0;
    uint256 public rewardRate;
    uint256 public rewardsDuration;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;
    uint256 public id;

    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public rewards;

    uint256 private _totalSupply;
    mapping(address => uint256) private _balances;

    /* ========== EVENTS ========== */

    event RewardAdded(uint256 reward);
    event Staked(address indexed user, uint256 id, uint256 amount);
    event Withdrawn(address indexed user, uint256 id, uint256 amount);
    event RewardPaid(address indexed user, uint256 reward);
    event RewardsDurationUpdated(uint256 newDuration);
    event Recovered(address token, uint256 amount);

    /* ========== MODIFIERS ========== */

    modifier updateReward(address account) {
        rewardPerTokenStored = rewardPerToken();
        lastUpdateTime = lastTimeRewardApplicable();
        if (account != address(0)) {
            rewards[account] = earned(account);
            userRewardPerTokenPaid[account] = rewardPerTokenStored;
        }
        _;
    }

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

    constructor(
        address _owner,
        address _rewardsDistribution,
        address _rewardsToken,
        address _stakingToken,
        uint256 _epochEnd
    ) Owned(_owner) {
        _pause();
        rewardsToken = ERC20(_rewardsToken);
        stakingToken = IERC1155(_stakingToken);
        rewardsDistribution = _rewardsDistribution;
        id = _epochEnd;
        rewardsDuration = _epochEnd - block.timestamp;
    }

    /* ========== MUTATIVE FUNCTIONS ========== */
    function stake(uint256 amount)
        external
        nonReentrant
        updateReward(msg.sender)
    {
        require(amount != 0, "Cannot stake 0");
        _totalSupply = _totalSupply.add(amount);
        _balances[msg.sender] = _balances[msg.sender].add(amount);
        stakingToken.safeTransferFrom(
            msg.sender,
            address(this),
            id,
            amount,
            ""
        );
        emit Staked(msg.sender, id, amount);
    }

    function exit() external {
        withdraw(_balances[msg.sender]);
        getReward();
    }

    function withdraw(uint256 amount)
        public
        nonReentrant
        updateReward(msg.sender)
    {
        require(amount > 0, "Cannot withdraw 0");
        _totalSupply = _totalSupply.sub(amount);
        _balances[msg.sender] = _balances[msg.sender].sub(amount);
        stakingToken.safeTransferFrom(
            address(this),
            msg.sender,
            id,
            amount,
            ""
        );
        emit Withdrawn(msg.sender, id, amount);
    }

    function getReward() public nonReentrant whenNotPaused updateReward(msg.sender) {
        uint256 reward = rewards[msg.sender];
        if (reward > 0) {
            rewards[msg.sender] = 0;
            rewardsToken.safeTransfer(msg.sender, reward);
            emit RewardPaid(msg.sender, reward);
        }
    }

    /* ========== VIEWS ========== */

    function totalSupply() external view returns (uint256) {
        return _totalSupply;
    }

    function balanceOf(address account) external view returns (uint256) {
        return _balances[account];
    }

    function getRewardForDuration() external view returns (uint256) {
        return rewardRate.mul(rewardsDuration);
    }

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

    function rewardPerToken() public view returns (uint256) {
        if (_totalSupply == 0) {
            return rewardPerTokenStored;
        }
        return
            rewardPerTokenStored.add(
                lastTimeRewardApplicable()
                    .sub(lastUpdateTime)
                    .mul(rewardRate)
                    .mul(1e18)
                    .div(_totalSupply)
            );
    }

    function earned(address account) public view returns (uint256) {
        return
            _balances[account]
                .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))
                .div(1e18)
                .add(rewards[account]);
    }

    /* ========== RESTRICTED FUNCTIONS ========== */

    function notifyRewardAmount(uint256 reward)
        external
        override
        onlyRewardsDistribution
        updateReward(address(0))
    {
        if (block.timestamp >= periodFinish) {
            rewardRate = reward.div(rewardsDuration);
        } else {
            uint256 remaining = periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardRate);
            rewardRate = reward.add(leftover).div(rewardsDuration);
        }

        // Ensure the provided reward amount is not more than the balance in the contract.
        // This keeps the reward rate in the right range, preventing overflows due to
        // very high values of rewardRate in the earned and rewardsPerToken functions;
        // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow.
        uint256 balance = rewardsToken.balanceOf(address(this));
        require(
            rewardRate <= balance.div(rewardsDuration),
            "Provided reward too high"
        );

        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp.add(rewardsDuration);
        emit RewardAdded(reward);
    }

    // Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders
    function recoverERC20(address tokenAddress, uint256 tokenAmount)
        external
        onlyOwner
    {
        require(
            tokenAddress != address(stakingToken),
            "Cannot withdraw the staking token"
        );
        ERC20(tokenAddress).safeTransfer(owner, tokenAmount);
        emit Recovered(tokenAddress, tokenAmount);
    }

    function setRewardsDuration(uint256 _rewardsDuration) external onlyOwner {
        require(
            block.timestamp > periodFinish,
            "Previous rewards period must be complete before changing the duration for the new period"
        );
        rewardsDuration = _rewardsDuration;
        emit RewardsDurationUpdated(rewardsDuration);
    }

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

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

File 2 of 16 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 3 of 16 : SafeTransferLib.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

import {ERC20} from "../tokens/ERC20.sol";

/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)
/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.
/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller.
library SafeTransferLib {
    event Debug(bool one, bool two, uint256 retsize);

    /*//////////////////////////////////////////////////////////////
                             ETH OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferETH(address to, uint256 amount) internal {
        bool success;

        assembly {
            // Transfer the ETH and store if it succeeded or not.
            success := call(gas(), to, amount, 0, 0, 0, 0)
        }

        require(success, "ETH_TRANSFER_FAILED");
    }

    /*//////////////////////////////////////////////////////////////
                            ERC20 OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferFrom(
        ERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        bool success;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), from) // Append the "from" argument.
            mstore(add(freeMemoryPointer, 36), to) // Append the "to" argument.
            mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 100, 0, 32)
            )
        }

        require(success, "TRANSFER_FROM_FAILED");
    }

    function safeTransfer(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "TRANSFER_FAILED");
    }

    function safeApprove(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "APPROVE_FAILED");
    }
}

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 5 of 16 : IStakingRewards.sol
pragma solidity 0.8.15;

// https://docs.synthetix.io/contracts/source/interfaces/istakingrewards
interface IStakingRewards {
    // Mutative
    function exit() external;

    function getReward() external;

    function stake(uint256 amount) external;

    function withdraw(uint256 amount) external;

    // Views
    function balanceOf(address account) external view returns (uint256);

    function earned(address account) external view returns (uint256);

    function getRewardForDuration() external view returns (uint256);

    function lastTimeRewardApplicable() external view returns (uint256);

    function rewardPerToken() external view returns (uint256);

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

File 6 of 16 : RewardsDistributionRecipient.sol
pragma solidity 0.8.15;

// Inheritance
import "./Owned.sol";

// https://docs.synthetix.io/contracts/source/contracts/rewardsdistributionrecipient
abstract contract RewardsDistributionRecipient is Owned {
    address public rewardsDistribution;

    modifier onlyRewardsDistribution() {
        require(
            msg.sender == rewardsDistribution,
            "Caller is not RewardsDistribution contract"
        );
        _;
    }

    function notifyRewardAmount(uint256 reward) external virtual;

    function setRewardsDistribution(address _rewardsDistribution)
        external
        onlyOwner
    {
        rewardsDistribution = _rewardsDistribution;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

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

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

File 8 of 16 : ERC1155Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)

pragma solidity ^0.8.0;

import "./ERC1155Receiver.sol";

/**
 * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.
 *
 * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be
 * stuck.
 *
 * @dev _Available since v3.1._
 */
contract ERC1155Holder is ERC1155Receiver {
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

File 9 of 16 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 10 of 16 : ERC20.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*//////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*//////////////////////////////////////////////////////////////
                            EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*//////////////////////////////////////////////////////////////
                               ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*//////////////////////////////////////////////////////////////
                             EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                                ),
                                owner,
                                spender,
                                value,
                                nonces[owner]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}

File 11 of 16 : Owned.sol
pragma solidity 0.8.15;

// https://docs.synthetix.io/contracts/source/contracts/owned
contract Owned {
    address public owner;
    address public nominatedOwner;

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);

    modifier onlyOwner() {
        _onlyOwner();
        _;
    }

    constructor(address _owner) {
        require(_owner != address(0), "Owner address cannot be 0");
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_owner);

        emit OwnerChanged(owner, nominatedOwner);
        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    function acceptOwnership() external {
        require(
            msg.sender == nominatedOwner,
            "You must be nominated before you can accept ownership"
        );
        emit OwnerChanged(owner, nominatedOwner);
        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    function _onlyOwner() private view {
        require(
            msg.sender == owner,
            "Only the contract owner may perform this action"
        );
    }
}

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

pragma solidity ^0.8.0;

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

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

File 13 of 16 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
    }
}

File 14 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 15 of 16 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 16 of 16 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

Settings
{
  "remappings": [
    "@chainlink/=lib/chainlink/contracts/src/v0.8/",
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "@solmate/=lib/solmate/src/",
    "chainlink/=lib/chainlink/",
    "ds-test/=lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "solmate/=lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_rewardsDistribution","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"uint256","name":"_epochEnd","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"RewardsDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","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":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"id","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsDistribution","type":"address"}],"name":"setRewardsDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"}],"name":"setRewardsDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC1155","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102105760003560e01c806379ba509711610125578063bc197c81116100ad578063d1af0c7d1161007c578063d1af0c7d1461046d578063df136d6514610494578063e9fad8ee1461049d578063ebe2b12b146104a5578063f23a6e61146104ae57600080fd5b8063bc197c8114610411578063c8f33c9114610449578063cc1a378f14610452578063cd3daf9d1461046557600080fd5b80638980f11f116100f45780638980f11f146103af5780638b876347146103c25780638da5cb5b146103e2578063a694fc3a146103f5578063af640d0f1461040857600080fd5b806379ba50971461038e5780637b0a47ee1461039657806380faa57d1461039f5780638456cb59146103a757600080fd5b8063386a9525116101a85780633fc6df6e116101775780633fc6df6e146102f557806353a47bb7146103205780635c975abb1461033357806370a082311461033e57806372f702f31461036757600080fd5b8063386a9525146102c95780633c6b16ab146102d25780633d18b912146102e55780633f4ba83a146102ed57600080fd5b806318160ddd116101e457806318160ddd14610293578063197621431461029b5780631c1f78eb146102ae5780632e1a7d4d146102b657600080fd5b80628cc2621461021557806301ffc9a71461023b5780630700037d1461025e5780631627540c1461027e575b600080fd5b6102286102233660046113ab565b6104cd565b6040519081526020015b60405180910390f35b61024e6102493660046113c6565b61054b565b6040519015158152602001610232565b61022861026c3660046113ab565b600c6020526000908152604090205481565b61029161028c3660046113ab565b610580565b005b600d54610228565b6102916102a93660046113ab565b61064c565b610228610676565b6102916102c43660046113f0565b610694565b61022860075481565b6102916102e03660046113f0565b61086d565b610291610ad9565b610291610c37565b600254610308906001600160a01b031681565b6040516001600160a01b039091168152602001610232565b600154610308906001600160a01b031681565b60045460ff1661024e565b61022861034c3660046113ab565b6001600160a01b03166000908152600e602052604090205490565b6103087f0000000000000000000000003e42e8d8357d05c66674ceb34f47bd4536d5a2b681565b610291610c49565b61022860065481565b610228610d33565b610291610d4a565b6102916103bd366004611409565b610d5a565b6102286103d03660046113ab565b600b6020526000908152604090205481565b600054610308906001600160a01b031681565b6102916104033660046113f0565b610e4d565b610228600a5481565b61043061041f36600461156a565b63bc197c8160e01b95945050505050565b6040516001600160e01b03199091168152602001610232565b61022860085481565b6102916104603660046113f0565b61100e565b6102286110ee565b6103087f00000000000000000000000065c936f008bc34fe819bce9fa5afd9dc2d49977f81565b61022860095481565b610291611139565b61022860055481565b6104306104bc366004611614565b63f23a6e6160e01b95945050505050565b6001600160a01b0381166000908152600c6020908152604080832054600b909252822054610545919061053f90670de0b6b3a7640000906105399061051a906105146110ee565b9061115a565b6001600160a01b0388166000908152600e60205260409020549061116d565b90611179565b90611185565b92915050565b60006001600160e01b03198216630271189760e51b148061054557506301ffc9a760e01b6001600160e01b0319831614610545565b610588611191565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229060200160405180910390a1600054600154604080516001600160a01b0393841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a15060018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b610654611191565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600061068f60075460065461116d90919063ffffffff16565b905090565b6002600354036106bf5760405162461bcd60e51b81526004016106b690611679565b60405180910390fd5b6002600355336106cd6110ee565b6009556106d8610d33565b6008556001600160a01b0381161561071f576106f3816104cd565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b600082116107635760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b60448201526064016106b6565b600d54610770908361115a565b600d55336000908152600e602052604090205461078d908361115a565b336000818152600e60205260409081902092909255600a549151637921219560e11b81527f0000000000000000000000003e42e8d8357d05c66674ceb34f47bd4536d5a2b66001600160a01b03169263f242432a926107f39230929088906004016116b0565b600060405180830381600087803b15801561080d57600080fd5b505af1158015610821573d6000803e3d6000fd5b5050600a5460408051918252602082018690523393507f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc69250015b60405180910390a250506001600355565b6002546001600160a01b031633146108da5760405162461bcd60e51b815260206004820152602a60248201527f43616c6c6572206973206e6f742052657761726473446973747269627574696f6044820152691b8818dbdb9d1c9858dd60b21b60648201526084016106b6565b60006108e46110ee565b6009556108ef610d33565b6008556001600160a01b038116156109365761090a816104cd565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b60055442106109555760075461094d908390611179565b600655610998565b600554600090610965904261115a565b9050600061097e6006548361116d90919063ffffffff16565b600754909150610992906105398684611185565b60065550505b6040516370a0823160e01b81523060048201526000907f00000000000000000000000065c936f008bc34fe819bce9fa5afd9dc2d49977f6001600160a01b0316906370a0823190602401602060405180830381865afa1580156109ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2391906116e8565b9050610a3a6007548261117990919063ffffffff16565b6006541115610a8b5760405162461bcd60e51b815260206004820152601860248201527f50726f76696465642072657761726420746f6f2068696768000000000000000060448201526064016106b6565b426008819055600754610a9e9190611185565b6005556040518381527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a1505050565b600260035403610afb5760405162461bcd60e51b81526004016106b690611679565b600260035560045460ff1615610b465760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106b6565b33610b4f6110ee565b600955610b5a610d33565b6008556001600160a01b03811615610ba157610b75816104cd565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b336000908152600c60205260409020548015610c2e57336000818152600c6020526040812055610bfc907f00000000000000000000000065c936f008bc34fe819bce9fa5afd9dc2d49977f6001600160a01b03169083611203565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200161085c565b50506001600355565b610c3f611191565b610c47611281565b565b6001546001600160a01b03163314610cc15760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b60648201526084016106b6565b600054600154604080516001600160a01b0393841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b60006005544210610d45575060055490565b504290565b610d52611191565b610c47611314565b610d62611191565b7f0000000000000000000000003e42e8d8357d05c66674ceb34f47bd4536d5a2b66001600160a01b0316826001600160a01b031603610ded5760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f7420776974686472617720746865207374616b696e6720746f6b656044820152603760f91b60648201526084016106b6565b600054610e07906001600160a01b03848116911683611203565b604080516001600160a01b0384168152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28910160405180910390a15050565b600260035403610e6f5760405162461bcd60e51b81526004016106b690611679565b600260035533610e7d6110ee565b600955610e88610d33565b6008556001600160a01b03811615610ecf57610ea3816104cd565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b81600003610f105760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b60448201526064016106b6565b600d54610f1d9083611185565b600d55336000908152600e6020526040902054610f3a9083611185565b336000818152600e60205260409081902092909255600a549151637921219560e11b81527f0000000000000000000000003e42e8d8357d05c66674ceb34f47bd4536d5a2b66001600160a01b03169263f242432a92610fa1929091309188906004016116b0565b600060405180830381600087803b158015610fbb57600080fd5b505af1158015610fcf573d6000803e3d6000fd5b5050600a5460408051918252602082018690523393507f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee9092500161085c565b611016611191565b60055442116110b35760405162461bcd60e51b815260206004820152605860248201527f50726576696f7573207265776172647320706572696f64206d7573742062652060448201527f636f6d706c657465206265666f7265206368616e67696e67207468652064757260648201527f6174696f6e20666f7220746865206e657720706572696f640000000000000000608482015260a4016106b6565b60078190556040518181527ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d39060200160405180910390a150565b6000600d54600003611101575060095490565b61068f611130600d54610539670de0b6b3a764000061112a60065461112a600854610514610d33565b9061116d565b60095490611185565b336000908152600e602052604090205461115290610694565b610c47610ad9565b60006111668284611717565b9392505050565b6000611166828461172e565b6000611166828461174d565b6000611166828461176f565b6000546001600160a01b03163314610c475760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b60648201526084016106b6565b600060405163a9059cbb60e01b8152836004820152826024820152602060006044836000895af13d15601f3d116001600051141617169150508061127b5760405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b60448201526064016106b6565b50505050565b60045460ff166112ca5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106b6565b6004805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60045460ff161561135a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106b6565b6004805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586112f73390565b80356001600160a01b03811681146113a657600080fd5b919050565b6000602082840312156113bd57600080fd5b6111668261138f565b6000602082840312156113d857600080fd5b81356001600160e01b03198116811461116657600080fd5b60006020828403121561140257600080fd5b5035919050565b6000806040838503121561141c57600080fd5b6114258361138f565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561147257611472611433565b604052919050565b600082601f83011261148b57600080fd5b8135602067ffffffffffffffff8211156114a7576114a7611433565b8160051b6114b6828201611449565b92835284810182019282810190878511156114d057600080fd5b83870192505b848310156114ef578235825291830191908301906114d6565b979650505050505050565b600082601f83011261150b57600080fd5b813567ffffffffffffffff81111561152557611525611433565b611538601f8201601f1916602001611449565b81815284602083860101111561154d57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561158257600080fd5b61158b8661138f565b94506115996020870161138f565b9350604086013567ffffffffffffffff808211156115b657600080fd5b6115c289838a0161147a565b945060608801359150808211156115d857600080fd5b6115e489838a0161147a565b935060808801359150808211156115fa57600080fd5b50611607888289016114fa565b9150509295509295909350565b600080600080600060a0868803121561162c57600080fd5b6116358661138f565b94506116436020870161138f565b93506040860135925060608601359150608086013567ffffffffffffffff81111561166d57600080fd5b611607888289016114fa565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b6000602082840312156116fa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561172957611729611701565b500390565b600081600019048311821515161561174857611748611701565b500290565b60008261176a57634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561178257611782611701565b50019056fea26469706673582212207b10ff3744839c854284ea767d0c767a5fa469fa66fdd6dd67e57a741dc9da2f64736f6c634300080f0033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.