Contract 0x3bb942a3b0ddf117f02b9edb33650976f70c1769

Contract Overview

Balance:
0 BNB

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x2a74f4dfc95c021fc6951c95a59a946a06993eb252caf32c0f844949a29f3b75Release Bet Lock126531112021-09-24 19:30:335 hrs 30 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.0003322
0x6b0843a490ac49315cbb89f86b4c89ba896a77747edf66f4334cc0b28861ce62Release Bet Lock126495112021-09-24 16:30:338 hrs 30 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00050068
0xe1d1474af7f1ad0a7bad68a596f3c5ac40d751926def57f9773b2cc66b1ef702Update Bet Lock126493222021-09-24 16:20:558 hrs 39 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00055116
0x054f3e798bd4b1a3bf235c8c3e7592b629c398344da1c7ec3eeb7647b4ad6307Update Bet Lock126493192021-09-24 16:20:468 hrs 39 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00055116
0x428619baee0454e56216014f1a3e3d496bf1142a1b40b6bcf1b5d91359440d36Register Win126468822021-09-24 14:10:3510 hrs 50 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00124094
0xf76de21be1fb33701f304831d2a3d30445dd4fbd0044e2a5696f459039e401ceRegister Win126461822021-09-24 13:35:3511 hrs 25 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00124094
0xb1c3244a0c181022b10f657732fc11e668a3f53509b73332a6889ca36222a8b4Register Loss126460812021-09-24 13:30:3211 hrs 30 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00179668
0x99ef051119f4e794e472ef32912e8530cff496cf0cde1317c7cb4060e1e3a146Update Bet Lock126458852021-09-24 13:20:4411 hrs 39 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00122496
0x960e0f48768167a95adf6c92668597a65d9e6cee72f9507b2bf71986fe8835e6Register Win126457802021-09-24 13:15:2911 hrs 45 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00124022
0x3b02f21d22fac144b1fe1945b460e991349e6afd323feec2d4a9e9298026dcb2Update Bet Lock126456842021-09-24 13:10:4111 hrs 49 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00122496
0x9aeee782dccf87389e2218e5699e74f30911782313659776a7d8b79325e4c0a8Update Bet Lock126455452021-09-24 13:03:4411 hrs 56 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00122496
0xb29f6830f303ccccfdb99d31bab8f7fdd17ac5260fc7afee950dd833500987bdRegister Win126454492021-09-24 12:58:5612 hrs 1 min ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00124046
0x80b3ad16e94ad7e68c71767d9f3794d9067d2554caa78fcdab028cf6682f8c3eRegister Loss126453492021-09-24 12:53:5612 hrs 6 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00179692
0x2e89edca98b575ebbdd0beb5cca02fbff5ecdd8e5c56566bde21a11be8a67158Update Bet Lock126452522021-09-24 12:49:0512 hrs 11 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00122496
0x4f787f34e1ceae98e68f12c6be6225d60edd337b9edddeb883ade6abf5b1130eUpdate Bet Lock126449472021-09-24 12:33:5012 hrs 26 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00122496
0x9041b8263a02fa5c39c9fcc0949594c08263203c1173469871a5c985adfdec49Register Loss126448022021-09-24 12:26:3512 hrs 34 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00179644
0xee4ecf777001f914573ae0b277ef6a0f5fba5e820481021868276ff3afb25378Register Loss126447022021-09-24 12:21:3512 hrs 39 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00179644
0x5a89a7484ff68f221f785338d7c494910c2fa9deb7e24e2bde5dbee84253f383Update Bet Lock126446062021-09-24 12:16:4712 hrs 43 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00122496
0x03708cbec1beb94e628c4fcd6150679c533f0ecad0fe023439ad80b0c1763545Update Bet Lock126444882021-09-24 12:10:5312 hrs 49 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00122496
0x8584e01a5d0ff774253df57b215d3642371406e398b852e96bd4db48676606f1Register Loss126442512021-09-24 11:59:0213 hrs 1 min ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00179692
0x385dc731a4f2efb9bda1598bdb9335bd504ecd4f08195182d2601d50278804deRegister Win126442492021-09-24 11:58:5613 hrs 1 min ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00124094
0x20a1cc5fe2bc7900ca22ca75026751f76546e201f8dd6e3f6772e2905ed35591Register Loss126441502021-09-24 11:53:5913 hrs 6 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00179692
0xc61bc4c80a3a6f27d5411f99b0f682bbdbdbbc1cfbbfb024274d2f53dd97d3dbRegister Loss126441492021-09-24 11:53:5613 hrs 6 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00179692
0xd133f891ba24fcbf11684465b2d0dbfcea7dc22092894669c05bfc7ea8c0f61aUpdate Bet Lock126440522021-09-24 11:49:0513 hrs 11 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00122496
0x753b40e49c0ae08cb2a8a4829ba87278e796e8b1062ab7b3aafdf1c325509aa0Update Bet Lock126438982021-09-24 11:41:2313 hrs 19 mins ago0x0e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89 IN  0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB0.00085116
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x428619baee0454e56216014f1a3e3d496bf1142a1b40b6bcf1b5d91359440d36126468822021-09-24 14:10:3510 hrs 50 mins ago 0x88c01b6b25156727cdcdef016656b7fd472c51bd 0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB
0x428619baee0454e56216014f1a3e3d496bf1142a1b40b6bcf1b5d91359440d36126468822021-09-24 14:10:3510 hrs 50 mins ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0x88c01b6b25156727cdcdef016656b7fd472c51bd0 BNB
0xf76de21be1fb33701f304831d2a3d30445dd4fbd0044e2a5696f459039e401ce126461822021-09-24 13:35:3511 hrs 25 mins ago 0x88c01b6b25156727cdcdef016656b7fd472c51bd 0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB
0xf76de21be1fb33701f304831d2a3d30445dd4fbd0044e2a5696f459039e401ce126461822021-09-24 13:35:3511 hrs 25 mins ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0x88c01b6b25156727cdcdef016656b7fd472c51bd0 BNB
0xb1c3244a0c181022b10f657732fc11e668a3f53509b73332a6889ca36222a8b4126460812021-09-24 13:30:3211 hrs 30 mins ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0x88c01b6b25156727cdcdef016656b7fd472c51bd0 BNB
0xb1c3244a0c181022b10f657732fc11e668a3f53509b73332a6889ca36222a8b4126460812021-09-24 13:30:3211 hrs 30 mins ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0xa3ca5df2938126bae7c0df74d3132b5f72bda0b60 BNB
0xb1c3244a0c181022b10f657732fc11e668a3f53509b73332a6889ca36222a8b4126460812021-09-24 13:30:3211 hrs 30 mins ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0xa3ca5df2938126bae7c0df74d3132b5f72bda0b60 BNB
0x960e0f48768167a95adf6c92668597a65d9e6cee72f9507b2bf71986fe8835e6126457802021-09-24 13:15:2911 hrs 45 mins ago 0x88c01b6b25156727cdcdef016656b7fd472c51bd 0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB
0x960e0f48768167a95adf6c92668597a65d9e6cee72f9507b2bf71986fe8835e6126457802021-09-24 13:15:2911 hrs 45 mins ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0x88c01b6b25156727cdcdef016656b7fd472c51bd0 BNB
0xb29f6830f303ccccfdb99d31bab8f7fdd17ac5260fc7afee950dd833500987bd126454492021-09-24 12:58:5612 hrs 1 min ago 0x88c01b6b25156727cdcdef016656b7fd472c51bd 0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB
0xb29f6830f303ccccfdb99d31bab8f7fdd17ac5260fc7afee950dd833500987bd126454492021-09-24 12:58:5612 hrs 1 min ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0x88c01b6b25156727cdcdef016656b7fd472c51bd0 BNB
0x80b3ad16e94ad7e68c71767d9f3794d9067d2554caa78fcdab028cf6682f8c3e126453492021-09-24 12:53:5612 hrs 6 mins ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0x88c01b6b25156727cdcdef016656b7fd472c51bd0 BNB
0x80b3ad16e94ad7e68c71767d9f3794d9067d2554caa78fcdab028cf6682f8c3e126453492021-09-24 12:53:5612 hrs 6 mins ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0xa3ca5df2938126bae7c0df74d3132b5f72bda0b60 BNB
0x80b3ad16e94ad7e68c71767d9f3794d9067d2554caa78fcdab028cf6682f8c3e126453492021-09-24 12:53:5612 hrs 6 mins ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0xa3ca5df2938126bae7c0df74d3132b5f72bda0b60 BNB
0x9041b8263a02fa5c39c9fcc0949594c08263203c1173469871a5c985adfdec49126448022021-09-24 12:26:3512 hrs 34 mins ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0x88c01b6b25156727cdcdef016656b7fd472c51bd0 BNB
0x9041b8263a02fa5c39c9fcc0949594c08263203c1173469871a5c985adfdec49126448022021-09-24 12:26:3512 hrs 34 mins ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0xa3ca5df2938126bae7c0df74d3132b5f72bda0b60 BNB
0x9041b8263a02fa5c39c9fcc0949594c08263203c1173469871a5c985adfdec49126448022021-09-24 12:26:3512 hrs 34 mins ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0xa3ca5df2938126bae7c0df74d3132b5f72bda0b60 BNB
0xee4ecf777001f914573ae0b277ef6a0f5fba5e820481021868276ff3afb25378126447022021-09-24 12:21:3512 hrs 39 mins ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0x88c01b6b25156727cdcdef016656b7fd472c51bd0 BNB
0xee4ecf777001f914573ae0b277ef6a0f5fba5e820481021868276ff3afb25378126447022021-09-24 12:21:3512 hrs 39 mins ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0xa3ca5df2938126bae7c0df74d3132b5f72bda0b60 BNB
0xee4ecf777001f914573ae0b277ef6a0f5fba5e820481021868276ff3afb25378126447022021-09-24 12:21:3512 hrs 39 mins ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0xa3ca5df2938126bae7c0df74d3132b5f72bda0b60 BNB
0x8584e01a5d0ff774253df57b215d3642371406e398b852e96bd4db48676606f1126442512021-09-24 11:59:0213 hrs 1 min ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0x88c01b6b25156727cdcdef016656b7fd472c51bd0 BNB
0x8584e01a5d0ff774253df57b215d3642371406e398b852e96bd4db48676606f1126442512021-09-24 11:59:0213 hrs 1 min ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0xa3ca5df2938126bae7c0df74d3132b5f72bda0b60 BNB
0x8584e01a5d0ff774253df57b215d3642371406e398b852e96bd4db48676606f1126442512021-09-24 11:59:0213 hrs 1 min ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0xa3ca5df2938126bae7c0df74d3132b5f72bda0b60 BNB
0x385dc731a4f2efb9bda1598bdb9335bd504ecd4f08195182d2601d50278804de126442492021-09-24 11:58:5613 hrs 1 min ago 0x88c01b6b25156727cdcdef016656b7fd472c51bd 0x3bb942a3b0ddf117f02b9edb33650976f70c17690 BNB
0x385dc731a4f2efb9bda1598bdb9335bd504ecd4f08195182d2601d50278804de126442492021-09-24 11:58:5613 hrs 1 min ago 0x3bb942a3b0ddf117f02b9edb33650976f70c1769 0x88c01b6b25156727cdcdef016656b7fd472c51bd0 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BitcrushLiveWallet

