ETH Price: $3,423.27 (-1.69%)
Gas: 6 Gwei

Contract

0x73f4F5743596732669956c86F3Ab5e3C0F4715F8
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040113380792020-11-27 3:22:261329 days ago1606447346IN
 Contract Creation
0 ETH0.2496550481

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

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

Contract Name:
LidSimplifiedPresale

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
byzantium EvmVersion
File 1 of 18 : LidSimplifiedPresale.sol
pragma solidity 0.5.16;

import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/lifecycle/Pausable.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/upgrades/contracts/Initializable.sol";
import "./uniswapV2Periphery/interfaces/IUniswapV2Router01.sol";
import "./library/BasisPoints.sol";
import "./LidSimplifiedPresaleTimer.sol";
import "./LidSimplifiedPresaleRedeemer.sol";
import "./LidSimplifiedPresaleAccess.sol";


contract LidSimplifiedPresale is Initializable, Ownable, ReentrancyGuard, Pausable {
    using BasisPoints for uint;
    using SafeMath for uint;

    uint public maxBuyPerAddress;

    uint public uniswapEthBP;
    uint public lidEthBP;

    uint public uniswapTokenBP;
    uint public presaleTokenBP;
    address[] public tokenPools;
    uint[] public tokenPoolBPs;

    uint public hardcap;
    uint public totalTokens;

    bool public hasSentToUniswap;
    bool public hasIssuedTokens;

    uint public finalEndTime;
    uint public finalEth;

    IERC20 private token;
    IUniswapV2Router01 private uniswapRouter;
    LidSimplifiedPresaleTimer private timer;
    LidSimplifiedPresaleRedeemer private redeemer;
    LidSimplifiedPresaleAccess private access;
    address payable private lidFund;

    mapping(address => uint) public earnedReferrals;

    mapping(address => uint) public referralCounts;

    mapping(address => uint) public refundedEth;

    bool public isRefunding;

    modifier whenPresaleActive {
        require(timer.isStarted(), "Presale not yet started.");
        require(!isPresaleEnded(), "Presale has ended.");
        _;
    }

    modifier whenPresaleFinished {
        require(timer.isStarted(), "Presale not yet started.");
        require(isPresaleEnded(), "Presale has not yet ended.");
        _;
    }

    function initialize(
        uint _maxBuyPerAddress,
        uint _uniswapEthBP,
        uint _lidEthBP,
        uint _hardcap,
        address owner,
        LidSimplifiedPresaleTimer _timer,
        LidSimplifiedPresaleRedeemer _redeemer,
        LidSimplifiedPresaleAccess _access,
        IERC20 _token,
        IUniswapV2Router01 _uniswapRouter,
        address payable _lidFund
    ) external initializer {
        Ownable.initialize(msg.sender);
        Pausable.initialize(msg.sender);
        ReentrancyGuard.initialize();

        token = _token;
        timer = _timer;
        redeemer = _redeemer;
        access = _access;
        lidFund = _lidFund;

        maxBuyPerAddress = _maxBuyPerAddress;

        uniswapEthBP = _uniswapEthBP;
        lidEthBP = _lidEthBP;

        hardcap = _hardcap;

        uniswapRouter = _uniswapRouter;
        totalTokens = token.totalSupply();
        token.approve(address(uniswapRouter), token.totalSupply());

        //Due to issue in oz testing suite, the msg.sender might not be owner
        _transferOwnership(owner);
    }

    function deposit() external payable whenNotPaused {
        deposit(address(0x0));
    }

    function setTokenPools(
        uint _uniswapTokenBP,
        uint _presaleTokenBP,
        address[] calldata _tokenPools,
        uint[] calldata _tokenPoolBPs
    ) external onlyOwner whenNotPaused {
        require(_tokenPools.length == _tokenPoolBPs.length, "Must have exactly one tokenPool addresses for each BP.");
        delete tokenPools;
        delete tokenPoolBPs;
        uniswapTokenBP = _uniswapTokenBP;
        presaleTokenBP = _presaleTokenBP;
        for (uint i = 0; i < _tokenPools.length; ++i) {
            tokenPools.push(_tokenPools[i]);
        }
        uint totalTokenPoolBPs = uniswapTokenBP.add(presaleTokenBP);
        for (uint i = 0; i < _tokenPoolBPs.length; ++i) {
            tokenPoolBPs.push(_tokenPoolBPs[i]);
            totalTokenPoolBPs = totalTokenPoolBPs.add(_tokenPoolBPs[i]);
        }
        require(totalTokenPoolBPs == 10000, "Must allocate exactly 100% (10000 BP) of tokens to pools");
    }

    function sendToUniswap() external whenPresaleFinished nonReentrant whenNotPaused {
        require(msg.sender == tx.origin, "Sender must be origin - no contract calls.");
        require(tokenPools.length > 0, "Must have set token pools");
        require(!hasSentToUniswap, "Has already sent to Uniswap.");
        finalEndTime = now;
        finalEth = address(this).balance;
        hasSentToUniswap = true;
        uint uniswapTokens = totalTokens.mulBP(uniswapTokenBP);
        uint uniswapEth = finalEth.mulBP(uniswapEthBP);
        uniswapRouter.addLiquidityETH.value(uniswapEth)(
            address(token),
            uniswapTokens,
            uniswapTokens,
            uniswapEth,
            address(0x000000000000000000000000000000000000dEaD),
            now
        );
    }

    function issueTokens() external whenPresaleFinished whenNotPaused {
        require(hasSentToUniswap, "Has not yet sent to Uniswap.");
        require(!hasIssuedTokens, "Has already issued tokens.");
        hasIssuedTokens = true;
        uint last = tokenPools.length.sub(1);
        for (uint i = 0; i < last; ++i) {
            token.transfer(
                tokenPools[i],
                totalTokens.mulBP(tokenPoolBPs[i])
            );
        }
        // in case rounding error, send all to final
        token.transfer(
            tokenPools[last],
            totalTokens.mulBP(tokenPoolBPs[last])
        );
    }

    function releaseEthToAddress(address payable receiver, uint amount) external onlyOwner whenNotPaused returns(uint) {
        require(hasSentToUniswap, "Has not yet sent to Uniswap.");
        receiver.transfer(amount);
    }

    function redeem() external whenPresaleFinished whenNotPaused {
        require(hasSentToUniswap, "Must have sent to Uniswap before any redeems.");
        uint claimable = redeemer.calculateReedemable(msg.sender, finalEndTime, totalTokens.mulBP(presaleTokenBP));
        redeemer.setClaimed(msg.sender, claimable);
        token.transfer(msg.sender, claimable);
    }

    function startRefund() external onlyOwner {
        _startRefund();
    }

    function claimRefund(address payable account) external whenPaused {
        require(isRefunding, "Refunds not active");
        uint refundAmt = getRefundableEth(account);
        require(refundAmt > 0, "Nothing to refund");
        refundedEth[account] = refundedEth[account].add(refundAmt);
        account.transfer(refundAmt);
    }

    function updateHardcap(uint valueWei) external onlyOwner {
        hardcap = valueWei;
    }

    function updateMaxBuy(uint valueWei) external onlyOwner {
        maxBuyPerAddress = valueWei;
    }

    function updateEthBP(uint _uniswapEthBP, uint _lidEthBP) external onlyOwner {
        uniswapEthBP = _uniswapEthBP;
        lidEthBP = _lidEthBP;
    }

    function deposit(address payable referrer) public payable nonReentrant whenNotPaused {
        require(timer.isStarted(), "Presale not yet started.");
        require(now >= access.getAccessTime(msg.sender, timer.startTime()), "Time must be at least access time.");
        require(msg.sender != referrer, "Sender cannot be referrer.");
        require(address(this).balance.sub(msg.value) <= hardcap, "Cannot deposit more than hardcap.");
        require(!hasSentToUniswap, "Presale Ended, Uniswap has been called.");
        uint endTime = timer.endTime();
        require(!(now > endTime && endTime != 0), "Presale Ended, time over limit.");
        require(
            redeemer.accountDeposits(msg.sender).add(msg.value) <= maxBuyPerAddress,
            "Deposit exceeds max buy per address."
        );
        bool _isRefunding = timer.updateRefunding();
        if(_isRefunding) {
            _startRefund();
            return;
        }
        uint depositEther = msg.value;
        uint excess = 0;

        //Refund eth in case final purchase needed to end sale without dust errors
        if (address(this).balance > hardcap) {
            excess = address(this).balance.sub(hardcap);
            depositEther = depositEther.sub(excess);
        }

        redeemer.setDeposit(msg.sender, depositEther);

        if (excess != 0) {
            msg.sender.transfer(excess);
        }
    }

    function getRefundableEth(address account) public view returns (uint) {
        if (!isRefunding) return 0;

        return redeemer.accountDeposits(account)
            .sub(refundedEth[account]);
    }

    function isPresaleEnded() public view returns (bool) {
        uint endTime =  timer.endTime();
        if (hasSentToUniswap) return true;
        return (
            (address(this).balance >= hardcap) ||
            (timer.isStarted() && (now > endTime && endTime != 0))
        );
    }

    function _startRefund() internal {
        //TODO: Automatically start refund after timer is passed for softcap reach
        pause();
        isRefunding = true;
    }

}

