Token 10X: Africa's First Cryptocurrency Hub
The Dragon Fury Token
The Dragon Fury ($TDF) is the next 1000X BSC moonshot. MMORPG Play to Earn game with different play modes, One to One Multiplayer, Story mode, futuristic graphics and in game NFTs. $TDF Reflections which will keep increasing your holdings. The game itself is a treat for MMORPG Lovers. KYC Verified. ...
About The Dragon Fury
The Dragon Fury ($TDF) is the next 1000X BSC moonshot. MMORPG Play to Earn game with different play modes, One to One Multiplayer, Story mode, futuristic graphics and in game NFTs. $TDF Reflections which will keep increasing your holdings. The game itself is a treat for MMORPG Lovers. KYC Verified. Audited Contract. NFT Marketplace. A moonshot you don't want to miss.
18 total visits
Token information and links
Circulating Supply
100000000000000000000
Token Contract (BSC Chain)
0XA35DB0338672C51CCACE75501CA954ED02232DF1
Contract license:
Launch Date
23/04/2022
KYC Information
No
Audit Information
None
Team Information
Team leader: None
Team leader contact: None
Contract source code
{{
"language": "Solidity",
"sources": {
"contracts/Greeter.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\";\n\ncontract TDF is Context, IERC20, Ownable {\n using SafeMath for uint256;\n\n mapping(address => uint256) private _rOwned;\n mapping(address => uint256) private _tOwned;\n mapping(address => bool) private _isExcludedFromFee;\n mapping(address => bool) private _isExcluded;\n mapping(address => bool) private _isAuthorized;\n mapping(address => mapping(address => uint256)) private _allowances;\n mapping(address => bool) public _isExcludedFromAutoLiquidity;\n\n address[] private _excluded;\n address public _marketingWallet =\n 0x4cf016D410E66e1A5a3483aBaBe0ECfF408cC24D;\n address public _devWallet = 0x2B8c46c8C8e2ef5aD9a29C8BA1C664Dca609D39D;\n address public _buyBackWallet = 0x229b889EFA5e4d1112d0049F86D534A46602F27e;\n\n uint256 private constant MAX = ~uint256(0);\n uint256 private _tTotal = 100 * 10**9 * 10**9;\n uint256 private _rTotal = (MAX - (MAX % _tTotal));\n uint256 private _tFeeTotal;\n\n string private _name = \"The Dragon Fury\";\n string private _symbol = \"$TDF\";\n uint8 private _decimals = 9;\n\n uint256 public _sellRewardFee = 3;\n uint256 public _sellLiquidityFee = 2;\n uint256 public _sellMarketingFee = 5;\n uint256 public _sellDevFee = 5;\n uint256 public _sellBuyBackFee = 5;\n\n uint256 public _buyRewardFee = 3;\n uint256 public _buyLiquidityFee = 2;\n uint256 public _buyMarketingFee = 5;\n uint256 public _buyDevFee = 5;\n uint256 public _buyBuyBackFee = 5;\n\n uint256 public liquiditySwap = 2;\n uint256 public marketingSwap = 3;\n uint256 public devSwap = 1;\n uint256 public buyBackSwap = 2;\n uint256 public totalSwap = 8;\n\n uint256 private _totalFeesToContract = 0;\n uint256 private _taxFee = 0;\n\n uint256 public _swapTokensAt = 100 * 10**6 * 10**9;\n\n bool tradeEnable = false;\n // auto liquidity\n bool public _swapAndLiquifyEnabled = true;\n bool _inSwapAndLiquify;\n IUniswapV2Router02 public _uniswapV2Router;\n address public _uniswapV2Pair;\n event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);\n event SwapAndLiquifyEnabledUpdated(bool enabled);\n event SwapAndLiquify(\n uint256 tokensSwapped,\n uint256 bnbReceived,\n uint256 tokensIntoLiqudity\n );\n\n modifier lockTheSwap() {\n _inSwapAndLiquify = true;\n _;\n _inSwapAndLiquify = false;\n }\n\n constructor() {\n _rOwned[owner()] = _rTotal;\n\n // uniswap\n IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(\n 0x10ED43C718714eb63d5aA57B78B54704E256024E\n );\n _uniswapV2Router = uniswapV2Router;\n _uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory())\n .createPair(address(this), uniswapV2Router.WETH());\n\n address deployer = 0xd2bdc070d302D4420fE9a2C34ba268D48052247F;\n\n // exclude system contracts\n _isExcludedFromFee[deployer] = true;\n _isExcludedFromFee[address(this)] = true;\n\n // authorized to do transactions before add liquidity\n _isAuthorized[deployer] = true;\n\n _isExcludedFromAutoLiquidity[_uniswapV2Pair] = true;\n _isExcludedFromAutoLiquidity[address(_uniswapV2Router)] = true;\n\n emit Transfer(address(0), deployer, _tTotal);\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _tTotal;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n if (_isExcluded[account]) return _tOwned[account];\n return tokenFromReflection(_rOwned[account]);\n }\n\n function transfer(address recipient, uint256 amount)\n public\n override\n returns (bool)\n {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n function allowance(address owner, address spender)\n public\n view\n override\n returns (uint256)\n {\n return _allowances[owner][spender];\n }\n\n function approve(address spender, uint256 amount)\n public\n override\n returns (bool)\n {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"BEP20: transfer amount exceeds allowance\"\n )\n );\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue)\n public\n virtual\n returns (bool)\n {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].add(addedValue)\n );\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue)\n public\n virtual\n returns (bool)\n {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].sub(\n subtractedValue,\n \"BEP20: decreased allowance below zero\"\n )\n );\n return true;\n }\n\n function isExcludedFromReward(address account) public view returns (bool) {\n return _isExcluded[account];\n }\n\n function totalFees() public view returns (uint256) {\n return _tFeeTotal;\n }\n\n function deliver(uint256 tAmount) public {\n address sender = _msgSender();\n require(\n !_isExcluded[sender],\n \"Excluded addresses cannot call this function\"\n );\n\n (, uint256 tFee, uint256 tLiquidity) = _getTValues(tAmount);\n uint256 currentRate = _getRate();\n (uint256 rAmount, , ) = _getRValues(\n tAmount,\n tFee,\n tLiquidity,\n currentRate\n );\n\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rTotal = _rTotal.sub(rAmount);\n _tFeeTotal = _tFeeTotal.add(tAmount);\n }\n\n function reflectionFromToken(uint256 tAmount, bool deductTransferFee)\n public\n view\n returns (uint256)\n {\n require(tAmount <= _tTotal, \"Amount must be less than supply\");\n (, uint256 tFee, uint256 tLiquidity) = _getTValues(tAmount);\n uint256 currentRate = _getRate();\n\n if (!deductTransferFee) {\n (uint256 rAmount, , ) = _getRValues(\n tAmount,\n tFee,\n tLiquidity,\n currentRate\n );\n return rAmount;\n } else {\n (, uint256 rTransferAmount, ) = _getRValues(\n tAmount,\n tFee,\n tLiquidity,\n currentRate\n );\n return rTransferAmount;\n }\n }\n\n function tokenFromReflection(uint256 rAmount)\n public\n view\n returns (uint256)\n {\n require(\n rAmount <= _rTotal,\n \"Amount must be less than total reflections\"\n );\n\n uint256 currentRate = _getRate();\n return rAmount.div(currentRate);\n }\n\n function excludeFromReward(address account) public onlyOwner {\n require(!_isExcluded[account], \"Account is already excluded\");\n\n if (_rOwned[account] > 0) {\n _tOwned[account] = tokenFromReflection(_rOwned[account]);\n }\n _isExcluded[account] = true;\n _excluded.push(account);\n }\n\n function includeInReward(address account) external onlyOwner {\n require(_isExcluded[account], \"Account is already excluded\");\n\n for (uint256 i = 0; i < _excluded.length; i ) {\n if (_excluded[i] == account) {\n _excluded[i] = _excluded[_excluded.length - 1];\n _tOwned[account] = 0;\n _isExcluded[account] = false;\n _excluded.pop();\n break;\n }\n }\n }\n\n function setMarketingWallet(address marketingWallet) external onlyOwner {\n _marketingWallet = marketingWallet;\n }\n\n function setDevWallet(address newWallet) external onlyOwner {\n _devWallet = newWallet;\n }\n\n function setBuyBackWallet(address newWallet) external onlyOwner {\n _buyBackWallet = newWallet;\n }\n\n function changeSwapAmount(uint256 amount) external onlyOwner {\n _swapTokensAt = amount * 10**9;\n }\n\n function setExcludedFromFee(address account, bool e) external onlyOwner {\n _isExcludedFromFee[account] = e;\n }\n\n function tradingEnable() external onlyOwner {\n tradeEnable = true;\n }\n\n // update fees\n function updateBuyFees(\n uint256 rewardFee,\n uint256 liquidityFee,\n uint256 marketingFee,\n uint256 devFee,\n uint256 buyBackFee\n ) external onlyOwner {\n _buyRewardFee = rewardFee;\n _buyLiquidityFee = liquidityFee;\n _buyMarketingFee = marketingFee;\n _buyDevFee = devFee;\n _buyBuyBackFee = buyBackFee;\n }\n\n function updateSellFees(\n uint256 rewardFee,\n uint256 liquidityFee,\n uint256 marketingFee,\n uint256 dev,\n uint256 buyBackFee\n ) external onlyOwner {\n _sellRewardFee = rewardFee;\n _sellLiquidityFee = liquidityFee;\n _sellMarketingFee = marketingFee;\n _sellDevFee = dev;\n _sellBuyBackFee = buyBackFee;\n }\n\n function updateSwapPercentages(\n uint256 liquidity,\n uint256 marketing,\n uint256 dev,\n uint256 buyBack\n ) external onlyOwner {\n liquiditySwap = liquidity;\n marketingSwap = marketing;\n devSwap = dev;\n buyBackSwap = buyBack;\n\n totalSwap = liquidity.add(marketing).add(dev).add(buyBack);\n }\n\n function setSwapAndLiquifyEnabled(bool e) public onlyOwner {\n _swapAndLiquifyEnabled = e;\n emit SwapAndLiquifyEnabledUpdated(e);\n }\n\n receive() external payable {}\n\n function setUniswapRouter(address r) external onlyOwner {\n IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(r);\n _uniswapV2Router = uniswapV2Router;\n }\n\n function setUniswapPair(address p) external onlyOwner {\n _uniswapV2Pair = p;\n }\n\n function setAuthorizedWallets(address wallet, bool status)\n external\n onlyOwner\n {\n _isAuthorized[wallet] = status;\n }\n\n function setExcludedFromAutoLiquidity(address a, bool b)\n external\n onlyOwner\n {\n _isExcludedFromAutoLiquidity[a] = b;\n }\n\n function _reflectFee(uint256 rFee, uint256 tFee) private {\n _rTotal = _rTotal.sub(rFee);\n _tFeeTotal = _tFeeTotal.add(tFee);\n }\n\n function _getTValues(uint256 tAmount)\n private\n view\n returns (\n uint256,\n uint256,\n uint256\n )\n {\n uint256 tFee = calculateFee(tAmount, _taxFee);\n uint256 tLiquidity = calculateFee(tAmount, _totalFeesToContract);\n uint256 tTransferAmount = tAmount.sub(tFee);\n tTransferAmount = tTransferAmount.sub(tLiquidity);\n return (tTransferAmount, tFee, tLiquidity);\n }\n\n function _getRValues(\n uint256 tAmount,\n uint256 tFee,\n uint256 tLiquidity,\n uint256 currentRate\n )\n private\n pure\n returns (\n uint256,\n uint256,\n uint256\n )\n {\n uint256 rAmount = tAmount.mul(currentRate);\n uint256 rFee = tFee.mul(currentRate);\n uint256 rLiquidity = tLiquidity.mul(currentRate);\n uint256 rTransferAmount = rAmount.sub(rFee);\n rTransferAmount = rTransferAmount.sub(rLiquidity);\n return (rAmount, rTransferAmount, rFee);\n }\n\n function _getRate() private view returns (uint256) {\n (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();\n return rSupply.div(tSupply);\n }\n\n function _getCurrentSupply() private view returns (uint256, uint256) {\n uint256 rSupply = _rTotal;\n uint256 tSupply = _tTotal;\n for (uint256 i = 0; i < _excluded.length; i ) {\n if (\n _rOwned[_excluded[i]] > rSupply ||\n _tOwned[_excluded[i]] > tSupply\n ) return (_rTotal, _tTotal);\n rSupply = rSupply.sub(_rOwned[_excluded[i]]);\n tSupply = tSupply.sub(_tOwned[_excluded[i]]);\n }\n if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);\n return (rSupply, tSupply);\n }\n\n function takeTokenFees(\n uint256 tokenAmount,\n uint256 currentRate,\n address from\n ) private {\n if (tokenAmount <= 0) {\n return;\n }\n // send tokens to contract\n takeTransactionFee(address(this), tokenAmount, currentRate);\n emit Transfer(from, address(this), tokenAmount);\n }\n\n function takeTransactionFee(\n address to,\n uint256 tAmount,\n uint256 currentRate\n ) private {\n if (tAmount <= 0) {\n return;\n }\n\n uint256 rAmount = tAmount.mul(currentRate);\n _rOwned[to] = _rOwned[to].add(rAmount);\n if (_isExcluded[to]) {\n _tOwned[to] = _tOwned[to].add(tAmount);\n }\n }\n\n function calculateFee(uint256 amount, uint256 fee)\n private\n pure\n returns (uint256)\n {\n return amount.mul(fee).div(100);\n }\n\n function isExcludedFromFee(address account) public view returns (bool) {\n return _isExcludedFromFee[account];\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) private {\n require(owner != address(0), \"BEP20: approve from the zero address\");\n require(spender != address(0), \"BEP20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) private {\n require(from != address(0), \"BEP20: transfer from the zero address\");\n require(to != address(0), \"BEP20: transfer to the zero address\");\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n if ((to == _uniswapV2Pair || from == _uniswapV2Pair) && !tradeEnable) {\n require(\n (_isAuthorized[to] || _isAuthorized[from]),\n \"Trading not enabled yet.\"\n );\n }\n\n /*\n - swapAndLiquify will be initiated when token balance of this contract\n has accumulated enough over the minimum number of tokens required.\n - don't get caught in a circular liquidity event.\n - don't swapAndLiquify if sender is uniswap pair.\n */\n uint256 contractTokenBalance = balanceOf(address(this));\n\n bool isOverMinTokenBalance = contractTokenBalance >= _swapTokensAt;\n if (\n isOverMinTokenBalance &&\n !_inSwapAndLiquify &&\n !_isExcludedFromAutoLiquidity[from] &&\n _swapAndLiquifyEnabled\n ) {\n // contractTokenBalance = _swapTokensAt;\n swapAndSendBnb(contractTokenBalance);\n }\n\n bool takeFee = true;\n if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {\n takeFee = false;\n }\n\n _tokenTransfer(from, to, amount, takeFee);\n }\n\n function swapAndSendBnb(uint256 contractTokenBalance) private lockTheSwap {\n uint256 tokensToAddLiquidity = contractTokenBalance\n .mul(liquiditySwap)\n .div(totalSwap);\n uint256 tokensToSwap = contractTokenBalance.sub(tokensToAddLiquidity);\n // swap tokens in to bnb\n swapTokensForBnb(tokensToSwap);\n\n uint256 swappedBnbFee = totalSwap.sub(liquiditySwap);\n\n uint256 swappedBnb = address(this).balance;\n\n uint256 bnbForMarketing = swappedBnb.mul(marketingSwap).div(\n swappedBnbFee\n );\n\n uint256 bnbForDev = swappedBnb.mul(devSwap).div(swappedBnbFee);\n\n uint256 bnbForBuyBack = swappedBnb.mul(buyBackSwap).div(swappedBnbFee);\n\n // send bnb to marketing wallet\n payable(_marketingWallet).transfer(bnbForMarketing);\n payable(_devWallet).transfer(bnbForDev);\n payable(_buyBackWallet).transfer(bnbForBuyBack);\n\n // add liquidity\n swapAndLiquify(tokensToAddLiquidity);\n }\n\n function swapAndLiquify(uint256 contractTokenBalance) private {\n // split contract balance into halves\n uint256 half = contractTokenBalance.div(2);\n uint256 otherHalf = contractTokenBalance.sub(half);\n\n /*\n capture the contract's current BNB balance.\n this is so that we can capture exactly the amount of BNB that\n the swap creates, and not make the liquidity event include any BNB\n that has been manually sent to the contract.\n */\n uint256 initialBalance = address(this).balance;\n\n // swap tokens for BNB\n swapTokensForBnb(half);\n\n // this is the amount of BNB that we just swapped into\n uint256 newBalance = address(this).balance.sub(initialBalance);\n\n // add liquidity to uniswap\n addLiquidity(otherHalf, newBalance);\n\n emit SwapAndLiquify(half, newBalance, otherHalf);\n }\n\n function swapTokensForBnb(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] = _uniswapV2Router.WETH();\n\n _approve(address(this), address(_uniswapV2Router), tokenAmount);\n\n // make the swap\n _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0, // accept any amount of BNB\n path,\n address(this),\n block.timestamp\n );\n }\n\n function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {\n // approve token transfer to cover all possible scenarios\n _approve(address(this), address(_uniswapV2Router), tokenAmount);\n\n // add the liquidity\n _uniswapV2Router.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 _tokenTransfer(\n address sender,\n address recipient,\n uint256 amount,\n bool takeFee\n ) private {\n if (recipient == _uniswapV2Pair) {\n _taxFee = _sellRewardFee;\n _totalFeesToContract = _sellLiquidityFee\n .add(_sellMarketingFee)\n .add(_sellDevFee)\n .add(_sellBuyBackFee);\n } else {\n _taxFee = _buyRewardFee;\n _totalFeesToContract = _buyLiquidityFee\n .add(_buyMarketingFee)\n .add(_buyDevFee)\n .add(_buyBuyBackFee);\n }\n\n if (!takeFee) {\n _taxFee = 0;\n _totalFeesToContract = 0;\n }\n\n if (_isExcluded[sender] && !_isExcluded[recipient]) {\n _transferFromExcluded(sender, recipient, amount);\n } else if (!_isExcluded[sender] && _isExcluded[recipient]) {\n _transferToExcluded(sender, recipient, amount);\n } else if (!_isExcluded[sender] && !_isExcluded[recipient]) {\n _transferStandard(sender, recipient, amount);\n } else if (_isExcluded[sender] && _isExcluded[recipient]) {\n _transferBothExcluded(sender, recipient, amount);\n } else {\n _transferStandard(sender, recipient, amount);\n }\n\n if (takeFee) {\n _taxFee = 0;\n _totalFeesToContract = 0;\n }\n }\n\n function _transferStandard(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity\n ) = _getTValues(tAmount);\n uint256 currentRate = _getRate();\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(\n tAmount,\n tFee,\n tLiquidity,\n currentRate\n );\n _reflectFee(rFee, tFee);\n\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n\n takeTokenFees(tLiquidity, currentRate, sender);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferBothExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity\n ) = _getTValues(tAmount);\n uint256 currentRate = _getRate();\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(\n tAmount,\n tFee,\n tLiquidity,\n currentRate\n );\n\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n\n takeTokenFees(tLiquidity, currentRate, sender);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferToExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity\n ) = _getTValues(tAmount);\n uint256 currentRate = _getRate();\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(\n tAmount,\n tFee,\n tLiquidity,\n currentRate\n );\n\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n\n takeTokenFees(tLiquidity, currentRate, sender);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferFromExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity\n ) = _getTValues(tAmount);\n uint256 currentRate = _getRate();\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(\n tAmount,\n tFee,\n tLiquidity,\n currentRate\n );\n\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n\n takeTokenFees(tLiquidity, currentRate, sender);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\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"
},
"@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/Greeter.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\";\n\ncontract TDF is Context, IERC20, Ownable {\n using SafeMath for uint256;\n\n mapping(address => uint256) private _rOwned;\n mapping(address => uint256) private _tOwned;\n mapping(address => bool) private _isExcludedFromFee;\n mapping(address => bool) private _isExcluded;\n mapping(address => bool) private _isAuthorized;\n mapping(address => mapping(address => uint256)) private _allowances;\n mapping(address => bool) public _isExcludedFromAutoLiquidity;\n\n address[] private _excluded;\n address public _marketingWallet =\n 0x4cf016D410E66e1A5a3483aBaBe0ECfF408cC24D;\n address public _devWallet = 0x2B8c46c8C8e2ef5aD9a29C8BA1C664Dca609D39D;\n address public _buyBackWallet = 0x229b889EFA5e4d1112d0049F86D534A46602F27e;\n\n uint256 private constant MAX = ~uint256(0);\n uint256 private _tTotal = 100 * 10**9 * 10**9;\n uint256 private _rTotal = (MAX - (MAX % _tTotal));\n uint256 private _tFeeTotal;\n\n string private _name = \"The Dragon Fury\";\n string private _symbol = \"$TDF\";\n uint8 private _decimals = 9;\n\n uint256 public _sellRewardFee = 3;\n uint256 public _sellLiquidityFee = 2;\n uint256 public _sellMarketingFee = 5;\n uint256 public _sellDevFee = 5;\n uint256 public _sellBuyBackFee = 5;\n\n uint256 public _buyRewardFee = 3;\n uint256 public _buyLiquidityFee = 2;\n uint256 public _buyMarketingFee = 5;\n uint256 public _buyDevFee = 5;\n uint256 public _buyBuyBackFee = 5;\n\n uint256 public liquiditySwap = 2;\n uint256 public marketingSwap = 3;\n uint256 public devSwap = 1;\n uint256 public buyBackSwap = 2;\n uint256 public totalSwap = 8;\n\n uint256 private _totalFeesToContract = 0;\n uint256 private _taxFee = 0;\n\n uint256 public _swapTokensAt = 100 * 10**6 * 10**9;\n\n bool tradeEnable = false;\n // auto liquidity\n bool public _swapAndLiquifyEnabled = true;\n bool _inSwapAndLiquify;\n IUniswapV2Router02 public _uniswapV2Router;\n address public _uniswapV2Pair;\n event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);\n event SwapAndLiquifyEnabledUpdated(bool enabled);\n event SwapAndLiquify(\n uint256 tokensSwapped,\n uint256 bnbReceived,\n uint256 tokensIntoLiqudity\n );\n\n modifier lockTheSwap() {\n _inSwapAndLiquify = true;\n _;\n _inSwapAndLiquify = false;\n }\n\n constructor() {\n _rOwned[owner()] = _rTotal;\n\n // uniswap\n IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(\n 0x10ED43C718714eb63d5aA57B78B54704E256024E\n );\n _uniswapV2Router = uniswapV2Router;\n _uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory())\n .createPair(address(this), uniswapV2Router.WETH());\n\n address deployer = 0xd2bdc070d302D4420fE9a2C34ba268D48052247F;\n\n // exclude system contracts\n _isExcludedFromFee[deployer] = true;\n _isExcludedFromFee[address(this)] = true;\n\n // authorized to do transactions before add liquidity\n _isAuthorized[deployer] = true;\n\n _isExcludedFromAutoLiquidity[_uniswapV2Pair] = true;\n _isExcludedFromAutoLiquidity[address(_uniswapV2Router)] = true;\n\n emit Transfer(address(0), deployer, _tTotal);\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _tTotal;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n if (_isExcluded[account]) return _tOwned[account];\n return tokenFromReflection(_rOwned[account]);\n }\n\n function transfer(address recipient, uint256 amount)\n public\n override\n returns (bool)\n {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n function allowance(address owner, address spender)\n public\n view\n override\n returns (uint256)\n {\n return _allowances[owner][spender];\n }\n\n function approve(address spender, uint256 amount)\n public\n override\n returns (bool)\n {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"BEP20: transfer amount exceeds allowance\"\n )\n );\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue)\n public\n virtual\n returns (bool)\n {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].add(addedValue)\n );\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue)\n public\n virtual\n returns (bool)\n {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].sub(\n subtractedValue,\n \"BEP20: decreased allowance below zero\"\n )\n );\n return true;\n }\n\n function isExcludedFromReward(address account) public view returns (bool) {\n return _isExcluded[account];\n }\n\n function totalFees() public view returns (uint256) {\n return _tFeeTotal;\n }\n\n function deliver(uint256 tAmount) public {\n address sender = _msgSender();\n require(\n !_isExcluded[sender],\n \"Excluded addresses cannot call this function\"\n );\n\n (, uint256 tFee, uint256 tLiquidity) = _getTValues(tAmount);\n uint256 currentRate = _getRate();\n (uint256 rAmount, , ) = _getRValues(\n tAmount,\n tFee,\n tLiquidity,\n currentRate\n );\n\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rTotal = _rTotal.sub(rAmount);\n _tFeeTotal = _tFeeTotal.add(tAmount);\n }\n\n function reflectionFromToken(uint256 tAmount, bool deductTransferFee)\n public\n view\n returns (uint256)\n {\n require(tAmount <= _tTotal, \"Amount must be less than supply\");\n (, uint256 tFee, uint256 tLiquidity) = _getTValues(tAmount);\n uint256 currentRate = _getRate();\n\n if (!deductTransferFee) {\n (uint256 rAmount, , ) = _getRValues(\n tAmount,\n tFee,\n tLiquidity,\n currentRate\n );\n return rAmount;\n } else {\n (, uint256 rTransferAmount, ) = _getRValues(\n tAmount,\n tFee,\n tLiquidity,\n currentRate\n );\n return rTransferAmount;\n }\n }\n\n function tokenFromReflection(uint256 rAmount)\n public\n view\n returns (uint256)\n {\n require(\n rAmount <= _rTotal,\n \"Amount must be less than total reflections\"\n );\n\n uint256 currentRate = _getRate();\n return rAmount.div(currentRate);\n }\n\n function excludeFromReward(address account) public onlyOwner {\n require(!_isExcluded[account], \"Account is already excluded\");\n\n if (_rOwned[account] > 0) {\n _tOwned[account] = tokenFromReflection(_rOwned[account]);\n }\n _isExcluded[account] = true;\n _excluded.push(account);\n }\n\n function includeInReward(address account) external onlyOwner {\n require(_isExcluded[account], \"Account is already excluded\");\n\n for (uint256 i = 0; i < _excluded.length; i ) {\n if (_excluded[i] == account) {\n _excluded[i] = _excluded[_excluded.length - 1];\n _tOwned[account] = 0;\n _isExcluded[account] = false;\n _excluded.pop();\n break;\n }\n }\n }\n\n function setMarketingWallet(address marketingWallet) external onlyOwner {\n _marketingWallet = marketingWallet;\n }\n\n function setDevWallet(address newWallet) external onlyOwner {\n _devWallet = newWallet;\n }\n\n function setBuyBackWallet(address newWallet) external onlyOwner {\n _buyBackWallet = newWallet;\n }\n\n function changeSwapAmount(uint256 amount) external onlyOwner {\n _swapTokensAt = amount * 10**9;\n }\n\n function setExcludedFromFee(address account, bool e) external onlyOwner {\n _isExcludedFromFee[account] = e;\n }\n\n function tradingEnable() external onlyOwner {\n tradeEnable = true;\n }\n\n // update fees\n function updateBuyFees(\n uint256 rewardFee,\n uint256 liquidityFee,\n uint256 marketingFee,\n uint256 devFee,\n uint256 buyBackFee\n ) external onlyOwner {\n _buyRewardFee = rewardFee;\n _buyLiquidityFee = liquidityFee;\n _buyMarketingFee = marketingFee;\n _buyDevFee = devFee;\n _buyBuyBackFee = buyBackFee;\n }\n\n function updateSellFees(\n uint256 rewardFee,\n uint256 liquidityFee,\n uint256 marketingFee,\n uint256 dev,\n uint256 buyBackFee\n ) external onlyOwner {\n _sellRewardFee = rewardFee;\n _sellLiquidityFee = liquidityFee;\n _sellMarketingFee = marketingFee;\n _sellDevFee = dev;\n _sellBuyBackFee = buyBackFee;\n }\n\n function updateSwapPercentages(\n uint256 liquidity,\n uint256 marketing,\n uint256 dev,\n uint256 buyBack\n ) external onlyOwner {\n liquiditySwap = liquidity;\n marketingSwap = marketing;\n devSwap = dev;\n buyBackSwap = buyBack;\n\n totalSwap = liquidity.add(marketing).add(dev).add(buyBack);\n }\n\n function setSwapAndLiquifyEnabled(bool e) public onlyOwner {\n _swapAndLiquifyEnabled = e;\n emit SwapAndLiquifyEnabledUpdated(e);\n }\n\n receive() external payable {}\n\n function setUniswapRouter(address r) external onlyOwner {\n IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(r);\n _uniswapV2Router = uniswapV2Router;\n }\n\n function setUniswapPair(address p) external onlyOwner {\n _uniswapV2Pair = p;\n }\n\n function setAuthorizedWallets(address wallet, bool status)\n external\n onlyOwner\n {\n _isAuthorized[wallet] = status;\n }\n\n function setExcludedFromAutoLiquidity(address a, bool b)\n external\n onlyOwner\n {\n _isExcludedFromAutoLiquidity[a] = b;\n }\n\n function _reflectFee(uint256 rFee, uint256 tFee) private {\n _rTotal = _rTotal.sub(rFee);\n _tFeeTotal = _tFeeTotal.add(tFee);\n }\n\n function _getTValues(uint256 tAmount)\n private\n view\n returns (\n uint256,\n uint256,\n uint256\n )\n {\n uint256 tFee = calculateFee(tAmount, _taxFee);\n uint256 tLiquidity = calculateFee(tAmount, _totalFeesToContract);\n uint256 tTransferAmount = tAmount.sub(tFee);\n tTransferAmount = tTransferAmount.sub(tLiquidity);\n return (tTransferAmount, tFee, tLiquidity);\n }\n\n function _getRValues(\n uint256 tAmount,\n uint256 tFee,\n uint256 tLiquidity,\n uint256 currentRate\n )\n private\n pure\n returns (\n uint256,\n uint256,\n uint256\n )\n {\n uint256 rAmount = tAmount.mul(currentRate);\n uint256 rFee = tFee.mul(currentRate);\n uint256 rLiquidity = tLiquidity.mul(currentRate);\n uint256 rTransferAmount = rAmount.sub(rFee);\n rTransferAmount = rTransferAmount.sub(rLiquidity);\n return (rAmount, rTransferAmount, rFee);\n }\n\n function _getRate() private view returns (uint256) {\n (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();\n return rSupply.div(tSupply);\n }\n\n function _getCurrentSupply() private view returns (uint256, uint256) {\n uint256 rSupply = _rTotal;\n uint256 tSupply = _tTotal;\n for (uint256 i = 0; i < _excluded.length; i ) {\n if (\n _rOwned[_excluded[i]] > rSupply ||\n _tOwned[_excluded[i]] > tSupply\n ) return (_rTotal, _tTotal);\n rSupply = rSupply.sub(_rOwned[_excluded[i]]);\n tSupply = tSupply.sub(_tOwned[_excluded[i]]);\n }\n if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);\n return (rSupply, tSupply);\n }\n\n function takeTokenFees(\n uint256 tokenAmount,\n uint256 currentRate,\n address from\n ) private {\n if (tokenAmount <= 0) {\n return;\n }\n // send tokens to contract\n takeTransactionFee(address(this), tokenAmount, currentRate);\n emit Transfer(from, address(this), tokenAmount);\n }\n\n function takeTransactionFee(\n address to,\n uint256 tAmount,\n uint256 currentRate\n ) private {\n if (tAmount <= 0) {\n return;\n }\n\n uint256 rAmount = tAmount.mul(currentRate);\n _rOwned[to] = _rOwned[to].add(rAmount);\n if (_isExcluded[to]) {\n _tOwned[to] = _tOwned[to].add(tAmount);\n }\n }\n\n function calculateFee(uint256 amount, uint256 fee)\n private\n pure\n returns (uint256)\n {\n return amount.mul(fee).div(100);\n }\n\n function isExcludedFromFee(address account) public view returns (bool) {\n return _isExcludedFromFee[account];\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) private {\n require(owner != address(0), \"BEP20: approve from the zero address\");\n require(spender != address(0), \"BEP20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) private {\n require(from != address(0), \"BEP20: transfer from the zero address\");\n require(to != address(0), \"BEP20: transfer to the zero address\");\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n if ((to == _uniswapV2Pair || from == _uniswapV2Pair) && !tradeEnable) {\n require(\n (_isAuthorized[to] || _isAuthorized[from]),\n \"Trading not enabled yet.\"\n );\n }\n\n /*\n - swapAndLiquify will be initiated when token balance of this contract\n has accumulated enough over the minimum number of tokens required.\n - don't get caught in a circular liquidity event.\n - don't swapAndLiquify if sender is uniswap pair.\n */\n uint256 contractTokenBalance = balanceOf(address(this));\n\n bool isOverMinTokenBalance = contractTokenBalance >= _swapTokensAt;\n if (\n isOverMinTokenBalance &&\n !_inSwapAndLiquify &&\n !_isExcludedFromAutoLiquidity[from] &&\n _swapAndLiquifyEnabled\n ) {\n // contractTokenBalance = _swapTokensAt;\n swapAndSendBnb(contractTokenBalance);\n }\n\n bool takeFee = true;\n if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {\n takeFee = false;\n }\n\n _tokenTransfer(from, to, amount, takeFee);\n }\n\n function swapAndSendBnb(uint256 contractTokenBalance) private lockTheSwap {\n uint256 tokensToAddLiquidity = contractTokenBalance\n .mul(liquiditySwap)\n .div(totalSwap);\n uint256 tokensToSwap = contractTokenBalance.sub(tokensToAddLiquidity);\n // swap tokens in to bnb\n swapTokensForBnb(tokensToSwap);\n\n uint256 swappedBnbFee = totalSwap.sub(liquiditySwap);\n\n uint256 swappedBnb = address(this).balance;\n\n uint256 bnbForMarketing = swappedBnb.mul(marketingSwap).div(\n swappedBnbFee\n );\n\n uint256 bnbForDev = swappedBnb.mul(devSwap).div(swappedBnbFee);\n\n uint256 bnbForBuyBack = swappedBnb.mul(buyBackSwap).div(swappedBnbFee);\n\n // send bnb to marketing wallet\n payable(_marketingWallet).transfer(bnbForMarketing);\n payable(_devWallet).transfer(bnbForDev);\n payable(_buyBackWallet).transfer(bnbForBuyBack);\n\n // add liquidity\n swapAndLiquify(tokensToAddLiquidity);\n }\n\n function swapAndLiquify(uint256 contractTokenBalance) private {\n // split contract balance into halves\n uint256 half = contractTokenBalance.div(2);\n uint256 otherHalf = contractTokenBalance.sub(half);\n\n /*\n capture the contract's current BNB balance.\n this is so that we can capture exactly the amount of BNB that\n the swap creates, and not make the liquidity event include any BNB\n that has been manually sent to the contract.\n */\n uint256 initialBalance = address(this).balance;\n\n // swap tokens for BNB\n swapTokensForBnb(half);\n\n // this is the amount of BNB that we just swapped into\n uint256 newBalance = address(this).balance.sub(initialBalance);\n\n // add liquidity to uniswap\n addLiquidity(otherHalf, newBalance);\n\n emit SwapAndLiquify(half, newBalance, otherHalf);\n }\n\n function swapTokensForBnb(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] = _uniswapV2Router.WETH();\n\n _approve(address(this), address(_uniswapV2Router), tokenAmount);\n\n // make the swap\n _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0, // accept any amount of BNB\n path,\n address(this),\n block.timestamp\n );\n }\n\n function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {\n // approve token transfer to cover all possible scenarios\n _approve(address(this), address(_uniswapV2Router), tokenAmount);\n\n // add the liquidity\n _uniswapV2Router.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 _tokenTransfer(\n address sender,\n address recipient,\n uint256 amount,\n bool takeFee\n ) private {\n if (recipient == _uniswapV2Pair) {\n _taxFee = _sellRewardFee;\n _totalFeesToContract = _sellLiquidityFee\n .add(_sellMarketingFee)\n .add(_sellDevFee)\n .add(_sellBuyBackFee);\n } else {\n _taxFee = _buyRewardFee;\n _totalFeesToContract = _buyLiquidityFee\n .add(_buyMarketingFee)\n .add(_buyDevFee)\n .add(_buyBuyBackFee);\n }\n\n if (!takeFee) {\n _taxFee = 0;\n _totalFeesToContract = 0;\n }\n\n if (_isExcluded[sender] && !_isExcluded[recipient]) {\n _transferFromExcluded(sender, recipient, amount);\n } else if (!_isExcluded[sender] && _isExcluded[recipient]) {\n _transferToExcluded(sender, recipient, amount);\n } else if (!_isExcluded[sender] && !_isExcluded[recipient]) {\n _transferStandard(sender, recipient, amount);\n } else if (_isExcluded[sender] && _isExcluded[recipient]) {\n _transferBothExcluded(sender, recipient, amount);\n } else {\n _transferStandard(sender, recipient, amount);\n }\n\n if (takeFee) {\n _taxFee = 0;\n _totalFeesToContract = 0;\n }\n }\n\n function _transferStandard(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity\n ) = _getTValues(tAmount);\n uint256 currentRate = _getRate();\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(\n tAmount,\n tFee,\n tLiquidity,\n currentRate\n );\n _reflectFee(rFee, tFee);\n\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n\n takeTokenFees(tLiquidity, currentRate, sender);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferBothExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity\n ) = _getTValues(tAmount);\n uint256 currentRate = _getRate();\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(\n tAmount,\n tFee,\n tLiquidity,\n currentRate\n );\n\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n\n takeTokenFees(tLiquidity, currentRate, sender);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferToExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity\n ) = _getTValues(tAmount);\n uint256 currentRate = _getRate();\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(\n tAmount,\n tFee,\n tLiquidity,\n currentRate\n );\n\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n\n takeTokenFees(tLiquidity, currentRate, sender);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferFromExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity\n ) = _getTValues(tAmount);\n uint256 currentRate = _getRate();\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(\n tAmount,\n tFee,\n tLiquidity,\n currentRate\n );\n\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n\n takeTokenFees(tLiquidity, currentRate, sender);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\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"
},
"@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": {}
}
}}