Compiler Version
v0.6.2+commit.bacdbe57

Optimization Enabled:
Yes with 2000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 10 : CrushCoin.sol
//SPDX-License-Identifier: MIT

pragma solidity >=0.6.2;

import "@pancakeswap/pancake-swap-lib/contracts/token/BEP20/BEP20.sol";
import "@pancakeswap/pancake-swap-lib/contracts/access/Ownable.sol";
import "@pancakeswap/pancake-swap-lib/contracts/math/SafeMath.sol";

contract CRUSHToken is BEP20 ("Crush Coin", "CRUSH") {

  using SafeMath for uint256;
  // Constants
  uint256 constant public MAX_SUPPLY = 30 * 10 ** 24; //30 million tokens are the max Supply
  
  // Variables
  uint256 public tokensBurned = 0;

  constructor() public {}

  function mint(address _benefactor,uint256 _amount) public onlyOwner {
    uint256 draftSupply = _amount.add( totalSupply() );
    uint256 maxSupply = MAX_SUPPLY.sub( tokensBurned );
    require( draftSupply <= maxSupply, "can't mint more than max." );
    _mint(_benefactor, _amount);
  }

  function burn(uint256 _amount) public {
    tokensBurned = tokensBurned.add( _amount ) ;
    _burn( msg.sender, _amount );
  }

}

File 2 of 10 : HouseBankroll.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;
import "@pancakeswap/pancake-swap-lib/contracts/access/Ownable.sol";
import "./CrushCoin.sol";
import "@pancakeswap/pancake-swap-lib/contracts/math/SafeMath.sol";
import "./staking.sol";
import "./HouseBankroll.sol";
import "./LiveWallet.sol";
contract BitcrushBankroll is Ownable {
    using SafeMath for uint256;

    uint256 public totalBankroll;
    uint256 public allTimeHigh;
    uint256 public availableProfit;
    bool poolDepleted = false;
    uint256 negativeBankroll;
    //address of the crush token
    CRUSHToken public crush;
    BitcrushStaking public stakingPool;
    BitcrushLiveWallet public liveWallet;
    address public reserve;
    address public lottery;
    
    uint256 public constant DIVISOR = 10000;
    uint256 public constant burnRate = 100;
    uint256 public profitThreshold = 0;
    
    //consistent 1% burn

        uint256 public profitShare;
        uint256 public houseBankrollShare;
        uint256 public lotteryShare;
        uint256 public reserveShare;
    
    constructor(
        CRUSHToken _crush,
        BitcrushStaking _stakingPool,
        address _reserve,
        address _lottery,
        uint256 _profitShare,
        uint256 _houseBankrollShare,
        uint256 _lotteryShare,
        uint256 _reserveShare
    ) public {
        crush = _crush;
        stakingPool = _stakingPool;
        reserve = _reserve;
        lottery = _lottery;
        profitShare = _profitShare;
        houseBankrollShare = _houseBankrollShare;
        lotteryShare = _lotteryShare;
        reserveShare = _reserveShare;

    }

    function setLiveWallet(BitcrushLiveWallet _liveWallet) public {
        liveWallet = _liveWallet;
    }

    

    function addToBankroll(uint256 _amount) public onlyOwner {
        crush.transferFrom(msg.sender, address(this), _amount);
        totalBankroll = totalBankroll.add(_amount);
    }

    function addUserLoss(uint256 _amount) public {
        require(
            msg.sender == address(liveWallet),
            "Caller must be bitcrush live wallet"
        );
        //make game specific
        //check if bankroll is in negative
        //uint is unsigned, keep a bool to track
        //if negative send to staking to replenish
        //otherwise add to bankroll and check for profit
        if (poolDepleted == true) {
            if (_amount >= negativeBankroll) {
                uint256 remainder = _amount.sub(negativeBankroll);
                crush.transferFrom(
                    msg.sender,
                    address(stakingPool),
                    negativeBankroll
                );
                stakingPool.unfreezeStaking(negativeBankroll);
                negativeBankroll = 0;
                poolDepleted = false;
                crush.transferFrom(msg.sender, address(this), remainder);
                totalBankroll = totalBankroll.add(remainder);
                checkForRewardPayOut();
            } else {
                crush.transferFrom(msg.sender, address(stakingPool), _amount);
                stakingPool.unfreezeStaking(_amount);
                negativeBankroll = negativeBankroll.sub(_amount);
            }
        } else {
            crush.transferFrom(msg.sender, address(this), _amount);
            totalBankroll = totalBankroll.add(_amount);
            checkForRewardPayOut();
        }
    }

    function payOutUserWinning(
        uint256 _amount,
        address _winner
    ) public {
        require(
            msg.sender == address(liveWallet),
            "Caller must be bitcrush live wallet"
        );
        
        
        //check if bankroll has funds available
        //if not dip into staking pool for any remainder
        // update bankroll accordingly
        if (_amount > totalBankroll) {
            uint256 remainder = _amount.sub(totalBankroll);
            poolDepleted = true;
            stakingPool.freezeStaking(remainder, _winner);
            negativeBankroll = negativeBankroll.add(remainder);
            transferWinnings(totalBankroll, _winner);

            totalBankroll = 0;
        } else {
            totalBankroll = totalBankroll.sub(_amount);
            transferWinnings(_amount, _winner);
        }
    }

    function transferWinnings(
        uint256 _amount,
        address _winner
    ) internal {
        crush.transfer(address(liveWallet), _amount);
        liveWallet.addToUserWinnings(_amount, _winner);
    }

    function checkForRewardPayOut()
        internal
    {
        if (totalBankroll > allTimeHigh) {
            //payout winning
            //handle calculation
            //calculate share
            //update all time high

            uint256 difference = totalBankroll.sub(allTimeHigh);
            if(profitShare > 0 ){
                uint256 stakingBakrollProfit = difference.mul(profitShare).div(DIVISOR);
                availableProfit = availableProfit.add(stakingBakrollProfit);
            }
            if(reserveShare > 0 ){
                uint256 reserveCrush = difference.mul(reserveShare).div(DIVISOR);
                crush.transfer(reserve, reserveCrush);
            }
            if(lotteryShare > 0){
                uint256 lotteryCrush = difference.mul(lotteryShare).div(DIVISOR);
                crush.transfer(lottery, lotteryCrush);
            }
            if(houseBankrollShare > 0){
                uint256 bankrollShare = difference.mul(houseBankrollShare).div(DIVISOR);
                //todo dont add again, optimize
                totalBankroll = totalBankroll.add(bankrollShare);
            }
            uint256 burn = difference.mul(burnRate).div(DIVISOR);
            crush.burn(burn); 
 
            allTimeHigh = totalBankroll;
            totalBankroll = totalBankroll.sub(difference);
            
        }
    }

    function transferProfit() public returns (uint256) {
        require(
            msg.sender == address(stakingPool),
            "Caller must be staking pool"
        );
        if (availableProfit >= profitThreshold) {
            crush.transfer(address(stakingPool), availableProfit);
            uint256 profit = availableProfit;
            availableProfit = 0;
            return profit;
        } else {
            return 0;
        }
    }

    function setProfitThreshold(uint256 _threshold) public onlyOwner {
        profitThreshold = _threshold;
    }

    function setHouseBankrollShare (uint256 _houseBankrollShare) public onlyOwner {
        houseBankrollShare = _houseBankrollShare;
    }

    function setProfitShare (uint256 _profitShare) public onlyOwner {
        profitShare = _profitShare;
    }

    function setLotteryShare (uint256 _lotteryShare) public onlyOwner {
        lotteryShare = _lotteryShare;
    }

    function setReserveShare (uint256 _reserveShare) public onlyOwner {
        reserveShare = _reserveShare;
    }

    function EmergencyWithdrawBankroll () public onlyOwner {
        crush.transfer(msg.sender, totalBankroll);
        totalBankroll = 0;
    }

    function EmergencyWithdrawAvailableProfit () public onlyOwner {
        crush.transfer(msg.sender, availableProfit);
        availableProfit = 0;
    }
}