File 2 of 18 : LidSimplifiedPresaleAccess.sol
pragma solidity 0.5.16;

import "@openzeppelin/upgrades/contracts/Initializable.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
//TODO: Replace with abstract sc or interface. mocks should only be for testing
import "./mocks/LidStaking.sol";


contract LidSimplifiedPresaleAccess is Initializable {
    using SafeMath for uint;
    LidStaking private staking;

    uint[5] private cutoffs;

    function initialize(LidStaking _staking) external initializer {
        staking = _staking;
        //Precalculated
        cutoffs = [
            500000 ether,
            100000 ether,
            50000 ether,
            25000 ether,
            1 ether
        ];
    }

    function getAccessTime(address account, uint startTime) external view returns (uint accessTime) {
        uint stakeValue = staking.stakeValue(account);
        if (stakeValue == 0) return startTime.add(15 minutes);
        if (stakeValue >= cutoffs[0]) return startTime;
        uint i=0;
        uint stake2 = cutoffs[0];
        while (stake2 > stakeValue && i < cutoffs.length) {
            i++;
            stake2 = cutoffs[i];
        }
        return startTime.add(i.mul(3 minutes));
    }
}

File 3 of 18 : LidSimplifiedPresaleRedeemer.sol
pragma solidity 0.5.16;

import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/upgrades/contracts/Initializable.sol";
import "./uniswapV2Periphery/interfaces/IUniswapV2Router01.sol";
import "./library/BasisPoints.sol";
import "./LidSimplifiedPresaleTimer.sol";


contract LidSimplifiedPresaleRedeemer is Initializable, Ownable {
    using BasisPoints for uint;
    using SafeMath for uint;

    uint public redeemBP;
    uint public redeemInterval;

    uint public totalShares;
    uint public totalDepositors;
    mapping(address => uint) public accountDeposits;
    mapping(address => uint) public accountShares;
    mapping(address => uint) public accountClaimedTokens;

    address private presale;

    modifier onlyPresaleContract {
        require(msg.sender == presale, "Only callable by presale contract.");
        _;
    }

    function initialize(
        uint _redeemBP,
        uint _redeemInterval,
        address _presale,
        address owner
    ) external initializer {
        Ownable.initialize(owner);

        redeemBP = _redeemBP;
        redeemInterval = _redeemInterval;
        presale = _presale;
    }

    function setClaimed(address account, uint amount) external onlyPresaleContract {
        accountClaimedTokens[account] = accountClaimedTokens[account].add(amount);
    }

    function setDeposit(address account, uint deposit) external onlyPresaleContract {
        if (accountDeposits[account] == 0) totalDepositors = totalDepositors.add(1);
        accountDeposits[account] = accountDeposits[account].add(deposit);
        uint sharesToAdd = deposit;
        accountShares[account] = accountShares[account].add(sharesToAdd);
        totalShares = totalShares.add(sharesToAdd);
    }

    function calculateRatePerEth(uint totalPresaleTokens, uint hardCap) external pure returns (uint) {
        return totalPresaleTokens
        .mul(1 ether)
        .div(
            getMaxShares(hardCap)
        );
    }

    function calculateReedemable(
        address account,
        uint finalEndTime,
        uint totalPresaleTokens
    ) external view returns (uint) {
        if (finalEndTime == 0) return 0;
        if (finalEndTime >= now) return 0;
        uint earnedTokens = accountShares[account].mul(totalPresaleTokens).div(totalShares);
        uint claimedTokens = accountClaimedTokens[account];
        uint cycles = now.sub(finalEndTime).div(redeemInterval).add(1);
        uint totalRedeemable = earnedTokens.mulBP(redeemBP).mul(cycles);
        uint claimable;
        if (totalRedeemable >= earnedTokens) {
            claimable = earnedTokens.sub(claimedTokens);
        } else {
            claimable = totalRedeemable.sub(claimedTokens);
        }
        return claimable;
    }

    function getMaxShares(uint hardCap) public pure returns (uint) {
        return hardCap;
    }
}

File 4 of 18 : LidSimplifiedPresaleTimer.sol
pragma solidity 0.5.16;

import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol";
import "@openzeppelin/upgrades/contracts/Initializable.sol";


contract LidSimplifiedPresaleTimer is Initializable, Ownable {
    using SafeMath for uint;

    uint public startTime;
    uint public endTime;
    uint public softCap;
    address public presale;

    uint public refundTime;
    uint public maxBalance;

    function initialize(
        uint _startTime,
        uint _refundTime,
        uint _endTime,
        uint _softCap,
        address _presale,
        address owner
    ) external initializer {
        Ownable.initialize(msg.sender);
        startTime = _startTime;
        refundTime = _refundTime;
        endTime = _endTime;
        softCap = _softCap;
        presale = _presale;
        //Due to issue in oz testing suite, the msg.sender might not be owner
        _transferOwnership(owner);
    }

    function setStartTime(uint time) external onlyOwner {
        startTime = time;
    }

    function setRefundTime(uint time) external onlyOwner {
        refundTime = time;
    }

    function setEndTime(uint time) external onlyOwner {
        endTime = time;
    }

    function updateSoftCap(uint valueWei) external onlyOwner {
        softCap = valueWei;
    }

    function updateRefunding() external returns (bool) {
        if (maxBalance < presale.balance) maxBalance = presale.balance;
        if (maxBalance < softCap && now > refundTime) return true;
        return false;
    }

    function isStarted() external view returns (bool) {
        return (startTime != 0 && now > startTime);
    }

}

File 5 of 18 : ILidCertifiableToken.sol
pragma solidity 0.5.16;


interface ILidCertifiableToken {
    function activateTransfers() external;
    function activateTax() external;
    function mint(address account, uint256 amount) external returns (bool);
    function addMinter(address account) external;
    function renounceMinter() external;
    function transfer(address recipient, uint256 amount) external returns (bool);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function isMinter(address account) external view returns (bool);
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

}

