Contract 0xc027dd6fc63e73b59425b10b6e26d6e458889ca9 3

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xc3b109e49bcefe70842a02daedd73ee832b703cb4f5c14dd49312223d90ee5ffWithdraw146923292022-01-26 4:04:0738 mins ago0x4870fcd3df4a9e88ac7a33d45fd7f81447901eac IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00055752
0xe0951d4225d60112f5d26f5071022e1ce1e98dd997eee7a41159a5eedcaa30f9Deposit146923162022-01-26 4:03:2839 mins ago0x4870fcd3df4a9e88ac7a33d45fd7f81447901eac IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00064293
0xbb873c5584522e563ec777a7d49c476947278aaca00fcaedb2ec5f9c3c89de2bWithdraw146909812022-01-26 2:56:431 hr 46 mins ago0x8bee4f0d95283a80206ee69a4321888f2c2fb693 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00090701
0xb934d310cf1cf0a595c1e7362ea07bc9d866568651d160a749b3f93875b600bcDeposit146905262022-01-26 2:33:582 hrs 9 mins ago0x01a525ceb7429dfc594fd57ae8667dfcfa5beea4 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00170678
0xdf910eb9da9b247acae9c5867edafb4c672d1b9b33353958265793179b5aa4deWithdraw146887212022-01-26 1:03:433 hrs 39 mins ago0x436fe626bd40704f7f2b4dab1583334d38f8717b IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00055729
0x4c0dc47bdf155f2a5a95bee7c7427eabf33e33862e097ba8db21eb221ed582afDeposit146882522022-01-26 0:40:154 hrs 2 mins ago0x436fe626bd40704f7f2b4dab1583334d38f8717b IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.001059245
0x7e8e9b0624816d3c538851280d0eb2982f86098c2ce92cffa9b754b79b886c77Deposit146878462022-01-26 0:19:574 hrs 23 mins ago0xba032e78fa74bbeb193d09e057cd0666ddc4b968 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.0008756
0x6290f2579ed6ac1f0aa30d969dbdbd982d202c370c2af3ba04e7584bf92c3df9Withdraw146870722022-01-25 23:41:155 hrs 1 min ago0xba032e78fa74bbeb193d09e057cd0666ddc4b968 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00055752
0x6d8b49abb69f28a61815ff22a69e597402188ffb29eba8d3db24265f14b19c48Deposit146868422022-01-25 23:29:455 hrs 13 mins ago0xba032e78fa74bbeb193d09e057cd0666ddc4b968 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00064293
0x5439644fac486d5e2b51d249a8c5f1eb4443d301fbbe01256c06ce3583aebfd6Withdraw146859022022-01-25 22:42:456 hrs ago0x7ed3ad6c6ef3f00c115884c61edb5135debe4eb9 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.0007566
0x6f063134a24d3d120688463c809de399032a8356e3876bc265766ef84ab5cdfbWithdraw146858932022-01-25 22:42:186 hrs ago0x7ed3ad6c6ef3f00c115884c61edb5135debe4eb9 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.001547235
0x911f51ef6548a53ebe948d027f0355e9541b38ff1ead4ae1ffb399599a13c395Withdraw146856172022-01-25 22:28:306 hrs 14 mins ago0x7ed3ad6c6ef3f00c115884c61edb5135debe4eb9 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00055752
0x6e7fe48a9a6fca3d140ee7b9bc34952ec17d0a416f80f54ef558ebf4c50a15e7Deposit146850732022-01-25 22:01:186 hrs 41 mins ago0x61a36c7257bea80e330bf70fd3a14348011d9927 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.001092805
0x28b940c9089a8a636b94cf5657954e26dd0185f84c2bdc3480fa53b795ed6846Withdraw146837192022-01-25 20:53:367 hrs 49 mins ago0xfa46371d5422d1dc61354816526ce128d6b007b0 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00055723
0x96d84e6afe7bc6f9e83af84098f3163cbb24522b3078b6c70b30c747784fa65bDeposit146832422022-01-25 20:29:458 hrs 13 mins ago0x3c66e7c081e75945dd0776a269c5a42713785567 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00064293
0x553ccbc6a7e67abeb748bedcb06f6940919ac6080b166354cbb332f30a4a831cWithdraw146823122022-01-25 19:43:158 hrs 59 mins ago0x8bb00966f6173b935ee68b668a15d8cd10c9fec2 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00070699
0x97e2689026466820024a9a88614946ac19ab2aa2158ee143aa545ce25d2cfcd8Withdraw146820242022-01-25 19:28:519 hrs 14 mins ago0xa1a234791392c42bd0c95e37e6908ae704d595bd IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00055705
0x9a331b0ade4de7da3d360c866f7904c6f47bf091ed1c7c897ef1cbd078786784Withdraw146804512022-01-25 18:10:1210 hrs 32 mins ago0xff07968a372acbbc4ad44be3ad9cbc18bb36d1ae IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00090701
0xba7c5ac5975ae5ad57e7d1a71c7f72dca80233f2a10a979d32f43d8c8a615555Deposit146800402022-01-25 17:49:3910 hrs 53 mins ago0xbf80f7c2d0ed505a06862435ba2c07858f63b6c4 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00064293
0xa6f605dbf8ea6f9c631581dc0aa029a953f77abb8aa050f7d490edff144c5f17Withdraw146800002022-01-25 17:47:3910 hrs 55 mins ago0x22a13e9a6fdcb64ff3968cf353d56d1fb8ccf8c8 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.001197685
0x07dc716e61f8238f8f53ca7e825562d98f0c4e36ebadaab8bf254825c15590e2Deposit146799982022-01-25 17:47:3310 hrs 55 mins ago0x22a13e9a6fdcb64ff3968cf353d56d1fb8ccf8c8 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00064293
0xbbcc1c5d054cc41b4eb51d5cb70b561f868c9875af69f3061479311dee6919fdWithdraw146799702022-01-25 17:46:0910 hrs 56 mins ago0xa0dafe47553623e66294b3240c97891420440cc7 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00090701
0x7cef69a55747fe0887fbcfaccb2d1c2fc6617ca3046b8ff0dadd9fdeeb61d64cDeposit146789192022-01-25 16:53:3611 hrs 49 mins ago0xe50b657b631244bf764063e5ab6eb199ae7e128d IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00064293
0xacedc496300e998808d4364f6703c32e888007cde116a8d40ed3445462c085c9Withdraw146782152022-01-25 16:17:2012 hrs 25 mins ago0x945deeb35cfe3ab2f0badf439744866fdfe7e0b5 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.001197745
0x14bfdbeb09f5591c2d4f94fe14a4816aafe76c417081b661761d645ff493d011Deposit146782072022-01-25 16:16:5512 hrs 26 mins ago0x945deeb35cfe3ab2f0badf439744866fdfe7e0b5 IN  0xc027dd6fc63e73b59425b10b6e26d6e458889ca90 BNB0.00064293
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MasterChefV2

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : MasterChefV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./libs/IERC20.sol";
import "./libs/SafeERC20.sol";
import "./libs/IReferralSystem.sol";
import "./libs/IStrategy.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import "./RevolutionToken.sol";