File 3 of 10 : LiveWallet.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;
import "@pancakeswap/pancake-swap-lib/contracts/access/Ownable.sol";
import "./CrushCoin.sol";
import "./HouseBankroll.sol";

import "@pancakeswap/pancake-swap-lib/contracts/math/SafeMath.sol";
contract BitcrushLiveWallet is Ownable {
    using SafeMath for uint256;
    struct wallet {
        //rename to balance
        uint256 balance;
        uint256 lockTimeStamp;
    }
    
    struct blackList {
        bool blacklisted;
    }
    mapping (address => blackList) public blacklistedUsers;
    //mapping users address with bet amount
    mapping (address => wallet) public betAmounts;
    
    //address of the crush token
    CRUSHToken public crush;
    BitcrushBankroll public bankroll;
    
    uint256 public lossBurn = 10;
    uint256 constant public DIVISOR = 10000;
    uint256 public lockPeriod = 10800;
    address public reserveAddress;
    uint256  public earlyWithdrawFee         = 50; // 50/10000 * 100 = 0.5% 
    
    event Withdraw (address indexed _address, uint256 indexed _amount);
    event Deposit (address indexed _address, uint256 indexed _amount);
    event LockPeriodUpdated (uint256 indexed _lockPeriod);

    constructor (CRUSHToken _crush, BitcrushBankroll _bankroll, address _reserveAddress) public{
        crush = _crush;
        bankroll = _bankroll;
        reserveAddress = _reserveAddress;
    }

    function addbet (uint256 _amount) public {
        
        require(_amount > 0, "Bet amount should be greater than 0");
        require(blacklistedUsers[msg.sender].blacklisted == false, "User is black Listed");
        crush.transferFrom(msg.sender, address(this), _amount);
        betAmounts[msg.sender].balance = betAmounts[msg.sender].balance.add(_amount);
        betAmounts[msg.sender].lockTimeStamp = block.timestamp;
        emit Deposit(msg.sender, _amount);
        
    }

    function addbetWithAddress (uint256 _amount, address _user) public {
        //todo add validation for valid game id
        require(_amount > 0, "Bet amount should be greater than 0");
        require(blacklistedUsers[_user].blacklisted == false, "User is black Listed");
        crush.transferFrom(msg.sender, address(this), _amount);
        betAmounts[_user].balance = betAmounts[_user].balance.add(_amount);
        
    }

    function balanceOf ( address _user) public view returns (uint256){
        return betAmounts[_user].balance;
    }

    function registerWin (uint256[] memory _wins, address[] memory _users) public onlyOwner {
        require (_wins.length == _users.length, "Parameter lengths should be equal");
        for(uint256 i=0; i < _users.length; i++){
                bankroll.payOutUserWinning(_wins[i], _users[i]);
        }
    }
    
    function registerLoss (uint256[] memory _bets, address[] memory _users) public onlyOwner {
        require (_bets.length == _users.length, "Parameter lengths should be equal");
        for(uint256 i=0; i < _users.length; i++){
            if(_bets[i] > 0){
            transferToBankroll(_bets[i]);
            betAmounts[_users[i]].balance = betAmounts[_users[i]].balance.sub(_bets[i]);
            }
            
        }
    }

    function transferToBankroll (uint256 _amount) internal {
        uint256 burnShare = _amount.mul(lossBurn).div(DIVISOR);
        crush.burn(burnShare);
        uint256 remainingAmount = _amount.sub(burnShare);
        crush.approve(address(bankroll), remainingAmount);
        bankroll.addUserLoss(remainingAmount);       
    }

    function withdrawBet(uint256 _amount) public {
        require(betAmounts[msg.sender].balance >= _amount, "bet less than amount withdraw");
        require(betAmounts[msg.sender].lockTimeStamp == 0 || betAmounts[msg.sender].lockTimeStamp.add(lockPeriod) < block.timestamp, "Bet Amount locked, please try again later");
        betAmounts[msg.sender].balance = betAmounts[msg.sender].balance.sub(_amount);
        crush.transfer(msg.sender, _amount);
        emit Withdraw(msg.sender, _amount);
    }

    function withdrawBetForUser(uint256 _amount, address _user) public onlyOwner {
        require(betAmounts[_user].balance >= _amount, "bet less than amount withdraw");
        betAmounts[_user].balance = betAmounts[_user].balance.sub(_amount);
        emit Withdraw(_user, _amount);
        uint256 withdrawalFee = _amount.mul(earlyWithdrawFee).div(DIVISOR);
        _amount = _amount.sub(withdrawalFee);
        crush.transfer(reserveAddress, withdrawalFee);
        crush.transfer(_user, _amount);
        
        
    }


    function addToUserWinnings (uint256 _amount, address _user) public {
        require(msg.sender == address(bankroll),"Caller must be bankroll");
        betAmounts[_user].balance = betAmounts[_user].balance.add(_amount);

    }
    function updateBetLock (address[] memory _users) public {
        for(uint256 i=0; i < _users.length; i++){
            betAmounts[_users[i]].lockTimeStamp = block.timestamp;
        }
        
    }

    function releaseBetLock (address[] memory _users) public {
        for(uint256 i=0; i < _users.length; i++){
            betAmounts[_users[i]].lockTimeStamp = 0;
        }
    }

    function blacklistUser (address _address) public onlyOwner {
        blacklistedUsers[_address].blacklisted = true;
    }

    function whitelistUser (address _address) public onlyOwner {
        delete blacklistedUsers[_address];
    }

    function blacklistSelf () public  {
        blacklistedUsers[msg.sender].blacklisted = true;
    }

    function setLossBurn(uint256 _lossBurn) public onlyOwner {
        require(_lossBurn > 0, "Loss burn cant be 0");
        lossBurn = _lossBurn;
    }
    function setLockPeriod (uint256 _lockPeriod) public onlyOwner {
        lockPeriod = _lockPeriod;
        emit LockPeriodUpdated(lockPeriod);
    }

    function setReserveAddress (address _reserveAddress) public onlyOwner {
        reserveAddress = _reserveAddress;
    }

    function setEarlyWithdrawFee (uint256 _earlyWithdrawFee ) public onlyOwner {
        earlyWithdrawFee = _earlyWithdrawFee;
    }

}