File 6 of 18 : IStakeHandler.sol
pragma solidity 0.5.16;


interface IStakeHandler {
    function handleStake(address staker, uint stakerDeltaValue, uint stakerFinalValue) external;
    function handleUnstake(address staker, uint stakerDeltaValue, uint stakerFinalValue) external;
}

File 7 of 18 : BasisPoints.sol
pragma solidity 0.5.16;

import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";


library BasisPoints {
    using SafeMath for uint;

    uint constant private BASIS_POINTS = 10000;

    function mulBP(uint amt, uint bp) internal pure returns (uint) {
        if (amt == 0) return 0;
        return amt.mul(bp).div(BASIS_POINTS);
    }

    function divBP(uint amt, uint bp) internal pure returns (uint) {
        require(bp > 0, "Cannot divide by zero.");
        if (amt == 0) return 0;
        return amt.mul(BASIS_POINTS).div(bp);
    }

    function addBP(uint amt, uint bp) internal pure returns (uint) {
        if (amt == 0) return 0;
        if (bp == 0) return amt;
        return amt.add(mulBP(amt, bp));
    }

    function subBP(uint amt, uint bp) internal pure returns (uint) {
        if (amt == 0) return 0;
        if (bp == 0) return amt;
        return amt.sub(mulBP(amt, bp));
    }
}

File 8 of 18 : LidStaking.sol
pragma solidity 0.5.16;

import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol";
import "@openzeppelin/upgrades/contracts/Initializable.sol";
import "../library/BasisPoints.sol";
import "../interfaces/IStakeHandler.sol";
import "../interfaces/ILidCertifiableToken.sol";


contract LidStaking is Initializable, Ownable {
    using BasisPoints for uint;
    using SafeMath for uint;

    uint256 constant internal DISTRIBUTION_MULTIPLIER = 2 ** 64;

    uint public stakingTaxBP;
    uint public unstakingTaxBP;
    ILidCertifiableToken private lidToken;

    mapping(address => uint) public stakeValue;
    mapping(address => int) public stakerPayouts;


    uint public totalDistributions;
    uint public totalStaked;
    uint public totalStakers;
    uint public profitPerShare;
    uint private emptyStakeTokens; //These are tokens given to the contract when there are no stakers.

    IStakeHandler[] public stakeHandlers;
    uint public startTime;

    uint public registrationFeeWithReferrer;
    uint public registrationFeeWithoutReferrer;
    mapping(address => uint) public accountReferrals;
    mapping(address => bool) public stakerIsRegistered;

    event OnDistribute(address sender, uint amountSent);
    event OnStake(address sender, uint amount, uint tax);
    event OnUnstake(address sender, uint amount, uint tax);
    event OnReinvest(address sender, uint amount, uint tax);
    event OnWithdraw(address sender, uint amount);

    modifier onlyLidToken {
        require(msg.sender == address(lidToken), "Can only be called by LidToken contract.");
        _;
    }

    modifier whenStakingActive {
        require(startTime != 0 && now > startTime, "Staking not yet started.");
        _;
    }

    function initialize(
        uint _stakingTaxBP,
        uint _ustakingTaxBP,
        uint _registrationFeeWithReferrer,
        uint _registrationFeeWithoutReferrer,
        address owner,
        ILidCertifiableToken _lidToken
    ) external initializer {
        Ownable.initialize(msg.sender);
        stakingTaxBP = _stakingTaxBP;
        unstakingTaxBP = _ustakingTaxBP;
        lidToken = _lidToken;
        registrationFeeWithReferrer = _registrationFeeWithReferrer;
        registrationFeeWithoutReferrer = _registrationFeeWithoutReferrer;
        //Due to issue in oz testing suite, the msg.sender might not be owner
        _transferOwnership(owner);
    }

    function registerAndStake(uint amount) public {
        registerAndStake(amount, address(0x0));
    }

    function registerAndStake(uint amount, address referrer) public whenStakingActive {
        require(!stakerIsRegistered[msg.sender], "Staker must not be registered");
        require(lidToken.balanceOf(msg.sender) >= amount, "Must have enough balance to stake amount");
        uint finalAmount;
        if(address(0x0) == referrer) {
            //No referrer
            require(amount >= registrationFeeWithoutReferrer, "Must send at least enough LID to pay registration fee.");
            distribute(registrationFeeWithoutReferrer);
            finalAmount = amount.sub(registrationFeeWithoutReferrer);
        } else {
            //has referrer
            require(amount >= registrationFeeWithReferrer, "Must send at least enough LID to pay registration fee.");
            require(lidToken.transferFrom(msg.sender, referrer, registrationFeeWithReferrer), "Stake failed due to failed referral transfer.");
            accountReferrals[referrer] = accountReferrals[referrer].add(1);
            finalAmount = amount.sub(registrationFeeWithReferrer);
        }
        stakerIsRegistered[msg.sender] = true;
        stake(finalAmount);
    }

    function stake(uint amount) public whenStakingActive {
        require(stakerIsRegistered[msg.sender] == true, "Must be registered to stake.");
        require(amount >= 1e18, "Must stake at least one LID.");
        require(lidToken.balanceOf(msg.sender) >= amount, "Cannot stake more LID than you hold unstaked.");
        if (stakeValue[msg.sender] == 0) totalStakers = totalStakers.add(1);
        uint tax = _addStake(amount);
        require(lidToken.transferFrom(msg.sender, address(this), amount), "Stake failed due to failed transfer.");
        emit OnStake(msg.sender, amount, tax);
    }

    function unstake(uint amount) external whenStakingActive {
        require(amount >= 1e18, "Must unstake at least one LID.");
        require(stakeValue[msg.sender] >= amount, "Cannot unstake more LID than you have staked.");
        //must withdraw all dividends, to prevent overflows
        withdraw(dividendsOf(msg.sender));
        if (stakeValue[msg.sender] == amount) totalStakers = totalStakers.sub(1);
        totalStaked = totalStaked.sub(amount);
        stakeValue[msg.sender] = stakeValue[msg.sender].sub(amount);

        uint tax = findTaxAmount(amount, unstakingTaxBP);
        uint earnings = amount.sub(tax);
        _increaseProfitPerShare(tax);
        stakerPayouts[msg.sender] = uintToInt(profitPerShare.mul(stakeValue[msg.sender]));

        for (uint i=0; i < stakeHandlers.length; i++) {
            stakeHandlers[i].handleUnstake(msg.sender, amount, stakeValue[msg.sender]);
        }

        require(lidToken.transferFrom(address(this), msg.sender, earnings), "Unstake failed due to failed transfer.");
        emit OnUnstake(msg.sender, amount, tax);
    }

    function withdraw(uint amount) public whenStakingActive {
        require(dividendsOf(msg.sender) >= amount, "Cannot withdraw more dividends than you have earned.");
        stakerPayouts[msg.sender] = stakerPayouts[msg.sender] + uintToInt(amount.mul(DISTRIBUTION_MULTIPLIER));
        lidToken.transfer(msg.sender, amount);
        emit OnWithdraw(msg.sender, amount);
    }

    function reinvest(uint amount) external whenStakingActive {
        require(dividendsOf(msg.sender) >= amount, "Cannot reinvest more dividends than you have earned.");
        uint payout = amount.mul(DISTRIBUTION_MULTIPLIER);
        stakerPayouts[msg.sender] = stakerPayouts[msg.sender] + uintToInt(payout);
        uint tax = _addStake(amount);
        emit OnReinvest(msg.sender, amount, tax);
    }

    function distribute(uint amount) public {
        require(lidToken.balanceOf(msg.sender) >= amount, "Cannot distribute more LID than you hold unstaked.");
        totalDistributions = totalDistributions.add(amount);
        _increaseProfitPerShare(amount);
        require(
            lidToken.transferFrom(msg.sender, address(this), amount),
            "Distribution failed due to failed transfer."
        );
        emit OnDistribute(msg.sender, amount);
    }

    function handleTaxDistribution(uint amount) external onlyLidToken {
        totalDistributions = totalDistributions.add(amount);
        _increaseProfitPerShare(amount);
        emit OnDistribute(msg.sender, amount);
    }

    function dividendsOf(address staker) public view returns (uint) {
        int divPayout = uintToInt(profitPerShare.mul(stakeValue[staker]));
        require(divPayout >= stakerPayouts[staker], "dividend calc overflow");
        return uint(divPayout - stakerPayouts[staker])
            .div(DISTRIBUTION_MULTIPLIER);
    }

    function findTaxAmount(uint value, uint taxBP) public pure returns (uint) {
        return value.mulBP(taxBP);
    }

    function numberStakeHandlersRegistered() external view returns (uint) {
        return stakeHandlers.length;
    }

    function registerStakeHandler(IStakeHandler sc) external onlyOwner {
        stakeHandlers.push(sc);
    }

    function unregisterStakeHandler(uint index) external onlyOwner {
        IStakeHandler sc = stakeHandlers[stakeHandlers.length-1];
        stakeHandlers.pop();
        stakeHandlers[index] = sc;
    }

    function setStakingBP(uint valueBP) external onlyOwner {
        require(valueBP < 10000, "Tax connot be over 100% (10000 BP)");
        stakingTaxBP = valueBP;
    }

    function setUnstakingBP(uint valueBP) external onlyOwner {
        require(valueBP < 10000, "Tax connot be over 100% (10000 BP)");
        unstakingTaxBP = valueBP;
    }

    function setStartTime(uint _startTime) external onlyOwner {
        startTime = _startTime;
    }

    function setRegistrationFees(uint valueWithReferrer, uint valueWithoutReferrer) external onlyOwner {
        registrationFeeWithReferrer = valueWithReferrer;
        registrationFeeWithoutReferrer = valueWithoutReferrer;
    }

    function uintToInt(uint val) internal pure returns (int) {
        if (val >= uint(-1).div(2)) {
            require(false, "Overflow. Cannot convert uint to int.");
        } else {
            return int(val);
        }
    }

    function _addStake(uint amount) internal returns (uint tax) {
        tax = findTaxAmount(amount, stakingTaxBP);
        uint stakeAmount = amount.sub(tax);
        totalStaked = totalStaked.add(stakeAmount);
        stakeValue[msg.sender] = stakeValue[msg.sender].add(stakeAmount);
        for (uint i=0; i < stakeHandlers.length; i++) {
            stakeHandlers[i].handleStake(msg.sender, stakeAmount, stakeValue[msg.sender]);
        }
        uint payout = profitPerShare.mul(stakeAmount);
        stakerPayouts[msg.sender] = stakerPayouts[msg.sender] + uintToInt(payout);
        _increaseProfitPerShare(tax);
    }

    function _increaseProfitPerShare(uint amount) internal {
        if (totalStaked != 0) {
            if (emptyStakeTokens != 0) {
                amount = amount.add(emptyStakeTokens);
                emptyStakeTokens = 0;
            }
            profitPerShare = profitPerShare.add(amount.mul(DISTRIBUTION_MULTIPLIER).div(totalStaked));
        } else {
            emptyStakeTokens = emptyStakeTokens.add(amount);
        }
    }

}

File 9 of 18 : IUniswapV2Router01.sol
pragma solidity =0.5.16;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);

    function WETH() external view returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
}

File 10 of 18 : Context.sol
pragma solidity ^0.5.0;

import "@openzeppelin/upgrades/contracts/Initializable.sol";

/*
 * @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 GSN 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.
 */
contract Context is Initializable {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

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

File 11 of 18 : Roles.sol
pragma solidity ^0.5.0;

/**
 * @title Roles
 * @dev Library for managing addresses assigned to a Role.
 */
library Roles {
    struct Role {
        mapping (address => bool) bearer;
    }

    /**
     * @dev Give an account access to this role.
     */
    function add(Role storage role, address account) internal {
        require(!has(role, account), "Roles: account already has role");
        role.bearer[account] = true;
    }

    /**
     * @dev Remove an account's access to this role.
     */
    function remove(Role storage role, address account) internal {
        require(has(role, account), "Roles: account does not have role");
        role.bearer[account] = false;
    }

    /**
     * @dev Check if an account has this role.
     * @return bool
     */
    function has(Role storage role, address account) internal view returns (bool) {
        require(account != address(0), "Roles: account is the zero address");
        return role.bearer[account];
    }
}

File 12 of 18 : PauserRole.sol
pragma solidity ^0.5.0;

import "@openzeppelin/upgrades/contracts/Initializable.sol";

import "../../GSN/Context.sol";
import "../Roles.sol";

contract PauserRole is Initializable, Context {
    using Roles for Roles.Role;

    event PauserAdded(address indexed account);
    event PauserRemoved(address indexed account);

    Roles.Role private _pausers;

    function initialize(address sender) public initializer {
        if (!isPauser(sender)) {
            _addPauser(sender);
        }
    }

    modifier onlyPauser() {
        require(isPauser(_msgSender()), "PauserRole: caller does not have the Pauser role");
        _;
    }

    function isPauser(address account) public view returns (bool) {
        return _pausers.has(account);
    }

    function addPauser(address account) public onlyPauser {
        _addPauser(account);
    }

    function renouncePauser() public {
        _removePauser(_msgSender());
    }

    function _addPauser(address account) internal {
        _pausers.add(account);
        emit PauserAdded(account);
    }

    function _removePauser(address account) internal {
        _pausers.remove(account);
        emit PauserRemoved(account);
    }

    uint256[50] private ______gap;
}

File 13 of 18 : Pausable.sol
pragma solidity ^0.5.0;

import "@openzeppelin/upgrades/contracts/Initializable.sol";

import "../GSN/Context.sol";
import "../access/roles/PauserRole.sol";

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

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

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state. Assigns the Pauser role
     * to the deployer.
     */
    function initialize(address sender) public initializer {
        PauserRole.initialize(sender);

        _paused = false;
    }

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

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

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

    /**
     * @dev Called by a pauser to pause, triggers stopped state.
     */
    function pause() public onlyPauser whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Called by a pauser to unpause, returns to normal state.
     */
    function unpause() public onlyPauser whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }

    uint256[50] private ______gap;
}

File 14 of 18 : SafeMath.sol
pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @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) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @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 sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @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) {
        // 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 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts 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 mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 15 of 18 : Ownable.sol
pragma solidity ^0.5.0;

import "@openzeppelin/upgrades/contracts/Initializable.sol";

import "../GSN/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.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be aplied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Initializable, Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function initialize(address sender) public initializer {
        _owner = sender;
        emit OwnershipTransferred(address(0), _owner);
    }

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

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

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _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 onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }

    uint256[50] private ______gap;
}

File 16 of 18 : IERC20.sol
pragma solidity ^0.5.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
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 17 of 18 : ReentrancyGuard.sol
pragma solidity ^0.5.0;

import "@openzeppelin/upgrades/contracts/Initializable.sol";

/**
 * @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.
 */
