Token 10X: Africa's First Cryptocurrency Hub
EFT Fan Token Token
%uD83D%uDCE2%uD83D%uDCE2 EFT Fan Token (EFF) %uD83D%uDCE2%uD83D%uDCE2 %uD83D%uDD10 Fully Audited BEP20 Smart Contract %uD83D%uDD25 EFF and EFT Buyback Burn %uD83D%uDCB5 EFT Buyback Rewards %uD83E%uDDF0 Tax @ 12% %uD83D%uDD12 Liquidity Lock for 2 Years (Initially we will lock for 30 days and then it ...
About EFT Fan Token
%uD83D%uDCE2%uD83D%uDCE2 EFT Fan Token (EFF) %uD83D%uDCE2%uD83D%uDCE2 %uD83D%uDD10 Fully Audited BEP20 Smart Contract %uD83D%uDD25 EFF and EFT Buyback Burn %uD83D%uDCB5 EFT Buyback Rewards %uD83E%uDDF0 Tax @ 12% %uD83D%uDD12 Liquidity Lock for 2 Years (Initially we will lock for 30 days and then it will be extended) %uD83C%uDFC6 Weekly Lottery with ETH prizes %u2733%uFE0F P2E and Staking all in the plan for Phase 2 %uD83D%uDC2C Anti Whale Mechanism
43 total visits
Token information and links
Circulating Supply
100000000000000000000
Token Contract (BSC Chain)
0XC8BB3CE64EA7AF3B734252D9B5E00ABBCEA973E6
Contract license:
Launch Date
19/03/2022
KYC Information
No
Audit Information
None
Team Information
Team leader: None
Team leader contact: None
Contract source code
{{
"language": "Solidity",
"sources": {
"contracts/eff.sol": {
"content": "//SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.7;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\";\nimport \"./DividendDistributor.sol\";\n\ncontract EFF is IERC20, Ownable {\n using SafeMath for uint256;\n\n address WBNB = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;\n address DEAD = 0x000000000000000000000000000000000000dEaD;\n address ZERO = 0x0000000000000000000000000000000000000000;\n\n address public REWARD = 0xB72962568345253f71A18318D67E13A282b187E6;\n address public BURN = 0xB72962568345253f71A18318D67E13A282b187E6;\n address public LOTTERY = 0x2170Ed0880ac9A755fd29B2688956BD959F933F8;\n\n string constant _name = \"EFT Fan Token\";\n string constant _symbol = \"$EFF\";\n uint8 constant _decimals = 9;\n\n uint256 _totalSupply = 100000000000 * (10**_decimals);\n\n mapping(address => uint256) _balances;\n mapping(address => mapping(address => uint256)) _allowances;\n\n mapping(address => bool) isFeeExempt;\n mapping(address => bool) isDividendExempt;\n // allowed users to do transactions before trading enable\n mapping(address => bool) isAuthorized;\n mapping(address => bool) isBlacklist;\n mapping(address => bool) isMaxWalletExempt;\n mapping(address => bool) isMaxTxExempt;\n mapping(address => bool) isTimelockExempt;\n\n // buy fees\n uint256 public buyRewardFee = 4;\n uint256 public buyMarketingFee = 3;\n uint256 public buyLiquidityFee = 2;\n uint256 public buyBurnFee = 1;\n uint256 public buyBuyBackFee = 1;\n uint256 public buyStakePoolFee = 0;\n uint256 public buyGameFee = 0;\n uint256 public buyLotteryFee = 1;\n uint256 public buyTotalFees = 12;\n // sell fees\n uint256 public sellRewardFee = 4;\n uint256 public sellMarketingFee = 3;\n uint256 public sellLiquidityFee = 2;\n uint256 public sellBurnFee = 1;\n uint256 public sellBuyBackFee = 1;\n uint256 public sellStakePoolFee = 0;\n uint256 public sellGameFee = 0;\n uint256 public sellLotteryFee = 1;\n uint256 public sellTotalFees = 12;\n\n address public marketingFeeReceiver;\n address public lotteryFeeReceiver;\n address public stakePoolAddress;\n address public gameWallet;\n\n // swap percentage\n uint256 public rewardSwap = 4;\n uint256 public marketingSwap = 3;\n uint256 public liquiditySwap = 2;\n uint256 public lotterySwap = 1;\n uint256 public burnSwap = 1;\n uint256 public totalSwap = 11;\n\n IUniswapV2Router02 public router;\n address public pair;\n\n bool public tradingOpen = false;\n\n uint256 public sellTaxMultiplier = 1;\n\n DividendDistributor public dividendTracker;\n\n uint256 distributorGas = 500000;\n\n bool public coolDownEnabled = true;\n uint256 public cooldownTimerInterval = 86400;\n mapping(address => uint256) private cooldownTimer;\n\n event AutoLiquify(uint256 amountBNB, uint256 amountBOG);\n event ChangeRewardTracker(address token);\n event IncludeInReward(address holder);\n\n bool public swapEnabled = true;\n uint256 public swapThreshold = (_totalSupply * 1) / 1000; // 0.1% of supply\n uint256 public maxWalletTokens = (_totalSupply * 10) / 1000;\n uint256 public maxTxAmount = (_totalSupply * 5) / 1000; // 0.5% of supply\n\n bool inSwap;\n modifier swapping() {\n inSwap = true;\n _;\n inSwap = false;\n }\n\n constructor() {\n router = IUniswapV2Router02(0x10ED43C718714eb63d5aA57B78B54704E256024E);\n pair = IUniswapV2Factory(router.factory()).createPair(\n WBNB,\n address(this)\n );\n _allowances[address(this)][address(router)] = type(uint256).max;\n\n dividendTracker = new DividendDistributor(address(router), REWARD);\n\n isFeeExempt[msg.sender] = true;\n\n isDividendExempt[pair] = true;\n isDividendExempt[address(this)] = true;\n isDividendExempt[DEAD] = true;\n\n isAuthorized[owner()] = true;\n\n isMaxTxExempt[owner()] = true;\n isMaxTxExempt[pair] = true;\n isMaxTxExempt[address(this)] = true;\n\n isMaxWalletExempt[owner()] = true;\n isMaxWalletExempt[pair] = true;\n isMaxWalletExempt[address(this)] = true;\n\n marketingFeeReceiver = 0xaBd50D22A9665E7adA7E7799d40E126C164F5c15;\n stakePoolAddress = 0x9c55657ED2DFAb5988281DD5204A91743713b902;\n lotteryFeeReceiver = 0xeffE48E632C21482c462e92ad3625f0a099e3c22;\n gameWallet = 0x920ad869B16b8a569B8980179F2E7850F447B56a;\n\n _balances[msg.sender] = _totalSupply;\n emit Transfer(address(0), msg.sender, _totalSupply);\n }\n\n receive() external payable {}\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n\n function name() public pure returns (string memory) {\n return _name;\n }\n\n function symbol() public pure returns (string memory) {\n return _symbol;\n }\n\n function decimals() public pure returns (uint8) {\n return _decimals;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n // tracker dashboard functions\n function getHolderDetails(address holder)\n public\n view\n returns (\n uint256,\n uint256,\n uint256,\n uint256\n )\n {\n return dividendTracker.getHolderDetails(holder);\n }\n\n function getLastProcessedIndex() public view returns (uint256) {\n return dividendTracker.getLastProcessedIndex();\n }\n\n function getNumberOfTokenHolders() public view returns (uint256) {\n return dividendTracker.getNumberOfTokenHolders();\n }\n\n function totalDistributedRewards() public view returns (uint256) {\n return dividendTracker.totalDistributedRewards();\n }\n\n function allowance(address holder, address spender)\n external\n view\n override\n returns (uint256)\n {\n return _allowances[holder][spender];\n }\n\n function approve(address spender, uint256 amount)\n public\n override\n returns (bool)\n {\n _allowances[msg.sender][spender] = amount;\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function approveMax(address spender) external returns (bool) {\n return approve(spender, type(uint256).max);\n }\n\n function transfer(address recipient, uint256 amount)\n external\n override\n returns (bool)\n {\n return _transferFrom(msg.sender, recipient, amount);\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external override returns (bool) {\n if (_allowances[sender][msg.sender] != type(uint256).max) {\n _allowances[sender][msg.sender] = _allowances[sender][msg.sender]\n .sub(amount, \"Insufficient Allowance\");\n }\n\n return _transferFrom(sender, recipient, amount);\n }\n\n function _transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) internal returns (bool) {\n require(\n !isBlacklist[sender] && !isBlacklist[recipient],\n \"Blacklisted users\"\n );\n if (inSwap) {\n return _basicTransfer(sender, recipient, amount);\n }\n\n if (!isAuthorized[sender]) {\n require(tradingOpen, \"Trading not open yet\");\n }\n if (!isMaxTxExempt[sender]) {\n require(amount <= maxTxAmount, \"Max Transaction Amount exceed\");\n }\n if (coolDownEnabled && sender == pair) {\n cooldownTimer[recipient] = block.timestamp cooldownTimerInterval;\n }\n if (!isMaxWalletExempt[recipient]) {\n uint256 balanceAfterTransfer = amount.add(_balances[recipient]);\n require(\n balanceAfterTransfer <= maxWalletTokens,\n \"Max Wallet Amount exceed\"\n );\n }\n if (shouldSwapBack()) {\n swapBackInBnb();\n }\n\n //Exchange tokens\n _balances[sender] = _balances[sender].sub(\n amount,\n \"Insufficient Balance\"\n );\n\n uint256 amountReceived = shouldTakeFee(sender, recipient)\n ? takeFee(sender, amount, recipient)\n : amount;\n _balances[recipient] = _balances[recipient].add(amountReceived);\n\n // Dividend tracker\n if (!isDividendExempt[sender]) {\n try dividendTracker.setShare(sender, _balances[sender]) {} catch {}\n }\n\n if (!isDividendExempt[recipient]) {\n try\n dividendTracker.setShare(recipient, _balances[recipient])\n {} catch {}\n }\n\n try dividendTracker.process(distributorGas) {} catch {}\n\n emit Transfer(sender, recipient, amountReceived);\n return true;\n }\n\n function _basicTransfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal returns (bool) {\n _balances[sender] = _balances[sender].sub(\n amount,\n \"Insufficient Balance\"\n );\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n return true;\n }\n\n function shouldTakeFee(address sender, address to)\n internal\n view\n returns (bool)\n {\n if (isFeeExempt[sender] || isFeeExempt[to]) {\n return false;\n } else {\n return true;\n }\n }\n\n function takeFee(\n address sender,\n uint256 amount,\n address to\n ) internal returns (uint256) {\n uint256 feeAmount = 0;\n uint256 gamePoolToken = 0;\n uint256 stakePoolToken = 0;\n if (to == pair) {\n feeAmount = amount.mul(sellTotalFees).div(100);\n if (coolDownEnabled && !isTimelockExempt[sender]) {\n feeAmount = feeAmount.mul(sellTaxMultiplier);\n }\n if (sellGameFee > 0) {\n gamePoolToken = feeAmount.mul(sellGameFee).div(sellTotalFees);\n _balances[gameWallet] = _balances[gameWallet].add(\n gamePoolToken\n );\n emit Transfer(sender, gameWallet, gamePoolToken);\n }\n if (sellStakePoolFee > 0) {\n stakePoolToken = feeAmount.mul(sellStakePoolFee).div(\n sellTotalFees\n );\n _balances[stakePoolAddress] = _balances[stakePoolAddress].add(\n stakePoolToken\n );\n emit Transfer(sender, stakePoolAddress, stakePoolToken);\n }\n } else {\n feeAmount = amount.mul(buyTotalFees).div(100);\n if (buyGameFee > 0) {\n gamePoolToken = feeAmount.mul(buyGameFee).div(buyTotalFees);\n _balances[gameWallet] = _balances[gameWallet].add(\n gamePoolToken\n );\n emit Transfer(sender, gameWallet, gamePoolToken);\n }\n if (buyStakePoolFee > 0) {\n stakePoolToken = feeAmount.mul(buyStakePoolFee).div(\n buyTotalFees\n );\n _balances[stakePoolAddress] = _balances[stakePoolAddress].add(\n stakePoolToken\n );\n emit Transfer(sender, stakePoolAddress, stakePoolToken);\n }\n }\n uint256 tokensToContract = feeAmount.sub(gamePoolToken).sub(\n stakePoolToken\n );\n _balances[address(this)] = _balances[address(this)].add(\n tokensToContract\n );\n emit Transfer(sender, address(this), tokensToContract);\n\n return amount.sub(feeAmount);\n }\n\n function shouldSwapBack() internal view returns (bool) {\n return\n msg.sender != pair &&\n !inSwap &&\n swapEnabled &&\n tradingOpen &&\n _balances[address(this)] >= swapThreshold;\n }\n\n function clearStuckBalance(uint256 amountPercentage) external onlyOwner {\n uint256 amountBNB = address(this).balance;\n payable(msg.sender).transfer((amountBNB * amountPercentage) / 100);\n }\n\n function getBep20Tokens(address _tokenAddress, uint256 amount)\n external\n onlyOwner\n {\n require(\n IERC20(_tokenAddress).balanceOf(address(this)) >= amount,\n \"No Enough Tokens\"\n );\n IERC20(_tokenAddress).transfer(msg.sender, amount);\n }\n\n function updateBuyFees(\n uint256 reward,\n uint256 marketing,\n uint256 liquidity,\n uint256 burn,\n uint256 staking,\n uint256 buyBack,\n uint256 gamePool,\n uint256 lottery\n ) public onlyOwner {\n buyRewardFee = reward;\n buyMarketingFee = marketing;\n buyLiquidityFee = liquidity;\n buyBurnFee = burn;\n buyStakePoolFee = staking;\n buyBuyBackFee = buyBack;\n buyGameFee = gamePool;\n buyLotteryFee = lottery;\n buyTotalFees = reward.add(marketing).add(liquidity).add(burn).add(\n staking\n );\n buyTotalFees = buyTotalFees.add(buyBack).add(gamePool).add(lottery);\n\n require(buyTotalFees <= 25, \"Fees can not be greater than 25%\");\n }\n\n function updateSellFees(\n uint256 reward,\n uint256 marketing,\n uint256 liquidity,\n uint256 burn,\n uint256 staking,\n uint256 buyBack,\n uint256 gamePool,\n uint256 lottery\n ) public onlyOwner {\n sellRewardFee = reward;\n sellMarketingFee = marketing;\n sellLiquidityFee = liquidity;\n sellBurnFee = burn;\n sellStakePoolFee = staking;\n sellBuyBackFee = buyBack;\n sellGameFee = gamePool;\n sellLotteryFee = lottery;\n sellTotalFees = reward.add(marketing).add(liquidity).add(burn).add(\n staking\n );\n sellTotalFees = buyTotalFees.add(buyBack).add(gamePool).add(lottery);\n\n require(sellTotalFees <= 25, \"Fees can not be greater than 25%\");\n }\n\n // update swap percentages\n function updateSwapPercentages(\n uint256 reward,\n uint256 marketing,\n uint256 liquidity,\n uint256 burn,\n uint256 lottery\n ) public onlyOwner {\n rewardSwap = reward;\n marketingSwap = marketing;\n liquiditySwap = liquidity;\n burnSwap = burn;\n lotterySwap = lottery;\n totalSwap = reward.add(marketing).add(liquidity).add(burn).add(lottery);\n }\n\n // switch Trading\n function enableTrading(bool _status) public onlyOwner {\n tradingOpen = _status;\n }\n\n function whitelistPreSale(address _preSale) public onlyOwner {\n isFeeExempt[_preSale] = true;\n isDividendExempt[_preSale] = true;\n isAuthorized[_preSale] = true;\n isMaxWalletExempt[_preSale] = true;\n }\n\n // manual claim for the greedy humans\n function ___claimRewards(bool tryAll) public {\n dividendTracker.claimDividend();\n if (tryAll) {\n try dividendTracker.process(distributorGas) {} catch {}\n }\n }\n\n // manually clear the queue\n function claimProcess() public {\n try dividendTracker.process(distributorGas) {} catch {}\n }\n\n function blackListWallets(address wallet, bool _status) public onlyOwner {\n isBlacklist[wallet] = _status;\n }\n\n function isBlacklisted(address _wallet) public view returns (bool) {\n return isBlacklist[_wallet];\n }\n\n function isRewardExclude(address _wallet) public view returns (bool) {\n return isDividendExempt[_wallet];\n }\n\n function isFeeExclude(address _wallet) public view returns (bool) {\n return isFeeExempt[_wallet];\n }\n\n function isMaxWalletExclude(address _wallet) public view returns (bool) {\n return isMaxWalletExempt[_wallet];\n }\n\n function isMaxTxExcluded(address _wallet) public view returns (bool) {\n return isMaxTxExempt[_wallet];\n }\n\n function setIsMaxTxExempt(address holder, bool exempt) external onlyOwner {\n isMaxTxExempt[holder] = exempt;\n }\n\n function setMaxTxAmount(uint256 amount) external onlyOwner {\n maxTxAmount = amount * (10**9);\n }\n\n function isExemptTimeLock(address _wallet) public view returns (bool) {\n return isTimelockExempt[_wallet];\n }\n\n function changeSellCoolDownTime(uint256 _time) public onlyOwner {\n cooldownTimerInterval = _time;\n }\n\n function enableSellCollDown(bool _status) public onlyOwner {\n coolDownEnabled = _status;\n }\n\n function exemptTimeLock(address wallet, bool _status) public onlyOwner {\n isTimelockExempt[wallet] = _status;\n }\n\n function swapBackInBnb() internal swapping {\n uint256 contractTokenBalance = _balances[address(this)];\n uint256 tokensToLiquidity = contractTokenBalance.mul(liquiditySwap).div(\n totalSwap\n );\n uint256 lotteryAndMarketingFee = marketingSwap.add(lotterySwap);\n uint256 tokensToMarketingAndLottery = contractTokenBalance\n .mul(lotteryAndMarketingFee)\n .div(totalSwap);\n uint256 tokensForRewardAndBurn = contractTokenBalance\n .sub(tokensToLiquidity)\n .sub(tokensToMarketingAndLottery);\n\n if (tokensForRewardAndBurn > 0) {\n if (REWARD == BURN) {\n swapTokensForTokens(tokensForRewardAndBurn, REWARD);\n uint256 swappedTokensAmount = IERC20(REWARD).balanceOf(\n address(this)\n );\n uint256 rewardAndBurnFee = rewardSwap.add(burnSwap);\n uint256 tokensToBurn = swappedTokensAmount.mul(burnSwap).div(\n rewardAndBurnFee\n );\n if (tokensToBurn > 0) {\n // send burn token\n try\n IERC20(REWARD).transfer(address(DEAD), tokensToBurn)\n {} catch {}\n }\n\n uint256 tokensToReward = swappedTokensAmount.sub(tokensToBurn);\n if (tokensToReward > 0) {\n // send token to reward\n IERC20(REWARD).transfer(\n address(dividendTracker),\n tokensToReward\n );\n try dividendTracker.deposit(tokensToReward) {} catch {}\n }\n } else {\n uint256 rewardAndBurnFee = rewardSwap.add(burnSwap);\n uint256 tokensToBurn = tokensForRewardAndBurn.mul(burnSwap).div(\n rewardAndBurnFee\n );\n uint256 tokensToReward = tokensForRewardAndBurn.sub(\n tokensToBurn\n );\n\n if (tokensToBurn > 0) {\n swapTokensForTokens(tokensToBurn, BURN);\n uint256 swappedTokensAmountBurn = IERC20(BURN).balanceOf(\n address(this)\n );\n // send burn token\n try\n IERC20(BURN).transfer(\n address(DEAD),\n swappedTokensAmountBurn\n )\n {} catch {}\n }\n\n if (tokensToReward > 0) {\n swapTokensForTokens(tokensToBurn, REWARD);\n uint256 swappedTokensAmount = IERC20(REWARD).balanceOf(\n address(this)\n );\n // send token to reward\n IERC20(REWARD).transfer(\n address(dividendTracker),\n swappedTokensAmount\n );\n try dividendTracker.deposit(tokensToReward) {} catch {}\n }\n }\n }\n\n if (tokensToMarketingAndLottery > 0) {\n swapTokensForTokens(tokensToMarketingAndLottery, LOTTERY);\n uint256 swappedTokensAmount = IERC20(LOTTERY).balanceOf(\n address(this)\n );\n\n uint256 tokensToMarketing = swappedTokensAmount\n .mul(marketingSwap)\n .div(lotteryAndMarketingFee);\n uint256 tokensToLottery = swappedTokensAmount.sub(\n tokensToMarketing\n );\n\n if (tokensToMarketing > 0) {\n try\n IERC20(LOTTERY).transfer(\n marketingFeeReceiver,\n tokensToMarketing\n )\n {} catch {}\n }\n if (tokensToLottery > 0) {\n try\n IERC20(LOTTERY).transfer(\n lotteryFeeReceiver,\n tokensToLottery\n )\n {} catch {}\n }\n }\n\n if (tokensToLiquidity > 0) {\n // add liquidity\n swapAndLiquify(tokensToLiquidity);\n }\n }\n\n function swapAndLiquify(uint256 tokens) private {\n // split the contract balance into halves\n uint256 half = tokens.div(2);\n uint256 otherHalf = tokens.sub(half);\n\n // capture the contract's current ETH balance.\n // this is so that we can capture exactly the amount of ETH that the\n // swap creates, and not make the liquidity event include any ETH that\n // has been manually sent to the contract\n uint256 initialBalance = address(this).balance;\n\n // swap tokens for ETH\n swapTokensForEth(half); // <- this breaks the ETH -> HATE swap when swap liquify is triggered\n\n // how much ETH did we just swap into?\n uint256 newBalance = address(this).balance.sub(initialBalance);\n\n // add liquidity to uniswap\n addLiquidity(otherHalf, newBalance);\n\n emit AutoLiquify(newBalance, otherHalf);\n }\n\n function swapTokensForEth(uint256 tokenAmount) private {\n // generate the uniswap pair path of token -> weth\n address[] memory path = new address[](2);\n path[0] = address(this);\n path[1] = router.WETH();\n _approve(address(this), address(router), tokenAmount);\n // make the swap\n router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0, // accept any amount of ETH\n path,\n address(this),\n block.timestamp\n );\n }\n\n function swapTokensForTokens(uint256 tokenAmount, address tokenToSwap)\n private\n {\n // generate the uniswap pair path of token -> weth\n address[] memory path = new address[](3);\n path[0] = address(this);\n path[1] = router.WETH();\n path[2] = tokenToSwap;\n _approve(address(this), address(router), tokenAmount);\n // make the swap\n router.swapExactTokensForTokensSupportingFeeOnTransferTokens(\n tokenAmount,\n 0, // accept any amount of tokens\n path,\n address(this),\n block.timestamp\n );\n }\n\n function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {\n _approve(address(this), address(router), tokenAmount);\n\n // add the liquidity\n router.addLiquidityETH{value: bnbAmount}(\n address(this),\n tokenAmount,\n 0, // slippage is unavoidable\n 0, // slippage is unavoidable\n address(this),\n block.timestamp\n );\n }\n\n function setIsDividendExempt(address holder, bool exempt)\n external\n onlyOwner\n {\n require(holder != address(this) && holder != pair);\n isDividendExempt[holder] = exempt;\n if (exempt) {\n dividendTracker.setShare(holder, 0);\n } else {\n dividendTracker.setShare(holder, _balances[holder]);\n }\n }\n\n function setIsFeeExempt(address holder, bool exempt) external onlyOwner {\n isFeeExempt[holder] = exempt;\n }\n\n function setIsMaxWalletExempt(address holder, bool exempt)\n external\n onlyOwner\n {\n isMaxWalletExempt[holder] = exempt;\n }\n\n function addAuthorizedWallets(address holder, bool exempt)\n external\n onlyOwner\n {\n isAuthorized[holder] = exempt;\n }\n\n function setMarketingWallet(address _marketingFeeReceiver)\n external\n onlyOwner\n {\n marketingFeeReceiver = _marketingFeeReceiver;\n }\n\n function setLotteryWallet(address _lotteryFeeReceiver) external onlyOwner {\n lotteryFeeReceiver = _lotteryFeeReceiver;\n }\n\n function setGamePoolAddress(address _gameWallet) external onlyOwner {\n gameWallet = _gameWallet;\n }\n\n function setStakePoolAddress(address _stakePool) external onlyOwner {\n stakePoolAddress = _stakePool;\n }\n\n function changeBuyBackAndBurnToken(address _tokenAddress)\n external\n onlyOwner\n {\n BURN = _tokenAddress;\n }\n\n function changeLotteryAndMarketingToken(address _tokenAddress)\n external\n onlyOwner\n {\n LOTTERY = _tokenAddress;\n }\n\n function setMaxWalletToken(uint256 amount) external onlyOwner {\n maxWalletTokens = amount * (10**9);\n }\n\n function changeSellFeeMultiplier(uint256 amount) external onlyOwner {\n sellTaxMultiplier = amount;\n }\n\n function setSwapBackSettings(bool _enabled, uint256 _amount)\n external\n onlyOwner\n {\n swapEnabled = _enabled;\n swapThreshold = _amount;\n }\n\n function setDistributionCriteria(\n uint256 _minPeriod,\n uint256 _minDistribution\n ) external onlyOwner {\n dividendTracker.setDistributionCriteria(_minPeriod, _minDistribution);\n }\n\n function setDistributorSettings(uint256 gas) external onlyOwner {\n require(gas < 750000);\n distributorGas = gas;\n }\n\n function purgeBeforeSwitch() public onlyOwner {\n dividendTracker.purge(msg.sender);\n }\n\n function includeMeinRewards() public {\n require(\n !isDividendExempt[msg.sender],\n \"You are not allowed to get rewards\"\n );\n try\n dividendTracker.setShare(msg.sender, _balances[msg.sender])\n {} catch {}\n\n emit IncludeInReward(msg.sender);\n }\n\n function switchToken(address rewardToken, bool isIncludeHolders)\n public\n onlyOwner\n {\n require(rewardToken != WBNB, \"Can not reward BNB in this tracker\");\n REWARD = rewardToken;\n // get current shareholders list\n address[] memory currentHolders = dividendTracker.getShareHoldersList();\n dividendTracker = new DividendDistributor(address(router), rewardToken);\n if (isIncludeHolders) {\n // add old share holders to new tracker\n for (uint256 i = 0; i < currentHolders.length; i ) {\n try\n dividendTracker.setShare(\n currentHolders[i],\n _balances[currentHolders[i]]\n )\n {} catch {}\n }\n }\n\n emit ChangeRewardTracker(rewardToken);\n }\n}\n"
},
"@openzeppelin/contracts/access/Ownable.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n"
},
"@openzeppelin/contracts/token/ERC20/IERC20.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"
},
"@openzeppelin/contracts/utils/math/SafeMath.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\n\npragma solidity ^0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler's built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n * now has built in overflow checking.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's ` ` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return a b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator.\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return a % b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {trySub}.\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b <= a, errorMessage);\n return a - b;\n }\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n return a / b;\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting with custom message when dividing by zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryMod}.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n return a % b;\n }\n }\n}\n"
},
"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol": {
"content": "pragma solidity >=0.6.2;\n\nimport './IUniswapV2Router01.sol';\n\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\n function removeLiquidityETHSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountETH);\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountETH);\n\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external payable;\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n}\n"
},
"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol": {
"content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Factory {\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n function feeTo() external view returns (address);\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB) external view returns (address pair);\n function allPairs(uint) external view returns (address pair);\n function allPairsLength() external view returns (uint);\n\n function createPair(address tokenA, address tokenB) external returns (address pair);\n\n function setFeeTo(address) external;\n function setFeeToSetter(address) external;\n}\n"
},
"contracts/DividendDistributor.sol": {
"content": "//SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.7;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\n\ninterface IDividendDistributor {\n function setDistributionCriteria(\n uint256 _minPeriod,\n uint256 _minDistribution\n ) external;\n\n function setShare(address shareholder, uint256 amount) external;\n\n function deposit(uint256 amount) external;\n\n function process(uint256 gas) external;\n\n function purge(address receiver) external;\n}\n\ncontract DividendDistributor is IDividendDistributor {\n using SafeMath for uint256;\n\n address public _token;\n\n struct Share {\n uint256 amount;\n uint256 totalExcluded;\n uint256 totalRealised;\n }\n\n IERC20 public REWARD;\n address public WBNB = 0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd;\n IUniswapV2Router02 public router;\n\n address[] shareholders;\n mapping(address => uint256) shareholderIndexes;\n mapping(address => uint256) shareholderClaims;\n\n mapping(address => Share) public shares;\n\n uint256 public totalShares;\n uint256 public totalDividends;\n uint256 public totalDistributed;\n uint256 public dividendsPerShare;\n uint256 public dividendsPerShareAccuracyFactor = 10**36;\n\n uint256 public minPeriod = 30 * 60;\n uint256 public minDistribution = 1 * (10**9);\n\n uint256 currentIndex;\n\n bool initialized;\n modifier initialization() {\n require(!initialized);\n _;\n initialized = true;\n }\n\n modifier onlyToken() {\n require(msg.sender == _token);\n _;\n }\n\n constructor(address _router, address rewardToken) {\n router = _router != address(0)\n ? IUniswapV2Router02(_router)\n : IUniswapV2Router02(0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3);\n _token = msg.sender;\n REWARD = IERC20(rewardToken);\n }\n\n receive() external payable {}\n\n function setDistributionCriteria(\n uint256 _minPeriod,\n uint256 _minDistribution\n ) external override onlyToken {\n minPeriod = _minPeriod;\n minDistribution = _minDistribution;\n }\n\n function purge(address receiver) external override onlyToken {\n uint256 balance = REWARD.balanceOf(address(this));\n REWARD.transfer(receiver, balance);\n }\n\n function setShare(address shareholder, uint256 amount)\n external\n override\n onlyToken\n {\n if (shares[shareholder].amount > 0) {\n distributeDividend(shareholder);\n }\n\n if (amount > 0 && shares[shareholder].amount == 0) {\n addShareholder(shareholder);\n } else if (amount == 0 && shares[shareholder].amount > 0) {\n removeShareholder(shareholder);\n }\n\n totalShares = totalShares.sub(shares[shareholder].amount).add(amount);\n shares[shareholder].amount = amount;\n shares[shareholder].totalExcluded = getCumulativeDividends(\n shares[shareholder].amount\n );\n }\n\n function deposit(uint256 amount) external override onlyToken {\n totalDividends = totalDividends.add(amount);\n dividendsPerShare = dividendsPerShare.add(\n dividendsPerShareAccuracyFactor.mul(amount).div(totalShares)\n );\n }\n\n function process(uint256 gas) external override onlyToken {\n uint256 shareholderCount = shareholders.length;\n\n if (shareholderCount == 0) {\n return;\n }\n\n uint256 gasUsed = 0;\n uint256 gasLeft = gasleft();\n\n uint256 iterations = 0;\n\n while (gasUsed < gas && iterations < shareholderCount) {\n if (currentIndex >= shareholderCount) {\n currentIndex = 0;\n }\n\n if (shouldDistribute(shareholders[currentIndex])) {\n distributeDividend(shareholders[currentIndex]);\n }\n\n gasUsed = gasUsed.add(gasLeft.sub(gasleft()));\n gasLeft = gasleft();\n currentIndex ;\n iterations ;\n }\n }\n\n function shouldDistribute(address shareholder)\n internal\n view\n returns (bool)\n {\n return\n shareholderClaims[shareholder] minPeriod < block.timestamp &&\n getUnpaidEarnings(shareholder) > minDistribution;\n }\n\n function distributeDividend(address shareholder) internal {\n if (shares[shareholder].amount == 0) {\n return;\n }\n\n uint256 amount = getUnpaidEarnings(shareholder);\n if (amount > 0) {\n totalDistributed = totalDistributed.add(amount);\n REWARD.transfer(shareholder, amount);\n shareholderClaims[shareholder] = block.timestamp;\n shares[shareholder].totalRealised = shares[shareholder]\n .totalRealised\n .add(amount);\n shares[shareholder].totalExcluded = getCumulativeDividends(\n shares[shareholder].amount\n );\n }\n }\n\n function claimDividend() external {\n distributeDividend(msg.sender);\n }\n\n function getUnpaidEarnings(address shareholder)\n public\n view\n returns (uint256)\n {\n if (shares[shareholder].amount == 0) {\n return 0;\n }\n\n uint256 shareholderTotalDividends = getCumulativeDividends(\n shares[shareholder].amount\n );\n uint256 shareholderTotalExcluded = shares[shareholder].totalExcluded;\n\n if (shareholderTotalDividends <= shareholderTotalExcluded) {\n return 0;\n }\n\n return shareholderTotalDividends.sub(shareholderTotalExcluded);\n }\n\n function getHolderDetails(address holder)\n public\n view\n returns (\n uint256 lastClaim,\n uint256 unpaidEarning,\n uint256 totalReward,\n uint256 holderIndex\n )\n {\n lastClaim = shareholderClaims[holder];\n unpaidEarning = getUnpaidEarnings(holder);\n totalReward = shares[holder].totalRealised;\n holderIndex = shareholderIndexes[holder];\n }\n\n function getCumulativeDividends(uint256 share)\n internal\n view\n returns (uint256)\n {\n return\n share.mul(dividendsPerShare).div(dividendsPerShareAccuracyFactor);\n }\n\n function getLastProcessedIndex() external view returns (uint256) {\n return currentIndex;\n }\n\n function getNumberOfTokenHolders() external view returns (uint256) {\n return shareholders.length;\n }\n function getShareHoldersList() external view returns (address[] memory) {\n return shareholders;\n }\n function totalDistributedRewards() external view returns (uint256) {\n return totalDistributed;\n }\n\n function addShareholder(address shareholder) internal {\n shareholderIndexes[shareholder] = shareholders.length;\n shareholders.push(shareholder);\n }\n\n function removeShareholder(address shareholder) internal {\n shareholders[shareholderIndexes[shareholder]] = shareholders[\n shareholders.length - 1\n ];\n shareholderIndexes[\n shareholders[shareholders.length - 1]\n ] = shareholderIndexes[shareholder];\n shareholders.pop();\n }\n}\n"
},
"@openzeppelin/contracts/utils/Context.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n"
},
"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol": {
"content": "pragma solidity >=0.6.2;\n\ninterface IUniswapV2Router01 {\n function factory() external pure returns (address);\n function WETH() external pure returns (address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint amountADesired,\n uint amountBDesired,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB, uint liquidity);\n function addLiquidityETH(\n address token,\n uint amountTokenDesired,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\n function removeLiquidity(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETH(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountToken, uint amountETH);\n function removeLiquidityWithPermit(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETHWithPermit(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountToken, uint amountETH);\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapTokensForExactTokens(\n uint amountOut,\n uint amountInMax,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n\n function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\n function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\n function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}
}}
"language": "Solidity",
"sources": {
"contracts/eff.sol": {
"content": "//SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.7;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\";\nimport \"./DividendDistributor.sol\";\n\ncontract EFF is IERC20, Ownable {\n using SafeMath for uint256;\n\n address WBNB = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;\n address DEAD = 0x000000000000000000000000000000000000dEaD;\n address ZERO = 0x0000000000000000000000000000000000000000;\n\n address public REWARD = 0xB72962568345253f71A18318D67E13A282b187E6;\n address public BURN = 0xB72962568345253f71A18318D67E13A282b187E6;\n address public LOTTERY = 0x2170Ed0880ac9A755fd29B2688956BD959F933F8;\n\n string constant _name = \"EFT Fan Token\";\n string constant _symbol = \"$EFF\";\n uint8 constant _decimals = 9;\n\n uint256 _totalSupply = 100000000000 * (10**_decimals);\n\n mapping(address => uint256) _balances;\n mapping(address => mapping(address => uint256)) _allowances;\n\n mapping(address => bool) isFeeExempt;\n mapping(address => bool) isDividendExempt;\n // allowed users to do transactions before trading enable\n mapping(address => bool) isAuthorized;\n mapping(address => bool) isBlacklist;\n mapping(address => bool) isMaxWalletExempt;\n mapping(address => bool) isMaxTxExempt;\n mapping(address => bool) isTimelockExempt;\n\n // buy fees\n uint256 public buyRewardFee = 4;\n uint256 public buyMarketingFee = 3;\n uint256 public buyLiquidityFee = 2;\n uint256 public buyBurnFee = 1;\n uint256 public buyBuyBackFee = 1;\n uint256 public buyStakePoolFee = 0;\n uint256 public buyGameFee = 0;\n uint256 public buyLotteryFee = 1;\n uint256 public buyTotalFees = 12;\n // sell fees\n uint256 public sellRewardFee = 4;\n uint256 public sellMarketingFee = 3;\n uint256 public sellLiquidityFee = 2;\n uint256 public sellBurnFee = 1;\n uint256 public sellBuyBackFee = 1;\n uint256 public sellStakePoolFee = 0;\n uint256 public sellGameFee = 0;\n uint256 public sellLotteryFee = 1;\n uint256 public sellTotalFees = 12;\n\n address public marketingFeeReceiver;\n address public lotteryFeeReceiver;\n address public stakePoolAddress;\n address public gameWallet;\n\n // swap percentage\n uint256 public rewardSwap = 4;\n uint256 public marketingSwap = 3;\n uint256 public liquiditySwap = 2;\n uint256 public lotterySwap = 1;\n uint256 public burnSwap = 1;\n uint256 public totalSwap = 11;\n\n IUniswapV2Router02 public router;\n address public pair;\n\n bool public tradingOpen = false;\n\n uint256 public sellTaxMultiplier = 1;\n\n DividendDistributor public dividendTracker;\n\n uint256 distributorGas = 500000;\n\n bool public coolDownEnabled = true;\n uint256 public cooldownTimerInterval = 86400;\n mapping(address => uint256) private cooldownTimer;\n\n event AutoLiquify(uint256 amountBNB, uint256 amountBOG);\n event ChangeRewardTracker(address token);\n event IncludeInReward(address holder);\n\n bool public swapEnabled = true;\n uint256 public swapThreshold = (_totalSupply * 1) / 1000; // 0.1% of supply\n uint256 public maxWalletTokens = (_totalSupply * 10) / 1000;\n uint256 public maxTxAmount = (_totalSupply * 5) / 1000; // 0.5% of supply\n\n bool inSwap;\n modifier swapping() {\n inSwap = true;\n _;\n inSwap = false;\n }\n\n constructor() {\n router = IUniswapV2Router02(0x10ED43C718714eb63d5aA57B78B54704E256024E);\n pair = IUniswapV2Factory(router.factory()).createPair(\n WBNB,\n address(this)\n );\n _allowances[address(this)][address(router)] = type(uint256).max;\n\n dividendTracker = new DividendDistributor(address(router), REWARD);\n\n isFeeExempt[msg.sender] = true;\n\n isDividendExempt[pair] = true;\n isDividendExempt[address(this)] = true;\n isDividendExempt[DEAD] = true;\n\n isAuthorized[owner()] = true;\n\n isMaxTxExempt[owner()] = true;\n isMaxTxExempt[pair] = true;\n isMaxTxExempt[address(this)] = true;\n\n isMaxWalletExempt[owner()] = true;\n isMaxWalletExempt[pair] = true;\n isMaxWalletExempt[address(this)] = true;\n\n marketingFeeReceiver = 0xaBd50D22A9665E7adA7E7799d40E126C164F5c15;\n stakePoolAddress = 0x9c55657ED2DFAb5988281DD5204A91743713b902;\n lotteryFeeReceiver = 0xeffE48E632C21482c462e92ad3625f0a099e3c22;\n gameWallet = 0x920ad869B16b8a569B8980179F2E7850F447B56a;\n\n _balances[msg.sender] = _totalSupply;\n emit Transfer(address(0), msg.sender, _totalSupply);\n }\n\n receive() external payable {}\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n\n function name() public pure returns (string memory) {\n return _name;\n }\n\n function symbol() public pure returns (string memory) {\n return _symbol;\n }\n\n function decimals() public pure returns (uint8) {\n return _decimals;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n // tracker dashboard functions\n function getHolderDetails(address holder)\n public\n view\n returns (\n uint256,\n uint256,\n uint256,\n uint256\n )\n {\n return dividendTracker.getHolderDetails(holder);\n }\n\n function getLastProcessedIndex() public view returns (uint256) {\n return dividendTracker.getLastProcessedIndex();\n }\n\n function getNumberOfTokenHolders() public view returns (uint256) {\n return dividendTracker.getNumberOfTokenHolders();\n }\n\n function totalDistributedRewards() public view returns (uint256) {\n return dividendTracker.totalDistributedRewards();\n }\n\n function allowance(address holder, address spender)\n external\n view\n override\n returns (uint256)\n {\n return _allowances[holder][spender];\n }\n\n function approve(address spender, uint256 amount)\n public\n override\n returns (bool)\n {\n _allowances[msg.sender][spender] = amount;\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function approveMax(address spender) external returns (bool) {\n return approve(spender, type(uint256).max);\n }\n\n function transfer(address recipient, uint256 amount)\n external\n override\n returns (bool)\n {\n return _transferFrom(msg.sender, recipient, amount);\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external override returns (bool) {\n if (_allowances[sender][msg.sender] != type(uint256).max) {\n _allowances[sender][msg.sender] = _allowances[sender][msg.sender]\n .sub(amount, \"Insufficient Allowance\");\n }\n\n return _transferFrom(sender, recipient, amount);\n }\n\n function _transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) internal returns (bool) {\n require(\n !isBlacklist[sender] && !isBlacklist[recipient],\n \"Blacklisted users\"\n );\n if (inSwap) {\n return _basicTransfer(sender, recipient, amount);\n }\n\n if (!isAuthorized[sender]) {\n require(tradingOpen, \"Trading not open yet\");\n }\n if (!isMaxTxExempt[sender]) {\n require(amount <= maxTxAmount, \"Max Transaction Amount exceed\");\n }\n if (coolDownEnabled && sender == pair) {\n cooldownTimer[recipient] = block.timestamp cooldownTimerInterval;\n }\n if (!isMaxWalletExempt[recipient]) {\n uint256 balanceAfterTransfer = amount.add(_balances[recipient]);\n require(\n balanceAfterTransfer <= maxWalletTokens,\n \"Max Wallet Amount exceed\"\n );\n }\n if (shouldSwapBack()) {\n swapBackInBnb();\n }\n\n //Exchange tokens\n _balances[sender] = _balances[sender].sub(\n amount,\n \"Insufficient Balance\"\n );\n\n uint256 amountReceived = shouldTakeFee(sender, recipient)\n ? takeFee(sender, amount, recipient)\n : amount;\n _balances[recipient] = _balances[recipient].add(amountReceived);\n\n // Dividend tracker\n if (!isDividendExempt[sender]) {\n try dividendTracker.setShare(sender, _balances[sender]) {} catch {}\n }\n\n if (!isDividendExempt[recipient]) {\n try\n dividendTracker.setShare(recipient, _balances[recipient])\n {} catch {}\n }\n\n try dividendTracker.process(distributorGas) {} catch {}\n\n emit Transfer(sender, recipient, amountReceived);\n return true;\n }\n\n function _basicTransfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal returns (bool) {\n _balances[sender] = _balances[sender].sub(\n amount,\n \"Insufficient Balance\"\n );\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n return true;\n }\n\n function shouldTakeFee(address sender, address to)\n internal\n view\n returns (bool)\n {\n if (isFeeExempt[sender] || isFeeExempt[to]) {\n return false;\n } else {\n return true;\n }\n }\n\n function takeFee(\n address sender,\n uint256 amount,\n address to\n ) internal returns (uint256) {\n uint256 feeAmount = 0;\n uint256 gamePoolToken = 0;\n uint256 stakePoolToken = 0;\n if (to == pair) {\n feeAmount = amount.mul(sellTotalFees).div(100);\n if (coolDownEnabled && !isTimelockExempt[sender]) {\n feeAmount = feeAmount.mul(sellTaxMultiplier);\n }\n if (sellGameFee > 0) {\n gamePoolToken = feeAmount.mul(sellGameFee).div(sellTotalFees);\n _balances[gameWallet] = _balances[gameWallet].add(\n gamePoolToken\n );\n emit Transfer(sender, gameWallet, gamePoolToken);\n }\n if (sellStakePoolFee > 0) {\n stakePoolToken = feeAmount.mul(sellStakePoolFee).div(\n sellTotalFees\n );\n _balances[stakePoolAddress] = _balances[stakePoolAddress].add(\n stakePoolToken\n );\n emit Transfer(sender, stakePoolAddress, stakePoolToken);\n }\n } else {\n feeAmount = amount.mul(buyTotalFees).div(100);\n if (buyGameFee > 0) {\n gamePoolToken = feeAmount.mul(buyGameFee).div(buyTotalFees);\n _balances[gameWallet] = _balances[gameWallet].add(\n gamePoolToken\n );\n emit Transfer(sender, gameWallet, gamePoolToken);\n }\n if (buyStakePoolFee > 0) {\n stakePoolToken = feeAmount.mul(buyStakePoolFee).div(\n buyTotalFees\n );\n _balances[stakePoolAddress] = _balances[stakePoolAddress].add(\n stakePoolToken\n );\n emit Transfer(sender, stakePoolAddress, stakePoolToken);\n }\n }\n uint256 tokensToContract = feeAmount.sub(gamePoolToken).sub(\n stakePoolToken\n );\n _balances[address(this)] = _balances[address(this)].add(\n tokensToContract\n );\n emit Transfer(sender, address(this), tokensToContract);\n\n return amount.sub(feeAmount);\n }\n\n function shouldSwapBack() internal view returns (bool) {\n return\n msg.sender != pair &&\n !inSwap &&\n swapEnabled &&\n tradingOpen &&\n _balances[address(this)] >= swapThreshold;\n }\n\n function clearStuckBalance(uint256 amountPercentage) external onlyOwner {\n uint256 amountBNB = address(this).balance;\n payable(msg.sender).transfer((amountBNB * amountPercentage) / 100);\n }\n\n function getBep20Tokens(address _tokenAddress, uint256 amount)\n external\n onlyOwner\n {\n require(\n IERC20(_tokenAddress).balanceOf(address(this)) >= amount,\n \"No Enough Tokens\"\n );\n IERC20(_tokenAddress).transfer(msg.sender, amount);\n }\n\n function updateBuyFees(\n uint256 reward,\n uint256 marketing,\n uint256 liquidity,\n uint256 burn,\n uint256 staking,\n uint256 buyBack,\n uint256 gamePool,\n uint256 lottery\n ) public onlyOwner {\n buyRewardFee = reward;\n buyMarketingFee = marketing;\n buyLiquidityFee = liquidity;\n buyBurnFee = burn;\n buyStakePoolFee = staking;\n buyBuyBackFee = buyBack;\n buyGameFee = gamePool;\n buyLotteryFee = lottery;\n buyTotalFees = reward.add(marketing).add(liquidity).add(burn).add(\n staking\n );\n buyTotalFees = buyTotalFees.add(buyBack).add(gamePool).add(lottery);\n\n require(buyTotalFees <= 25, \"Fees can not be greater than 25%\");\n }\n\n function updateSellFees(\n uint256 reward,\n uint256 marketing,\n uint256 liquidity,\n uint256 burn,\n uint256 staking,\n uint256 buyBack,\n uint256 gamePool,\n uint256 lottery\n ) public onlyOwner {\n sellRewardFee = reward;\n sellMarketingFee = marketing;\n sellLiquidityFee = liquidity;\n sellBurnFee = burn;\n sellStakePoolFee = staking;\n sellBuyBackFee = buyBack;\n sellGameFee = gamePool;\n sellLotteryFee = lottery;\n sellTotalFees = reward.add(marketing).add(liquidity).add(burn).add(\n staking\n );\n sellTotalFees = buyTotalFees.add(buyBack).add(gamePool).add(lottery);\n\n require(sellTotalFees <= 25, \"Fees can not be greater than 25%\");\n }\n\n // update swap percentages\n function updateSwapPercentages(\n uint256 reward,\n uint256 marketing,\n uint256 liquidity,\n uint256 burn,\n uint256 lottery\n ) public onlyOwner {\n rewardSwap = reward;\n marketingSwap = marketing;\n liquiditySwap = liquidity;\n burnSwap = burn;\n lotterySwap = lottery;\n totalSwap = reward.add(marketing).add(liquidity).add(burn).add(lottery);\n }\n\n // switch Trading\n function enableTrading(bool _status) public onlyOwner {\n tradingOpen = _status;\n }\n\n function whitelistPreSale(address _preSale) public onlyOwner {\n isFeeExempt[_preSale] = true;\n isDividendExempt[_preSale] = true;\n isAuthorized[_preSale] = true;\n isMaxWalletExempt[_preSale] = true;\n }\n\n // manual claim for the greedy humans\n function ___claimRewards(bool tryAll) public {\n dividendTracker.claimDividend();\n if (tryAll) {\n try dividendTracker.process(distributorGas) {} catch {}\n }\n }\n\n // manually clear the queue\n function claimProcess() public {\n try dividendTracker.process(distributorGas) {} catch {}\n }\n\n function blackListWallets(address wallet, bool _status) public onlyOwner {\n isBlacklist[wallet] = _status;\n }\n\n function isBlacklisted(address _wallet) public view returns (bool) {\n return isBlacklist[_wallet];\n }\n\n function isRewardExclude(address _wallet) public view returns (bool) {\n return isDividendExempt[_wallet];\n }\n\n function isFeeExclude(address _wallet) public view returns (bool) {\n return isFeeExempt[_wallet];\n }\n\n function isMaxWalletExclude(address _wallet) public view returns (bool) {\n return isMaxWalletExempt[_wallet];\n }\n\n function isMaxTxExcluded(address _wallet) public view returns (bool) {\n return isMaxTxExempt[_wallet];\n }\n\n function setIsMaxTxExempt(address holder, bool exempt) external onlyOwner {\n isMaxTxExempt[holder] = exempt;\n }\n\n function setMaxTxAmount(uint256 amount) external onlyOwner {\n maxTxAmount = amount * (10**9);\n }\n\n function isExemptTimeLock(address _wallet) public view returns (bool) {\n return isTimelockExempt[_wallet];\n }\n\n function changeSellCoolDownTime(uint256 _time) public onlyOwner {\n cooldownTimerInterval = _time;\n }\n\n function enableSellCollDown(bool _status) public onlyOwner {\n coolDownEnabled = _status;\n }\n\n function exemptTimeLock(address wallet, bool _status) public onlyOwner {\n isTimelockExempt[wallet] = _status;\n }\n\n function swapBackInBnb() internal swapping {\n uint256 contractTokenBalance = _balances[address(this)];\n uint256 tokensToLiquidity = contractTokenBalance.mul(liquiditySwap).div(\n totalSwap\n );\n uint256 lotteryAndMarketingFee = marketingSwap.add(lotterySwap);\n uint256 tokensToMarketingAndLottery = contractTokenBalance\n .mul(lotteryAndMarketingFee)\n .div(totalSwap);\n uint256 tokensForRewardAndBurn = contractTokenBalance\n .sub(tokensToLiquidity)\n .sub(tokensToMarketingAndLottery);\n\n if (tokensForRewardAndBurn > 0) {\n if (REWARD == BURN) {\n swapTokensForTokens(tokensForRewardAndBurn, REWARD);\n uint256 swappedTokensAmount = IERC20(REWARD).balanceOf(\n address(this)\n );\n uint256 rewardAndBurnFee = rewardSwap.add(burnSwap);\n uint256 tokensToBurn = swappedTokensAmount.mul(burnSwap).div(\n rewardAndBurnFee\n );\n if (tokensToBurn > 0) {\n // send burn token\n try\n IERC20(REWARD).transfer(address(DEAD), tokensToBurn)\n {} catch {}\n }\n\n uint256 tokensToReward = swappedTokensAmount.sub(tokensToBurn);\n if (tokensToReward > 0) {\n // send token to reward\n IERC20(REWARD).transfer(\n address(dividendTracker),\n tokensToReward\n );\n try dividendTracker.deposit(tokensToReward) {} catch {}\n }\n } else {\n uint256 rewardAndBurnFee = rewardSwap.add(burnSwap);\n uint256 tokensToBurn = tokensForRewardAndBurn.mul(burnSwap).div(\n rewardAndBurnFee\n );\n uint256 tokensToReward = tokensForRewardAndBurn.sub(\n tokensToBurn\n );\n\n if (tokensToBurn > 0) {\n swapTokensForTokens(tokensToBurn, BURN);\n uint256 swappedTokensAmountBurn = IERC20(BURN).balanceOf(\n address(this)\n );\n // send burn token\n try\n IERC20(BURN).transfer(\n address(DEAD),\n swappedTokensAmountBurn\n )\n {} catch {}\n }\n\n if (tokensToReward > 0) {\n swapTokensForTokens(tokensToBurn, REWARD);\n uint256 swappedTokensAmount = IERC20(REWARD).balanceOf(\n address(this)\n );\n // send token to reward\n IERC20(REWARD).transfer(\n address(dividendTracker),\n swappedTokensAmount\n );\n try dividendTracker.deposit(tokensToReward) {} catch {}\n }\n }\n }\n\n if (tokensToMarketingAndLottery > 0) {\n swapTokensForTokens(tokensToMarketingAndLottery, LOTTERY);\n uint256 swappedTokensAmount = IERC20(LOTTERY).balanceOf(\n address(this)\n );\n\n uint256 tokensToMarketing = swappedTokensAmount\n .mul(marketingSwap)\n .div(lotteryAndMarketingFee);\n uint256 tokensToLottery = swappedTokensAmount.sub(\n tokensToMarketing\n );\n\n if (tokensToMarketing > 0) {\n try\n IERC20(LOTTERY).transfer(\n marketingFeeReceiver,\n tokensToMarketing\n )\n {} catch {}\n }\n if (tokensToLottery > 0) {\n try\n IERC20(LOTTERY).transfer(\n lotteryFeeReceiver,\n tokensToLottery\n )\n {} catch {}\n }\n }\n\n if (tokensToLiquidity > 0) {\n // add liquidity\n swapAndLiquify(tokensToLiquidity);\n }\n }\n\n function swapAndLiquify(uint256 tokens) private {\n // split the contract balance into halves\n uint256 half = tokens.div(2);\n uint256 otherHalf = tokens.sub(half);\n\n // capture the contract's current ETH balance.\n // this is so that we can capture exactly the amount of ETH that the\n // swap creates, and not make the liquidity event include any ETH that\n // has been manually sent to the contract\n uint256 initialBalance = address(this).balance;\n\n // swap tokens for ETH\n swapTokensForEth(half); // <- this breaks the ETH -> HATE swap when swap liquify is triggered\n\n // how much ETH did we just swap into?\n uint256 newBalance = address(this).balance.sub(initialBalance);\n\n // add liquidity to uniswap\n addLiquidity(otherHalf, newBalance);\n\n emit AutoLiquify(newBalance, otherHalf);\n }\n\n function swapTokensForEth(uint256 tokenAmount) private {\n // generate the uniswap pair path of token -> weth\n address[] memory path = new address[](2);\n path[0] = address(this);\n path[1] = router.WETH();\n _approve(address(this), address(router), tokenAmount);\n // make the swap\n router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0, // accept any amount of ETH\n path,\n address(this),\n block.timestamp\n );\n }\n\n function swapTokensForTokens(uint256 tokenAmount, address tokenToSwap)\n private\n {\n // generate the uniswap pair path of token -> weth\n address[] memory path = new address[](3);\n path[0] = address(this);\n path[1] = router.WETH();\n path[2] = tokenToSwap;\n _approve(address(this), address(router), tokenAmount);\n // make the swap\n router.swapExactTokensForTokensSupportingFeeOnTransferTokens(\n tokenAmount,\n 0, // accept any amount of tokens\n path,\n address(this),\n block.timestamp\n );\n }\n\n function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {\n _approve(address(this), address(router), tokenAmount);\n\n // add the liquidity\n router.addLiquidityETH{value: bnbAmount}(\n address(this),\n tokenAmount,\n 0, // slippage is unavoidable\n 0, // slippage is unavoidable\n address(this),\n block.timestamp\n );\n }\n\n function setIsDividendExempt(address holder, bool exempt)\n external\n onlyOwner\n {\n require(holder != address(this) && holder != pair);\n isDividendExempt[holder] = exempt;\n if (exempt) {\n dividendTracker.setShare(holder, 0);\n } else {\n dividendTracker.setShare(holder, _balances[holder]);\n }\n }\n\n function setIsFeeExempt(address holder, bool exempt) external onlyOwner {\n isFeeExempt[holder] = exempt;\n }\n\n function setIsMaxWalletExempt(address holder, bool exempt)\n external\n onlyOwner\n {\n isMaxWalletExempt[holder] = exempt;\n }\n\n function addAuthorizedWallets(address holder, bool exempt)\n external\n onlyOwner\n {\n isAuthorized[holder] = exempt;\n }\n\n function setMarketingWallet(address _marketingFeeReceiver)\n external\n onlyOwner\n {\n marketingFeeReceiver = _marketingFeeReceiver;\n }\n\n function setLotteryWallet(address _lotteryFeeReceiver) external onlyOwner {\n lotteryFeeReceiver = _lotteryFeeReceiver;\n }\n\n function setGamePoolAddress(address _gameWallet) external onlyOwner {\n gameWallet = _gameWallet;\n }\n\n function setStakePoolAddress(address _stakePool) external onlyOwner {\n stakePoolAddress = _stakePool;\n }\n\n function changeBuyBackAndBurnToken(address _tokenAddress)\n external\n onlyOwner\n {\n BURN = _tokenAddress;\n }\n\n function changeLotteryAndMarketingToken(address _tokenAddress)\n external\n onlyOwner\n {\n LOTTERY = _tokenAddress;\n }\n\n function setMaxWalletToken(uint256 amount) external onlyOwner {\n maxWalletTokens = amount * (10**9);\n }\n\n function changeSellFeeMultiplier(uint256 amount) external onlyOwner {\n sellTaxMultiplier = amount;\n }\n\n function setSwapBackSettings(bool _enabled, uint256 _amount)\n external\n onlyOwner\n {\n swapEnabled = _enabled;\n swapThreshold = _amount;\n }\n\n function setDistributionCriteria(\n uint256 _minPeriod,\n uint256 _minDistribution\n ) external onlyOwner {\n dividendTracker.setDistributionCriteria(_minPeriod, _minDistribution);\n }\n\n function setDistributorSettings(uint256 gas) external onlyOwner {\n require(gas < 750000);\n distributorGas = gas;\n }\n\n function purgeBeforeSwitch() public onlyOwner {\n dividendTracker.purge(msg.sender);\n }\n\n function includeMeinRewards() public {\n require(\n !isDividendExempt[msg.sender],\n \"You are not allowed to get rewards\"\n );\n try\n dividendTracker.setShare(msg.sender, _balances[msg.sender])\n {} catch {}\n\n emit IncludeInReward(msg.sender);\n }\n\n function switchToken(address rewardToken, bool isIncludeHolders)\n public\n onlyOwner\n {\n require(rewardToken != WBNB, \"Can not reward BNB in this tracker\");\n REWARD = rewardToken;\n // get current shareholders list\n address[] memory currentHolders = dividendTracker.getShareHoldersList();\n dividendTracker = new DividendDistributor(address(router), rewardToken);\n if (isIncludeHolders) {\n // add old share holders to new tracker\n for (uint256 i = 0; i < currentHolders.length; i ) {\n try\n dividendTracker.setShare(\n currentHolders[i],\n _balances[currentHolders[i]]\n )\n {} catch {}\n }\n }\n\n emit ChangeRewardTracker(rewardToken);\n }\n}\n"
},
"@openzeppelin/contracts/access/Ownable.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n"
},
"@openzeppelin/contracts/token/ERC20/IERC20.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"
},
"@openzeppelin/contracts/utils/math/SafeMath.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\n\npragma solidity ^0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler's built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n * now has built in overflow checking.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's ` ` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return a b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator.\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return a % b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {trySub}.\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b <= a, errorMessage);\n return a - b;\n }\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n return a / b;\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting with custom message when dividing by zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryMod}.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n return a % b;\n }\n }\n}\n"
},
"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol": {
"content": "pragma solidity >=0.6.2;\n\nimport './IUniswapV2Router01.sol';\n\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\n function removeLiquidityETHSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountETH);\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountETH);\n\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external payable;\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n}\n"
},
"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol": {
"content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Factory {\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n function feeTo() external view returns (address);\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB) external view returns (address pair);\n function allPairs(uint) external view returns (address pair);\n function allPairsLength() external view returns (uint);\n\n function createPair(address tokenA, address tokenB) external returns (address pair);\n\n function setFeeTo(address) external;\n function setFeeToSetter(address) external;\n}\n"
},
"contracts/DividendDistributor.sol": {
"content": "//SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.7;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\n\ninterface IDividendDistributor {\n function setDistributionCriteria(\n uint256 _minPeriod,\n uint256 _minDistribution\n ) external;\n\n function setShare(address shareholder, uint256 amount) external;\n\n function deposit(uint256 amount) external;\n\n function process(uint256 gas) external;\n\n function purge(address receiver) external;\n}\n\ncontract DividendDistributor is IDividendDistributor {\n using SafeMath for uint256;\n\n address public _token;\n\n struct Share {\n uint256 amount;\n uint256 totalExcluded;\n uint256 totalRealised;\n }\n\n IERC20 public REWARD;\n address public WBNB = 0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd;\n IUniswapV2Router02 public router;\n\n address[] shareholders;\n mapping(address => uint256) shareholderIndexes;\n mapping(address => uint256) shareholderClaims;\n\n mapping(address => Share) public shares;\n\n uint256 public totalShares;\n uint256 public totalDividends;\n uint256 public totalDistributed;\n uint256 public dividendsPerShare;\n uint256 public dividendsPerShareAccuracyFactor = 10**36;\n\n uint256 public minPeriod = 30 * 60;\n uint256 public minDistribution = 1 * (10**9);\n\n uint256 currentIndex;\n\n bool initialized;\n modifier initialization() {\n require(!initialized);\n _;\n initialized = true;\n }\n\n modifier onlyToken() {\n require(msg.sender == _token);\n _;\n }\n\n constructor(address _router, address rewardToken) {\n router = _router != address(0)\n ? IUniswapV2Router02(_router)\n : IUniswapV2Router02(0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3);\n _token = msg.sender;\n REWARD = IERC20(rewardToken);\n }\n\n receive() external payable {}\n\n function setDistributionCriteria(\n uint256 _minPeriod,\n uint256 _minDistribution\n ) external override onlyToken {\n minPeriod = _minPeriod;\n minDistribution = _minDistribution;\n }\n\n function purge(address receiver) external override onlyToken {\n uint256 balance = REWARD.balanceOf(address(this));\n REWARD.transfer(receiver, balance);\n }\n\n function setShare(address shareholder, uint256 amount)\n external\n override\n onlyToken\n {\n if (shares[shareholder].amount > 0) {\n distributeDividend(shareholder);\n }\n\n if (amount > 0 && shares[shareholder].amount == 0) {\n addShareholder(shareholder);\n } else if (amount == 0 && shares[shareholder].amount > 0) {\n removeShareholder(shareholder);\n }\n\n totalShares = totalShares.sub(shares[shareholder].amount).add(amount);\n shares[shareholder].amount = amount;\n shares[shareholder].totalExcluded = getCumulativeDividends(\n shares[shareholder].amount\n );\n }\n\n function deposit(uint256 amount) external override onlyToken {\n totalDividends = totalDividends.add(amount);\n dividendsPerShare = dividendsPerShare.add(\n dividendsPerShareAccuracyFactor.mul(amount).div(totalShares)\n );\n }\n\n function process(uint256 gas) external override onlyToken {\n uint256 shareholderCount = shareholders.length;\n\n if (shareholderCount == 0) {\n return;\n }\n\n uint256 gasUsed = 0;\n uint256 gasLeft = gasleft();\n\n uint256 iterations = 0;\n\n while (gasUsed < gas && iterations < shareholderCount) {\n if (currentIndex >= shareholderCount) {\n currentIndex = 0;\n }\n\n if (shouldDistribute(shareholders[currentIndex])) {\n distributeDividend(shareholders[currentIndex]);\n }\n\n gasUsed = gasUsed.add(gasLeft.sub(gasleft()));\n gasLeft = gasleft();\n currentIndex ;\n iterations ;\n }\n }\n\n function shouldDistribute(address shareholder)\n internal\n view\n returns (bool)\n {\n return\n shareholderClaims[shareholder] minPeriod < block.timestamp &&\n getUnpaidEarnings(shareholder) > minDistribution;\n }\n\n function distributeDividend(address shareholder) internal {\n if (shares[shareholder].amount == 0) {\n return;\n }\n\n uint256 amount = getUnpaidEarnings(shareholder);\n if (amount > 0) {\n totalDistributed = totalDistributed.add(amount);\n REWARD.transfer(shareholder, amount);\n shareholderClaims[shareholder] = block.timestamp;\n shares[shareholder].totalRealised = shares[shareholder]\n .totalRealised\n .add(amount);\n shares[shareholder].totalExcluded = getCumulativeDividends(\n shares[shareholder].amount\n );\n }\n }\n\n function claimDividend() external {\n distributeDividend(msg.sender);\n }\n\n function getUnpaidEarnings(address shareholder)\n public\n view\n returns (uint256)\n {\n if (shares[shareholder].amount == 0) {\n return 0;\n }\n\n uint256 shareholderTotalDividends = getCumulativeDividends(\n shares[shareholder].amount\n );\n uint256 shareholderTotalExcluded = shares[shareholder].totalExcluded;\n\n if (shareholderTotalDividends <= shareholderTotalExcluded) {\n return 0;\n }\n\n return shareholderTotalDividends.sub(shareholderTotalExcluded);\n }\n\n function getHolderDetails(address holder)\n public\n view\n returns (\n uint256 lastClaim,\n uint256 unpaidEarning,\n uint256 totalReward,\n uint256 holderIndex\n )\n {\n lastClaim = shareholderClaims[holder];\n unpaidEarning = getUnpaidEarnings(holder);\n totalReward = shares[holder].totalRealised;\n holderIndex = shareholderIndexes[holder];\n }\n\n function getCumulativeDividends(uint256 share)\n internal\n view\n returns (uint256)\n {\n return\n share.mul(dividendsPerShare).div(dividendsPerShareAccuracyFactor);\n }\n\n function getLastProcessedIndex() external view returns (uint256) {\n return currentIndex;\n }\n\n function getNumberOfTokenHolders() external view returns (uint256) {\n return shareholders.length;\n }\n function getShareHoldersList() external view returns (address[] memory) {\n return shareholders;\n }\n function totalDistributedRewards() external view returns (uint256) {\n return totalDistributed;\n }\n\n function addShareholder(address shareholder) internal {\n shareholderIndexes[shareholder] = shareholders.length;\n shareholders.push(shareholder);\n }\n\n function removeShareholder(address shareholder) internal {\n shareholders[shareholderIndexes[shareholder]] = shareholders[\n shareholders.length - 1\n ];\n shareholderIndexes[\n shareholders[shareholders.length - 1]\n ] = shareholderIndexes[shareholder];\n shareholders.pop();\n }\n}\n"
},
"@openzeppelin/contracts/utils/Context.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n"
},
"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol": {
"content": "pragma solidity >=0.6.2;\n\ninterface IUniswapV2Router01 {\n function factory() external pure returns (address);\n function WETH() external pure returns (address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint amountADesired,\n uint amountBDesired,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB, uint liquidity);\n function addLiquidityETH(\n address token,\n uint amountTokenDesired,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\n function removeLiquidity(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETH(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountToken, uint amountETH);\n function removeLiquidityWithPermit(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETHWithPermit(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountToken, uint amountETH);\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapTokensForExactTokens(\n uint amountOut,\n uint amountInMax,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n\n function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\n function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\n function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}
}}