contract MasterChefV2 is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;

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

    // Info of each pool.
    struct PoolInfo {
        IERC20 lpToken;             // Address of LP token contract.
        IStrategy strategy;         // Strategy address that will earnings compound want tokens
        uint256 allocPoint;         // How many allocation points assigned to this pool. Revolution to distribute per block.
        uint256 lastRewardBlock;    // Last block number that Revolution distribution occurs.
        uint256 accRevolutionPerShare;   // Accumulated Revolution per share, times 1e12. See below.
        uint256 lpSupply;
        uint16 depositFeeBP;        // Deposit fee in basis points
    }

    uint256 public constant RevolutionMaximumSupply = 1000000 * 1e18;

    RevolutionToken public immutable revolution;
    uint16 public constant referralCommissionRate = 300; // 3%

    // tokens created per block.
    uint256 public revolutionPerBlock = 1 * 1e18;
    // Deposit Fee address
    address public feeAddress;

    IReferralSystem public revolutionReferral;

    // 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;

    uint256 public startBlock; // The block number when Revolution mining starts.
    uint256 public emissionEndBlock; // The block number when Revolution mining ends.

    event AddPool(uint256 indexed pid, address lpToken, address strategy, uint256 allocPoint, uint256 depositFeeBP);
    event SetPool(uint256 indexed pid, address lpToken, uint256 allocPoint, uint256 depositFeeBP);
    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 UpdateStartBlock(uint256 newStartBlock);
    event SetRevolutionReferral(address referralAddress);
    event StuckTokenRemoval(address token, uint256 amount);

    constructor(
        RevolutionToken _revolution,
        address _feeAddress,
        uint256 _startBlock
    ) public {
        require(_startBlock >= block.number && _startBlock < 14500000, "invalid startBlock"); //14500000 = Estimated Target Date: Wed Jan 19 2022 10:54:32 GMT+0100 (Central European Standard Time)
        revolution = _revolution;
        feeAddress = _feeAddress;
        startBlock = _startBlock;
        emissionEndBlock = _startBlock + 403200; //Farm ends in 2 weeks
    }

    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, IStrategy _strategy, uint16 _depositFeeBP, bool _withUpdate) external onlyOwner nonDuplicated(_lpToken) {
        // Make sure the provided token is ERC20
        _lpToken.balanceOf(address(this));
        require(_strategy.wantLockedTotal() >= 0, "add: invalid strategy");
        require(_allocPoint <= 1e6, "add: invalid allocPoint");
        require(_depositFeeBP <= 601, "add: invalid deposit fee basis points");
        require(address(_lpToken) != address(revolution), "add: no native token pool");

        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint + _allocPoint;
        poolExistence[_lpToken] = true;

        poolInfo.push(PoolInfo({
        lpToken : _lpToken,
        allocPoint : _allocPoint,
        lastRewardBlock : lastRewardBlock,
        strategy: _strategy,
        accRevolutionPerShare : 0,
        depositFeeBP : _depositFeeBP,
        lpSupply: 0
        }));

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

    // Update the given pool's Revolution 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(_allocPoint <= 1e6, "set: invalid allocPoint");
        require(_depositFeeBP <= 601, "set: invalid deposit fee basis points");
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint - poolInfo[_pid].allocPoint + _allocPoint;
        poolInfo[_pid].allocPoint = _allocPoint;
        poolInfo[_pid].depositFeeBP = _depositFeeBP;

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

    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
        // As we set the multiplier to 0 here after emissionEndBlock
        // deposits aren't blocked after farming ends.
        if (_from > emissionEndBlock)
            return 0;
        if (_to > emissionEndBlock)
            return emissionEndBlock - _from;
        else
            return _to - _from;
    }

    // View function to see pending Revolution on frontend.
    function pendingRevolution(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accRevolutionPerShare = pool.accRevolutionPerShare;
        if (block.number > pool.lastRewardBlock && pool.lpSupply != 0 && totalAllocPoint > 0) {
            uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
            uint256 revolutionReward = (multiplier * revolutionPerBlock * pool.allocPoint) / totalAllocPoint;
            accRevolutionPerShare = accRevolutionPerShare + (( revolutionReward * 1e12) / pool.lpSupply);
        }

        return ((user.amount * accRevolutionPerShare) /  1e12) - 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.number <= pool.lastRewardBlock) {
            return;
        }

        if (pool.lpSupply == 0 || pool.allocPoint == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }

        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 revolutionReward = (multiplier * revolutionPerBlock * pool.allocPoint) / totalAllocPoint;

        // This shouldn't happen, but just in case we stop rewards.
        uint256 totalSupply = revolution.totalSupply();
        if (totalSupply > RevolutionMaximumSupply)
            revolutionReward = 0;
        else if ((totalSupply + revolutionReward) > RevolutionMaximumSupply)
            revolutionReward = RevolutionMaximumSupply - totalSupply;

        if (revolutionReward > 0)
            revolution.mint(address(this), revolutionReward);

        // The first time we reach revolution max supply we solidify the end of farming.
        if (revolution.totalSupply() >= RevolutionMaximumSupply && emissionEndBlock > block.number)
            emissionEndBlock = block.number;

        pool.accRevolutionPerShare = pool.accRevolutionPerShare + ((revolutionReward * 1e12) / pool.lpSupply);
        pool.lastRewardBlock = block.number;
    }

    // Deposit LP tokens to MasterChef for Revolution allocation.
    function deposit(uint256 _pid, uint256 _amount, address _referrer) external nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);

        if (_amount > 0 && address(revolutionReferral) != address(0) && _referrer != address(0) && _referrer != msg.sender) {
            revolutionReferral.recordReferral(msg.sender, _referrer);
        }

        if (user.amount > 0) {
            uint256 pending = ((user.amount * pool.accRevolutionPerShare) / 1e12) - user.rewardDebt;
            if (pending > 0) {
                safeRevolutionTransfer(msg.sender, pending);
                payReferralCommission(msg.sender, pending);
            }
        }
        if (_amount > 0) {
            uint256 balanceBefore = pool.lpToken.balanceOf(address(this));
            pool.lpToken.safeTransferFrom(msg.sender, address(this), _amount);
            uint256 wantBalAfter = pool.lpToken.balanceOf(address(this));
            _amount = wantBalAfter - balanceBefore;
            require(_amount > 0, "we dont accept deposits of 0 size");

            uint256 amountToDepositStrat = _amount;
            if (pool.depositFeeBP > 0) {
                uint256 depositFee = (_amount * pool.depositFeeBP) / 10000;
                pool.lpToken.safeTransfer(feeAddress, depositFee);
                amountToDepositStrat = _amount - depositFee;
            }

            pool.lpToken.safeIncreaseAllowance(address(pool.strategy), amountToDepositStrat);
            uint256 amountDeposit = pool.strategy.deposit(amountToDepositStrat);
            user.amount = user.amount + amountDeposit;
            pool.lpSupply = pool.lpSupply + amountDeposit;

        }
        user.rewardDebt = (user.amount * pool.accRevolutionPerShare) / 1e12;

        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 total = pool.strategy.wantLockedTotal();
        require(total > 0, "Total is 0");

        uint256 pending = ((user.amount * pool.accRevolutionPerShare) / 1e12) - user.rewardDebt;
        if (pending > 0) {
            safeRevolutionTransfer(msg.sender, pending);
            payReferralCommission(msg.sender, pending);
        }
        if (_amount > 0) {
            uint256 lpAmountBefore = pool.lpToken.balanceOf(address(this));
            pool.strategy.withdraw(_amount);
            uint256 lpAmountAfter = pool.lpToken.balanceOf(address(this));
            uint256 amountRemoved = lpAmountAfter - lpAmountBefore;

            if (amountRemoved > user.amount) {
                user.amount = 0;
            } else {
                user.amount = user.amount - _amount;
            }

            //            if (amountRemoved < _amount) {
            //                _amount = amountRemoved;
            //            }

            pool.lpToken.safeTransfer(msg.sender, amountRemoved);

            if (pool.lpSupply >= _amount)
                pool.lpSupply = pool.lpSupply - _amount;
            else
                pool.lpSupply = 0;

        }
        user.rewardDebt = (user.amount * pool.accRevolutionPerShare) / 1e12;
        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;

        uint256 lpAmountBefore = pool.lpToken.balanceOf(address(this));
        pool.strategy.withdraw(amount);
        uint256 lpAmountAfter = pool.lpToken.balanceOf(address(this));
        uint256 amountRemoved = lpAmountAfter - lpAmountBefore;

        user.amount = 0;
        user.rewardDebt = 0;

        //        uint256 wantBal = pool.lpToken.balanceOf(address(this));
        pool.lpToken.safeTransfer(msg.sender, amountRemoved);

        // In the case of an accounting error, we choose to let the user emergency withdraw anyway
        if (pool.lpSupply >= amount)
            pool.lpSupply = pool.lpSupply - amount;
        else
            pool.lpSupply = 0;

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

    // Safe revolution transfer function, just in case if rounding error causes pool to not have enough Revolutions.
    function safeRevolutionTransfer(address _to, uint256 _amount) internal {
        uint256 revolutionBal = revolution.balanceOf(address(this));
        bool transferSuccess = false;
        if (_amount > revolutionBal) {
            transferSuccess = revolution.transfer(_to, revolutionBal);
        } else {
            transferSuccess = revolution.transfer(_to, _amount);
        }
        require(transferSuccess, "safeRevolutionTransfer: transfer failed");
    }

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

    function setStartBlock(uint256 _newStartBlock) external onlyOwner {
        require(poolInfo.length == 0);
        require(block.number < startBlock, "farm has already started");
        require(block.number < _newStartBlock, "cannot set start block in the past");
        require(_newStartBlock < 14500000, "invalid startBlock"); //14500000 = Estimated Target Date: Wed Jan 19 2022 10:54:32 GMT+0100 (Central European Standard Time)
        startBlock = _newStartBlock;
        emissionEndBlock = _newStartBlock + 403200; //Farm ends in 2 weeks

        emit UpdateStartBlock(startBlock);
    }

    function inCaseTokensGetStuck(address _token, uint256 _amount) external onlyOwner {
        require(_token != address(revolution), "!safe");
        IERC20(_token).safeTransfer(msg.sender, _amount);
        emit StuckTokenRemoval(_token, _amount);
    }

    // Update the Revolution referral contract address by the owner
    function setRevolutionReferral(IReferralSystem _revolutionReferral) external onlyOwner {
        require(address(_revolutionReferral) != address(0), "revolutionReferral cannot be the 0 address");
        revolutionReferral = _revolutionReferral;

        emit SetRevolutionReferral(address(revolutionReferral));
    }

    // Pay referral commission to the referrer who referred this user.
    function payReferralCommission(address _user, uint256 _pending) internal {
        if (address(revolutionReferral) != address(0) && referralCommissionRate > 0) {
            address referrer = revolutionReferral.getReferrer(_user);
            uint256 commissionAmount = ((_pending * referralCommissionRate) / 10000);

            if (referrer != address(0) && commissionAmount > 0 && revolution.totalSupply() + commissionAmount <= RevolutionMaximumSupply) {
                revolution.mint(referrer, commissionAmount);
                revolutionReferral.recordReferralCommission(referrer, commissionAmount);
            }
        }
    }
}