File 4 of 10 : staking.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;

import "@pancakeswap/pancake-swap-lib/contracts/access/Ownable.sol";
import "./CrushCoin.sol";
import "@pancakeswap/pancake-swap-lib/contracts/math/SafeMath.sol";
import "./HouseBankroll.sol";
import "./LiveWallet.sol";
contract BitcrushStaking is Ownable {
    using SafeMath for uint256;
    
    uint256 constant MAX_CRUSH_PER_BLOCK = 10;
    uint256 constant MAX_FEE = 1000; // 1000/10000 * 100 = 10%
    uint256 public performanceFeeCompounder = 10; // 10/10000 * 100 = 0.1%
    uint256 public performanceFeeBurn       = 100; // 100/10000 * 100 = 1%
    uint256 constant divisor = 10000;
    
    uint256  public earlyWithdrawFee         = 50; // 50/10000 * 100 = 0.5% 
    uint256  public performanceFeeReserve    = 190; // 190/10000 * 100 = 1.9%
    
    uint256 public profitShare = 10;
    uint256 public blockPerSecond = 3;
    uint256 public earlyWithdrawFeeTime = 72 * 60 * 60 / blockPerSecond;
    
    //address of the crush token
    CRUSHToken public crush;
    BitcrushBankroll public bankroll;
    BitcrushLiveWallet public liveWallet;
    struct staked {
        uint256 stakedAmount;
        uint256 claimedAmount;
        uint256 profit;
        uint256 lastBlockCompounded;
        uint256 lastBlockStaked;
        uint256 index;
    }
    mapping (address => staked) public stakings;
    address[] public addressIndexes;

    struct profit {
        uint256 total;
        uint256 remaining;
    }
    profit[] public profits;

    uint256 public totalPool;
    uint256 public lastAutoCompoundBlock;
    uint256 public batchStartingIndex = 0;
    
    uint256 public crushPerBlock = 5;
    address public reserveAddress;

    uint256 public totalStaked;
    
    uint256 public totalClaimed;
    uint256 public totalFrozen = 0;
    uint256 public totalProfitDistributed = 0;
    
    uint256 public autoCompoundLimit = 10;

    event RewardPoolUpdated (uint256 indexed _totalPool);
    event CompoundAll (uint256 indexed _totalRewarded);
    event StakeUpdated (address indexed recipeint, uint256 indexed _amount);
    
    constructor (CRUSHToken _crush, uint256 _crushPerBlock, address _reserveAddress) public{
        crush = _crush;
        crushPerBlock = _crushPerBlock;
        reserveAddress = _reserveAddress;
        lastAutoCompoundBlock = 0;
        
    }

    function setBankroll (BitcrushBankroll _bankroll) public {
        bankroll = _bankroll;
    }
    function setLiveWallet (BitcrushLiveWallet _liveWallet) public{
        liveWallet = _liveWallet;
    }

    /// Adds the provided amount to the totalPool
    /// @param _amount the amount to add
    /// @dev adds the provided amount to `totalPool` state variable
    function addRewardToPool (uint256 _amount) public  {
        require(crush.balanceOf(msg.sender) >= _amount, "Insufficient Crush tokens for transfer");
        totalPool = totalPool.add(_amount);
        crush.transferFrom(msg.sender, address(this), _amount);
        emit RewardPoolUpdated(totalPool);
    }

    
    function setCrushPerBlock (uint256 _amount) public onlyOwner {
        require(_amount >= 0, "Crush per Block can not be negative" );
        require(_amount <= MAX_CRUSH_PER_BLOCK, "Crush Per Block can not be more than 10");
        crushPerBlock = _amount;
    }


    /// Stake the provided amount
    /// @param _amount the amount to stake
    /// @dev stakes the provided amount
    function enterStaking (uint256 _amount) public  {
        require(crush.balanceOf(msg.sender) >= _amount, "Insufficient Crush tokens for transfer");
        require(_amount > 0,"Invalid staking amount");
        require(totalPool > 0, "Reward Pool Exhausted");
        
        crush.transferFrom(msg.sender, address(this), _amount);
        if(totalStaked == 0){
            lastAutoCompoundBlock = block.number;
        }
        if(stakings[msg.sender].stakedAmount == 0){
            stakings[msg.sender].lastBlockCompounded = block.number;
            addressIndexes.push(msg.sender);
            stakings[msg.sender].index = addressIndexes.length-1;
        }
        stakings[msg.sender].stakedAmount = stakings[msg.sender].stakedAmount.add(_amount);
        stakings[msg.sender].lastBlockStaked = block.number;
        totalStaked = totalStaked.add(_amount);
        crush.transfer(msg.sender, getReward(msg.sender));
        stakings[msg.sender].lastBlockCompounded = block.number;
        
       
    }



    /// Leaves staking for a user by the specified amount and transfering staked amount and reward to users address
    /// @param _amount the amount to unstake
    /// @dev leaves staking and deducts total pool by the users reward. early withdrawal fee applied if withdraw is made before earlyWithdrawFeeTime
    function leaveStaking (uint256 _amount, bool _liveWallet) public  {
        uint256 reward = getReward(msg.sender);
        stakings[msg.sender].lastBlockCompounded = block.number;
        totalPool = totalPool.sub(reward);
        uint256 availableStaked;
        if(totalFrozen > 0){
            availableStaked = stakings[msg.sender].stakedAmount.sub(totalFrozen.mul(stakings[msg.sender].stakedAmount).div(totalStaked));
        }else {
            availableStaked = stakings[msg.sender].stakedAmount;
        }
        require(availableStaked >= _amount, "Withdraw amount can not be greater than available staked amount");
        totalStaked = totalStaked.sub(_amount);
        stakings[msg.sender].stakedAmount = stakings[msg.sender].stakedAmount.sub(_amount);
        if(block.number < stakings[msg.sender].lastBlockStaked.add(earlyWithdrawFeeTime)){
            //apply fee
            uint256 withdrawalFee = _amount.mul(earlyWithdrawFee).div(divisor);
            _amount = _amount.sub(withdrawalFee);
            crush.transfer(reserveAddress, withdrawalFee);
        }
        _amount = _amount.add(reward);
        if(_liveWallet == false){
            crush.transfer(msg.sender, _amount);
        }else {
            crush.approve(address(liveWallet), _amount);
            liveWallet.addbetWithAddress(_amount, msg.sender);
        }
        
        //remove from array
        if(stakings[msg.sender].stakedAmount == 0){
            staked storage staking = stakings[msg.sender];
            if(staking.index != addressIndexes.length-1){
                address lastAddress = addressIndexes[addressIndexes.length-1];
                addressIndexes[staking.index] = lastAddress;
                stakings[lastAddress].index = staking.index;
                crush.approve( address(this), 0);
            }
            addressIndexes.pop();
            delete stakings[msg.sender];
        }
        emit RewardPoolUpdated(totalPool);
    }


/* function transferStakingToLiveWallet (uint256 _amount) public  {
        uint256 reward = getReward(msg.sender);
        stakings[msg.sender].lastBlockCompounded = block.number;
        totalPool = totalPool.sub(reward);
        uint256 availableStaked;
        if(totalFrozen > 0){
            availableStaked = stakings[msg.sender].stakedAmount.sub(totalFrozen.mul(stakings[msg.sender].stakedAmount).div(totalStaked));
        }else {
            availableStaked = stakings[msg.sender].stakedAmount;
        }
        require(availableStaked >= _amount, "Withdraw amount can not be greater than available staked amount");
        totalStaked = totalStaked.sub(_amount);
        stakings[msg.sender].stakedAmount = stakings[msg.sender].stakedAmount.sub(_amount);
        if(block.number < stakings[msg.sender].lastBlockStaked.add(earlyWithdrawFeeTime)){
            //apply fee
            uint256 withdrawalFee = _amount.mul(earlyWithdrawFee).div(divisor);
            _amount = _amount.sub(withdrawalFee);
            crush.transfer(reserveAddress, withdrawalFee);
        }
        _amount = _amount.add(reward);
        crush.approve(address(liveWallet), _amount);
        liveWallet.addbetWithAddress(_amount, msg.sender);
        
        //remove from array
        if(stakings[msg.sender].stakedAmount == 0){
            staked storage staking = stakings[msg.sender];
            if(staking.index != addressIndexes.length-1){
                address lastAddress = addressIndexes[addressIndexes.length-1];
                addressIndexes[staking.index] = lastAddress;
                stakings[lastAddress].index = staking.index;
                crush.approve( address(this), 0);
            }
            addressIndexes.pop();
            delete stakings[msg.sender];
        }
        emit RewardPoolUpdated(totalPool);
    }
 */




    /* //todo deprecated verify from jose if still in use
    /// Leaves staking for a user while setting stakedAmount to 0 and transfering staked amount and reward to users address
    /// @dev leaves staking and deducts total pool by the users reward. early withdrawal fee applied if withdraw is made before earlyWithdrawFeeTime
    function leaveStakingCompletely () public {
        uint256 reward = getReward(msg.sender);
        stakings[msg.sender].lastBlockCompounded = block.number;
        uint256 stakedAmount = stakings[msg.sender].stakedAmount;
        totalPool = totalPool.sub(reward);
        stakedAmount = stakedAmount.add(reward);
        totalStaked = totalStaked.sub(stakings[msg.sender].stakedAmount);
        
        if(block.number < stakings[msg.sender].lastBlockStaked + earlyWithdrawFeeTime ){
            uint256 withdrawalFee = stakedAmount.mul(earlyWithdrawFee).div(divisor);
            stakedAmount = stakedAmount.sub(withdrawalFee);
            crush.transfer(reserveAddress, withdrawalFee);
        }
        crush.transfer(msg.sender, stakedAmount);
        stakings[msg.sender].stakedAmount = 0;
        if(stakings[msg.sender].stakedAmount == 0){
            staked storage staking = stakings[msg.sender];
            if(staking.index != addressIndexes.length-1){
                address lastAddress = addressIndexes[addressIndexes.length-1];
                addressIndexes[staking.index] = lastAddress;
                stakings[lastAddress].index = staking.index;
                crush.approve( address(this), 0);
            }
            addressIndexes.pop();
            delete stakings[msg.sender];
        }
        emit RewardPoolUpdated(totalPool);
    }
 */
    
    function getReward(address _address) internal view returns (uint256) {
        if(block.number <=  stakings[_address].lastBlockCompounded){
            return 0;
        }else {
            if(totalPool == 0 || totalStaked ==0 ){
                return 0;
            }else {
                //if the staker reward is greater than total pool => set it to total pool
                uint256 blocks = block.number.sub(stakings[_address].lastBlockCompounded);
                uint256 totalReward = blocks.mul(crushPerBlock);
                uint256 stakerReward = totalReward.mul(stakings[_address].stakedAmount).div(totalStaked);
                if(stakerReward > totalPool){
                    stakerReward = totalPool;
                }
                return stakerReward;
            }
            
        }
    }

    /// Calculates total potential pending rewards
    /// @dev Calculates potential reward based on crush per block
    function totalPendingRewards () public view returns (uint256){
            if(block.number <= lastAutoCompoundBlock){
                return 0;
            }else if(lastAutoCompoundBlock == 0){
                return 0;
            }else if (totalPool == 0){
                return 0;
            }

            uint256 blocks = block.number.sub(lastAutoCompoundBlock);
            uint256 totalReward = blocks.mul(crushPerBlock);

            return totalReward;
    }

    /// Get pending rewards of a user
    /// @param _address the address to calculate the reward for
    /// @dev calculates potential reward for the address provided based on crush per block
    function pendingReward (address _address) public view returns (uint256){
        return getReward(_address);
    }

    /// transfers the rewards of a user to their address
    /// @dev calculates users rewards and transfers it out while deducting reward from totalPool
    function claim (bool _liveWallet) public  {
        uint256 reward = getReward(msg.sender);
        stakings[msg.sender].claimedAmount = stakings[msg.sender].claimedAmount.add(reward);
        if(_liveWallet == false){
            crush.transfer(msg.sender, reward);
        }else {
            crush.approve(address(liveWallet), reward);
            liveWallet.addbetWithAddress(reward, msg.sender);
        }
        stakings[msg.sender].lastBlockCompounded = block.number;
        totalClaimed = totalClaimed.add(reward);
        totalPool = totalPool.sub(reward); 
    }




    function claimProfit () public {
        require(stakings[msg.sender].profit > 0, "No Profit to claim");
        crush.transfer(msg.sender, stakings[msg.sender].profit);
        stakings[msg.sender].profit = 0;
    }

    /// compounds the rewards of the caller
    /// @dev compounds the rewards of the caller add adds it into their staked amount
    function singleCompound () public  {
        require(stakings[msg.sender].stakedAmount > 0, "Please Stake Crush to compound");
        uint256 reward = getReward(msg.sender);
        stakings[msg.sender].stakedAmount = stakings[msg.sender].stakedAmount.add(reward); 
        totalStaked = totalStaked.add(reward);
        stakings[msg.sender].lastBlockCompounded = block.number;
        totalPool = totalPool.sub(reward);
        emit RewardPoolUpdated(totalPool);
        emit StakeUpdated(msg.sender,reward);
    }

  

    /// compounds the rewards of all users in the pool
    /// @dev compounds the rewards of all users in the pool add adds it into their staked amount while deducting fees
    function compoundAll () public  {
        require(lastAutoCompoundBlock <= block.number, "Compound All not yet applicable.");
        require(totalStaked > 0, "No Staked rewards to claim" );
        uint256 crushToBurn = 0;
        uint256 performanceFee = 0;
        uint256 totalRewarded = 0;
        uint256 compounderReward = 0;
        uint totalPoolDeducted = 0;
        
        uint256 batchLimit = addressIndexes.length;
        if(addressIndexes.length <= autoCompoundLimit || batchStartingIndex.add(autoCompoundLimit) >= addressIndexes.length){
            batchLimit = addressIndexes.length;
        }else {
            batchLimit = batchStartingIndex.add(autoCompoundLimit);
        }
        for(uint256 i=batchStartingIndex; i < batchLimit; i++){
            uint256 stakerReward = getReward(addressIndexes[i]);
            if(stakerReward > 0){
                totalRewarded = totalRewarded.add(stakerReward);
            totalPoolDeducted = totalPoolDeducted.add(stakerReward);
            
            uint256 stakerBurn = stakerReward.mul(performanceFeeBurn).div(divisor);
            crushToBurn = crushToBurn.add(stakerBurn);
            
            uint256 cpAllReward = stakerReward.mul(performanceFeeCompounder).div(divisor);
            compounderReward = compounderReward.add(cpAllReward);
            
            uint256 feeReserve = stakerReward.mul(performanceFeeReserve).div(divisor);
            performanceFee = performanceFee.add(feeReserve);
            

            stakerReward = stakerReward.sub(stakerBurn);
            stakerReward = stakerReward.sub(cpAllReward);
            stakerReward = stakerReward.sub(feeReserve);
            
            totalStaked = totalStaked.add(stakerReward);
            stakings[addressIndexes[i]].stakedAmount = stakings[addressIndexes[i]].stakedAmount.add(stakerReward);
            stakings[addressIndexes[i]].lastBlockCompounded = block.number;
            }
            if(profits.length > 0){
                if(profits[0].remaining > 0){
                uint256 profitShareUser = profits[0].total.mul(stakings[addressIndexes[i]].stakedAmount).div(totalStaked);
                if(profitShareUser >= profits[0].remaining){
                 profitShare = profits[0].remaining;
                }
                uint256 compounderShare = profitShareUser.mul(profitShare).div(divisor);
                profits[0].remaining = profits[0].remaining.sub(profitShareUser);
                profitShareUser = profitShareUser.sub(compounderShare);
                stakings[addressIndexes[i]].profit = stakings[addressIndexes[i]].profit.add(profitShareUser); 
                compounderReward = compounderReward.add(compounderShare);   
                }
            }
                        
        }
        if(batchStartingIndex.add(batchLimit) >= addressIndexes.length){
            if(profits.length > 0){
                if(profits[0].remaining == 0 && profits[0].total > 0 && profits.length > 0 ){
                //rearrange array
                profits[0] = profits[profits.length - 1];
                profits.pop;

                }
            }
            
            batchStartingIndex = 0;
            uint256 newProfit = bankroll.transferProfit();
            if(newProfit > 0){
                //profit deduction
                profit memory prof = profit(newProfit,newProfit);
                profits.push(prof);
                totalProfitDistributed = totalProfitDistributed.add(newProfit);
            }
        }
        totalPool = totalPool.sub(totalPoolDeducted);
        lastAutoCompoundBlock = block.number;
        crush.burn(crushToBurn);
        crush.transfer(msg.sender, compounderReward);
        crush.transfer(reserveAddress, performanceFee);
        
    }


    function freezeStaking (uint256 _amount, address _recipient) public {
        //divide amount over users
        //update user mapping to reflect frozen amount
         require(_amount <= totalStaked.sub(totalFrozen), "Freeze amount should be less than or equal to available funds");
         totalFrozen = totalFrozen.add(_amount);
         liveWallet.addToUserWinnings(_amount, _recipient);
         crush.transfer(address(liveWallet), _amount);
    }

    function unfreezeStaking (uint256 _amount) public {
       //divide amount over users
        //update user mapping to reflect deducted frozen amount
         require(_amount <= totalFrozen, "unfreeze amount cant be greater than currently frozen amount");
         totalFrozen = totalFrozen.sub(_amount);
    }


    /// withdraws the staked amount of user in case of emergency.
    /// @dev drains the staked amount and sets the state variable `stakedAmount` of staking mapping to 0
    function emergencyWithdraw() public {
        //add check for frozen amount
        uint256 availableStaked;
        if(totalFrozen > 0){
            availableStaked = stakings[msg.sender].stakedAmount.sub(totalFrozen.mul(stakings[msg.sender].stakedAmount).div(totalStaked));
        }else {
            availableStaked = stakings[msg.sender].stakedAmount;
        }

        crush.transfer( msg.sender, availableStaked);
        stakings[msg.sender].stakedAmount = stakings[msg.sender].stakedAmount.sub(availableStaked);
        
        stakings[msg.sender].lastBlockCompounded = block.number;
        if(stakings[msg.sender].stakedAmount == 0) {
            staked storage staking = stakings[msg.sender];
            if(staking.index != addressIndexes.length-1){
                address lastAddress = addressIndexes[addressIndexes.length-1];
                addressIndexes[staking.index] = lastAddress;
                stakings[lastAddress].index = staking.index;
            }
            addressIndexes.pop();
            crush.approve( address(this), 0);
        }
        
    }

    /// withdraws the total pool in case of emergency.
    /// @dev drains the total pool and sets the state variable `totalPool` to 0
    function emergencyTotalPoolWithdraw () public onlyOwner {
        require(totalPool > 0, "Total Pool need to be greater than 0");
        if(totalFrozen > 0){
            crush.transfer(msg.sender, totalPool.sub(totalFrozen));
            totalPool = totalPool.sub(totalFrozen);
        } else {
            crush.transfer(msg.sender, totalPool);
            totalPool = 0;
        }
        
    }

    /// Store `_fee`.
    /// @param _fee the new value to store
    /// @dev stores the fee in the state variable `performanceFeeCompounder`
    function setPerformanceFeeCompounder (uint256 _fee) public onlyOwner{
        require(_fee > 0, "Fee must be greater than 0");
        require(_fee < MAX_FEE, "Fee must be less than 10%");
        performanceFeeCompounder = _fee;
    }

    /// Store `_fee`.
    /// @param _fee the new value to store
    /// @dev stores the fee in the state variable `performanceFeeBurn`
    function setPerformanceFeeBurn (uint256 _fee) public onlyOwner {
        require(_fee > 0, "Fee must be greater than 0");
        require(_fee < MAX_FEE, "Fee must be less than 10%");
        performanceFeeBurn = _fee;
    }

    /// Store `_fee`.
    /// @param _fee the new value to store
    /// @dev stores the fee in the state variable `earlyWithdrawFee`
    function setEarlyWithdrawFee (uint256 _fee) public onlyOwner {
        require(_fee > 0, "Fee must be greater than 0");
        require(_fee < MAX_FEE, "Fee must be less than 10%");
        earlyWithdrawFee = _fee;
    }


    /// Store `_fee`.
    /// @param _fee the new value to store
    /// @dev stores the fee in the state variable `performanceFeeReserve`
    function setPerformanceFeeReserve (uint256 _fee) public onlyOwner {
        require(_fee > 0, "Fee must be greater than 0");
        require(_fee <= MAX_FEE, "Fee must be less than 10%");
        performanceFeeReserve = _fee;
    }

    /// Store `_time`.
    /// @param _time the new value to store
    /// @dev stores the time in the state variable `earlyWithdrawFeeTime`
    function setEarlyWithdrawFeeTime (uint256 _time) public onlyOwner {
        require(_time > 0, "Time must be greater than 0");
        earlyWithdrawFeeTime = _time;
    }

    function setAutoCompoundLimit (uint256 _limit) public onlyOwner {
        require(_limit > 0, "Limit can not be 0");
        autoCompoundLimit = _limit;
    }

    function setProfitShare (uint256 _profitShare) public onlyOwner {
        require(_profitShare > 0, "Profit share can not be 0");
        profitShare = _profitShare;
    }

   
}