contract ReentrancyGuard is Initializable {
    // counter to allow mutex lock with only one SSTORE operation
    uint256 private _guardCounter;

    function initialize() public initializer {
        // The counter starts at one to prevent changing it from zero to a non-zero
        // value, which is a more expensive operation.
        _guardCounter = 1;
    }

    /**
     * @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() {
        _guardCounter += 1;
        uint256 localCounter = _guardCounter;
        _;
        require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call");
    }

    uint256[50] private ______gap;
}

File 18 of 18 : Initializable.sol
pragma solidity >=0.4.24 <0.7.0;


/**
 * @title Initializable
 *
 * @dev Helper contract to support initializer functions. To use it, replace
 * the constructor with a function that has the `initializer` modifier.
 * WARNING: Unlike constructors, initializer functions must be manually
 * invoked. This applies both to deploying an Initializable contract, as well
 * as extending an Initializable contract via inheritance.
 * WARNING: When used with inheritance, manual care must be taken to not invoke
 * a parent initializer twice, or ensure that all initializers are idempotent,
 * because this is not dealt with automatically as with constructors.
 */
contract Initializable {

  /**
   * @dev Indicates that the contract has been initialized.
   */
  bool private initialized;

  /**
   * @dev Indicates that the contract is in the process of being initialized.
   */
  bool private initializing;

  /**
   * @dev Modifier to use in the initializer function of a contract.
   */
  modifier initializer() {
    require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized");

    bool isTopLevelCall = !initializing;
    if (isTopLevelCall) {
      initializing = true;
      initialized = true;
    }

    _;

    if (isTopLevelCall) {
      initializing = false;
    }
  }

  /// @dev Returns true if and only if the function is running in the constructor
  function isConstructor() private view returns (bool) {
    // extcodesize checks the size of the code stored in an address, and
    // address returns the current address. Since the code is still not
    // deployed when running a constructor, any checks on its code size will
    // yield zero, making it an effective way to detect if a contract is
    // under construction or not.
    address self = address(this);
    uint256 cs;
    assembly { cs := extcodesize(self) }
    return cs == 0;
  }

  // Reserved storage space to allow for layout changes in the future.
  uint256[50] private ______gap;
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "byzantium",
  "libraries": {
    "": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"PauserAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"PauserRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addPauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"claimRefund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"deposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"internalType":"address payable","name":"referrer","type":"address"}],"name":"deposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"earnedReferrals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"finalEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"finalEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getRefundableEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"hardcap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"hasIssuedTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"hasSentToUniswap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_maxBuyPerAddress","type":"uint256"},{"internalType":"uint256","name":"_uniswapEthBP","type":"uint256"},{"internalType":"uint256","name":"_lidEthBP","type":"uint256"},{"internalType":"uint256","name":"_hardcap","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"contract LidSimplifiedPresaleTimer","name":"_timer","type":"address"},{"internalType":"contract LidSimplifiedPresaleRedeemer","name":"_redeemer","type":"address"},{"internalType":"contract LidSimplifiedPresaleAccess","name":"_access","type":"address"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"contract IUniswapV2Router01","name":"_uniswapRouter","type":"address"},{"internalType":"address payable","name":"_lidFund","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isPauser","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isPresaleEnded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isRefunding","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"issueTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lidEthBP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxBuyPerAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"presaleTokenBP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"redeem","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"referralCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"refundedEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address payable","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"releaseEthToAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renouncePauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"sendToUniswap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_uniswapTokenBP","type":"uint256"},{"internalType":"uint256","name":"_presaleTokenBP","type":"uint256"},{"internalType":"address[]","name":"_tokenPools","type":"address[]"},{"internalType":"uint256[]","name":"_tokenPoolBPs","type":"uint256[]"}],"name":"setTokenPools","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"startRefund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenPoolBPs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenPools","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"uniswapEthBP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"uniswapTokenBP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_uniswapEthBP","type":"uint256"},{"internalType":"uint256","name":"_lidEthBP","type":"uint256"}],"name":"updateEthBP","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"valueWei","type":"uint256"}],"name":"updateHardcap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"valueWei","type":"uint256"}],"name":"updateMaxBuy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x60806040526004361061026a5760003560e060020a9004806382dc1ec411610148578063bffa55d5116100ba578063d7ca81661161007e578063d7ca816614610864578063e05ba89a14610879578063e668d6d81461088e578063f2fde38b146108b8578063f340fa01146108eb578063f562e736146109115761026a565b8063bffa55d514610742578063c4d66de814610775578063c79ce30d146107a8578063cec297a014610829578063d0e30db01461085c5761026a565b8063974499da1161010c578063974499da146106a65780639d6fb020146106d9578063adf4a144146106ee578063b071cbe614610703578063be040fb014610718578063bed683741461072d5761026a565b806382dc1ec4146106015780638456cb59146106345780638da5cb5b146106495780638f32d59b1461065e57806393daed4c146106735761026a565b80635c975abb116101e157806376c80776116101a557806376c807761461054a5780637b31a859146105835780637b6f299c146105ad5780637decf27f146105c25780637e1c0c09146105d75780638129fc1c146105ec5761026a565b80635c975abb146104e157806360ab5852146104f65780636a73c4041461050b5780636ef8d66d14610520578063715018a6146105355761026a565b80633f4ba83a116102335780633f4ba83a1461035657806341f059fa1461036b57806344cbe5de1461044657806346fbf68e1461045b5780634c17989a146104a257806358881304146104b75761026a565b8062c0f9161461026f57806302249d9b146102b55780630655e400146102dc57806306e95096146102f15780633c4eb4de14610324575b600080fd5b34801561027b57600080fd5b506102996004803603602081101561029257600080fd5b5035610926565b60408051600160a060020a039092168252519081900360200190f35b3480156102c157600080fd5b506102ca61094e565b60408051918252519081900360200190f35b3480156102e857600080fd5b506102ca610955565b3480156102fd57600080fd5b506102ca6004803603602081101561031457600080fd5b5035600160a060020a031661095c565b34801561033057600080fd5b506103546004803603604081101561034757600080fd5b508035906020013561096f565b005b34801561036257600080fd5b506103546109c6565b34801561037757600080fd5b506103546004803603608081101561038e57600080fd5b8135916020810135918101906060810160408201356401000000008111156103b557600080fd5b8201836020820111156103c757600080fd5b803590602001918460208302840111640100000000831117156103e957600080fd5b91939092909160208101903564010000000081111561040757600080fd5b82018360208201111561041957600080fd5b8035906020019184602083028401116401000000008311171561043b57600080fd5b509092509050610abe565b34801561045257600080fd5b50610354610cf8565b34801561046757600080fd5b5061048e6004803603602081101561047e57600080fd5b5035600160a060020a03166110cd565b604080519115158252519081900360200190f35b3480156104ae57600080fd5b506102ca6110e8565b3480156104c357600080fd5b50610354600480360360208110156104da57600080fd5b50356110ef565b3480156104ed57600080fd5b5061048e61113e565b34801561050257600080fd5b50610354611148565b34801561051757600080fd5b506102ca61156d565b34801561052c57600080fd5b50610354611573565b34801561054157600080fd5b50610354611585565b34801561055657600080fd5b506102ca6004803603604081101561056d57600080fd5b50600160a060020a038135169060200135611626565b34801561058f57600080fd5b50610354600480360360208110156105a657600080fd5b5035611753565b3480156105b957600080fd5b506102ca6117a3565b3480156105ce57600080fd5b5061048e6117aa565b3480156105e357600080fd5b506102ca6118eb565b3480156105f857600080fd5b506103546118f2565b34801561060d57600080fd5b506103546004803603602081101561062457600080fd5b5035600160a060020a031661199b565b34801561064057600080fd5b506103546119ed565b34801561065557600080fd5b50610299611ab5565b34801561066a57600080fd5b5061048e611ac4565b34801561067f57600080fd5b506102ca6004803603602081101561069657600080fd5b5035600160a060020a0316611aea565b3480156106b257600080fd5b506102ca600480360360208110156106c957600080fd5b5035600160a060020a0316611afd565b3480156106e557600080fd5b5061048e611bca565b3480156106fa57600080fd5b50610354611bd4565b34801561070f57600080fd5b506102ca611c26565b34801561072457600080fd5b50610354611c2d565b34801561073957600080fd5b5061048e611f84565b34801561074e57600080fd5b506103546004803603602081101561076557600080fd5b5035600160a060020a0316611f8e565b34801561078157600080fd5b506103546004803603602081101561079857600080fd5b5035600160a060020a031661211a565b3480156107b457600080fd5b5061035460048036036101608110156107cc57600080fd5b50803590602081013590604081013590606081013590600160a060020a03608082013581169160a081013582169160c082013581169160e081013582169161010082013581169161012081013582169161014090910135166121d3565b34801561083557600080fd5b506102ca6004803603602081101561084c57600080fd5b5035600160a060020a03166124c8565b6103546124db565b34801561087057600080fd5b506102ca61252e565b34801561088557600080fd5b506102ca612535565b34801561089a57600080fd5b506102ca600480360360208110156108b157600080fd5b503561253c565b3480156108c457600080fd5b50610354600480360360208110156108db57600080fd5b5035600160a060020a031661255b565b6103546004803603602081101561090157600080fd5b5035600160a060020a03166125ae565b34801561091d57600080fd5b5061048e612cdf565b610104818154811061093457fe5b600091825260209091200154600160a060020a0316905081565b61010a5481565b6101015481565b6101116020526000908152604090205481565b610977611ac4565b6109b9576040805160e560020a62461bcd02815260206004820181905260248201526000805160206135aa833981519152604482015290519081900360640190fd5b6101009190915561010155565b6109d66109d1612cee565b6110cd565b610a145760405160e560020a62461bcd0281526004018080602001828103825260308152602001806134646030913960400191505060405180910390fd5b60cc5460ff16610a6e576040805160e560020a62461bcd02815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b60cc805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610aa1612cee565b60408051600160a060020a039092168252519081900360200190a1565b610ac6611ac4565b610b08576040805160e560020a62461bcd02815260206004820181905260248201526000805160206135aa833981519152604482015290519081900360640190fd5b60cc5460ff1615610b51576040805160e560020a62461bcd0281526020600482015260106024820152600080516020613650833981519152604482015290519081900360640190fd5b828114610b925760405160e560020a62461bcd02815260040180806020018281038252603681526020018061361a6036913960400191505060405180910390fd5b610b9f61010460006133de565b610bac61010560006133de565b61010286905561010385905560005b83811015610c2257610104858583818110610bd257fe5b8354600181810186556000958652602095869020909101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0396909302949094013594909416179091555001610bbb565b506000610c3e6101035461010254612cf290919063ffffffff16565b905060005b82811015610cab57610105848483818110610c5a57fe5b83546001810185556000948552602094859020919094029290920135919092015550610ca1848483818110610c8b57fe5b9050602002013583612cf290919063ffffffff16565b9150600101610c43565b508061271014610cef5760405160e560020a62461bcd0281526004018080602001828103825260388152602001806135036038913960400191505060405180910390fd5b50505050505050565b61010d60009054906101000a9004600160a060020a0316600160a060020a031663544736e66040518163ffffffff1660e060020a02815260040160206040518083038186803b158015610d4a57600080fd5b505afa158015610d5e573d6000803e3d6000fd5b505050506040513d6020811015610d7457600080fd5b5051610db8576040805160e560020a62461bcd0281526020600482015260186024820152600080516020613670833981519152604482015290519081900360640190fd5b610dc06117aa565b610e14576040805160e560020a62461bcd02815260206004820152601a60248201527f50726573616c6520686173206e6f742079657420656e6465642e000000000000604482015290519081900360640190fd5b606680546001019081905560cc5460ff1615610e68576040805160e560020a62461bcd0281526020600482015260106024820152600080516020613650833981519152604482015290519081900360640190fd5b333214610ea95760405160e560020a62461bcd02815260040180806020018281038252602a815260200180613416602a913960400191505060405180910390fd5b61010454610f01576040805160e560020a62461bcd02815260206004820152601960248201527f4d75737420686176652073657420746f6b656e20706f6f6c7300000000000000604482015290519081900360640190fd5b6101085460ff1615610f5d576040805160e560020a62461bcd02815260206004820152601c60248201527f48617320616c72656164792073656e7420746f20556e69737761702e00000000604482015290519081900360640190fd5b4261010955303161010a55610108805460ff191660011790556101025461010754600091610f91919063ffffffff612d5816565b90506000610fae6101005461010a54612d5890919063ffffffff16565b61010c5461010b54604080517ff305d719000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015260248101879052604481018790526064810185905261dead60848201524260a4820152905193945091169163f305d71991849160c480830192606092919082900301818588803b15801561104057600080fd5b505af1158015611054573d6000803e3d6000fd5b50505050506040513d606081101561106b57600080fd5b5050606654831491506110ca9050576040805160e560020a62461bcd02815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b50565b60006110e060998363ffffffff612d8916565b90505b919050565b6101005481565b6110f7611ac4565b611139576040805160e560020a62461bcd02815260206004820181905260248201526000805160206135aa833981519152604482015290519081900360640190fd5b60ff55565b60cc5460ff165b90565b61010d60009054906101000a9004600160a060020a0316600160a060020a031663544736e66040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561119a57600080fd5b505afa1580156111ae573d6000803e3d6000fd5b505050506040513d60208110156111c457600080fd5b5051611208576040805160e560020a62461bcd0281526020600482015260186024820152600080516020613670833981519152604482015290519081900360640190fd5b6112106117aa565b611264576040805160e560020a62461bcd02815260206004820152601a60248201527f50726573616c6520686173206e6f742079657420656e6465642e000000000000604482015290519081900360640190fd5b60cc5460ff16156112ad576040805160e560020a62461bcd0281526020600482015260106024820152600080516020613650833981519152604482015290519081900360640190fd5b6101085460ff16611308576040805160e560020a62461bcd02815260206004820152601c60248201527f486173206e6f74207965742073656e7420746f20556e69737761702e00000000604482015290519081900360640190fd5b61010854610100900460ff1615611369576040805160e560020a62461bcd02815260206004820152601a60248201527f48617320616c72656164792069737375656420746f6b656e732e000000000000604482015290519081900360640190fd5b610108805461ff0019166101001790556101045460009061139190600163ffffffff612df316565b905060005b818110156114965761010b546101048054600160a060020a039092169163a9059cbb9190849081106113c457fe5b9060005260206000200160009054906101000a9004600160a060020a031661141061010585815481106113f357fe5b906000526020600020015461010754612d5890919063ffffffff16565b6040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561146257600080fd5b505af1158015611476573d6000803e3d6000fd5b505050506040513d602081101561148c57600080fd5b5050600101611396565b5061010b546101048054600160a060020a039092169163a9059cbb9190849081106114bd57fe5b9060005260206000200160009054906101000a9004600160a060020a03166114ec61010585815481106113f357fe5b6040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561153e57600080fd5b505af1158015611552573d6000803e3d6000fd5b505050506040513d602081101561156857600080fd5b505050565b60ff5481565b61158361157e612cee565b612e35565b565b61158d611ac4565b6115cf576040805160e560020a62461bcd02815260206004820181905260248201526000805160206135aa833981519152604482015290519081900360640190fd5b603354604051600091600160a060020a0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36033805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000611630611ac4565b611672576040805160e560020a62461bcd02815260206004820181905260248201526000805160206135aa833981519152604482015290519081900360640190fd5b60cc5460ff16156116bb576040805160e560020a62461bcd0281526020600482015260106024820152600080516020613650833981519152604482015290519081900360640190fd5b6101085460ff16611716576040805160e560020a62461bcd02815260206004820152601c60248201527f486173206e6f74207965742073656e7420746f20556e69737761702e00000000604482015290519081900360640190fd5b604051600160a060020a0384169083156108fc029084906000818181858888f1935050505015801561174c573d6000803e3d6000fd5b5092915050565b61175b611ac4565b61179d576040805160e560020a62461bcd02815260206004820181905260248201526000805160206135aa833981519152604482015290519081900360640190fd5b61010655565b6101025481565b60008061010d60009054906101000a9004600160a060020a0316600160a060020a0316633197cbb66040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156117ff57600080fd5b505afa158015611813573d6000803e3d6000fd5b505050506040513d602081101561182957600080fd5b50516101085490915060ff1615611844576001915050611145565b6101065430311015806118e5575061010d60009054906101000a9004600160a060020a0316600160a060020a031663544736e66040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156118a457600080fd5b505afa1580156118b8573d6000803e3d6000fd5b505050506040513d60208110156118ce57600080fd5b505180156118e5575080421180156118e557508015155b91505090565b6101075481565b600054610100900460ff168061190b575061190b612e7d565b80611919575060005460ff16155b6119575760405160e560020a62461bcd02815260040180806020018281038252602e8152602001806135ec602e913960400191505060405180910390fd5b600054610100900460ff16158015611982576000805460ff1961ff0019909116610100171660011790555b600160665580156110ca576000805461ff001916905550565b6119a66109d1612cee565b6119e45760405160e560020a62461bcd0281526004018080602001828103825260308152602001806134646030913960400191505060405180910390fd5b6110ca81612e83565b6119f86109d1612cee565b611a365760405160e560020a62461bcd0281526004018080602001828103825260308152602001806134646030913960400191505060405180910390fd5b60cc5460ff1615611a7f576040805160e560020a62461bcd0281526020600482015260106024820152600080516020613650833981519152604482015290519081900360640190fd5b60cc805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610aa1612cee565b603354600160a060020a031690565b603354600090600160a060020a0316611adb612cee565b600160a060020a031614905090565b6101136020526000908152604090205481565b6101145460009060ff16611b13575060006110e3565b600160a060020a03808316600081815261011360209081526040918290205461010e5483517f835dada0000000000000000000000000000000000000000000000000000000008152600481019590955292516110e0959194939091169263835dada0926024808301939192829003018186803b158015611b9257600080fd5b505afa158015611ba6573d6000803e3d6000fd5b505050506040513d6020811015611bbc57600080fd5b50519063ffffffff612df316565b6101145460ff1681565b611bdc611ac4565b611c1e576040805160e560020a62461bcd02815260206004820181905260248201526000805160206135aa833981519152604482015290519081900360640190fd5b611583612ecb565b6101065481565b61010d60009054906101000a9004600160a060020a0316600160a060020a031663544736e66040518163ffffffff1660e060020a02815260040160206040518083038186803b158015611c7f57600080fd5b505afa158015611c93573d6000803e3d6000fd5b505050506040513d6020811015611ca957600080fd5b5051611ced576040805160e560020a62461bcd0281526020600482015260186024820152600080516020613670833981519152604482015290519081900360640190fd5b611cf56117aa565b611d49576040805160e560020a62461bcd02815260206004820152601a60248201527f50726573616c6520686173206e6f742079657420656e6465642e000000000000604482015290519081900360640190fd5b60cc5460ff1615611d92576040805160e560020a62461bcd0281526020600482015260106024820152600080516020613650833981519152604482015290519081900360640190fd5b6101085460ff16611dd75760405160e560020a62461bcd02815260040180806020018281038252602d81526020018061357d602d913960400191505060405180910390fd5b61010e54610109546101035461010754600093600160a060020a03169263c6db01ad923392611e0b9163ffffffff612d5816565b6040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a03168152602001838152602001828152602001935050505060206040518083038186803b158015611e6257600080fd5b505afa158015611e76573d6000803e3d6000fd5b505050506040513d6020811015611e8c57600080fd5b505161010e54604080517f2fab59ed000000000000000000000000000000000000000000000000000000008152336004820152602481018490529051929350600160a060020a0390911691632fab59ed9160448082019260009290919082900301818387803b158015611efe57600080fd5b505af1158015611f12573d6000803e3d6000fd5b505061010b54604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018690529051600160a060020a03909216935063a9059cbb92506044808201926020929091908290030181600087803b15801561153e57600080fd5b6101085460ff1681565b60cc5460ff16611fe8576040805160e560020a62461bcd02815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6101145460ff16612043576040805160e560020a62461bcd02815260206004820152601260248201527f526566756e6473206e6f74206163746976650000000000000000000000000000604482015290519081900360640190fd5b600061204e82611afd565b9050600081116120a8576040805160e560020a62461bcd02815260206004820152601160248201527f4e6f7468696e6720746f20726566756e64000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a038216600090815261011360205260409020546120d2908263ffffffff612cf216565b600160a060020a03831660008181526101136020526040808220939093559151909183156108fc02918491818181858888f19350505050158015611568573d6000803e3d6000fd5b600054610100900460ff16806121335750612133612e7d565b80612141575060005460ff16155b61217f5760405160e560020a62461bcd02815260040180806020018281038252602e8152602001806135ec602e913960400191505060405180910390fd5b600054610100900460ff161580156121aa576000805460ff1961ff0019909116610100171660011790555b6121b382612ee3565b60cc805460ff1916905580156121cf576000805461ff00191690555b5050565b600054610100900460ff16806121ec57506121ec612e7d565b806121fa575060005460ff16155b6122385760405160e560020a62461bcd02815260040180806020018281038252602e8152602001806135ec602e913960400191505060405180910390fd5b600054610100900460ff16158015612263576000805460ff1961ff0019909116610100171660011790555b61226c33612f9e565b6122753361211a565b61227d6118f2565b61010b805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03878116919091179283905561010d805483168b831617905561010e805483168a831617905561010f805483168983161790556101108054831686831617905560ff8f90556101008e90556101018d90556101068c905561010c805490921686821617909155604080517f18160ddd000000000000000000000000000000000000000000000000000000008152905192909116916318160ddd91600481810192602092909190829003018186803b15801561235c57600080fd5b505afa158015612370573d6000803e3d6000fd5b505050506040513d602081101561238657600080fd5b50516101075561010b5461010c54604080517f18160ddd0000000000000000000000000000000000000000000000000000000081529051600160a060020a039384169363095ea7b393169184916318160ddd91600480820192602092909190829003018186803b1580156123f957600080fd5b505afa15801561240d573d6000803e3d6000fd5b505050506040513d602081101561242357600080fd5b50516040805160e060020a63ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b15801561247257600080fd5b505af1158015612486573d6000803e3d6000fd5b505050506040513d602081101561249c57600080fd5b506124a890508861309f565b80156124ba576000805461ff00191690555b505050505050505050505050565b6101126020526000908152604090205481565b60cc5460ff1615612524576040805160e560020a62461bcd0281526020600482015260106024820152600080516020613650833981519152604482015290519081900360640190fd5b61158360006125ae565b6101095481565b6101035481565b610105818154811061254a57fe5b600091825260209091200154905081565b612563611ac4565b6125a5576040805160e560020a62461bcd02815260206004820181905260248201526000805160206135aa833981519152604482015290519081900360640190fd5b6110ca8161309f565b606680546001019081905560cc5460ff1615612602576040805160e560020a62461bcd0281526020600482015260106024820152600080516020613650833981519152604482015290519081900360640190fd5b61010d60009054906101000a9004600160a060020a0316600160a060020a031663544736e66040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561265457600080fd5b505afa158015612668573d6000803e3d6000fd5b505050506040513d602081101561267e57600080fd5b50516126c2576040805160e560020a62461bcd0281526020600482015260186024820152600080516020613670833981519152604482015290519081900360640190fd5b61010f5461010d54604080517f78e979250000000000000000000000000000000000000000000000000000000081529051600160a060020a039384169363fa04fcfb9333939116916378e9792591600480820192602092909190829003018186803b15801561273057600080fd5b505afa158015612744573d6000803e3d6000fd5b505050506040513d602081101561275a57600080fd5b50516040805160e060020a63ffffffff8616028152600160a060020a0390931660048401526024830191909152516044808301926020929190829003018186803b1580156127a757600080fd5b505afa1580156127bb573d6000803e3d6000fd5b505050506040513d60208110156127d157600080fd5b50514210156128145760405160e560020a62461bcd0281526004018080602001828103825260228152602001806134e16022913960400191505060405180910390fd5b33600160a060020a0383161415612875576040805160e560020a62461bcd02815260206004820152601a60248201527f53656e6465722063616e6e6f742062652072656665727265722e000000000000604482015290519081900360640190fd5b6101065461288a30313463ffffffff612df316565b11156128ca5760405160e560020a62461bcd0281526004018080602001828103825260218152602001806136906021913960400191505060405180910390fd5b6101085460ff16156129105760405160e560020a62461bcd0281526004018080602001828103825260278152602001806134ba6027913960400191505060405180910390fd5b61010d54604080517f3197cbb60000000000000000000000000000000000000000000000000000000081529051600092600160a060020a031691633197cbb6916004808301926020929190829003018186803b15801561296f57600080fd5b505afa158015612983573d6000803e3d6000fd5b505050506040513d602081101561299957600080fd5b5051905042811080156129ab57508015155b15612a00576040805160e560020a62461bcd02815260206004820152601f60248201527f50726573616c6520456e6465642c2074696d65206f766572206c696d69742e00604482015290519081900360640190fd5b60ff5461010e54604080517f835dada00000000000000000000000000000000000000000000000000000000081523360048201529051612aa6923492600160a060020a039091169163835dada091602480820192602092909190829003018186803b158015612a6e57600080fd5b505afa158015612a82573d6000803e3d6000fd5b505050506040513d6020811015612a9857600080fd5b50519063ffffffff612cf216565b1115612ae65760405160e560020a62461bcd0281526004018080602001828103825260248152602001806134406024913960400191505060405180910390fd5b61010d54604080517f7192cb550000000000000000000000000000000000000000000000000000000081529051600092600160a060020a031691637192cb5591600480830192602092919082900301818787803b158015612b4657600080fd5b505af1158015612b5a573d6000803e3d6000fd5b505050506040513d6020811015612b7057600080fd5b505190508015612b8957612b82612ecb565b5050612c86565b61010654349060009030311115612bc55761010654612bb09030319063ffffffff612df316565b9050612bc2828263ffffffff612df316565b91505b61010e54604080517fc6b21b02000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163c6b21b029160448082019260009290919082900301818387803b158015612c3257600080fd5b505af1158015612c46573d6000803e3d6000fd5b5050505080600014612c8157604051339082156108fc029083906000818181858888f19350505050158015612c7f573d6000803e3d6000fd5b505b505050505b60665481146121cf576040805160e560020a62461bcd02815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b61010854610100900460ff1681565b3390565b600082820183811015612d4f576040805160e560020a62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b600082612d6757506000612d52565b612d4f612710612d7d858563ffffffff61315016565b9063ffffffff6131ac16565b6000600160a060020a038216612dd35760405160e560020a62461bcd0281526004018080602001828103825260228152602001806135ca6022913960400191505060405180910390fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6000612d4f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506131ee565b612e4660998263ffffffff61328816565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b303b1590565b612e9460998263ffffffff6132f216565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b612ed36119ed565b610114805460ff19166001179055565b600054610100900460ff1680612efc5750612efc612e7d565b80612f0a575060005460ff16155b612f485760405160e560020a62461bcd02815260040180806020018281038252602e8152602001806135ec602e913960400191505060405180910390fd5b600054610100900460ff16158015612f73576000805460ff1961ff0019909116610100171660011790555b612f7c826110cd565b612f8957612f8982612e83565b80156121cf576000805461ff00191690555050565b600054610100900460ff1680612fb75750612fb7612e7d565b80612fc5575060005460ff16155b6130035760405160e560020a62461bcd02815260040180806020018281038252602e8152602001806135ec602e913960400191505060405180910390fd5b600054610100900460ff1615801561302e576000805460ff1961ff0019909116610100171660011790555b6033805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0384811691909117918290556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a380156121cf576000805461ff00191690555050565b600160a060020a0381166130e75760405160e560020a62461bcd0281526004018080602001828103825260268152602001806134946026913960400191505060405180910390fd5b603354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36033805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008261315f57506000612d52565b8282028284828161316c57fe5b0414612d4f5760405160e560020a62461bcd02815260040180806020018281038252602181526020018061355c6021913960400191505060405180910390fd5b6000612d4f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613376565b600081848411156132805760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561324557818101518382015260200161322d565b50505050905090810190601f1680156132725780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6132928282612d89565b6132d05760405160e560020a62461bcd02815260040180806020018281038252602181526020018061353b6021913960400191505060405180910390fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b6132fc8282612d89565b15613351576040805160e560020a62461bcd02815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600081836133c85760405160e560020a62461bcd02815260206004820181815283516024840152835190928392604490910191908501908083836000831561324557818101518382015260200161322d565b5060008385816133d457fe5b0495945050505050565b50805460008255906000526020600020908101906110ca919061114591905b8082111561341157600081556001016133fd565b509056fe53656e646572206d757374206265206f726967696e202d206e6f20636f6e74726163742063616c6c732e4465706f7369742065786365656473206d6178206275792070657220616464726573732e506175736572526f6c653a2063616c6c657220646f6573206e6f742068617665207468652050617573657220726f6c654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737350726573616c6520456e6465642c20556e697377617020686173206265656e2063616c6c65642e54696d65206d757374206265206174206c65617374206163636573732074696d652e4d75737420616c6c6f636174652065786163746c7920313030252028313030303020425029206f6620746f6b656e7320746f20706f6f6c73526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774d75737420686176652073656e7420746f20556e6973776170206265666f726520616e792072656465656d732e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a65644d75737420686176652065786163746c79206f6e6520746f6b656e506f6f6c2061646472657373657320666f7220656163682042502e5061757361626c653a207061757365640000000000000000000000000000000050726573616c65206e6f742079657420737461727465642e000000000000000043616e6e6f74206465706f736974206d6f7265207468616e20686172646361702ea265627a7a723158203f210b3ddd3c206eb56b3f6453960471561801d4093966c1ecda5e1dbac1bb3364736f6c63430005100032

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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