File 2 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "@openzeppelin/contracts/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 4 of 12 : IReferralSystem.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IReferralSystem {
    /**
     * @dev Record referral.
     */
    function recordReferral(address user, address referrer) external;

    /**
     * @dev Record referral commission.
     */
    function recordReferralCommission(address referrer, uint256 commission) external;

    /**
     * @dev Get the referrer address that referred the user.
     */
    function getReferrer(address user) external view returns (address);
}

File 5 of 12 : IStrategy.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IStrategy {
    // Total want tokens managed by strategy
    function wantLockedTotal() external view returns (uint256);

    // Main want token compounding function
    function earn() external;

    // Transfer want tokens MasterChefV2 -> strategy
    function deposit(uint256 _wantAmt)
    external
    returns (uint256);

    // Transfer want tokens strategy -> MasterChefV2
    function withdraw(uint256 _wantAmt)
    external
    returns (uint256);

    function inCaseTokensGetStuck(
        address _token,
        uint256 _amount,
        address _to
    ) external;
}

File 6 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 7 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 8 of 12 : RevolutionToken.sol
pragma solidity ^0.8.0;

import "./libs/ERC20.sol";

// Revolution Token
contract RevolutionToken is ERC20('Revolution', 'REV') {

    constructor() {
        _mint(address(msg.sender), uint256(37500 ether));
    }

    /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
    function mint(address _to, uint256 _amount) external onlyOwner {
        _mint(_to, _amount);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 12 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 11 of 12 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./IERC20Metadata.sol";

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/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 guidelines: functions revert instead
 * of 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, Ownable {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

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

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

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
    unchecked {
        _approve(sender, _msgSender(), currentAllowance - amount);
    }

        return true;
    }

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

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

        return true;
    }

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

        _beforeTokenTransfer(sender, recipient, amount);

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

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC20.sol";

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract RevolutionToken","name":"_revolution","type":"address"},{"internalType":"address","name":"_feeAddress","type":"address"},{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"address","name":"lpToken","type":"address"},{"indexed":false,"internalType":"address","name":"strategy","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":"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":"SetFeeAddress","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"referralAddress","type":"address"}],"name":"SetRevolutionReferral","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StuckTokenRemoval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newStartBlock","type":"uint256"}],"name":"UpdateStartBlock","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"},{"inputs":[],"name":"RevolutionMaximumSupply","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":"contract IStrategy","name":"_strategy","type":"address"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"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"},{"internalType":"address","name":"_referrer","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emissionEndBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"inCaseTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","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":"pendingRevolution","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":"contract IStrategy","name":"strategy","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accRevolutionPerShare","type":"uint256"},{"internalType":"uint256","name":"lpSupply","type":"uint256"},{"internalType":"uint16","name":"depositFeeBP","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referralCommissionRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revolution","outputs":[{"internalType":"contract RevolutionToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revolutionPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revolutionReferral","outputs":[{"internalType":"contract IReferralSystem","name":"","type":"address"}],"stateMutability":"view","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":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IReferralSystem","name":"_revolutionReferral","type":"address"}],"name":"setRevolutionReferral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newStartBlock","type":"uint256"}],"name":"setStartBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","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":"_pid","type":"uint256"}],"name":"updatePool","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"}]