File 5 of 10 : Context.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.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 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 {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor() internal {}

    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 6 of 10 : Ownable.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.0;

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.
 *
 * 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.
 */
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() internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @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(_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 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;
    }
}

File 7 of 10 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.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.
     */
    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.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        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.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }

    function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint256 y) internal pure returns (uint256 z) {
        if (y > 3) {
            z = y;
            uint256 x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

File 8 of 10 : BEP20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.0;

import '../../access/Ownable.sol';
import '../../GSN/Context.sol';
import './IBEP20.sol';
import '../../math/SafeMath.sol';
import '../../utils/Address.sol';

/**
 * @dev Implementation of the {IBEP20} 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 {BEP20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-BEP20-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 BEP20 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 {IBEP20-approve}.
 */
contract BEP20 is Context, IBEP20, Ownable {
    using SafeMath for uint256;
    using Address for address;

    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name, string memory symbol) public {
        _name = name;
        _symbol = symbol;
        _decimals = 18;
    }

    /**
     * @dev Returns the bep token owner.
     */
    function getOwner() external override view returns (address) {
        return owner();
    }

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

    /**
     * @dev Returns the token decimals.
     */
    function decimals() public override view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev Returns the token symbol.
     */
    function symbol() public override view returns (string memory) {
        return _symbol;
    }

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

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

    /**
     * @dev See {BEP20-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 override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

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

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

    /**
     * @dev See {BEP20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {BEP20};
     *
     * 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 override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(
            sender,
            _msgSender(),
            _allowances[sender][_msgSender()].sub(amount, 'BEP20: transfer amount exceeds allowance')
        );
        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 {BEP20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(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 {BEP20-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 returns (bool) {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][spender].sub(subtractedValue, 'BEP20: decreased allowance below zero')
        );
        return true;
    }

    /**
     * @dev Creates `amount` tokens and assigns them to `msg.sender`, increasing
     * the total supply.
     *
     * Requirements
     *
     * - `msg.sender` must be the token owner
     */
    function mint(uint256 amount) public onlyOwner returns (bool) {
        _mint(_msgSender(), amount);
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is 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 {
        require(sender != address(0), 'BEP20: transfer from the zero address');
        require(recipient != address(0), 'BEP20: transfer to the zero address');

        _balances[sender] = _balances[sender].sub(amount, 'BEP20: transfer amount exceeds balance');
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(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
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal {
        require(account != address(0), 'BEP20: mint to the zero address');

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(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 {
        require(account != address(0), 'BEP20: burn from the zero address');

        _balances[account] = _balances[account].sub(amount, 'BEP20: burn amount exceeds balance');
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is 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 {
        require(owner != address(0), 'BEP20: approve from the zero address');
        require(spender != address(0), 'BEP20: approve to the zero address');

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

    /**
     * @dev Destroys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See {_burn} and {_approve}.
     */
    function _burnFrom(address account, uint256 amount) internal {
        _burn(account, amount);
        _approve(
            account,
            _msgSender(),
            _allowances[account][_msgSender()].sub(amount, 'BEP20: burn amount exceeds allowance')
        );
    }
}

File 9 of 10 : IBEP20.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.0;

interface IBEP20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

    /**
     * @dev Returns the bep token owner.
     */
    function getOwner() external view returns (address);

    /**
     * @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 10 of 10 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            codehash := extcodehash(account)
        }
        return (codehash != accountHash && codehash != 0x0);
    }

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

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

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

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

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

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

    function _functionCallWithValue(
        address target,
        bytes memory data,
        uint256 weiValue,
        string memory errorMessage
    ) private returns (bytes memory) {
        require(isContract(target), 'Address: call to non-contract');

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value: weiValue}(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

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

Contract ABI

[{"inputs":[{"internalType":"contract CRUSHToken","name":"_crush","type":"address"},{"internalType":"contract BitcrushBankroll","name":"_bankroll","type":"address"},{"internalType":"address","name":"_reserveAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"},{"indexed":true,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_lockPeriod","type":"uint256"}],"name":"LockPeriodUpdated","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":"_address","type":"address"},{"indexed":true,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DIVISOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"addToUserWinnings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"addbet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"addbetWithAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bankroll","outputs":[{"internalType":"contract BitcrushBankroll","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"betAmounts","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"lockTimeStamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blacklistSelf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"blacklistUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"blacklistedUsers","outputs":[{"internalType":"bool","name":"blacklisted","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"crush","outputs":[{"internalType":"contract CRUSHToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"earlyWithdrawFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lossBurn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_bets","type":"uint256[]"},{"internalType":"address[]","name":"_users","type":"address[]"}],"name":"registerLoss","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_wins","type":"uint256[]"},{"internalType":"address[]","name":"_users","type":"address[]"}],"name":"registerWin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"}],"name":"releaseBetLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_earlyWithdrawFee","type":"uint256"}],"name":"setEarlyWithdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockPeriod","type":"uint256"}],"name":"setLockPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lossBurn","type":"uint256"}],"name":"setLossBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_reserveAddress","type":"address"}],"name":"setReserveAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"}],"name":"updateBetLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"whitelistUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawBet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"withdrawBetForUser","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600a600555612a30600655603260085534801561002057600080fd5b506040516120253803806120258339818101604052606081101561004357600080fd5b508051602082015160409092015190919060006100676001600160e01b036100f316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600380546001600160a01b039485166001600160a01b0319918216179091556004805493851693821693909317909255600780549190931691161790556100f7565b3390565b611f1f806101066000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80638da5cb5b11610104578063c22982f4116100a2578063f2fde38b11610071578063f2fde38b146107b4578063f62cf8d0146107da578063f79ed94b14610806578063fcbca4561461080e576101cf565b8063c22982f414610605578063d4b9661c14610622578063ebcfcf6b1461064e578063f2150bbb1461068d576101cf565b8063a80a7882116100de578063a80a788214610535578063afb62d701461053d578063b359a9f9146105e0578063c025247d146105e8576101cf565b80638da5cb5b146103e9578063a2b1a2cc146103f1578063a4ae1c561461040e576101cf565b806370a0823111610171578063723ea1151161014b578063723ea115146102f5578063779972da146102fd5780637efd38131461031a578063815b738614610346576101cf565b806370a08231146102bf578063715018a6146102e5578063720fe1fd146102ed576101cf565b80633410fe6e116101ad5780633410fe6e1461025a5780633fd8b02f146102745780634a4c560d1461027c5780636145b22c146102a2576101cf565b80630c657eb0146101d457806314673d31146101f857806322c0aec714610220575b600080fd5b6101dc610834565b604080516001600160a01b039092168252519081900360200190f35b61021e6004803603602081101561020e57600080fd5b50356001600160a01b0316610843565b005b6102466004803603602081101561023657600080fd5b50356001600160a01b03166108dc565b604080519115158252519081900360200190f35b6102626108f1565b60408051918252519081900360200190f35b6102626108f7565b61021e6004803603602081101561029257600080fd5b50356001600160a01b03166108fd565b61021e600480360360208110156102b857600080fd5b5035610988565b610262600480360360208110156102d557600080fd5b50356001600160a01b0316610b32565b61021e610b4d565b610262610c0e565b61021e610c14565b61021e6004803603602081101561031357600080fd5b5035610c33565b61021e6004803603604081101561033057600080fd5b50803590602001356001600160a01b0316610cd0565b61021e6004803603602081101561035c57600080fd5b81019060208101813564010000000081111561037757600080fd5b82018360208201111561038957600080fd5b803590602001918460208302840111640100000000831117156103ab57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610e62945050505050565b6101dc610ec0565b61021e6004803603602081101561040757600080fd5b5035610ecf565b61021e6004803603604081101561042457600080fd5b81019060208101813564010000000081111561043f57600080fd5b82018360208201111561045157600080fd5b8035906020019184602083028401116401000000008311171561047357600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092959493602081019350359150506401000000008111156104c357600080fd5b8201836020820111156104d557600080fd5b803590602001918460208302840111640100000000831117156104f757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611093945050505050565b610262611224565b61021e6004803603602081101561055357600080fd5b81019060208101813564010000000081111561056e57600080fd5b82018360208201111561058057600080fd5b803590602001918460208302840111640100000000831117156105a257600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061122a945050505050565b6101dc611283565b61021e600480360360208110156105fe57600080fd5b5035611292565b61021e6004803603602081101561061b57600080fd5b5035611356565b61021e6004803603604081101561063857600080fd5b50803590602001356001600160a01b03166113c5565b6106746004803603602081101561066457600080fd5b50356001600160a01b0316611652565b6040805192835260208301919091528051918290030190f35b61021e600480360360408110156106a357600080fd5b8101906020810181356401000000008111156106be57600080fd5b8201836020820111156106d057600080fd5b803590602001918460208302840111640100000000831117156106f257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561074257600080fd5b82018360208201111561075457600080fd5b8035906020019184602083028401116401000000008311171561077657600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061166b945050505050565b61021e600480360360208110156107ca57600080fd5b50356001600160a01b03166117d3565b61021e600480360360408110156107f057600080fd5b50803590602001356001600160a01b0316611849565b6101dc6118d1565b61021e6004803603602081101561082457600080fd5b50356001600160a01b03166118e0565b6004546001600160a01b031681565b61084b611971565b6000546001600160a01b039081169116146108ad576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6007805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60016020526000908152604090205460ff1681565b61271081565b60065481565b610905611971565b6000546001600160a01b03908116911614610967576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03166000908152600160205260409020805460ff19169055565b600081116109c75760405162461bcd60e51b8152600401808060200182810382526023815260200180611ec76023913960400191505060405180910390fd5b3360009081526001602052604090205460ff1615610a2c576040805162461bcd60e51b815260206004820152601460248201527f5573657220697320626c61636b204c6973746564000000000000000000000000604482015290519081900360640190fd5b600354604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810184905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610a9f57600080fd5b505af1158015610ab3573d6000803e3d6000fd5b505050506040513d6020811015610ac957600080fd5b505033600090815260026020526040902054610aeb908263ffffffff61197516565b3360008181526002602052604080822093845542600190940193909355915183927fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c91a350565b6001600160a01b031660009081526002602052604090205490565b610b55611971565b6000546001600160a01b03908116911614610bb7576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b60055481565b336000908152600160208190526040909120805460ff19169091179055565b610c3b611971565b6000546001600160a01b03908116911614610c9d576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600681905560405181907f8249ec545e68f6f1e1230133ca48c704d831a7f8e635ded80f3dd9e99b09bb2f90600090a250565b60008211610d0f5760405162461bcd60e51b8152600401808060200182810382526023815260200180611ec76023913960400191505060405180910390fd5b6001600160a01b03811660009081526001602052604090205460ff1615610d7d576040805162461bcd60e51b815260206004820152601460248201527f5573657220697320626c61636b204c6973746564000000000000000000000000604482015290519081900360640190fd5b600354604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810185905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610df057600080fd5b505af1158015610e04573d6000803e3d6000fd5b505050506040513d6020811015610e1a57600080fd5b50506001600160a01b038116600090815260026020526040902054610e45908363ffffffff61197516565b6001600160a01b0390911660009081526002602052604090205550565b60005b8151811015610ebc57600060026000848481518110610e8057fe5b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600101819055508080600101915050610e65565b5050565b6000546001600160a01b031690565b33600090815260026020526040902054811115610f33576040805162461bcd60e51b815260206004820152601d60248201527f626574206c657373207468616e20616d6f756e74207769746864726177000000604482015290519081900360640190fd5b336000908152600260205260409020600101541580610f775750600654336000908152600260205260409020600101544291610f75919063ffffffff61197516565b105b610fb25760405162461bcd60e51b8152600401808060200182810382526029815260200180611e366029913960400191505060405180910390fd5b33600090815260026020526040902054610fd2908263ffffffff6119d816565b33600081815260026020908152604080832094909455600354845163a9059cbb60e01b815260048101949094526024840186905293516001600160a01b039094169363a9059cbb93604480820194918390030190829087803b15801561103757600080fd5b505af115801561104b573d6000803e3d6000fd5b505050506040513d602081101561106157600080fd5b5050604051819033907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436490600090a350565b61109b611971565b6000546001600160a01b039081169116146110fd576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b805182511461113d5760405162461bcd60e51b8152600401808060200182810382526021815260200180611e856021913960400191505060405180910390fd5b60005b815181101561121f57600083828151811061115757fe5b602002602001015111156112175761118183828151811061117457fe5b6020026020010151611a1a565b6111e283828151811061119057fe5b6020026020010151600260008585815181106111a857fe5b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600001546119d890919063ffffffff16565b600260008484815181106111f257fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020555b600101611140565b505050565b60085481565b60005b8151811015610ebc57426002600084848151811061124757fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060010181905550808060010191505061122d565b6003546001600160a01b031681565b61129a611971565b6000546001600160a01b039081169116146112fc576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60008111611351576040805162461bcd60e51b815260206004820152601360248201527f4c6f7373206275726e2063616e74206265203000000000000000000000000000604482015290519081900360640190fd5b600555565b61135e611971565b6000546001600160a01b039081169116146113c0576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600855565b6113cd611971565b6000546001600160a01b0390811691161461142f576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811660009081526002602052604090205482111561149c576040805162461bcd60e51b815260206004820152601d60248201527f626574206c657373207468616e20616d6f756e74207769746864726177000000604482015290519081900360640190fd5b6001600160a01b0381166000908152600260205260409020546114c5908363ffffffff6119d816565b6001600160a01b03821660008181526002602052604080822093909355915184927f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436491a3600061153261271061152660085486611bf190919063ffffffff16565b9063ffffffff611c4a16565b9050611544838263ffffffff6119d816565b6003546007546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101869052905193965091169163a9059cbb916044808201926020929091908290030181600087803b15801561159f57600080fd5b505af11580156115b3573d6000803e3d6000fd5b505050506040513d60208110156115c957600080fd5b50506003546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018790529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561162157600080fd5b505af1158015611635573d6000803e3d6000fd5b505050506040513d602081101561164b57600080fd5b5050505050565b6002602052600090815260409020805460019091015482565b611673611971565b6000546001600160a01b039081169116146116d5576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b80518251146117155760405162461bcd60e51b8152600401808060200182810382526021815260200180611e856021913960400191505060405180910390fd5b60005b815181101561121f5760045483516001600160a01b03909116906361433d889085908490811061174457fe5b602002602001015184848151811061175857fe5b60200260200101516040518363ffffffff1660e01b815260040180838152602001826001600160a01b03166001600160a01b0316815260200192505050600060405180830381600087803b1580156117af57600080fd5b505af11580156117c3573d6000803e3d6000fd5b5050600190920191506117189050565b6117db611971565b6000546001600160a01b0390811691161461183d576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61184681611c8c565b50565b6004546001600160a01b031633146118a8576040805162461bcd60e51b815260206004820152601760248201527f43616c6c6572206d7573742062652062616e6b726f6c6c000000000000000000604482015290519081900360640190fd5b6001600160a01b038116600090815260026020526040902054610e45908363ffffffff61197516565b6007546001600160a01b031681565b6118e8611971565b6000546001600160a01b0390811691161461194a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b3390565b6000828201838110156119cf576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b60006119cf83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d39565b6000611a3761271061152660055485611bf190919063ffffffff16565b600354604080517f42966c680000000000000000000000000000000000000000000000000000000081526004810184905290519293506001600160a01b03909116916342966c689160248082019260009290919082900301818387803b158015611aa057600080fd5b505af1158015611ab4573d6000803e3d6000fd5b505050506000611acd82846119d890919063ffffffff16565b60035460048054604080517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b039283169381019390935260248301859052519394509091169163095ea7b3916044808201926020929091908290030181600087803b158015611b4457600080fd5b505af1158015611b58573d6000803e3d6000fd5b505050506040513d6020811015611b6e57600080fd5b505060048054604080517fc2e50b16000000000000000000000000000000000000000000000000000000008152928301849052516001600160a01b039091169163c2e50b1691602480830192600092919082900301818387803b158015611bd457600080fd5b505af1158015611be8573d6000803e3d6000fd5b50505050505050565b600082611c00575060006119d2565b82820282848281611c0d57fe5b04146119cf5760405162461bcd60e51b8152600401808060200182810382526021815260200180611ea66021913960400191505060405180910390fd5b60006119cf83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611dd0565b6001600160a01b038116611cd15760405162461bcd60e51b8152600401808060200182810382526026815260200180611e5f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60008184841115611dc85760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d8d578181015183820152602001611d75565b50505050905090810190601f168015611dba5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611e1f5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611d8d578181015183820152602001611d75565b506000838581611e2b57fe5b049594505050505056fe42657420416d6f756e74206c6f636b65642c20706c656173652074727920616761696e206c617465724f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373506172616d65746572206c656e677468732073686f756c6420626520657175616c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7742657420616d6f756e742073686f756c642062652067726561746572207468616e2030a26469706673582212205ddaa2d2b5b64d157b86a3deff719025d79e69d55e376a34e70b48028a7158fa64736f6c63430006020033000000000000000000000000a3ca5df2938126bae7c0df74d3132b5f72bda0b600000000000000000000000088c01b6b25156727cdcdef016656b7fd472c51bd0000000000000000000000000e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89

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

000000000000000000000000a3ca5df2938126bae7c0df74d3132b5f72bda0b600000000000000000000000088c01b6b25156727cdcdef016656b7fd472c51bd0000000000000000000000000e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000a3ca5df2938126bae7c0df74d3132b5f72bda0b6
Arg [1] : 00000000000000000000000088c01b6b25156727cdcdef016656b7fd472c51bd
Arg [2] : 0000000000000000000000000e5de84bfc1a9799a0fda4ef0bd13b6a20e97d89


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading