Contract 0x25bd0f92faec987fe978714eac986b2515f5e2fc 2

 
 
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0xe764743c97b5f3507bfbd2e194b478473865808e8e8b27c21d33a1da35bb727eWithdraw386818982023-01-29 22:52:3961 days 16 hrs ago0x9bdbdb4a8f7f816c87a67f5281484ed902c6b942 IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.0062850292881.180951696
0x1d28e728b942786af033470d541b40f23202d21a8758f366f063ba1be0ea07c2Withdraw376986752023-01-05 10:35:0486 days 4 hrs ago0x6285f201641ae13d7ae9a272987f756c0a17c68d IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.00731507676
0x433459836037afa4d6bde0c24d45da794a746ef4b2ab26115f2a4b27d03c1eb1Deposit376984562023-01-05 10:27:3386 days 4 hrs ago0x6285f201641ae13d7ae9a272987f756c0a17c68d IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.01200020771
0xfcfe8976effa3f6c12df4fb5e796b4547ee25c126a1596dcf3547d5fa7dff493Withdraw374249072022-12-29 15:41:3992 days 23 hrs ago0x6285f201641ae13d7ae9a272987f756c0a17c68d IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.008704208075 85.561019508
0x6a01bef10d024154f08528e46be70cdb9940f3b6d30165d11c636e94b2ec7a14Deposit374217342022-12-29 13:50:2093 days 1 hr ago0x6285f201641ae13d7ae9a272987f756c0a17c68d IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.007875265546 53.351120143
0x6ceb056a9ded991e45eea7117f3927dee8cc59d76677c73202e2b4eb7eff43bcWithdraw373426722022-12-27 14:24:4995 days 39 mins ago0x6285f201641ae13d7ae9a272987f756c0a17c68d IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.010959192 108
0x48ba22ed685fb956e3beaa4f794b673f6d3e9fb511f3c4e14ff161899eac5aeeDeposit373426452022-12-27 14:23:5195 days 40 mins ago0x6285f201641ae13d7ae9a272987f756c0a17c68d IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.012267936 108
0x9cb03dce133574858116aa7d172d2c94c30c0266895815204f801cc2503650d4Deposit373425852022-12-27 14:21:4795 days 42 mins ago0x6285f201641ae13d7ae9a272987f756c0a17c68d IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.013392925 91
0xa7c991af0228912731f2e90876777c3d3ed633ade3dbe3a3889e74ab87eef53fWithdraw370949252022-12-21 10:49:53101 days 4 hrs ago0x3f1a1f2725d5f073ab4fafeb304c180d575ad8e6 IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.006173802498 60.834031279
0xc439eb91ed535a2b4ad20956ef9c3c5d7cc73b9a4390c75600b9dd2cbb644af4Deposit370947602022-12-21 10:44:11101 days 4 hrs ago0x3f1a1f2725d5f073ab4fafeb304c180d575ad8e6 IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.009692944107 65.854621044
0x3f9cb051a58494b8fb7c4afd1ad6311cf48098a6a18d3f91c922370d5821212cWithdraw363641462022-12-03 6:17:22119 days 8 hrs ago0x70f5c37c3fef4a07b60bc5c7cb9b440662ee3c68 IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.003325834105.945272694
0x18c95e13d4311364afac44003c8ed2897689c2201439e3fc0f544e77b7bede21Withdraw362531852022-11-30 12:37:48122 days 2 hrs ago0x70f5c37c3fef4a07b60bc5c7cb9b440662ee3c68 IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.00771293676
0x9438d45786a485cac192028a6df06a5bdc7b0d91dbf6bfeb05ecf4b397a85588Deposit362531382022-11-30 12:36:10122 days 2 hrs ago0x70f5c37c3fef4a07b60bc5c7cb9b440662ee3c68 IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.0090873680
0xb4d56b7a1bd47b1e9a39f4e946b5799e0a15edde8716d354d985030e8984428eDeposit362530292022-11-30 12:32:24122 days 2 hrs ago0x70f5c37c3fef4a07b60bc5c7cb9b440662ee3c68 IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.018839936128
0xc4478813ca0a863c598056fefcc489bcb340a5d7a229131042b21d408f4ab3f0Deposit358452922022-11-20 13:44:12132 days 1 hr ago0x9bdbdb4a8f7f816c87a67f5281484ed902c6b942 IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.005304419841 33.424616831
0x94e2fdf7912a4c34ed769d352d796cc87a0935a27e46ae04c71f2ffdc4dd6beeWithdraw358439602022-11-20 12:58:08132 days 2 hrs ago0x9bdbdb4a8f7f816c87a67f5281484ed902c6b942 IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.00443676 40
0xa2f75bc2c374fe2cad569de069c05acb71477b85d7617121946eccd5ec0dc8ccDeposit358436142022-11-20 12:44:22132 days 2 hrs ago0x9bdbdb4a8f7f816c87a67f5281484ed902c6b942 IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.002423460037 30.006315082
0xcc7ce7f65abfd648b009da8ed9f330ff98678b9bdd3552d31aa3f54c814a79bfWithdraw356371162022-11-15 12:29:27137 days 2 hrs ago0x1c8faa756493e2678bed8d8b8b4df1090d17aa05 IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.003906228271 50.473934581
0x0ac23db73a5f5a6370ff32e6db2f917547884b3425dc71a37a2d9d6b3af9fdfeWithdraw354732032022-11-11 9:39:55141 days 5 hrs ago0xfef3bf11e6b1a2541b44db599a1f86bc4e50aadb IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.018312622294 216.192931879
0x9fb1f13e07b3907601f485223fa4798f600d81ba0794840d94db9d51165fd437Withdraw354731972022-11-11 9:39:31141 days 5 hrs ago0xfef3bf11e6b1a2541b44db599a1f86bc4e50aadb IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.018473367455 205.22087445
0xe23a2dcadc6f929f5f6f7aa5fb5079080e430191d26a522b3117f59318975182Deposit354731892022-11-11 9:38:59141 days 5 hrs ago0xfef3bf11e6b1a2541b44db599a1f86bc4e50aadb IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.018729705809 179.814957703
0xadc46feb28e5a0687837d7b3d7e5578bf65904bfb4febff33da5bf02bddda4e6Withdraw339119152022-10-04 7:48:31179 days 7 hrs ago0xeb4321ef99c988f90134fb2cdc4181242102d552 IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.006934884 44
0xc0616d70fefa55b5e6544d9a91e56afdf406c967db43a7ecbd09fb204adcf4aaDeposit339111202022-10-04 7:21:13179 days 7 hrs ago0xeb4321ef99c988f90134fb2cdc4181242102d552 IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.0070766 40
0x8046c29d43e03dd9b556c2f067e75376f3685640a69c0b8bd89fd7c4cc230d4dWithdraw338304052022-10-02 8:47:15181 days 6 hrs ago0x6285f201641ae13d7ae9a272987f756c0a17c68d IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.00608716 40
0x50225f47517643cb3525dfde6a236fb647b39fe788c1b77af72c63713acbba89Deposit338296492022-10-02 8:19:07181 days 6 hrs ago0x6285f201641ae13d7ae9a272987f756c0a17c68d IN  0x25bd0f92faec987fe978714eac986b2515f5e2fc0 MATIC0.005949960003 30.000000017
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

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

Contract Name:
MushroomFarm

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : MushroomFarm.sol
// File: masterchef.sol

pragma solidity 0.8.10;

import '@openzeppelin/contracts8/access/Ownable.sol';
import '@openzeppelin/contracts8/utils/math/SafeMath.sol';
import '@openzeppelin/contracts8/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts8/security/ReentrancyGuard.sol';

import './MushToken.sol';

contract MushroomFarm is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    // Info of each user.
    struct UserInfo {
        uint256 amount; // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt.
    }

    // Info of each pool.
    struct PoolInfo {
        IERC20 lpToken; // Address of LP token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool. Native to distribute per second.
        uint256 lastRewardSecond; // Last second that Native distribution occurs.
        uint256 accNativePerShare; // Accumulated Native per share, times 1e18. See below.
        uint16 depositFeeBP; // Deposit fee in basis points
        uint256 lpSupply;
        bool isNative;
    }

    // The native token!
    MushToken public immutable native;
    // Dev address.
    address public devaddr;
    // Marketing address for giveaways and promotions
    address public marketingAddr;
    // Native tokens created per second.
    uint256 public nativePerSecond;
    // Deposit Fee address
    address public feeAddress;
    // Max emission rate.
    uint256 public constant MAX_EMISSION_RATE = 10 ether;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block timestamp when native mining starts.
    uint256 public startTime;

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(
        address indexed user,
        uint256 indexed pid,
        uint256 amount
    );
    event SetFeeAddress(address indexed user, address indexed newAddress);
    event SetDevAddress(address indexed user, address indexed newAddress);
    event UpdateEmissionRate(address indexed user, uint256 nativePerSecond);
    event addPool(
        uint256 indexed pid,
        address lpToken,
        uint256 allocPoint,
        uint256 depositFeeBP
    );
    event setPool(
        uint256 indexed pid,
        address lpToken,
        uint256 allocPoint,
        uint256 depositFeeBP
    );
    event UpdateStartTime(uint256 newStartTime);

    constructor(
        MushToken _native,
        address _devaddr,
        address _marketingAddr,
        address _feeAddress,
        uint256 _NativePerSecond,
        uint256 _startTime
    ) {
        native = _native;
        devaddr = _devaddr;
        marketingAddr = _marketingAddr;
        feeAddress = _feeAddress;
        nativePerSecond = _NativePerSecond;
        startTime = _startTime;
    }

    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    mapping(IERC20 => bool) public poolExistence;
    modifier nonDuplicated(IERC20 _lpToken) {
        require(poolExistence[_lpToken] == false, 'nonDuplicated: duplicated');
        _;
    }

    // Add a new lp to the pool. Can only be called by the owner.
    function add(
        uint256 _allocPoint,
        IERC20 _lpToken,
        uint16 _depositFeeBP,
        bool _isNative,
        bool _withUpdate
    ) public onlyOwner nonDuplicated(_lpToken) {
        // valid ERC20 token
        _lpToken.balanceOf(address(this));

        require(_depositFeeBP <= 400, 'add: invalid deposit fee basis points');
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardSecond = block.timestamp > startTime
            ? block.timestamp
            : startTime;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolExistence[_lpToken] = true;
        poolInfo.push(
            PoolInfo({
                lpToken: _lpToken,
                allocPoint: _allocPoint,
                lastRewardSecond: lastRewardSecond,
                accNativePerShare: 0,
                depositFeeBP: _depositFeeBP,
                lpSupply: 0,
                isNative: _isNative
            })
        );

        emit addPool(
            poolInfo.length - 1,
            address(_lpToken),
            _allocPoint,
            _depositFeeBP
        );
    }

    // Update the given pool's native allocation point and deposit fee. Can only be called by the owner.
    function set(
        uint256 _pid,
        uint256 _allocPoint,
        uint16 _depositFeeBP,
        bool _withUpdate
    ) external onlyOwner {
        require(_depositFeeBP <= 400, 'set: invalid deposit fee basis points');
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(
            _allocPoint
        );
        poolInfo[_pid].allocPoint = _allocPoint;
        poolInfo[_pid].depositFeeBP = _depositFeeBP;

        emit setPool(
            _pid,
            address(poolInfo[_pid].lpToken),
            _allocPoint,
            _depositFeeBP
        );
    }

    // Sets the deposit fee of all non natives in the farm.
    function setGlobalDepositFee(uint16 _globalDepositFeeBP)
        external
        onlyOwner
    {
        require(
            _globalDepositFeeBP <= 400,
            'set: invalid deposit fee basis points'
        );

        for (uint256 pid = 0; pid < poolInfo.length; ++pid) {
            if (poolInfo[pid].isNative == false) {
                updatePool(pid);
                poolInfo[pid].depositFeeBP = _globalDepositFeeBP;

                emit setPool(
                    pid,
                    address(poolInfo[pid].lpToken),
                    poolInfo[pid].allocPoint,
                    _globalDepositFeeBP
                );
            }
        }
    }

    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to)
        public
        pure
        returns (uint256)
    {
        return _to.sub(_from);
    }

    // View function to see pending native on frontend.
    function pendingNative(uint256 _pid, address _user)
        external
        view
        returns (uint256)
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accNativePerShare = pool.accNativePerShare;
        if (
            block.timestamp > pool.lastRewardSecond &&
            pool.lpSupply != 0 &&
            totalAllocPoint > 0
        ) {
            uint256 multiplier = getMultiplier(
                pool.lastRewardSecond,
                block.timestamp
            );
            uint256 nativeReward = multiplier
                .mul(nativePerSecond)
                .mul(pool.allocPoint)
                .div(totalAllocPoint);
            uint256 devReward = nativeReward.div(10);
            uint256 totalRewards = native.totalSupply().add(devReward).add(
                nativeReward
            );
            if (totalRewards > native.cap()) {
                nativeReward = native.cap().sub(native.totalSupply());
            }
            accNativePerShare = accNativePerShare.add(
                nativeReward.mul(1e18).div(pool.lpSupply)
            );
        }
        return
            user.amount.mul(accNativePerShare).div(1e18).sub(user.rewardDebt);
    }

    // Update reward variables for all pools. Be careful of gas spending!
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.timestamp <= pool.lastRewardSecond) {
            return;
        }
        if (pool.lpSupply == 0 || pool.allocPoint == 0) {
            pool.lastRewardSecond = block.timestamp;
            return;
        }
        uint256 multiplier = getMultiplier(
            pool.lastRewardSecond,
            block.timestamp
        );
        uint256 nativeReward = multiplier
            .mul(nativePerSecond)
            .mul(pool.allocPoint)
            .div(totalAllocPoint);

        uint256 devReward = nativeReward.div(10);
        uint256 marketingReward = nativeReward.div(50);
        uint256 totalRewards = native
            .totalSupply()
            .add(devReward)
            .add(nativeReward)
            .add(marketingReward);

        if (totalRewards <= native.cap()) {
            // mint as normal as not at maxSupply
            native.mint(devaddr, nativeReward.div(10));
            native.mint(marketingAddr, nativeReward.div(50));
            native.mint(address(this), nativeReward);
        } else {
            // mint the difference only to MC, update nativeReward
            nativeReward = native.cap().sub(native.totalSupply());
            native.mint(address(this), nativeReward);
        }

        if (nativeReward != 0) {
            // only calculate and update if nativeReward is non 0
            pool.accNativePerShare = pool.accNativePerShare.add(
                nativeReward.mul(1e18).div(pool.lpSupply)
            );
        }

        pool.lastRewardSecond = block.timestamp;
    }

    // Deposit LP tokens to MasterChef for native allocation.
    function deposit(uint256 _pid, uint256 _amount) external nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending = user
                .amount
                .mul(pool.accNativePerShare)
                .div(1e18)
                .sub(user.rewardDebt);
            if (pending > 0) {
                safeNativeTransfer(msg.sender, pending);
            }
        }
        if (_amount > 0) {
            uint256 balanceBefore = pool.lpToken.balanceOf(address(this));
            pool.lpToken.safeTransferFrom(
                address(msg.sender),
                address(this),
                _amount
            );
            _amount = pool.lpToken.balanceOf(address(this)).sub(balanceBefore);
            if (pool.depositFeeBP > 0) {
                uint256 depositFee = _amount.mul(pool.depositFeeBP).div(10000);
                pool.lpToken.safeTransfer(feeAddress, depositFee);
                user.amount = user.amount.add(_amount).sub(depositFee);
                pool.lpSupply = pool.lpSupply.add(_amount).sub(depositFee);
            } else {
                user.amount = user.amount.add(_amount);
                pool.lpSupply = pool.lpSupply.add(_amount);
            }
        }
        user.rewardDebt = user.amount.mul(pool.accNativePerShare).div(1e18);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _amount) external nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, 'withdraw: not good');
        updatePool(_pid);
        uint256 pending = user.amount.mul(pool.accNativePerShare).div(1e18).sub(
            user.rewardDebt
        );
        if (pending > 0) {
            safeNativeTransfer(msg.sender, pending);
        }
        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.lpToken.safeTransfer(address(msg.sender), _amount);
            pool.lpSupply = pool.lpSupply.sub(_amount);
        }
        user.rewardDebt = user.amount.mul(pool.accNativePerShare).div(1e18);
        emit Withdraw(msg.sender, _pid, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) external nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        pool.lpToken.safeTransfer(address(msg.sender), amount);

        if (pool.lpSupply >= amount) {
            pool.lpSupply = pool.lpSupply.sub(amount);
        } else {
            pool.lpSupply = 0;
        }

        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }

    // Safe native transfer function, just in case if rounding error causes pool to not have enough coins.
    function safeNativeTransfer(address _to, uint256 _amount) internal {
        uint256 starBal = native.balanceOf(address(this));
        bool transferSuccess = false;
        if (_amount > starBal) {
            transferSuccess = native.transfer(_to, starBal);
        } else {
            transferSuccess = native.transfer(_to, _amount);
        }
        require(transferSuccess, 'safeNativeTransfer: transfer failed');
    }

    // Update dev address.
    function setDevAddress(address _devaddr) external {
        require(_devaddr != address(0), '!nonzero');
        require(msg.sender == devaddr, 'dev: wut?');
        devaddr = _devaddr;
        emit SetDevAddress(msg.sender, _devaddr);
    }

    function setFeeAddress(address _feeAddress) external {
        require(msg.sender == feeAddress, 'setFeeAddress: FORBIDDEN');
        require(_feeAddress != address(0), '!nonzero');
        feeAddress = _feeAddress;
        emit SetFeeAddress(msg.sender, _feeAddress);
    }

    //Pancake has to add hidden dummy pools inorder to alter the emission, here we make it simple and transparent to all.
    function updateEmissionRate(uint256 _NativePerSecond) external onlyOwner {
        require(_NativePerSecond <= MAX_EMISSION_RATE, 'Emission too high');
        massUpdatePools();
        nativePerSecond = _NativePerSecond;
        emit UpdateEmissionRate(msg.sender, _NativePerSecond);
    }

    // Only update before start of farm
    function updateStartTime(uint256 _newStartTime) external onlyOwner {
        require(
            block.timestamp < startTime,
            'cannot change start time if farm has already started'
        );
        require(
            block.timestamp < _newStartTime,
            'cannot set start time in the past'
        );
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            PoolInfo storage pool = poolInfo[pid];
            pool.lastRewardSecond = _newStartTime;
        }
        startTime = _newStartTime;

        emit UpdateStartTime(startTime);
    }
}