60a0604052670de0b6b3a764000060025560006007553480156200002257600080fd5b50604051620030703803806200307083398101604081905262000045916200014b565b6200005033620000fb565b6001805543811080159062000067575062dd40a081105b620000ad5760405162461bcd60e51b8152602060048201526012602482015271696e76616c6964207374617274426c6f636b60701b604482015260640160405180910390fd5b606083901b6001600160601b031916608052600380546001600160a01b0319166001600160a01b0384161790556008819055620000ee816206270062000192565b60095550620001d0915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060006060848603121562000160578283fd5b83516200016d81620001b7565b60208501519093506200018081620001b7565b80925050604084015190509250925092565b60008219821115620001b257634e487b7160e01b81526011600452602481fd5b500190565b6001600160a01b0381168114620001cd57600080fd5b50565b60805160601c612e3b620002356000396000818161027001528181610beb01528181610ceb01528181610d5d015281816113bb01528181611c78015281816121a90152818161225d01528181612306015281816124d4015261259b0152612e3b6000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80637663403711610104578063c51d8550116100a2578063d963842211610071578063d96384221461044e578063e3bb983714610461578063f2fde38b1461046a578063f35e4a6e1461047d57600080fd5b8063c51d8550146103d9578063c6d758cb146103ec578063cbd258b5146103ff578063d30ef61b1461043257600080fd5b80638dbb1e3a116100de5780638dbb1e3a1461035b5780638dbdbe6d1461036e57806393f1a40b146103815780639eb6c586146103c857600080fd5b806376634037146103245780638705fcd4146103375780638da5cb5b1461034a57600080fd5b8063412753581161017157806351eb05a61161014b57806351eb05a6146102ee5780635312ea8e14610301578063630b5ba114610314578063715018a61461031c57600080fd5b806341275358146102bf578063441a3e70146102d257806348cd4cb1146102e557600080fd5b806317caf6f1116101ad57806317caf6f11461024f57806323fa39951461025857806325b731af1461026b5780632f27a09a146102aa57600080fd5b806304703108146101d4578063081e3eda146101f05780631526fe27146101f8575b600080fd5b6101dd60095481565b6040519081526020015b60405180910390f35b6005546101dd565b61020b610206366004612af8565b610490565b604080516001600160a01b039889168152979096166020880152948601939093526060850191909152608084015260a083015261ffff1660c082015260e0016101e7565b6101dd60075481565b6101dd610266366004612b28565b6104f0565b6102927f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101e7565b6102bd6102b8366004612a79565b61061d565b005b600354610292906001600160a01b031681565b6102bd6102e0366004612bbc565b61070e565b6101dd60085481565b6102bd6102fc366004612af8565b610b43565b6102bd61030f366004612af8565b610e47565b6102bd6110db565b6102bd611106565b6102bd610332366004612b57565b61113c565b6102bd610345366004612a79565b61168e565b6000546001600160a01b0316610292565b6101dd610369366004612bbc565b611775565b6102bd61037c366004612bdd565b6117b2565b6103b361038f366004612b28565b60066020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016101e7565b6101dd69d3c21bcecceda100000081565b600454610292906001600160a01b031681565b6102bd6103fa366004612ab1565b611c4c565b61042261040d366004612a79565b600a6020526000908152604090205460ff1681565b60405190151581526020016101e7565b61043b61012c81565b60405161ffff90911681526020016101e7565b6102bd61045c366004612c15565b611d3a565b6101dd60025481565b6102bd610478366004612a79565b611f85565b6102bd61048b366004612af8565b612020565b600581815481106104a057600080fd5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919061ffff1687565b6000806005848154811061051457634e487b7160e01b600052603260045260246000fd5b600091825260208083208784526006825260408085206001600160a01b038916865290925292206004600790920290920190810154600382015491935090431180156105635750600583015415155b801561057157506000600754115b156105e4576000610586846003015443611775565b905060006007548560020154600254846105a09190612d4f565b6105aa9190612d4f565b6105b49190612d2f565b60058601549091506105cb8264e8d4a51000612d4f565b6105d59190612d2f565b6105df9084612d17565b925050505b6001820154825464e8d4a51000906105fd908490612d4f565b6106079190612d2f565b6106119190612d6e565b93505050505b92915050565b6000546001600160a01b031633146106505760405162461bcd60e51b815260040161064790612cab565b60405180910390fd5b6001600160a01b0381166106b95760405162461bcd60e51b815260206004820152602a60248201527f7265766f6c7574696f6e526566657272616c2063616e6e6f74206265207468656044820152692030206164647265737360b01b6064820152608401610647565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f6feea31ff5bb1ba4ff0108449bc97770edc3605e327f5df1f51ae11cea268088906020015b60405180910390a150565b600260015414156107315760405162461bcd60e51b815260040161064790612ce0565b600260018190555060006005838154811061075c57634e487b7160e01b600052603260045260246000fd5b6000918252602080832086845260068252604080852033865290925292208054600790920290920192508311156107ca5760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b6044820152606401610647565b6107d384610b43565b6001820154604080516342da4eb360e01b815290516000926001600160a01b0316916342da4eb3916004808301926020929190829003018186803b15801561081a57600080fd5b505afa15801561082e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108529190612b10565b9050600081116108915760405162461bcd60e51b815260206004820152600a6024820152690546f74616c20697320360b41b6044820152606401610647565b6000826001015464e8d4a51000856004015485600001546108b29190612d4f565b6108bc9190612d2f565b6108c69190612d6e565b905080156108e2576108d83382612191565b6108e233826123e8565b8415610ada5783546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561092b57600080fd5b505afa15801561093f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109639190612b10565b6001860154604051632e1a7d4d60e01b8152600481018990529192506001600160a01b031690632e1a7d4d90602401602060405180830381600087803b1580156109ac57600080fd5b505af11580156109c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e49190612b10565b5084546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610a2857600080fd5b505afa158015610a3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a609190612b10565b90506000610a6e8383612d6e565b8654909150811115610a835760008655610a93565b8554610a90908990612d6e565b86555b8654610aa9906001600160a01b03163383612665565b87876005015410610ace57878760050154610ac49190612d6e565b6005880155610ad6565b600060058801555b5050505b6004840154835464e8d4a5100091610af191612d4f565b610afb9190612d2f565b6001840155604051858152869033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a350506001805550505050565b600060058281548110610b6657634e487b7160e01b600052603260045260246000fd5b9060005260206000209060070201905080600301544311610b85575050565b60058101541580610b9857506002810154155b15610ba7574360039091015550565b6000610bb7826003015443611775565b90506000600754836002015460025484610bd19190612d4f565b610bdb9190612d4f565b610be59190612d2f565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c4257600080fd5b505afa158015610c56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7a9190612b10565b905069d3c21bcecceda1000000811115610c975760009150610cc9565b69d3c21bcecceda1000000610cac8383612d17565b1115610cc957610cc68169d3c21bcecceda1000000612d6e565b91505b8115610d50576040516340c10f1960e01b8152306004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906340c10f1990604401600060405180830381600087803b158015610d3757600080fd5b505af1158015610d4b573d6000803e3d6000fd5b505050505b69d3c21bcecceda10000007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610db457600080fd5b505afa158015610dc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dec9190612b10565b10158015610dfb575043600954115b15610e0557436009555b6005840154610e198364e8d4a51000612d4f565b610e239190612d2f565b8460040154610e329190612d17565b60048501555050436003909201919091555050565b60026001541415610e6a5760405162461bcd60e51b815260040161064790612ce0565b6002600181905550600060058281548110610e9557634e487b7160e01b600052603260045260246000fd5b600091825260208083208584526006825260408085203386529092528184208054600794909402909101805492516370a0823160e01b81523060048201529095509093916001600160a01b0316906370a082319060240160206040518083038186803b158015610f0457600080fd5b505afa158015610f18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3c9190612b10565b6001850154604051632e1a7d4d60e01b8152600481018590529192506001600160a01b031690632e1a7d4d90602401602060405180830381600087803b158015610f8557600080fd5b505af1158015610f99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fbd9190612b10565b5083546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561100157600080fd5b505afa158015611015573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110399190612b10565b905060006110478383612d6e565b60008087556001870155865490915061106a906001600160a01b03163383612665565b8386600501541061108f578386600501546110859190612d6e565b6005870155611097565b600060058701555b604051848152879033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a35050600180555050505050565b60055460005b81811015611102576110f281610b43565b6110fb81612db1565b90506110e1565b5050565b6000546001600160a01b031633146111305760405162461bcd60e51b815260040161064790612cab565b61113a60006126cd565b565b6000546001600160a01b031633146111665760405162461bcd60e51b815260040161064790612cab565b6001600160a01b0384166000908152600a6020526040902054849060ff16156111d15760405162461bcd60e51b815260206004820152601960248201527f6e6f6e4475706c6963617465643a206475706c696361746564000000000000006044820152606401610647565b6040516370a0823160e01b81523060048201526001600160a01b038616906370a082319060240160206040518083038186803b15801561121057600080fd5b505afa158015611224573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112489190612b10565b506000846001600160a01b03166342da4eb36040518163ffffffff1660e01b815260040160206040518083038186803b15801561128457600080fd5b505afa158015611298573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112bc9190612b10565b10156113025760405162461bcd60e51b81526020600482015260156024820152746164643a20696e76616c696420737472617465677960581b6044820152606401610647565b620f42408611156113555760405162461bcd60e51b815260206004820152601760248201527f6164643a20696e76616c696420616c6c6f63506f696e740000000000000000006044820152606401610647565b6102598361ffff1611156113b95760405162461bcd60e51b815260206004820152602560248201527f6164643a20696e76616c6964206465706f7369742066656520626173697320706044820152646f696e747360d81b6064820152608401610647565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316856001600160a01b0316141561143b5760405162461bcd60e51b815260206004820152601960248201527f6164643a206e6f206e617469766520746f6b656e20706f6f6c000000000000006044820152606401610647565b8115611449576114496110db565b6000600854431161145c5760085461145e565b435b90508660075461146e9190612d17565b60079081556001600160a01b038781166000818152600a602090815260408083208054600160ff199091168117909155815160e0810183529485528b86169285019283529084018d8152606085018881526080860185815260a0870186815261ffff8e811660c08a019081526005805480890182559981905299517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db099909c0298890180546001600160a01b03199081169d8d169d909d17905596517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db189018054909c169a169990991790995591517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db2860155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db3850155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db484015594517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db5830155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db6909101805461ffff19169190931617909155546116309190612d6e565b604080516001600160a01b03808a1682528816602082015290810189905261ffff861660608201527f65c96b45e6a1e397d5195d64dc31fd412c2a5a63779c59453c3249e022090f949060800160405180910390a250505050505050565b6003546001600160a01b031633146116e85760405162461bcd60e51b815260206004820152601860248201527f736574466565416464726573733a20464f5242494444454e00000000000000006044820152606401610647565b6001600160a01b0381166117295760405162461bcd60e51b8152602060048201526008602482015267216e6f6e7a65726f60c01b6044820152606401610647565b600380546001600160a01b0319166001600160a01b03831690811790915560405133907fd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f790600090a350565b600060095483111561178957506000610617565b6009548211156117a857826009546117a19190612d6e565b9050610617565b6117a18383612d6e565b600260015414156117d55760405162461bcd60e51b815260040161064790612ce0565b600260018190555060006005848154811061180057634e487b7160e01b600052603260045260246000fd5b6000918252602080832087845260068252604080852033865290925292206007909102909101915061183185610b43565b60008411801561184b57506004546001600160a01b031615155b801561185f57506001600160a01b03831615155b801561187457506001600160a01b0383163314155b156118e05760048054604051630c7f7b6b60e01b815233928101929092526001600160a01b0385811660248401521690630c7f7b6b90604401600060405180830381600087803b1580156118c757600080fd5b505af11580156118db573d6000803e3d6000fd5b505050505b80541561193a576000816001015464e8d4a51000846004015484600001546119089190612d4f565b6119129190612d2f565b61191c9190612d6e565b905080156119385761192e3382612191565b61193833826123e8565b505b8315611be45781546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561198357600080fd5b505afa158015611997573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119bb9190612b10565b83549091506119d5906001600160a01b031633308861271d565b82546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015611a1857600080fd5b505afa158015611a2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a509190612b10565b9050611a5c8282612d6e565b955060008611611ab85760405162461bcd60e51b815260206004820152602160248201527f776520646f6e7420616363657074206465706f73697473206f6620302073697a6044820152606560f81b6064820152608401610647565b6006840154869061ffff1615611b1957600685015460009061271090611ae29061ffff168a612d4f565b611aec9190612d2f565b6003548754919250611b0b916001600160a01b03908116911683612665565b611b158189612d6e565b9150505b60018501548554611b37916001600160a01b03918216911683612755565b600185015460405163b6b55f2560e01b8152600481018390526000916001600160a01b03169063b6b55f2590602401602060405180830381600087803b158015611b8057600080fd5b505af1158015611b94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb89190612b10565b8554909150611bc8908290612d17565b85556005860154611bda908290612d17565b6005870155505050505b6004820154815464e8d4a5100091611bfb91612d4f565b611c059190612d2f565b6001820155604051848152859033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a3505060018055505050565b6000546001600160a01b03163314611c765760405162461bcd60e51b815260040161064790612cab565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611ce05760405162461bcd60e51b8152602060048201526005602482015264217361666560d81b6044820152606401610647565b611cf46001600160a01b0383163383612665565b604080516001600160a01b0384168152602081018390527f210c6c6ec4599801ad3a6b3cfab662bf860a2eb45ac55a7d00b4e82eeb01d3a0910160405180910390a15050565b6000546001600160a01b03163314611d645760405162461bcd60e51b815260040161064790612cab565b620f4240831115611db75760405162461bcd60e51b815260206004820152601760248201527f7365743a20696e76616c696420616c6c6f63506f696e740000000000000000006044820152606401610647565b6102598261ffff161115611e1b5760405162461bcd60e51b815260206004820152602560248201527f7365743a20696e76616c6964206465706f7369742066656520626173697320706044820152646f696e747360d81b6064820152608401610647565b8015611e2957611e296110db565b8260058581548110611e4b57634e487b7160e01b600052603260045260246000fd5b906000526020600020906007020160020154600754611e6a9190612d6e565b611e749190612d17565b6007819055508260058581548110611e9c57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060070201600201819055508160058581548110611ed357634e487b7160e01b600052603260045260246000fd5b906000526020600020906007020160060160006101000a81548161ffff021916908361ffff160217905550837f22d010b39cce830b2f23926bfb7551a230dbe713d1f6085480fef4a6ad7a4aaa60058681548110611f4157634e487b7160e01b600052603260045260246000fd5b60009182526020918290206007919091020154604080516001600160a01b03909216825291810187905261ffff86168183015290519081900360600190a250505050565b6000546001600160a01b03163314611faf5760405162461bcd60e51b815260040161064790612cab565b6001600160a01b0381166120145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610647565b61201d816126cd565b50565b6000546001600160a01b0316331461204a5760405162461bcd60e51b815260040161064790612cab565b6005541561205757600080fd5b60085443106120a85760405162461bcd60e51b815260206004820152601860248201527f6661726d2068617320616c7265616479207374617274656400000000000000006044820152606401610647565b8043106121025760405162461bcd60e51b815260206004820152602260248201527f63616e6e6f742073657420737461727420626c6f636b20696e207468652070616044820152611cdd60f21b6064820152608401610647565b62dd40a081106121495760405162461bcd60e51b8152602060048201526012602482015271696e76616c6964207374617274426c6f636b60701b6044820152606401610647565b600881905561215b8162062700612d17565b6009556008546040519081527f1ff2238e284780b094bb341b41af7e6ce294dee1da3799ae49cd0e29fbe1270990602001610703565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156121f357600080fd5b505afa158015612207573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222b9190612b10565b90506000818311156122e05760405163a9059cbb60e01b81526001600160a01b038581166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b1580156122a157600080fd5b505af11580156122b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d99190612adc565b9050612385565b60405163a9059cbb60e01b81526001600160a01b038581166004830152602482018590527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b15801561234a57600080fd5b505af115801561235e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123829190612adc565b90505b806123e25760405162461bcd60e51b815260206004820152602760248201527f736166655265766f6c7574696f6e5472616e736665723a207472616e736665726044820152660819985a5b195960ca1b6064820152608401610647565b50505050565b6004546001600160a01b031615801590612400575060015b156111025760048054604051634a9fefc760e01b81526001600160a01b038581169382019390935260009290911690634a9fefc79060240160206040518083038186803b15801561245057600080fd5b505afa158015612464573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124889190612a95565b9050600061271061249b61012c85612d4f565b6124a59190612d2f565b90506001600160a01b038216158015906124bf5750600081115b8015612570575069d3c21bcecceda1000000817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561252b57600080fd5b505afa15801561253f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125639190612b10565b61256d9190612d17565b11155b156123e2576040516340c10f1960e01b81526001600160a01b038381166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b1580156125df57600080fd5b505af11580156125f3573d6000803e3d6000fd5b505060048054604051631b82d29760e31b81526001600160a01b0387811693820193909352602481018690529116925063dc1694b89150604401600060405180830381600087803b15801561264757600080fd5b505af115801561265b573d6000803e3d6000fd5b5050505050505050565b6040516001600160a01b0383166024820152604481018290526126c890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612816565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526123e29085906323b872dd60e01b90608401612691565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e9060440160206040518083038186803b1580156127a157600080fd5b505afa1580156127b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d99190612b10565b6127e39190612d17565b6040516001600160a01b0385166024820152604481018290529091506123e290859063095ea7b360e01b90606401612691565b600061286b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166128e89092919063ffffffff16565b8051909150156126c857808060200190518101906128899190612adc565b6126c85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610647565b60606128f78484600085612901565b90505b9392505050565b6060824710156129625760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610647565b843b6129b05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610647565b600080866001600160a01b031685876040516129cc9190612c5c565b60006040518083038185875af1925050503d8060008114612a09576040519150601f19603f3d011682016040523d82523d6000602084013e612a0e565b606091505b5091509150612a1e828286612a29565b979650505050505050565b60608315612a385750816128fa565b825115612a485782518084602001fd5b8160405162461bcd60e51b81526004016106479190612c78565b803561ffff81168114612a7457600080fd5b919050565b600060208284031215612a8a578081fd5b81356128fa81612de2565b600060208284031215612aa6578081fd5b81516128fa81612de2565b60008060408385031215612ac3578081fd5b8235612ace81612de2565b946020939093013593505050565b600060208284031215612aed578081fd5b81516128fa81612df7565b600060208284031215612b09578081fd5b5035919050565b600060208284031215612b21578081fd5b5051919050565b60008060408385031215612b3a578182fd5b823591506020830135612b4c81612de2565b809150509250929050565b600080600080600060a08688031215612b6e578081fd5b853594506020860135612b8081612de2565b93506040860135612b9081612de2565b9250612b9e60608701612a62565b91506080860135612bae81612df7565b809150509295509295909350565b60008060408385031215612bce578182fd5b50508035926020909101359150565b600080600060608486031215612bf1578283fd5b83359250602084013591506040840135612c0a81612de2565b809150509250925092565b60008060008060808587031215612c2a578384fd5b8435935060208501359250612c4160408601612a62565b91506060850135612c5181612df7565b939692955090935050565b60008251612c6e818460208701612d85565b9190910192915050565b6020815260008251806020840152612c97816040850160208701612d85565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115612d2a57612d2a612dcc565b500190565b600082612d4a57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612d6957612d69612dcc565b500290565b600082821015612d8057612d80612dcc565b500390565b60005b83811015612da0578181015183820152602001612d88565b838111156123e25750506000910152565b6000600019821415612dc557612dc5612dcc565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461201d57600080fd5b801515811461201d57600080fdfea2646970667358221220168470aa9c97ab0aa007fee7bc85a12a4452ba9bc71c2b4cc483e616a73a640764736f6c63430008040033000000000000000000000000276b440fdb4c54631c882cac9e4317929e751ff80000000000000000000000007ec0feba77136445b28496c3cb416fc9117ea7980000000000000000000000000000000000000000000000000000000000d6cc48

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

000000000000000000000000276b440fdb4c54631c882cac9e4317929e751ff80000000000000000000000007ec0feba77136445b28496c3cb416fc9117ea7980000000000000000000000000000000000000000000000000000000000d6cc48

-----Decoded View---------------
Arg [0] : _revolution (address): 0x276b440fdb4c54631c882cac9e4317929e751ff8
Arg [1] : _feeAddress (address): 0x7ec0feba77136445b28496c3cb416fc9117ea798
Arg [2] : _startBlock (uint256): 14077000

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000276b440fdb4c54631c882cac9e4317929e751ff8
Arg [1] : 0000000000000000000000007ec0feba77136445b28496c3cb416fc9117ea798
Arg [2] : 0000000000000000000000000000000000000000000000000000000000d6cc48


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.