Token 10X: Africa's First Cryptocurrency Hub
Scarce Protocol Token
The first truly mintless yield farm on the binance smart chain.
Instead of creating new tokens to reward trusty stakers, SRC tokens are collected on each sale of the token. This way the normal inflation a yield farm always tried to combat is simply not possible in the Scarce Protocol!
About Scarce Protocol
The first truly mintless yield farm on the binance smart chain.
Instead of creating new tokens to reward trusty stakers, SRC tokens are collected on each sale of the token. This way the normal inflation a yield farm always tried to combat is simply not possible in the Scarce Protocol!
Additionally, Instead of using fees to buy back and burn the native tokens the fees are used to buy back and resupply the farm with fresh tokens to distribute. Burns are executed on every sell transaction which makes the circulating supply continuously shrink, hence the name SCARCE!
0% Buy fee! 0% Transfer fee! Only 15% sell fee.
Instead of creating new tokens to reward trusty stakers, SRC tokens are collected on each sale of the token. This way the normal inflation a yield farm always tried to combat is simply not possible in the Scarce Protocol!
Additionally, Instead of using fees to buy back and burn the native tokens the fees are used to buy back and resupply the farm with fresh tokens to distribute. Burns are executed on every sell transaction which makes the circulating supply continuously shrink, hence the name SCARCE!
0% Buy fee! 0% Transfer fee! Only 15% sell fee.
69 total visits
Token information and links
Circulating Supply
50000000000000000000000
Token Contract (BSC Chain)
0XF43EDDAA306191088358AA45CF20DD4F9ED9BD69
Contract license: MIT
Launch Date
09/01/2022
KYC Information
No
Audit Information
None
Team Information
Team leader: None
Team leader contact: None
Contract source code
{"Context.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity \u003e=0.6.0 \u003c0.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 GSN 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 payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}"},"IBEP20.sol":{"content":"// SPDX-License-Identifier: MIT\n\n/**\n *Submitted for verification at BscScan.com on 2020-09-02\n*/\n\npragma solidity \u003e=0.4.0 \u003c0.8.0;\n\ninterface IBEP20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the token decimals.\n */\n function decimals() external view returns (uint8);\n\n /**\n * @dev Returns the token symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the token name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the bep token owner.\n */\n function getOwner() external view returns (address);\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\u0027s account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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\u0027s 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\u0027s 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 `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller\u0027s\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) 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}"},"IPancakeFactory.sol":{"content":"// SPDX-License-Identifier: MIT\r\n\r\npragma solidity \u003e=0.5.16;\r\n\r\n\r\ninterface IPancakeFactory {\r\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\r\n\r\n function feeTo() external view returns (address);\r\n function feeToSetter() external view returns (address);\r\n\r\n function getPair(address tokenA, address tokenB) external view returns (address pair);\r\n function allPairs(uint) external view returns (address pair);\r\n function allPairsLength() external view returns (uint);\r\n\r\n function createPair(address tokenA, address tokenB) external returns (address pair);\r\n\r\n function setFeeTo(address) external;\r\n function setFeeToSetter(address) external;\r\n}"},"IPancakePair.sol":{"content":"// SPDX-License-Identifier: MIT\r\n\r\npragma solidity \u003e=0.5.0;\r\n\r\ninterface IPancakePair {\r\n event Approval(address indexed owner, address indexed spender, uint value);\r\n event Transfer(address indexed from, address indexed to, uint value);\r\n\r\n function name() external pure returns (string memory);\r\n function symbol() external pure returns (string memory);\r\n function decimals() external pure returns (uint8);\r\n function totalSupply() external view returns (uint);\r\n function balanceOf(address owner) external view returns (uint);\r\n function allowance(address owner, address spender) external view returns (uint);\r\n\r\n function approve(address spender, uint value) external returns (bool);\r\n function transfer(address to, uint value) external returns (bool);\r\n function transferFrom(address from, address to, uint value) external returns (bool);\r\n\r\n function DOMAIN_SEPARATOR() external view returns (bytes32);\r\n function PERMIT_TYPEHASH() external pure returns (bytes32);\r\n function nonces(address owner) external view returns (uint);\r\n\r\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\r\n\r\n event Mint(address indexed sender, uint amount0, uint amount1);\r\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\r\n event Swap(\r\n address indexed sender,\r\n uint amount0In,\r\n uint amount1In,\r\n uint amount0Out,\r\n uint amount1Out,\r\n address indexed to\r\n );\r\n event Sync(uint112 reserve0, uint112 reserve1);\r\n\r\n function MINIMUM_LIQUIDITY() external pure returns (uint);\r\n function factory() external view returns (address);\r\n function token0() external view returns (address);\r\n function token1() external view returns (address);\r\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\r\n function price0CumulativeLast() external view returns (uint);\r\n function price1CumulativeLast() external view returns (uint);\r\n function kLast() external view returns (uint);\r\n\r\n function mint(address to) external returns (uint liquidity);\r\n function burn(address to) external returns (uint amount0, uint amount1);\r\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\r\n function skim(address to) external;\r\n function sync() external;\r\n\r\n function initialize(address, address) external;\r\n}"},"IPancakeRouter.sol":{"content":"// SPDX-License-Identifier: MIT\r\n\r\npragma solidity \u003e=0.6.2;\r\n\r\ninterface IPancakeRouter01 {\r\n function factory() external pure returns (address);\r\n function WETH() external pure returns (address);\r\n\r\n function addLiquidity(\r\n address tokenA,\r\n address tokenB,\r\n uint amountADesired,\r\n uint amountBDesired,\r\n uint amountAMin,\r\n uint amountBMin,\r\n address to,\r\n uint deadline\r\n ) external returns (uint amountA, uint amountB, uint liquidity);\r\n function addLiquidityETH(\r\n address token,\r\n uint amountTokenDesired,\r\n uint amountTokenMin,\r\n uint amountETHMin,\r\n address to,\r\n uint deadline\r\n ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\r\n function removeLiquidity(\r\n address tokenA,\r\n address tokenB,\r\n uint liquidity,\r\n uint amountAMin,\r\n uint amountBMin,\r\n address to,\r\n uint deadline\r\n ) external returns (uint amountA, uint amountB);\r\n function removeLiquidityETH(\r\n address token,\r\n uint liquidity,\r\n uint amountTokenMin,\r\n uint amountETHMin,\r\n address to,\r\n uint deadline\r\n ) external returns (uint amountToken, uint amountETH);\r\n function removeLiquidityWithPermit(\r\n address tokenA,\r\n address tokenB,\r\n uint liquidity,\r\n uint amountAMin,\r\n uint amountBMin,\r\n address to,\r\n uint deadline,\r\n bool approveMax, uint8 v, bytes32 r, bytes32 s\r\n ) external returns (uint amountA, uint amountB);\r\n function removeLiquidityETHWithPermit(\r\n address token,\r\n uint liquidity,\r\n uint amountTokenMin,\r\n uint amountETHMin,\r\n address to,\r\n uint deadline,\r\n bool approveMax, uint8 v, bytes32 r, bytes32 s\r\n ) external returns (uint amountToken, uint amountETH);\r\n function swapExactTokensForTokens(\r\n uint amountIn,\r\n uint amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint deadline\r\n ) external returns (uint[] memory amounts);\r\n function swapTokensForExactTokens(\r\n uint amountOut,\r\n uint amountInMax,\r\n address[] calldata path,\r\n address to,\r\n uint deadline\r\n ) external returns (uint[] memory amounts);\r\n function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)\r\n external\r\n payable\r\n returns (uint[] memory amounts);\r\n function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)\r\n external\r\n returns (uint[] memory amounts);\r\n function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)\r\n external\r\n returns (uint[] memory amounts);\r\n function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)\r\n external\r\n payable\r\n returns (uint[] memory amounts);\r\n\r\n function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\r\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\r\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\r\n function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\r\n function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\r\n}\r\n\r\n// File: contracts\\interfaces\\IPancakeRouter02.sol\r\n\r\npragma solidity \u003e=0.6.2;\r\n\r\ninterface IPancakeRouter02 is IPancakeRouter01 {\r\n function removeLiquidityETHSupportingFeeOnTransferTokens(\r\n address token,\r\n uint liquidity,\r\n uint amountTokenMin,\r\n uint amountETHMin,\r\n address to,\r\n uint deadline\r\n ) external returns (uint amountETH);\r\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\r\n address token,\r\n uint liquidity,\r\n uint amountTokenMin,\r\n uint amountETHMin,\r\n address to,\r\n uint deadline,\r\n bool approveMax, uint8 v, bytes32 r, bytes32 s\r\n ) external returns (uint amountETH);\r\n\r\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\r\n uint amountIn,\r\n uint amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint deadline\r\n ) external;\r\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\r\n uint amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint deadline\r\n ) external payable;\r\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\r\n uint amountIn,\r\n uint amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint deadline\r\n ) external;\r\n}"},"Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity \u003e=0.6.0 \u003c0.8.0;\n\nimport \"./Context.sol\";\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 () internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), 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 emit OwnershipTransferred(_owner, address(0));\n _owner = 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 emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n"},"SafeMath.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity \u003e=0.6.0 \u003c0.8.0;\n\n/**\n * @dev Wrappers over Solidity\u0027s arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it\u0027s recommended to use it always.\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 uint256 c = a b;\n if (c \u003c a) return (false, 0);\n return (true, c);\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 if (b \u003e a) return (false, 0);\n return (true, a - b);\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 // Gas optimization: this is cheaper than requiring \u0027a\u0027 not being zero, but the\n // benefit is lost if \u0027b\u0027 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 * @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 if (b == 0) return (false, 0);\n return (true, a / b);\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 if (b == 0) return (false, 0);\n return (true, a % b);\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity\u0027s ` ` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a b;\n require(c \u003e= a, \"SafeMath: addition overflow\");\n return c;\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\u0027s `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b \u003c= a, \"SafeMath: subtraction overflow\");\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\u0027s `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) return 0;\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n return c;\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\u0027s `/` 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(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b \u003e 0, \"SafeMath: division by zero\");\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\u0027s `%` 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 require(b \u003e 0, \"SafeMath: modulo by zero\");\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\u0027s `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b \u003c= a, errorMessage);\n return a - b;\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryDiv}.\n *\n * Counterpart to Solidity\u0027s `/` 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(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b \u003e 0, errorMessage);\n return a / b;\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\u0027s `%` 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, string memory errorMessage) internal pure returns (uint256) {\n require(b \u003e 0, errorMessage);\n return a % b;\n }\n}"},"ScarceToken.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.6.12;\n\nimport \"./Context.sol\";\nimport \"./IBEP20.sol\";\nimport \"./Ownable.sol\";\nimport \"./SafeMath.sol\";\nimport \"./IPancakeFactory.sol\";\nimport \"./IPancakePair.sol\";\nimport \"./IPancakeRouter.sol\";\n\n// SRC Token with Governance.\ncontract ScarceToken is Context, IBEP20, Ownable {\n using SafeMath for uint256;\n mapping (address =\u003e uint256) private _tOwned; //balances\n mapping (address =\u003e bool) private _isExcludedFromFee;\n mapping (address =\u003e mapping (address =\u003e uint256)) private _allowances;\n mapping (address =\u003e bool) public _isExcludedFromAutoLiquidity;\n\n address public constant _burnAddress = 0x000000000000000000000000000000000000dEaD;\n \n address public _feeAddress;\n address public _tokenDistContract;\n\n uint256 private _tTotal = 50000*10**18;\n uint256 private _tFeeTotal;\n\n string private constant _name = \"Scarce Protocol\";\n string private constant _symbol = \"SRC\";\n uint8 private constant _decimals = 18;\n\n // transfer fee\n uint256 public _taxFee = 0; // tax fee is reflections\n uint256 public _liquidityFee = 0; // ZERO tax for transfering tokens\n uint256 public _burnFee = 0;\n\n // buy fee\n uint256 public _taxFeeBuy = 0;\n uint256 public _liquidityFeeBuy = 0;\n uint256 public _burnFeeBuy = 0;\n\n // sell fee\n uint256 public _taxFeeSell = 10;\n uint256 public _liquidityFeeSell = 4;\n uint256 public _burnFeeSell = 1;\n\n uint256 public _minTokenBalance = _tTotal.div(200);\n \n // auto liquidity\n IPancakeRouter02 public PancakeRouter;\n address public PancakePair;\n address public PancakePairBusd;\n bool inSwapAndLiquify;\n bool public swapAndLiquifyEnabled = true;\n event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);\n event SwapAndLiquifyEnabledUpdated(bool enabled);\n event SwapAndLiquify(\n uint256 tokensSwapped,\n uint256 bnbReceived,\n uint256 tokensIntoLiquidity\n );\n \n modifier lockTheSwap {\n inSwapAndLiquify = true;\n _;\n inSwapAndLiquify = false;\n }\n\n // Tracker for one time setting of Pancakerouter if things go wrong during deployment.\n bool public RouterInit;\n // Tracker for one time setting of Pancakepairs.\n bool public PairsInit;\n\n constructor (\n address feeAddress,\n address tokenDistContract\n ) public {\n _tOwned[_msgSender()] = _tTotal;\n _feeAddress = feeAddress;\n _tokenDistContract = tokenDistContract;\n \n // pancakeswap\n IPancakeRouter02 _PancakeRouter = IPancakeRouter02(0x10ED43C718714eb63d5aA57B78B54704E256024E);\n PancakePair = IPancakeFactory(_PancakeRouter.factory()).createPair(address(this), _PancakeRouter.WETH());\n PancakeRouter = _PancakeRouter;\n \n // exclude system contracts\n _isExcludedFromFee[owner()] = true;\n _isExcludedFromFee[address(this)] = true;\n _isExcludedFromFee[_tokenDistContract] = true;\n\n _isExcludedFromAutoLiquidity[PancakePair] = true;\n _isExcludedFromAutoLiquidity[PancakePairBusd] = true;\n _isExcludedFromAutoLiquidity[address(PancakeRouter)] = true;\n _isExcludedFromAutoLiquidity[_tokenDistContract] = true;\n\n emit Transfer(address(0), _msgSender(), _tTotal);\n }\n\n function getOwner() external override view returns (address) {\n return owner();\n }\n\n function name() public view override returns (string memory) {\n return _name;\n }\n\n function symbol() public view override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n // to reflect burned amount in total supply\n // return _tTotal - balanceOf(_burnAddress);\n\n return _tTotal;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _tOwned[account];\n }\n\n function transfer(address recipient, uint256 amount) public override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n function allowance(address owner, address spender) public view override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount, \u0027BEP20: transfer amount exceeds allowance\u0027));\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \u0027BEP20: decreased allowance below zero\u0027));\n return true;\n }\n\n function totalFees() public view returns (uint256) {\n return _tFeeTotal;\n }\n\n function setExcludedFromFee(address account, bool e) external onlyOwner {\n _isExcludedFromFee[account] = e;\n }\n\n function setMinTokenBalance(uint256 minTokenBalance) external onlyOwner {\n _minTokenBalance = minTokenBalance;\n }\n\n function setFeesTransfer(uint taxFee, uint liquidityFee, uint burnFee) external onlyOwner {\n require(taxFee \u003c= 15, \"invalid deposit tax fee basis points\");\n require(liquidityFee \u003c= 10, \"invalid deposit liquidity fee basis points\");\n require(burnFee \u003c= 5, \"invalid deposit burn fee basis points\");\n _taxFee = taxFee;\n _liquidityFee = liquidityFee;\n _burnFee = burnFee;\n \n }\n\n function setFeesBuy(uint taxFee, uint liquidityFee, uint burnFee) external onlyOwner {\n require(taxFee \u003c= 15, \"invalid deposit tax fee basis points\");\n require(liquidityFee \u003c= 10, \"invalid deposit liquidity fee basis points\");\n require(burnFee \u003c= 5, \"invalid deposit burn fee basis points\");\n _taxFeeBuy = taxFee;\n _liquidityFeeBuy = liquidityFee;\n _burnFeeBuy = burnFee;\n }\n\n function setFeesSell(uint taxFee, uint liquidityFee, uint burnFee) external onlyOwner {\n require(taxFee \u003c= 15, \"invalid deposit tax fee basis points\");\n require(liquidityFee \u003c= 10, \"invalid deposit liquidity fee basis points\");\n require(burnFee \u003c= 5, \"invalid deposit burn fee basis points\");\n _taxFeeSell = taxFee;\n _liquidityFeeSell = liquidityFee;\n _burnFeeSell = burnFee;\n }\n\n function setAddresses(address feeAddress, address tokenDistContract) external onlyOwner {\n _feeAddress = feeAddress;\n _tokenDistContract = tokenDistContract;\n }\n\n function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {\n swapAndLiquifyEnabled = _enabled;\n emit SwapAndLiquifyEnabledUpdated(_enabled);\n }\n \n receive() external payable {}\n\n function setPancakeRouter(address r) external onlyOwner {\n require (RouterInit == false,\"Already initialized!\");\n IPancakeRouter02 _PancakeRouter = IPancakeRouter02(r);\n PancakeRouter = _PancakeRouter;\n RouterInit = true;\n }\n\n function setPancakePairs(address p, address pbusd) external onlyOwner {\n require (PairsInit == false,\"Already initialized!\");\n PancakePair = p;\n PancakePairBusd = pbusd;\n PairsInit = true;\n }\n\n function setExcludedFromAutoLiquidity(address a, bool b) external onlyOwner {\n _isExcludedFromAutoLiquidity[a] = b;\n }\n \n function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) {\n uint256 tFee = calculateFee(tAmount, _taxFee);\n uint256 tLiquidity = calculateFee(tAmount, _liquidityFee);\n uint256 tBurn = calculateFee(tAmount, _burnFee);\n uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity).sub(tBurn);\n return (tTransferAmount, tFee, tLiquidity, tBurn);\n }\n \n function takeTransactionFee(address sender, address to, uint256 tAmount) private {\n if (tAmount == 0) { return; }\n\n _tOwned[to] = _tOwned[to].add(tAmount);\n\n emit Transfer(sender, to, tAmount);\n }\n \n function calculateFee(uint256 amount, uint256 fee) private pure returns (uint256) {\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(address owner, address spender, uint256 amount) 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 \u003e 0, \"Transfer amount must be greater than zero\");\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\u0027t get caught in a circular liquidity event.\n - don\u0027t swapAndLiquify if sender is Pancake pair.\n */\n uint256 contractTokenBalance = balanceOf(address(this));\n \n bool isOverMinTokenBalance = contractTokenBalance \u003e= _minTokenBalance;\n if (\n isOverMinTokenBalance \u0026\u0026\n !inSwapAndLiquify \u0026\u0026\n !_isExcludedFromAutoLiquidity[from] \u0026\u0026\n swapAndLiquifyEnabled\n ) {\n contractTokenBalance = _minTokenBalance;\n swapAndLiquify(contractTokenBalance);\n }\n\n \n bool takeFee = true;\n if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {\n takeFee = false;\n }\n _tokenTransfer(from, to, amount, takeFee);\n }\n\n function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {\n // split contract balance into halves\n uint256 half = contractTokenBalance.div(2);\n uint256 otherHalf = contractTokenBalance.sub(half);\n\n uint256 initialBalance = address(this).balance;\n\n swapTokensForBnb(half);\n\n uint256 bnbForLiquidity = address(this).balance.sub(initialBalance);\n \n (uint256 tokenAdded, uint256 bnbAdded) = addLiquidity(otherHalf, bnbForLiquidity);\n \n emit SwapAndLiquify(half, bnbAdded, tokenAdded);\n }\n\n function swapTokensForBnb(uint256 tokenAmount) private {\n // generate the Pancake pair path of token -\u003e weth\n address[] memory path = new address[](2);\n path[0] = address(this);\n path[1] = PancakeRouter.WETH();\n\n _approve(address(this), address(PancakeRouter), tokenAmount);\n\n // make the swap\n PancakeRouter.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 returns (uint256, uint256) {\n // approve token transfer to cover all possible scenarios\n _approve(address(this), address(PancakeRouter), tokenAmount);\n\n // add the liquidity\n (uint amountToken, uint amountETH, ) = PancakeRouter.addLiquidityETH{value: bnbAmount}(\n address(this),\n tokenAmount,\n 0, // slippage is unavoidable\n 0, // slippage is unavoidable\n _feeAddress,\n block.timestamp\n );\n return (uint256(amountToken), uint256(amountETH));\n }\n\n function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private {\n uint256 previousTaxFee = _taxFee;\n uint256 previousLiquidityFee = _liquidityFee;\n uint256 previousBurnFee = _burnFee;\n \n bool isBuy = (sender == PancakePair || sender == PancakePairBusd) \u0026\u0026 recipient != address(PancakeRouter);\n bool isSell = recipient == PancakePair || recipient == PancakePairBusd;\n \n if (!takeFee) {\n _taxFee = 0;\n _liquidityFee = 0;\n _burnFee = 0;\n\n } else if (isBuy) { \n _taxFee = _taxFeeBuy;\n _liquidityFee = _liquidityFeeBuy;\n _burnFee = _burnFeeBuy;\n\n } else if (isSell) { \n _taxFee = _taxFeeSell;\n _liquidityFee = _liquidityFeeSell;\n _burnFee = _burnFeeSell;\n }\n \n _transferStandard(sender, recipient, amount);\n \n if (!takeFee || isBuy || isSell) {\n _taxFee = previousTaxFee;\n _liquidityFee = previousLiquidityFee;\n _burnFee = previousBurnFee;\n }\n }\n\n function _transferStandard(address sender, address recipient, uint256 tAmount) private {\n (uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tBurn) = _getTValues(tAmount);\n\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\n\n takeTransactionFee(sender, _tokenDistContract, tFee);\n takeTransactionFee(sender, address(this), tLiquidity);\n takeTransactionFee(sender, _burnAddress, tBurn);\n _tFeeTotal = _tFeeTotal.add(tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n } \n}"}}