File 2 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 12 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 substraction 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 4 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 5 of 12 : 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 6 of 12 : MushToken.sol
pragma solidity ^0.8.0;

import '@openzeppelin/contracts8/access/Ownable.sol';
import '@openzeppelin/contracts8/token/ERC20/ERC20.sol';
import '@openzeppelin/contracts8/token/ERC20/extensions/ERC20Capped.sol';

contract MushToken is ERC20Capped, Ownable {
    constructor()
        public
        ERC20('Mush', 'MUSH')
        ERC20Capped(10000000 * (10**uint256(18)))
    {}

    function mint(address account, uint256 amount) public onlyOwner {
        _mint(account, amount);
    }
}

File 7 of 12 : 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 8 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 9 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

        return true;
    }

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

        _beforeTokenTransfer(from, to, amount);

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

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 11 of 12 : ERC20Capped.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Capped.sol)

pragma solidity ^0.8.0;

import "../ERC20.sol";

/**
 * @dev Extension of {ERC20} that adds a cap to the supply of tokens.
 */
abstract contract ERC20Capped is ERC20 {
    uint256 private immutable _cap;

    /**
     * @dev Sets the value of the `cap`. This value is immutable, it can only be
     * set once during construction.
     */
    constructor(uint256 cap_) {
        require(cap_ > 0, "ERC20Capped: cap is 0");
        _cap = cap_;
    }

    /**
     * @dev Returns the cap on the token's total supply.
     */
    function cap() public view virtual returns (uint256) {
        return _cap;
    }

    /**
     * @dev See {ERC20-_mint}.
     */
    function _mint(address account, uint256 amount) internal virtual override {
        require(ERC20.totalSupply() + amount <= cap(), "ERC20Capped: cap exceeded");
        super._mint(account, amount);
    }
}

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

pragma solidity ^0.8.0;

import "../IERC20.sol";

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract MushToken","name":"_native","type":"address"},{"internalType":"address","name":"_devaddr","type":"address"},{"internalType":"address","name":"_marketingAddr","type":"address"},{"internalType":"address","name":"_feeAddress","type":"address"},{"internalType":"uint256","name":"_NativePerSecond","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"SetDevAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"SetFeeAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"nativePerSecond","type":"uint256"}],"name":"UpdateEmissionRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newStartTime","type":"uint256"}],"name":"UpdateStartTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"address","name":"lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"depositFeeBP","type":"uint256"}],"name":"addPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"address","name":"lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"depositFeeBP","type":"uint256"}],"name":"setPool","type":"event"},{"inputs":[],"name":"MAX_EMISSION_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"bool","name":"_isNative","type":"bool"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devaddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"marketingAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"native","outputs":[{"internalType":"contract MushToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativePerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingNative","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"poolExistence","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardSecond","type":"uint256"},{"internalType":"uint256","name":"accNativePerShare","type":"uint256"},{"internalType":"uint16","name":"depositFeeBP","type":"uint16"},{"internalType":"uint256","name":"lpSupply","type":"uint256"},{"internalType":"bool","name":"isNative","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_devaddr","type":"address"}],"name":"setDevAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_globalDepositFeeBP","type":"uint16"}],"name":"setGlobalDepositFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","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":[{"internalType":"uint256","name":"_NativePerSecond","type":"uint256"}],"name":"updateEmissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newStartTime","type":"uint256"}],"name":"updateStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405260006008553480156200001657600080fd5b5060405162002c2d38038062002c2d833981016040819052620000399162000102565b620000443362000099565b600180556001600160a01b03958616608052600280549587166001600160a01b03199687161790556003805494871694861694909417909355600580549290951691909316179092556004556009556200017e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620000ff57600080fd5b50565b60008060008060008060c087890312156200011c57600080fd5b86516200012981620000e9565b60208801519096506200013c81620000e9565b60408801519095506200014f81620000e9565b60608801519094506200016281620000e9565b809350506080870151915060a087015190509295509295509295565b608051612a31620001fc6000396000818161021801528181610a5f01528181610ae901528181610b7c01528181610c3101528181610cf701528181610d6701528181610de901528181610e8801528181611f2b01528181611f8b0152818161201701528181612114015281816121b901526122530152612a316000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063715018a611610104578063d0d41fe1116100a2578063e2bbb15811610071578063e2bbb15814610440578063ecb1ab5414610453578063f2fde38b14610466578063fa3b627b1461047957600080fd5b8063d0d41fe1146103f4578063d49e77cd14610407578063d96384221461041a578063dc9464b91461042d57600080fd5b80638da5cb5b116100de5780638da5cb5b146103565780638dbb1e3a1461036757806393f1a40b1461037a578063cbd258b5146103c157600080fd5b8063715018a61461033257806378e979251461033a5780638705fcd41461034357600080fd5b806341275358116101715780634be5ac891161014b5780634be5ac89146102fb57806351eb05a6146103045780635312ea8e14610317578063630b5ba11461032a57600080fd5b806341275358146102c6578063436cc3d6146102d9578063441a3e70146102e857600080fd5b806311b0b42d116101ad57806311b0b42d146102135780631526fe271461025257806317caf6f1146102aa5780633ff42b92146102b357600080fd5b806306bcf02f146101d4578063081e3eda146101e95780630ba84cd214610200575b600080fd5b6101e76101e2366004612708565b61048c565b005b6006545b6040519081526020015b60405180910390f35b6101e761020e366004612708565b61065e565b61023a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101f7565b610265610260366004612708565b610755565b604080516001600160a01b039098168852602088019690965294860193909352606085019190915261ffff16608084015260a0830152151560c082015260e0016101f7565b6101ed60085481565b60035461023a906001600160a01b031681565b60055461023a906001600160a01b031681565b6101ed678ac7230489e8000081565b6101e76102f6366004612721565b6107b5565b6101ed60045481565b6101e7610312366004612708565b61099c565b6101e7610325366004612708565b610f35565b6101e7611060565b6101e761108b565b6101ed60095481565b6101e7610351366004612758565b6110f1565b6000546001600160a01b031661023a565b6101ed610375366004612721565b6111e5565b6103ac610388366004612775565b60076020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016101f7565b6103e46103cf366004612758565b600a6020526000908152604090205460ff1681565b60405190151581526020016101f7565b6101e7610402366004612758565b6111f8565b60025461023a906001600160a01b031681565b6101e76104283660046127ca565b6112ec565b6101e761043b366004612812565b6114dc565b6101e761044e366004612721565b6118c3565b6101e7610461366004612878565b611b88565b6101e7610474366004612758565b611d7e565b6101ed610487366004612775565b611e60565b6000546001600160a01b031633146104eb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b60095442106105625760405162461bcd60e51b815260206004820152603460248201527f63616e6e6f74206368616e67652073746172742074696d65206966206661726d60448201527f2068617320616c7265616479207374617274656400000000000000000000000060648201526084016104e2565b8042106105d75760405162461bcd60e51b815260206004820152602160248201527f63616e6e6f74207365742073746172742074696d6520696e207468652070617360448201527f740000000000000000000000000000000000000000000000000000000000000060648201526084016104e2565b60065460005b81811015610621576000600682815481106105fa576105fa612893565b600091825260209091206002600790920201018490555061061a816128bf565b90506105dd565b5060098290556040518281527fa09018266c541576eb124551c9c57c82a8129add3ba6777a5974b1d0e6252e999060200160405180910390a15050565b6000546001600160a01b031633146106b85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e2565b678ac7230489e800008111156107105760405162461bcd60e51b815260206004820152601160248201527f456d697373696f6e20746f6f206869676800000000000000000000000000000060448201526064016104e2565b610718611060565b600481905560405181815233907fe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c40539060200160405180910390a250565b6006818154811061076557600080fd5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b03909516965092949193909261ffff16919060ff1687565b600260015414156108085760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104e2565b600260018190555060006006838154811061082557610825612893565b60009182526020808320868452600780835260408086203387529093529190932080549290910290920192508311156108a05760405162461bcd60e51b815260206004820152601260248201527f77697468647261773a206e6f7420676f6f64000000000000000000000000000060448201526064016104e2565b6108a98461099c565b60006108e682600101546108e0670de0b6b3a76400006108da876003015487600001546120d890919063ffffffff16565b906120e4565b906120f0565b905080156108f8576108f833826120fc565b831561093757815461090a90856120f0565b82558254610922906001600160a01b0316338661233c565b600583015461093190856120f0565b60058401555b6003830154825461095591670de0b6b3a7640000916108da916120d8565b6001830155604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a3505060018055505050565b6000600682815481106109b1576109b1612893565b90600052602060002090600702019050806002015442116109d0575050565b600581015415806109e357506001810154155b156109f2574260029091015550565b6000610a028260020154426111e5565b90506000610a2f6008546108da8560010154610a29600454876120d890919063ffffffff16565b906120d8565b90506000610a3e82600a6120e4565b90506000610a4d8360326120e4565b90506000610ae582610adf86610adf877f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610abb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adf91906128da565b906123d1565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663355274ea6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6991906128da565b8111610d62576002546001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116916340c10f199116610bb087600a6120e4565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015610c0e57600080fd5b505af1158015610c22573d6000803e3d6000fd5b50506003546001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811693506340c10f19925016610c678760326120e4565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015610cc557600080fd5b505af1158015610cd9573d6000803e3d6000fd5b50506040516340c10f1960e01b8152306004820152602481018790527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692506340c10f199150604401600060405180830381600087803b158015610d4557600080fd5b505af1158015610d59573d6000803e3d6000fd5b50505050610eed565b610e697f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de791906128da565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663355274ea6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e45573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e091906128da565b6040516340c10f1960e01b8152306004820152602481018290529094507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906340c10f1990604401600060405180830381600087803b158015610ed457600080fd5b505af1158015610ee8573d6000803e3d6000fd5b505050505b8315610f23576005860154610f1d90610f12906108da87670de0b6b3a76400006120d8565b6003880154906123d1565b60038701555b42866002018190555050505050505050565b60026001541415610f885760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104e2565b6002600181905550600060068281548110610fa557610fa5612893565b60009182526020808320858452600780835260408086203380885294528520805486825560018201969096559302018054909450919291610ff2916001600160a01b03909116908361233c565b8083600501541061101657600583015461100c90826120f0565b600584015561101e565b600060058401555b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595906020015b60405180910390a35050600180555050565b60065460005b81811015611087576110778161099c565b611080816128bf565b9050611066565b5050565b6000546001600160a01b031633146110e55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e2565b6110ef60006123dd565b565b6005546001600160a01b0316331461114b5760405162461bcd60e51b815260206004820152601860248201527f736574466565416464726573733a20464f5242494444454e000000000000000060448201526064016104e2565b6001600160a01b03811661118c5760405162461bcd60e51b8152602060048201526008602482015267216e6f6e7a65726f60c01b60448201526064016104e2565b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03831690811790915560405133907fd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f790600090a350565b60006111f182846120f0565b9392505050565b6001600160a01b0381166112395760405162461bcd60e51b8152602060048201526008602482015267216e6f6e7a65726f60c01b60448201526064016104e2565b6002546001600160a01b031633146112935760405162461bcd60e51b815260206004820152600960248201527f6465763a207775743f000000000000000000000000000000000000000000000060448201526064016104e2565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03831690811790915560405133907f618c54559e94f1499a808aad71ee8729f8e74e8c48e979616328ce493a1a52e790600090a350565b6000546001600160a01b031633146113465760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e2565b6101908261ffff1611156113aa5760405162461bcd60e51b815260206004820152602560248201527f7365743a20696e76616c6964206465706f7369742066656520626173697320706044820152646f696e747360d81b60648201526084016104e2565b80156113b8576113b8611060565b6113f583610adf600687815481106113d2576113d2612893565b9060005260206000209060070201600101546008546120f090919063ffffffff16565b600881905550826006858154811061140f5761140f612893565b906000526020600020906007020160010181905550816006858154811061143857611438612893565b906000526020600020906007020160040160006101000a81548161ffff021916908361ffff160217905550837f39f0c3d078af018954b4fa56832a05a2b511afaa999b133ea3f1c487c21ed2876006868154811061149857611498612893565b60009182526020918290206007919091020154604080516001600160a01b03909216825291810187905261ffff86168183015290519081900360600190a250505050565b6000546001600160a01b031633146115365760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e2565b6001600160a01b0384166000908152600a6020526040902054849060ff16156115a15760405162461bcd60e51b815260206004820152601960248201527f6e6f6e4475706c6963617465643a206475706c6963617465640000000000000060448201526064016104e2565b6040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa1580156115e5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160991906128da565b506101908461ffff16111561166e5760405162461bcd60e51b815260206004820152602560248201527f6164643a20696e76616c6964206465706f7369742066656520626173697320706044820152646f696e747360d81b60648201526084016104e2565b811561167c5761167c611060565b6000600954421161168f57600954611691565b425b6008549091506116a190886123d1565b6008556001600160a01b038681166000818152600a602090815260408083208054600160ff199182168117909255825160e0810184529586529285018d81529185018781526060860185815261ffff8d81166080890190815260a089018881528e151560c08b019081526006805480890182559a8190529a517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f6007909b029a8b01805473ffffffffffffffffffffffffffffffffffffffff191691909d1617909b5595517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4089015592517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4188015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4287015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d438601805461ffff19169190921617905590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4484015593517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4590920180549091169115159190911790555461186e91906128f3565b604080516001600160a01b0389168152602081018a905261ffff88168183015290517faa6642278d4bbef86d8990c37355d5d4dfe365c194106bdf7a65162268606f079181900360600190a250505050505050565b600260015414156119165760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104e2565b600260018190555060006006838154811061193357611933612893565b600091825260208083208684526007808352604080862033875290935291909320910290910191506119648461099c565b8054156119b057600061199c82600101546108e0670de0b6b3a76400006108da876003015487600001546120d890919063ffffffff16565b905080156119ae576119ae33826120fc565b505b8215611b315781546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156119fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a2291906128da565b8354909150611a3c906001600160a01b031633308761243a565b82546040516370a0823160e01b8152306004820152611a899183916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610e45573d6000803e3d6000fd5b600484015490945061ffff1615611b0c576004830154600090611ab990612710906108da90889061ffff166120d8565b6005548554919250611ad8916001600160a01b0390811691168361233c565b8254611aea9082906108e090886123d1565b83556005840154611b019082906108e090886123d1565b600585015550611b2f565b8154611b1890856123d1565b82556005830154611b2990856123d1565b60058401555b505b60038201548154611b4f91670de0b6b3a7640000916108da916120d8565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200161104e565b6000546001600160a01b03163314611be25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e2565b6101908161ffff161115611c465760405162461bcd60e51b815260206004820152602560248201527f7365743a20696e76616c6964206465706f7369742066656520626173697320706044820152646f696e747360d81b60648201526084016104e2565b60005b6006548110156110875760068181548110611c6657611c66612893565b600091825260209091206006600790920201015460ff16611d6e57611c8a8161099c565b8160068281548110611c9e57611c9e612893565b906000526020600020906007020160040160006101000a81548161ffff021916908361ffff160217905550807f39f0c3d078af018954b4fa56832a05a2b511afaa999b133ea3f1c487c21ed28760068381548110611cfe57611cfe612893565b6000918252602090912060079091020154600680546001600160a01b039092169185908110611d2f57611d2f612893565b600091825260209182902060016007909202010154604080516001600160a01b0390941684529183015261ffff86169082015260600160405180910390a25b611d77816128bf565b9050611c49565b6000546001600160a01b03163314611dd85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e2565b6001600160a01b038116611e545760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104e2565b611e5d816123dd565b50565b60008060068481548110611e7657611e76612893565b60009182526020808320878452600780835260408086206001600160a01b038a168752909352919093209102909101600381015460028201549193509042118015611ec45750600583015415155b8015611ed257506000600854115b156120a3576000611ee78460020154426111e5565b90506000611f0e6008546108da8760010154610a29600454876120d890919063ffffffff16565b90506000611f1d82600a6120e4565b90506000611f8783610adf847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610abb573d6000803e3d6000fd5b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663355274ea6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fe7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200b91906128da565b811115612076576120737f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dc3573d6000803e3d6000fd5b92505b600587015461209c90612095906108da86670de0b6b3a76400006120d8565b86906123d1565b9450505050505b6120ce82600101546108e0670de0b6b3a76400006108da8587600001546120d890919063ffffffff16565b9695505050505050565b60006111f1828461290a565b60006111f18284612929565b60006111f182846128f3565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015612163573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061218791906128da565b905060008183111561222d5760405163a9059cbb60e01b81526001600160a01b038581166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015612202573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612226919061294b565b90506122c3565b60405163a9059cbb60e01b81526001600160a01b038581166004830152602482018590527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af115801561229c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122c0919061294b565b90505b806123365760405162461bcd60e51b815260206004820152602360248201527f736166654e61746976655472616e736665723a207472616e736665722066616960448201527f6c6564000000000000000000000000000000000000000000000000000000000060648201526084016104e2565b50505050565b6040516001600160a01b0383166024820152604481018290526123cc90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261248b565b505050565b60006111f18284612968565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526123369085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612368565b60006124e0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166125709092919063ffffffff16565b8051909150156123cc57808060200190518101906124fe919061294b565b6123cc5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104e2565b606061257f8484600085612587565b949350505050565b6060824710156125ff5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104e2565b6001600160a01b0385163b6126565760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104e2565b600080866001600160a01b0316858760405161267291906129ac565b60006040518083038185875af1925050503d80600081146126af576040519150601f19603f3d011682016040523d82523d6000602084013e6126b4565b606091505b50915091506126c48282866126cf565b979650505050505050565b606083156126de5750816111f1565b8251156126ee5782518084602001fd5b8160405162461bcd60e51b81526004016104e291906129c8565b60006020828403121561271a57600080fd5b5035919050565b6000806040838503121561273457600080fd5b50508035926020909101359150565b6001600160a01b0381168114611e5d57600080fd5b60006020828403121561276a57600080fd5b81356111f181612743565b6000806040838503121561278857600080fd5b82359150602083013561279a81612743565b809150509250929050565b803561ffff811681146127b757600080fd5b919050565b8015158114611e5d57600080fd5b600080600080608085870312156127e057600080fd5b84359350602085013592506127f7604086016127a5565b91506060850135612807816127bc565b939692955090935050565b600080600080600060a0868803121561282a57600080fd5b85359450602086013561283c81612743565b935061284a604087016127a5565b9250606086013561285a816127bc565b9150608086013561286a816127bc565b809150509295509295909350565b60006020828403121561288a57600080fd5b6111f1826127a5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156128d3576128d36128a9565b5060010190565b6000602082840312156128ec57600080fd5b5051919050565b600082821015612905576129056128a9565b500390565b6000816000190483118215151615612924576129246128a9565b500290565b60008261294657634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561295d57600080fd5b81516111f1816127bc565b6000821982111561297b5761297b6128a9565b500190565b60005b8381101561299b578181015183820152602001612983565b838111156123365750506000910152565b600082516129be818460208701612980565b9190910192915050565b60208152600082518060208401526129e7816040850160208701612980565b601f01601f1916919091016040019291505056fea2646970667358221220746502824ecea804a63fbf9b9df9a376bc235dbd4eb292e4928405f19bfefb0b64736f6c634300080a003300000000000000000000000093c55afcbb82594f7446537e4071fc6439e14f2a0000000000000000000000001b27119ce4d0fb2f35d9daf9250a5496010b338c0000000000000000000000001c3d33e021a32b0770fc868e7b9884fce858c1c70000000000000000000000001b27119ce4d0fb2f35d9daf9250a5496010b338c0000000000000000000000000000000000000000000000000a688906bd8b00000000000000000000000000000000000000000000000000000000000060a94d75

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
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.