Token 10X: Africa's First Cryptocurrency Hub
Sevenloop Token
The Highest Sustainable Auto-stake/compound protocol in Defi
SELO rewards holders with a sustainable Fixed APY of 1,000,000.00% compounding EVERY 7 MINUTES. (This is theoretical limit in BSC) For example: An investment of $1000 SELO gives $10,001,000.00 SELO in just 12 months.
The SevenLoop Au...
About Sevenloop
The Highest Sustainable Auto-stake/compound protocol in Defi
SELO rewards holders with a sustainable Fixed APY of 1,000,000.00% compounding EVERY 7 MINUTES. (This is theoretical limit in BSC) For example: An investment of $1000 SELO gives $10,001,000.00 SELO in just 12 months.
The SevenLoop Auto-Stake feature is a simple yet cutting-edge function called Hold2Earn, that provides the ultimate ease of use for $SELO holders.
Hold2Earn - By simply buying and holding $SELO token in your wallet, you earn rebase rewards as interest payments directly into your wallet. Your tokens will increase every 07 minutes.
SELO rewards holders with a sustainable Fixed APY of 1,000,000.00% compounding EVERY 7 MINUTES. (This is theoretical limit in BSC) For example: An investment of $1000 SELO gives $10,001,000.00 SELO in just 12 months.
The SevenLoop Auto-Stake feature is a simple yet cutting-edge function called Hold2Earn, that provides the ultimate ease of use for $SELO holders.
Hold2Earn - By simply buying and holding $SELO token in your wallet, you earn rebase rewards as interest payments directly into your wallet. Your tokens will increase every 07 minutes.
107 total visits
Token information and links
Circulating Supply
33000000000
Token Contract (BSC Chain)
0X24B5850FF36A03B5D8EBF069B64DE1D264273A31
Contract license: Unlicense
Launch Date
In 8 Days
KYC Information
No
Audit Information
None
Team Information
Team leader: None
Team leader contact: None
Contract source code
{{
"language": "Solidity",
"sources": {
"contracts/ERC20Detailed.sol": {
"content": "pragma solidity ^0.7.4;\n\nimport \"./IERC20.sol\";\n\nabstract contract ERC20Detailed is IERC20 {\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) {\n _name = name_;\n _symbol = symbol_;\n _decimals = decimals_;\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"
},
"contracts/IERC20.sol": {
"content": "pragma solidity ^0.7.4;\n\ninterface IERC20 {\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address who) external view returns (uint256);\n\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n\n function transfer(address to, uint256 value) external returns (bool);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) external returns (bool);\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n}\n"
},
"contracts/SevenLoop.sol": {
"content": "pragma solidity ^0.7.4;\n\nimport \"./ERC20Detailed.sol\";\nimport \"./Ownable.sol\";\nimport \"./SafeMath.sol\";\nimport \"./SafeMathInt.sol\";\nimport \"./IPancakeSwapPair.sol\";\nimport \"./IPancakeSwapRouter.sol\";\nimport \"./IPancakeSwapFactory.sol\";\n\ncontract SevenLoop is ERC20Detailed, Ownable {\n using SafeMath for uint256;\n using SafeMathInt for int256;\n\n event LogRebase(uint256 indexed epoch, uint256 totalSupply);\n\n string public _name = \"SevenLoop\";\n string public _symbol = \"SELO\";\n uint8 public _decimals = 5;\n\n IPancakeSwapPair public pairContract;\n mapping(address => bool) _isFeeExempt;\n mapping(address => bool) public _operators;\n\n modifier validRecipient(address to) {\n require(to != address(0x0));\n _;\n }\n\n modifier onlyOperator() {\n require(_operators[msg.sender], \"Forbidden\");\n _;\n }\n\n uint256 public constant DECIMALS = 5;\n uint256 public constant MAX_UINT256 = ~uint256(0);\n uint8 public constant RATE_DECIMALS = 7;\n\n uint256 private constant INITIAL_FRAGMENTS_SUPPLY =\n 330 * 10**3 * 10**DECIMALS;\n\n uint256 public liquidityFee = 50;\n uint256 public treasuryFee = 20;\n uint256 public sevenLoopInsuranceFundFee = 50;\n uint256 public sellFee = 30;\n uint256 public darkHoleFee = 25;\n uint256 public lotteryFee = 5;\n uint256 public totalFee =\n liquidityFee\n .add(treasuryFee)\n .add(sevenLoopInsuranceFundFee)\n .add(darkHoleFee)\n .add(lotteryFee);\n uint256 public feeDenominator = 1000;\n\n address DEAD = 0x000000000000000000000000000000000000dEaD;\n address ZERO = 0x0000000000000000000000000000000000000000;\n\n address public autoLiquidityReceiver;\n address public treasuryReceiver;\n address public sevenLoopInsuranceFundReceiver;\n address public lotteryReceiver;\n address public darkHole;\n address public pairAddress;\n bool public swapEnabled = true;\n IPancakeSwapRouter public router;\n address public pair;\n bool inSwap = false;\n modifier swapping() {\n inSwap = true;\n _;\n inSwap = false;\n }\n\n uint256 private constant TOTAL_GONS =\n MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);\n\n uint256 private constant MAX_SUPPLY = 36571000000 * 10**DECIMALS;\n\n uint256 public _lastLotteryPayouts;\n bool public _autoRebase;\n bool public _autoAddLiquidity;\n uint256 public _initRebaseStartTime;\n uint256 public _lastRebasedTime;\n uint256 public _lastAddLiquidityTime;\n uint256 public _totalSupply;\n uint256 private _gonsPerFragment;\n\n mapping(address => uint256) private _gonBalances;\n mapping(address => mapping(address => uint256)) private _allowedFragments;\n mapping(address => bool) public blacklist;\n\n constructor()\n ERC20Detailed(\"SevenLoop\", \"SELO\", uint8(DECIMALS))\n Ownable()\n {\n router = IPancakeSwapRouter(0x10ED43C718714eb63d5aA57B78B54704E256024E);\n pair = IPancakeSwapFactory(router.factory()).createPair(\n router.WETH(),\n address(this)\n );\n\n autoLiquidityReceiver = 0xC1da947bE6928A5e0Cc156C13204C5EebC0748c6;\n treasuryReceiver = 0x95d9089428AC9BFD432F05b1c84a69b248350b99;\n sevenLoopInsuranceFundReceiver = 0x647B8E39275B3aEa564380cb6040Bbc69Cf21050;\n lotteryReceiver = 0xA7147ccfE5843441f69c5fC7B59394E9dC8b0D13;\n darkHole = 0xDCb9fE0eBd63c5171ac6221409047c555515A265;\n\n _allowedFragments[address(this)][address(router)] = uint256(-1);\n pairAddress = pair;\n pairContract = IPancakeSwapPair(pair);\n\n _totalSupply = INITIAL_FRAGMENTS_SUPPLY;\n _gonBalances[treasuryReceiver] = TOTAL_GONS;\n _gonsPerFragment = TOTAL_GONS.div(_totalSupply);\n _initRebaseStartTime = block.timestamp;\n _lastRebasedTime = block.timestamp;\n _autoRebase = false;\n _autoAddLiquidity = false;\n _isFeeExempt[treasuryReceiver] = true;\n _isFeeExempt[address(this)] = true;\n _operators[msg.sender] = true;\n\n _transferOwnership(treasuryReceiver);\n emit Transfer(address(0x0), treasuryReceiver, _totalSupply);\n }\n\n function forceRebase() external onlyOperator {\n if (shouldRebase()) {\n rebase();\n }\n }\n\n function rebase() internal {\n if (inSwap) return;\n uint256 rebaseRate;\n uint256 deltaTimeFromInit = block.timestamp - _initRebaseStartTime;\n uint256 deltaTime = block.timestamp - _lastRebasedTime;\n uint256 times = deltaTime.div(7 minutes);\n uint256 epoch = times.mul(7);\n\n if (deltaTimeFromInit < (365 days)) {\n rebaseRate = 1227;\n } else if (deltaTimeFromInit >= (7 * 365 days)) {\n rebaseRate = 1;\n } else if (deltaTimeFromInit >= ((15 * 365 days) / 10)) {\n rebaseRate = 24;\n } else if (deltaTimeFromInit >= (365 days)) {\n rebaseRate = 146;\n }\n\n for (uint256 i = 0; i < times; i ) {\n _totalSupply = _totalSupply\n .mul((10**RATE_DECIMALS).add(rebaseRate))\n .div(10**RATE_DECIMALS);\n }\n\n _gonsPerFragment = TOTAL_GONS.div(_totalSupply);\n _lastRebasedTime = _lastRebasedTime.add(times.mul(7 minutes));\n\n pairContract.sync();\n\n emit LogRebase(epoch, _totalSupply);\n }\n\n function transfer(address to, uint256 value)\n external\n override\n validRecipient(to)\n returns (bool)\n {\n _transferFrom(msg.sender, to, value);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) external override validRecipient(to) returns (bool) {\n if (_allowedFragments[from][msg.sender] != uint256(-1)) {\n _allowedFragments[from][msg.sender] = _allowedFragments[from][\n msg.sender\n ].sub(value, \"Insufficient Allowance\");\n }\n _transferFrom(from, to, value);\n return true;\n }\n\n function _basicTransfer(\n address from,\n address to,\n uint256 amount\n ) internal returns (bool) {\n uint256 gonAmount = amount.mul(_gonsPerFragment);\n _gonBalances[from] = _gonBalances[from].sub(gonAmount);\n _gonBalances[to] = _gonBalances[to].add(gonAmount);\n return true;\n }\n\n function _transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) internal returns (bool) {\n require(!blacklist[sender] && !blacklist[recipient], \"in_blacklist\");\n\n if (inSwap) {\n return _basicTransfer(sender, recipient, amount);\n }\n\n if (shouldRebase()) {\n rebase();\n }\n\n if (shouldAddLiquidity()) {\n addLiquidity();\n }\n\n if (shouldSwapBack()) {\n swapBack();\n }\n\n uint256 gonAmount = amount.mul(_gonsPerFragment);\n _gonBalances[sender] = _gonBalances[sender].sub(gonAmount);\n uint256 gonAmountReceived = shouldTakeFee(sender, recipient)\n ? takeFee(sender, recipient, gonAmount)\n : gonAmount;\n _gonBalances[recipient] = _gonBalances[recipient].add(\n gonAmountReceived\n );\n\n emit Transfer(\n sender,\n recipient,\n gonAmountReceived.div(_gonsPerFragment)\n );\n return true;\n }\n\n function takeFee(\n address sender,\n address recipient,\n uint256 gonAmount\n ) internal returns (uint256) {\n uint256 _totalFee = totalFee;\n uint256 _treasuryFee = treasuryFee;\n\n if (recipient == pair) {\n _totalFee = totalFee.add(sellFee);\n _treasuryFee = treasuryFee.add(sellFee);\n }\n\n uint256 feeAmount = gonAmount.div(feeDenominator).mul(_totalFee);\n\n _gonBalances[darkHole] = _gonBalances[darkHole].add(\n gonAmount.div(feeDenominator).mul(darkHoleFee)\n );\n _gonBalances[lotteryReceiver] = _gonBalances[lotteryReceiver].add(\n gonAmount.div(feeDenominator).mul(lotteryFee)\n );\n _gonBalances[address(this)] = _gonBalances[address(this)].add(\n gonAmount.div(feeDenominator).mul(\n _treasuryFee.add(sevenLoopInsuranceFundFee)\n )\n );\n _gonBalances[autoLiquidityReceiver] = _gonBalances[\n autoLiquidityReceiver\n ].add(gonAmount.div(feeDenominator).mul(liquidityFee));\n\n emit Transfer(sender, address(this), feeAmount.div(_gonsPerFragment));\n return gonAmount.sub(feeAmount);\n }\n\n function forceAddLiquidity() external onlyOperator {\n if (shouldAddLiquidity()) {\n addLiquidity();\n }\n }\n\n function addLiquidity() internal swapping {\n uint256 autoLiquidityAmount = _gonBalances[autoLiquidityReceiver].div(\n _gonsPerFragment\n );\n _gonBalances[address(this)] = _gonBalances[address(this)].add(\n _gonBalances[autoLiquidityReceiver]\n );\n _gonBalances[autoLiquidityReceiver] = 0;\n uint256 amountToLiquify = autoLiquidityAmount.div(2);\n uint256 amountToSwap = autoLiquidityAmount.sub(amountToLiquify);\n\n if (amountToSwap == 0) {\n return;\n }\n address[] memory path = new address[](2);\n path[0] = address(this);\n path[1] = router.WETH();\n\n uint256 balanceBefore = address(this).balance;\n\n router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n amountToSwap,\n 0,\n path,\n address(this),\n block.timestamp\n );\n\n uint256 amountETHLiquidity = address(this).balance.sub(balanceBefore);\n\n if (amountToLiquify > 0 && amountETHLiquidity > 0) {\n router.addLiquidityETH{value: amountETHLiquidity}(\n address(this),\n amountToLiquify,\n 0,\n 0,\n autoLiquidityReceiver,\n block.timestamp\n );\n }\n _lastAddLiquidityTime = block.timestamp;\n }\n\n function lotteryPayouts(address[] calldata addrs) external onlyOperator {\n require(addrs.length > 0, \"Invalid addrs\");\n uint256 lotteryAmount = _gonBalances[lotteryReceiver];\n uint256 amountPerAddr = lotteryAmount.div(addrs.length);\n uint256 totalAmount = amountPerAddr.mul(addrs.length);\n _lastLotteryPayouts = totalAmount.div(_gonsPerFragment);\n _gonBalances[lotteryReceiver] = _gonBalances[lotteryReceiver].sub(\n totalAmount\n );\n for (uint32 i = 0; i < addrs.length; i ) {\n _gonBalances[addrs[i]] = _gonBalances[addrs[i]].add(amountPerAddr);\n emit Transfer(\n address(this),\n addrs[i],\n amountPerAddr.div(_gonsPerFragment)\n );\n }\n emit LotteryPayouts(addrs, totalAmount.div(_gonsPerFragment));\n }\n\n function swapBack() internal swapping {\n uint256 amountToSwap = _gonBalances[address(this)].div(\n _gonsPerFragment\n );\n\n if (amountToSwap == 0) {\n return;\n }\n\n uint256 balanceBefore = address(this).balance;\n address[] memory path = new address[](2);\n path[0] = address(this);\n path[1] = router.WETH();\n\n router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n amountToSwap,\n 0,\n path,\n address(this),\n block.timestamp\n );\n\n uint256 amountETHToTreasuryAndSIF = address(this).balance.sub(\n balanceBefore\n );\n\n (bool success, ) = payable(treasuryReceiver).call{\n value: amountETHToTreasuryAndSIF.mul(treasuryFee).div(\n treasuryFee.add(sevenLoopInsuranceFundFee)\n ),\n gas: 30000\n }(\"\");\n (success, ) = payable(sevenLoopInsuranceFundReceiver).call{\n value: amountETHToTreasuryAndSIF.mul(sevenLoopInsuranceFundFee).div(\n treasuryFee.add(sevenLoopInsuranceFundFee)\n ),\n gas: 30000\n }(\"\");\n }\n\n function withdrawAllToTreasury() external swapping onlyOwner {\n uint256 amountToSwap = _gonBalances[address(this)].div(\n _gonsPerFragment\n );\n require(\n amountToSwap > 0,\n \"There is no SELO token deposited in token contract\"\n );\n address[] memory path = new address[](2);\n path[0] = address(this);\n path[1] = router.WETH();\n router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n amountToSwap,\n 0,\n path,\n treasuryReceiver,\n block.timestamp\n );\n }\n\n function shouldTakeFee(address from, address to)\n internal\n view\n returns (bool)\n {\n return (pair == from || pair == to) && !_isFeeExempt[from];\n }\n\n function shouldRebase() internal view returns (bool) {\n return\n _autoRebase &&\n (_totalSupply < MAX_SUPPLY) &&\n msg.sender != pair &&\n !inSwap &&\n block.timestamp >= (_lastRebasedTime 7 minutes);\n }\n\n function shouldAddLiquidity() internal view returns (bool) {\n return\n _autoAddLiquidity &&\n !inSwap &&\n msg.sender != pair &&\n block.timestamp >= (_lastAddLiquidityTime 2 days);\n }\n\n function shouldSwapBack() internal view returns (bool) {\n return !inSwap && msg.sender != pair;\n }\n\n function setAutoRebase(bool _flag) external onlyOwner {\n if (_flag) {\n _autoRebase = _flag;\n _lastRebasedTime = block.timestamp;\n } else {\n _autoRebase = _flag;\n }\n }\n\n function setAutoAddLiquidity(bool _flag) external onlyOwner {\n if (_flag) {\n _autoAddLiquidity = _flag;\n _lastAddLiquidityTime = block.timestamp;\n } else {\n _autoAddLiquidity = _flag;\n }\n }\n\n function allowance(address owner_, address spender)\n external\n view\n override\n returns (uint256)\n {\n return _allowedFragments[owner_][spender];\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue)\n external\n returns (bool)\n {\n uint256 oldValue = _allowedFragments[msg.sender][spender];\n if (subtractedValue >= oldValue) {\n _allowedFragments[msg.sender][spender] = 0;\n } else {\n _allowedFragments[msg.sender][spender] = oldValue.sub(\n subtractedValue\n );\n }\n emit Approval(\n msg.sender,\n spender,\n _allowedFragments[msg.sender][spender]\n );\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue)\n external\n returns (bool)\n {\n _allowedFragments[msg.sender][spender] = _allowedFragments[msg.sender][\n spender\n ].add(addedValue);\n emit Approval(\n msg.sender,\n spender,\n _allowedFragments[msg.sender][spender]\n );\n return true;\n }\n\n function approve(address spender, uint256 value)\n external\n override\n returns (bool)\n {\n _allowedFragments[msg.sender][spender] = value;\n emit Approval(msg.sender, spender, value);\n return true;\n }\n\n function checkFeeExempt(address _addr) external view returns (bool) {\n return _isFeeExempt[_addr];\n }\n\n function getCirculatingSupply() public view returns (uint256) {\n return\n (TOTAL_GONS.sub(_gonBalances[DEAD]).sub(_gonBalances[ZERO])).div(\n _gonsPerFragment\n );\n }\n\n function isNotInSwap() external view returns (bool) {\n return !inSwap;\n }\n\n function manualSync() external {\n IPancakeSwapPair(pair).sync();\n }\n\n function setFeeReceivers(\n address _autoLiquidityReceiver,\n address _treasuryReceiver,\n address _sevenLoopInsuranceFundReceiver,\n address _darkHole,\n address _lotteryReceiver\n ) external onlyOwner {\n autoLiquidityReceiver = _autoLiquidityReceiver;\n treasuryReceiver = _treasuryReceiver;\n sevenLoopInsuranceFundReceiver = _sevenLoopInsuranceFundReceiver;\n darkHole = _darkHole;\n lotteryReceiver = _lotteryReceiver;\n }\n\n function getLiquidityBacking(uint256 accuracy)\n public\n view\n returns (uint256)\n {\n uint256 liquidityBalance = _gonBalances[pair].div(_gonsPerFragment);\n return\n accuracy.mul(liquidityBalance.mul(2)).div(getCirculatingSupply());\n }\n\n function setWhitelist(address _addr) external onlyOwner {\n _isFeeExempt[_addr] = true;\n }\n\n function setBotBlacklist(address _botAddress, bool _flag)\n external\n onlyOperator\n {\n require(\n isContract(_botAddress),\n \"only contract address, not allowed exteranlly owned account\"\n );\n blacklist[_botAddress] = _flag;\n }\n\n function setPairAddress(address _pairAddress) public onlyOwner {\n pairAddress = _pairAddress;\n }\n\n function setLP(address _address) external onlyOwner {\n pairContract = IPancakeSwapPair(_address);\n }\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address who) external view override returns (uint256) {\n return _gonBalances[who].div(_gonsPerFragment);\n }\n\n function isContract(address addr) internal view returns (bool) {\n uint256 size;\n assembly {\n size := extcodesize(addr)\n }\n return size > 0;\n }\n\n function setOperator(address operatorAddress, bool value)\n external\n onlyOwner\n {\n require(\n operatorAddress != address(0),\n \"operatorAddress is zero address\"\n );\n _operators[operatorAddress] = value;\n emit OperatorSetted(operatorAddress, value);\n }\n\n receive() external payable {}\n\n event LotteryPayouts(address[] indexed addrs, uint256 amount);\n event OperatorSetted(address operatorAddress, bool value);\n}\n"
},
"contracts/Ownable.sol": {
"content": "pragma solidity ^0.7.4;\n\ncontract Ownable {\n address private _owner;\n\n event OwnershipRenounced(address indexed previousOwner);\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor() {\n _owner = msg.sender;\n }\n\n function owner() public view returns (address) {\n return _owner;\n }\n\n modifier onlyOwner() {\n require(isOwner());\n _;\n }\n\n function isOwner() public view returns (bool) {\n return msg.sender == _owner;\n }\n\n function renounceOwnership() public onlyOwner {\n emit OwnershipRenounced(_owner);\n _owner = address(0);\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0));\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n"
},
"contracts/SafeMath.sol": {
"content": "pragma solidity ^0.7.4;\n\nlibrary SafeMath {\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n function sub(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n function div(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n uint256 c = a / b;\n\n return c;\n }\n\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b != 0);\n return a % b;\n }\n}\n"
},
"contracts/SafeMathInt.sol": {
"content": "pragma solidity ^0.7.4;\n\nlibrary SafeMathInt {\n int256 private constant MIN_INT256 = int256(1) << 255;\n int256 private constant MAX_INT256 = ~(int256(1) << 255);\n\n function mul(int256 a, int256 b) internal pure returns (int256) {\n int256 c = a * b;\n\n require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256));\n require((b == 0) || (c / b == a));\n return c;\n }\n\n function div(int256 a, int256 b) internal pure returns (int256) {\n require(b != -1 || a != MIN_INT256);\n\n return a / b;\n }\n\n function sub(int256 a, int256 b) internal pure returns (int256) {\n int256 c = a - b;\n require((b >= 0 && c <= a) || (b < 0 && c > a));\n return c;\n }\n\n function add(int256 a, int256 b) internal pure returns (int256) {\n int256 c = a b;\n require((b >= 0 && c >= a) || (b < 0 && c < a));\n return c;\n }\n\n function abs(int256 a) internal pure returns (int256) {\n require(a != MIN_INT256);\n return a < 0 ? -a : a;\n }\n}"
},
"contracts/IPancakeSwapPair.sol": {
"content": "pragma solidity ^0.7.4;\n\ninterface IPancakeSwapPair {\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function name() external pure returns (string memory);\n\n function symbol() external pure returns (string memory);\n\n function decimals() external pure returns (uint8);\n\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address owner) external view returns (uint256);\n\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n\n function nonces(address owner) external view returns (uint256);\n\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n event Mint(address indexed sender, uint256 amount0, uint256 amount1);\n event Burn(\n address indexed sender,\n uint256 amount0,\n uint256 amount1,\n address indexed to\n );\n event Swap(\n address indexed sender,\n uint256 amount0In,\n uint256 amount1In,\n uint256 amount0Out,\n uint256 amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint256);\n\n function factory() external view returns (address);\n\n function token0() external view returns (address);\n\n function token1() external view returns (address);\n\n function getReserves()\n external\n view\n returns (\n uint112 reserve0,\n uint112 reserve1,\n uint32 blockTimestampLast\n );\n\n function price0CumulativeLast() external view returns (uint256);\n\n function price1CumulativeLast() external view returns (uint256);\n\n function kLast() external view returns (uint256);\n\n function mint(address to) external returns (uint256 liquidity);\n\n function burn(address to)\n external\n returns (uint256 amount0, uint256 amount1);\n\n function swap(\n uint256 amount0Out,\n uint256 amount1Out,\n address to,\n bytes calldata data\n ) external;\n\n function skim(address to) external;\n\n function sync() external;\n\n function initialize(address, address) external;\n}\n"
},
"contracts/IPancakeSwapRouter.sol": {
"content": "pragma solidity ^0.7.4;\n\ninterface IPancakeSwapRouter {\n function factory() external pure returns (address);\n\n function WETH() external pure returns (address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint256 amountADesired,\n uint256 amountBDesired,\n uint256 amountAMin,\n uint256 amountBMin,\n address to,\n uint256 deadline\n )\n external\n returns (\n uint256 amountA,\n uint256 amountB,\n uint256 liquidity\n );\n\n function addLiquidityETH(\n address token,\n uint256 amountTokenDesired,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline\n )\n external\n payable\n returns (\n uint256 amountToken,\n uint256 amountETH,\n uint256 liquidity\n );\n\n function removeLiquidity(\n address tokenA,\n address tokenB,\n uint256 liquidity,\n uint256 amountAMin,\n uint256 amountBMin,\n address to,\n uint256 deadline\n ) external returns (uint256 amountA, uint256 amountB);\n\n function removeLiquidityETH(\n address token,\n uint256 liquidity,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline\n ) external returns (uint256 amountToken, uint256 amountETH);\n\n function removeLiquidityWithPermit(\n address tokenA,\n address tokenB,\n uint256 liquidity,\n uint256 amountAMin,\n uint256 amountBMin,\n address to,\n uint256 deadline,\n bool approveMax,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external returns (uint256 amountA, uint256 amountB);\n\n function removeLiquidityETHWithPermit(\n address token,\n uint256 liquidity,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline,\n bool approveMax,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external returns (uint256 amountToken, uint256 amountETH);\n\n function swapExactTokensForTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapTokensForExactTokens(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactETHForTokens(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256[] memory amounts);\n\n function swapTokensForExactETH(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactTokensForETH(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapETHForExactTokens(\n uint256 amountOut,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256[] memory amounts);\n\n function quote(\n uint256 amountA,\n uint256 reserveA,\n uint256 reserveB\n ) external pure returns (uint256 amountB);\n\n function getAmountOut(\n uint256 amountIn,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure returns (uint256 amountOut);\n\n function getAmountIn(\n uint256 amountOut,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure returns (uint256 amountIn);\n\n function getAmountsOut(uint256 amountIn, address[] calldata path)\n external\n view\n returns (uint256[] memory amounts);\n\n function getAmountsIn(uint256 amountOut, address[] calldata path)\n external\n view\n returns (uint256[] memory amounts);\n\n function removeLiquidityETHSupportingFeeOnTransferTokens(\n address token,\n uint256 liquidity,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline\n ) external returns (uint256 amountETH);\n\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\n address token,\n uint256 liquidity,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline,\n bool approveMax,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external returns (uint256 amountETH);\n\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external;\n\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable;\n\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external;\n}\n"
},
"contracts/IPancakeSwapFactory.sol": {
"content": "pragma solidity ^0.7.4;\n\ninterface IPancakeSwapFactory {\n event PairCreated(\n address indexed token0,\n address indexed token1,\n address pair,\n uint256\n );\n\n function feeTo() external view returns (address);\n\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB)\n external\n view\n returns (address pair);\n\n function allPairs(uint256) external view returns (address pair);\n\n function allPairsLength() external view returns (uint256);\n\n function createPair(address tokenA, address tokenB)\n external\n returns (address pair);\n\n function setFeeTo(address) external;\n\n function setFeeToSetter(address) external;\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
}
}
}}
"language": "Solidity",
"sources": {
"contracts/ERC20Detailed.sol": {
"content": "pragma solidity ^0.7.4;\n\nimport \"./IERC20.sol\";\n\nabstract contract ERC20Detailed is IERC20 {\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) {\n _name = name_;\n _symbol = symbol_;\n _decimals = decimals_;\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"
},
"contracts/IERC20.sol": {
"content": "pragma solidity ^0.7.4;\n\ninterface IERC20 {\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address who) external view returns (uint256);\n\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n\n function transfer(address to, uint256 value) external returns (bool);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) external returns (bool);\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n}\n"
},
"contracts/SevenLoop.sol": {
"content": "pragma solidity ^0.7.4;\n\nimport \"./ERC20Detailed.sol\";\nimport \"./Ownable.sol\";\nimport \"./SafeMath.sol\";\nimport \"./SafeMathInt.sol\";\nimport \"./IPancakeSwapPair.sol\";\nimport \"./IPancakeSwapRouter.sol\";\nimport \"./IPancakeSwapFactory.sol\";\n\ncontract SevenLoop is ERC20Detailed, Ownable {\n using SafeMath for uint256;\n using SafeMathInt for int256;\n\n event LogRebase(uint256 indexed epoch, uint256 totalSupply);\n\n string public _name = \"SevenLoop\";\n string public _symbol = \"SELO\";\n uint8 public _decimals = 5;\n\n IPancakeSwapPair public pairContract;\n mapping(address => bool) _isFeeExempt;\n mapping(address => bool) public _operators;\n\n modifier validRecipient(address to) {\n require(to != address(0x0));\n _;\n }\n\n modifier onlyOperator() {\n require(_operators[msg.sender], \"Forbidden\");\n _;\n }\n\n uint256 public constant DECIMALS = 5;\n uint256 public constant MAX_UINT256 = ~uint256(0);\n uint8 public constant RATE_DECIMALS = 7;\n\n uint256 private constant INITIAL_FRAGMENTS_SUPPLY =\n 330 * 10**3 * 10**DECIMALS;\n\n uint256 public liquidityFee = 50;\n uint256 public treasuryFee = 20;\n uint256 public sevenLoopInsuranceFundFee = 50;\n uint256 public sellFee = 30;\n uint256 public darkHoleFee = 25;\n uint256 public lotteryFee = 5;\n uint256 public totalFee =\n liquidityFee\n .add(treasuryFee)\n .add(sevenLoopInsuranceFundFee)\n .add(darkHoleFee)\n .add(lotteryFee);\n uint256 public feeDenominator = 1000;\n\n address DEAD = 0x000000000000000000000000000000000000dEaD;\n address ZERO = 0x0000000000000000000000000000000000000000;\n\n address public autoLiquidityReceiver;\n address public treasuryReceiver;\n address public sevenLoopInsuranceFundReceiver;\n address public lotteryReceiver;\n address public darkHole;\n address public pairAddress;\n bool public swapEnabled = true;\n IPancakeSwapRouter public router;\n address public pair;\n bool inSwap = false;\n modifier swapping() {\n inSwap = true;\n _;\n inSwap = false;\n }\n\n uint256 private constant TOTAL_GONS =\n MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);\n\n uint256 private constant MAX_SUPPLY = 36571000000 * 10**DECIMALS;\n\n uint256 public _lastLotteryPayouts;\n bool public _autoRebase;\n bool public _autoAddLiquidity;\n uint256 public _initRebaseStartTime;\n uint256 public _lastRebasedTime;\n uint256 public _lastAddLiquidityTime;\n uint256 public _totalSupply;\n uint256 private _gonsPerFragment;\n\n mapping(address => uint256) private _gonBalances;\n mapping(address => mapping(address => uint256)) private _allowedFragments;\n mapping(address => bool) public blacklist;\n\n constructor()\n ERC20Detailed(\"SevenLoop\", \"SELO\", uint8(DECIMALS))\n Ownable()\n {\n router = IPancakeSwapRouter(0x10ED43C718714eb63d5aA57B78B54704E256024E);\n pair = IPancakeSwapFactory(router.factory()).createPair(\n router.WETH(),\n address(this)\n );\n\n autoLiquidityReceiver = 0xC1da947bE6928A5e0Cc156C13204C5EebC0748c6;\n treasuryReceiver = 0x95d9089428AC9BFD432F05b1c84a69b248350b99;\n sevenLoopInsuranceFundReceiver = 0x647B8E39275B3aEa564380cb6040Bbc69Cf21050;\n lotteryReceiver = 0xA7147ccfE5843441f69c5fC7B59394E9dC8b0D13;\n darkHole = 0xDCb9fE0eBd63c5171ac6221409047c555515A265;\n\n _allowedFragments[address(this)][address(router)] = uint256(-1);\n pairAddress = pair;\n pairContract = IPancakeSwapPair(pair);\n\n _totalSupply = INITIAL_FRAGMENTS_SUPPLY;\n _gonBalances[treasuryReceiver] = TOTAL_GONS;\n _gonsPerFragment = TOTAL_GONS.div(_totalSupply);\n _initRebaseStartTime = block.timestamp;\n _lastRebasedTime = block.timestamp;\n _autoRebase = false;\n _autoAddLiquidity = false;\n _isFeeExempt[treasuryReceiver] = true;\n _isFeeExempt[address(this)] = true;\n _operators[msg.sender] = true;\n\n _transferOwnership(treasuryReceiver);\n emit Transfer(address(0x0), treasuryReceiver, _totalSupply);\n }\n\n function forceRebase() external onlyOperator {\n if (shouldRebase()) {\n rebase();\n }\n }\n\n function rebase() internal {\n if (inSwap) return;\n uint256 rebaseRate;\n uint256 deltaTimeFromInit = block.timestamp - _initRebaseStartTime;\n uint256 deltaTime = block.timestamp - _lastRebasedTime;\n uint256 times = deltaTime.div(7 minutes);\n uint256 epoch = times.mul(7);\n\n if (deltaTimeFromInit < (365 days)) {\n rebaseRate = 1227;\n } else if (deltaTimeFromInit >= (7 * 365 days)) {\n rebaseRate = 1;\n } else if (deltaTimeFromInit >= ((15 * 365 days) / 10)) {\n rebaseRate = 24;\n } else if (deltaTimeFromInit >= (365 days)) {\n rebaseRate = 146;\n }\n\n for (uint256 i = 0; i < times; i ) {\n _totalSupply = _totalSupply\n .mul((10**RATE_DECIMALS).add(rebaseRate))\n .div(10**RATE_DECIMALS);\n }\n\n _gonsPerFragment = TOTAL_GONS.div(_totalSupply);\n _lastRebasedTime = _lastRebasedTime.add(times.mul(7 minutes));\n\n pairContract.sync();\n\n emit LogRebase(epoch, _totalSupply);\n }\n\n function transfer(address to, uint256 value)\n external\n override\n validRecipient(to)\n returns (bool)\n {\n _transferFrom(msg.sender, to, value);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) external override validRecipient(to) returns (bool) {\n if (_allowedFragments[from][msg.sender] != uint256(-1)) {\n _allowedFragments[from][msg.sender] = _allowedFragments[from][\n msg.sender\n ].sub(value, \"Insufficient Allowance\");\n }\n _transferFrom(from, to, value);\n return true;\n }\n\n function _basicTransfer(\n address from,\n address to,\n uint256 amount\n ) internal returns (bool) {\n uint256 gonAmount = amount.mul(_gonsPerFragment);\n _gonBalances[from] = _gonBalances[from].sub(gonAmount);\n _gonBalances[to] = _gonBalances[to].add(gonAmount);\n return true;\n }\n\n function _transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) internal returns (bool) {\n require(!blacklist[sender] && !blacklist[recipient], \"in_blacklist\");\n\n if (inSwap) {\n return _basicTransfer(sender, recipient, amount);\n }\n\n if (shouldRebase()) {\n rebase();\n }\n\n if (shouldAddLiquidity()) {\n addLiquidity();\n }\n\n if (shouldSwapBack()) {\n swapBack();\n }\n\n uint256 gonAmount = amount.mul(_gonsPerFragment);\n _gonBalances[sender] = _gonBalances[sender].sub(gonAmount);\n uint256 gonAmountReceived = shouldTakeFee(sender, recipient)\n ? takeFee(sender, recipient, gonAmount)\n : gonAmount;\n _gonBalances[recipient] = _gonBalances[recipient].add(\n gonAmountReceived\n );\n\n emit Transfer(\n sender,\n recipient,\n gonAmountReceived.div(_gonsPerFragment)\n );\n return true;\n }\n\n function takeFee(\n address sender,\n address recipient,\n uint256 gonAmount\n ) internal returns (uint256) {\n uint256 _totalFee = totalFee;\n uint256 _treasuryFee = treasuryFee;\n\n if (recipient == pair) {\n _totalFee = totalFee.add(sellFee);\n _treasuryFee = treasuryFee.add(sellFee);\n }\n\n uint256 feeAmount = gonAmount.div(feeDenominator).mul(_totalFee);\n\n _gonBalances[darkHole] = _gonBalances[darkHole].add(\n gonAmount.div(feeDenominator).mul(darkHoleFee)\n );\n _gonBalances[lotteryReceiver] = _gonBalances[lotteryReceiver].add(\n gonAmount.div(feeDenominator).mul(lotteryFee)\n );\n _gonBalances[address(this)] = _gonBalances[address(this)].add(\n gonAmount.div(feeDenominator).mul(\n _treasuryFee.add(sevenLoopInsuranceFundFee)\n )\n );\n _gonBalances[autoLiquidityReceiver] = _gonBalances[\n autoLiquidityReceiver\n ].add(gonAmount.div(feeDenominator).mul(liquidityFee));\n\n emit Transfer(sender, address(this), feeAmount.div(_gonsPerFragment));\n return gonAmount.sub(feeAmount);\n }\n\n function forceAddLiquidity() external onlyOperator {\n if (shouldAddLiquidity()) {\n addLiquidity();\n }\n }\n\n function addLiquidity() internal swapping {\n uint256 autoLiquidityAmount = _gonBalances[autoLiquidityReceiver].div(\n _gonsPerFragment\n );\n _gonBalances[address(this)] = _gonBalances[address(this)].add(\n _gonBalances[autoLiquidityReceiver]\n );\n _gonBalances[autoLiquidityReceiver] = 0;\n uint256 amountToLiquify = autoLiquidityAmount.div(2);\n uint256 amountToSwap = autoLiquidityAmount.sub(amountToLiquify);\n\n if (amountToSwap == 0) {\n return;\n }\n address[] memory path = new address[](2);\n path[0] = address(this);\n path[1] = router.WETH();\n\n uint256 balanceBefore = address(this).balance;\n\n router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n amountToSwap,\n 0,\n path,\n address(this),\n block.timestamp\n );\n\n uint256 amountETHLiquidity = address(this).balance.sub(balanceBefore);\n\n if (amountToLiquify > 0 && amountETHLiquidity > 0) {\n router.addLiquidityETH{value: amountETHLiquidity}(\n address(this),\n amountToLiquify,\n 0,\n 0,\n autoLiquidityReceiver,\n block.timestamp\n );\n }\n _lastAddLiquidityTime = block.timestamp;\n }\n\n function lotteryPayouts(address[] calldata addrs) external onlyOperator {\n require(addrs.length > 0, \"Invalid addrs\");\n uint256 lotteryAmount = _gonBalances[lotteryReceiver];\n uint256 amountPerAddr = lotteryAmount.div(addrs.length);\n uint256 totalAmount = amountPerAddr.mul(addrs.length);\n _lastLotteryPayouts = totalAmount.div(_gonsPerFragment);\n _gonBalances[lotteryReceiver] = _gonBalances[lotteryReceiver].sub(\n totalAmount\n );\n for (uint32 i = 0; i < addrs.length; i ) {\n _gonBalances[addrs[i]] = _gonBalances[addrs[i]].add(amountPerAddr);\n emit Transfer(\n address(this),\n addrs[i],\n amountPerAddr.div(_gonsPerFragment)\n );\n }\n emit LotteryPayouts(addrs, totalAmount.div(_gonsPerFragment));\n }\n\n function swapBack() internal swapping {\n uint256 amountToSwap = _gonBalances[address(this)].div(\n _gonsPerFragment\n );\n\n if (amountToSwap == 0) {\n return;\n }\n\n uint256 balanceBefore = address(this).balance;\n address[] memory path = new address[](2);\n path[0] = address(this);\n path[1] = router.WETH();\n\n router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n amountToSwap,\n 0,\n path,\n address(this),\n block.timestamp\n );\n\n uint256 amountETHToTreasuryAndSIF = address(this).balance.sub(\n balanceBefore\n );\n\n (bool success, ) = payable(treasuryReceiver).call{\n value: amountETHToTreasuryAndSIF.mul(treasuryFee).div(\n treasuryFee.add(sevenLoopInsuranceFundFee)\n ),\n gas: 30000\n }(\"\");\n (success, ) = payable(sevenLoopInsuranceFundReceiver).call{\n value: amountETHToTreasuryAndSIF.mul(sevenLoopInsuranceFundFee).div(\n treasuryFee.add(sevenLoopInsuranceFundFee)\n ),\n gas: 30000\n }(\"\");\n }\n\n function withdrawAllToTreasury() external swapping onlyOwner {\n uint256 amountToSwap = _gonBalances[address(this)].div(\n _gonsPerFragment\n );\n require(\n amountToSwap > 0,\n \"There is no SELO token deposited in token contract\"\n );\n address[] memory path = new address[](2);\n path[0] = address(this);\n path[1] = router.WETH();\n router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n amountToSwap,\n 0,\n path,\n treasuryReceiver,\n block.timestamp\n );\n }\n\n function shouldTakeFee(address from, address to)\n internal\n view\n returns (bool)\n {\n return (pair == from || pair == to) && !_isFeeExempt[from];\n }\n\n function shouldRebase() internal view returns (bool) {\n return\n _autoRebase &&\n (_totalSupply < MAX_SUPPLY) &&\n msg.sender != pair &&\n !inSwap &&\n block.timestamp >= (_lastRebasedTime 7 minutes);\n }\n\n function shouldAddLiquidity() internal view returns (bool) {\n return\n _autoAddLiquidity &&\n !inSwap &&\n msg.sender != pair &&\n block.timestamp >= (_lastAddLiquidityTime 2 days);\n }\n\n function shouldSwapBack() internal view returns (bool) {\n return !inSwap && msg.sender != pair;\n }\n\n function setAutoRebase(bool _flag) external onlyOwner {\n if (_flag) {\n _autoRebase = _flag;\n _lastRebasedTime = block.timestamp;\n } else {\n _autoRebase = _flag;\n }\n }\n\n function setAutoAddLiquidity(bool _flag) external onlyOwner {\n if (_flag) {\n _autoAddLiquidity = _flag;\n _lastAddLiquidityTime = block.timestamp;\n } else {\n _autoAddLiquidity = _flag;\n }\n }\n\n function allowance(address owner_, address spender)\n external\n view\n override\n returns (uint256)\n {\n return _allowedFragments[owner_][spender];\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue)\n external\n returns (bool)\n {\n uint256 oldValue = _allowedFragments[msg.sender][spender];\n if (subtractedValue >= oldValue) {\n _allowedFragments[msg.sender][spender] = 0;\n } else {\n _allowedFragments[msg.sender][spender] = oldValue.sub(\n subtractedValue\n );\n }\n emit Approval(\n msg.sender,\n spender,\n _allowedFragments[msg.sender][spender]\n );\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue)\n external\n returns (bool)\n {\n _allowedFragments[msg.sender][spender] = _allowedFragments[msg.sender][\n spender\n ].add(addedValue);\n emit Approval(\n msg.sender,\n spender,\n _allowedFragments[msg.sender][spender]\n );\n return true;\n }\n\n function approve(address spender, uint256 value)\n external\n override\n returns (bool)\n {\n _allowedFragments[msg.sender][spender] = value;\n emit Approval(msg.sender, spender, value);\n return true;\n }\n\n function checkFeeExempt(address _addr) external view returns (bool) {\n return _isFeeExempt[_addr];\n }\n\n function getCirculatingSupply() public view returns (uint256) {\n return\n (TOTAL_GONS.sub(_gonBalances[DEAD]).sub(_gonBalances[ZERO])).div(\n _gonsPerFragment\n );\n }\n\n function isNotInSwap() external view returns (bool) {\n return !inSwap;\n }\n\n function manualSync() external {\n IPancakeSwapPair(pair).sync();\n }\n\n function setFeeReceivers(\n address _autoLiquidityReceiver,\n address _treasuryReceiver,\n address _sevenLoopInsuranceFundReceiver,\n address _darkHole,\n address _lotteryReceiver\n ) external onlyOwner {\n autoLiquidityReceiver = _autoLiquidityReceiver;\n treasuryReceiver = _treasuryReceiver;\n sevenLoopInsuranceFundReceiver = _sevenLoopInsuranceFundReceiver;\n darkHole = _darkHole;\n lotteryReceiver = _lotteryReceiver;\n }\n\n function getLiquidityBacking(uint256 accuracy)\n public\n view\n returns (uint256)\n {\n uint256 liquidityBalance = _gonBalances[pair].div(_gonsPerFragment);\n return\n accuracy.mul(liquidityBalance.mul(2)).div(getCirculatingSupply());\n }\n\n function setWhitelist(address _addr) external onlyOwner {\n _isFeeExempt[_addr] = true;\n }\n\n function setBotBlacklist(address _botAddress, bool _flag)\n external\n onlyOperator\n {\n require(\n isContract(_botAddress),\n \"only contract address, not allowed exteranlly owned account\"\n );\n blacklist[_botAddress] = _flag;\n }\n\n function setPairAddress(address _pairAddress) public onlyOwner {\n pairAddress = _pairAddress;\n }\n\n function setLP(address _address) external onlyOwner {\n pairContract = IPancakeSwapPair(_address);\n }\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address who) external view override returns (uint256) {\n return _gonBalances[who].div(_gonsPerFragment);\n }\n\n function isContract(address addr) internal view returns (bool) {\n uint256 size;\n assembly {\n size := extcodesize(addr)\n }\n return size > 0;\n }\n\n function setOperator(address operatorAddress, bool value)\n external\n onlyOwner\n {\n require(\n operatorAddress != address(0),\n \"operatorAddress is zero address\"\n );\n _operators[operatorAddress] = value;\n emit OperatorSetted(operatorAddress, value);\n }\n\n receive() external payable {}\n\n event LotteryPayouts(address[] indexed addrs, uint256 amount);\n event OperatorSetted(address operatorAddress, bool value);\n}\n"
},
"contracts/Ownable.sol": {
"content": "pragma solidity ^0.7.4;\n\ncontract Ownable {\n address private _owner;\n\n event OwnershipRenounced(address indexed previousOwner);\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor() {\n _owner = msg.sender;\n }\n\n function owner() public view returns (address) {\n return _owner;\n }\n\n modifier onlyOwner() {\n require(isOwner());\n _;\n }\n\n function isOwner() public view returns (bool) {\n return msg.sender == _owner;\n }\n\n function renounceOwnership() public onlyOwner {\n emit OwnershipRenounced(_owner);\n _owner = address(0);\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0));\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n"
},
"contracts/SafeMath.sol": {
"content": "pragma solidity ^0.7.4;\n\nlibrary SafeMath {\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n function sub(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n function div(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n uint256 c = a / b;\n\n return c;\n }\n\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b != 0);\n return a % b;\n }\n}\n"
},
"contracts/SafeMathInt.sol": {
"content": "pragma solidity ^0.7.4;\n\nlibrary SafeMathInt {\n int256 private constant MIN_INT256 = int256(1) << 255;\n int256 private constant MAX_INT256 = ~(int256(1) << 255);\n\n function mul(int256 a, int256 b) internal pure returns (int256) {\n int256 c = a * b;\n\n require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256));\n require((b == 0) || (c / b == a));\n return c;\n }\n\n function div(int256 a, int256 b) internal pure returns (int256) {\n require(b != -1 || a != MIN_INT256);\n\n return a / b;\n }\n\n function sub(int256 a, int256 b) internal pure returns (int256) {\n int256 c = a - b;\n require((b >= 0 && c <= a) || (b < 0 && c > a));\n return c;\n }\n\n function add(int256 a, int256 b) internal pure returns (int256) {\n int256 c = a b;\n require((b >= 0 && c >= a) || (b < 0 && c < a));\n return c;\n }\n\n function abs(int256 a) internal pure returns (int256) {\n require(a != MIN_INT256);\n return a < 0 ? -a : a;\n }\n}"
},
"contracts/IPancakeSwapPair.sol": {
"content": "pragma solidity ^0.7.4;\n\ninterface IPancakeSwapPair {\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function name() external pure returns (string memory);\n\n function symbol() external pure returns (string memory);\n\n function decimals() external pure returns (uint8);\n\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address owner) external view returns (uint256);\n\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n\n function nonces(address owner) external view returns (uint256);\n\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n event Mint(address indexed sender, uint256 amount0, uint256 amount1);\n event Burn(\n address indexed sender,\n uint256 amount0,\n uint256 amount1,\n address indexed to\n );\n event Swap(\n address indexed sender,\n uint256 amount0In,\n uint256 amount1In,\n uint256 amount0Out,\n uint256 amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint256);\n\n function factory() external view returns (address);\n\n function token0() external view returns (address);\n\n function token1() external view returns (address);\n\n function getReserves()\n external\n view\n returns (\n uint112 reserve0,\n uint112 reserve1,\n uint32 blockTimestampLast\n );\n\n function price0CumulativeLast() external view returns (uint256);\n\n function price1CumulativeLast() external view returns (uint256);\n\n function kLast() external view returns (uint256);\n\n function mint(address to) external returns (uint256 liquidity);\n\n function burn(address to)\n external\n returns (uint256 amount0, uint256 amount1);\n\n function swap(\n uint256 amount0Out,\n uint256 amount1Out,\n address to,\n bytes calldata data\n ) external;\n\n function skim(address to) external;\n\n function sync() external;\n\n function initialize(address, address) external;\n}\n"
},
"contracts/IPancakeSwapRouter.sol": {
"content": "pragma solidity ^0.7.4;\n\ninterface IPancakeSwapRouter {\n function factory() external pure returns (address);\n\n function WETH() external pure returns (address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint256 amountADesired,\n uint256 amountBDesired,\n uint256 amountAMin,\n uint256 amountBMin,\n address to,\n uint256 deadline\n )\n external\n returns (\n uint256 amountA,\n uint256 amountB,\n uint256 liquidity\n );\n\n function addLiquidityETH(\n address token,\n uint256 amountTokenDesired,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline\n )\n external\n payable\n returns (\n uint256 amountToken,\n uint256 amountETH,\n uint256 liquidity\n );\n\n function removeLiquidity(\n address tokenA,\n address tokenB,\n uint256 liquidity,\n uint256 amountAMin,\n uint256 amountBMin,\n address to,\n uint256 deadline\n ) external returns (uint256 amountA, uint256 amountB);\n\n function removeLiquidityETH(\n address token,\n uint256 liquidity,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline\n ) external returns (uint256 amountToken, uint256 amountETH);\n\n function removeLiquidityWithPermit(\n address tokenA,\n address tokenB,\n uint256 liquidity,\n uint256 amountAMin,\n uint256 amountBMin,\n address to,\n uint256 deadline,\n bool approveMax,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external returns (uint256 amountA, uint256 amountB);\n\n function removeLiquidityETHWithPermit(\n address token,\n uint256 liquidity,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline,\n bool approveMax,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external returns (uint256 amountToken, uint256 amountETH);\n\n function swapExactTokensForTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapTokensForExactTokens(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactETHForTokens(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256[] memory amounts);\n\n function swapTokensForExactETH(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactTokensForETH(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapETHForExactTokens(\n uint256 amountOut,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256[] memory amounts);\n\n function quote(\n uint256 amountA,\n uint256 reserveA,\n uint256 reserveB\n ) external pure returns (uint256 amountB);\n\n function getAmountOut(\n uint256 amountIn,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure returns (uint256 amountOut);\n\n function getAmountIn(\n uint256 amountOut,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure returns (uint256 amountIn);\n\n function getAmountsOut(uint256 amountIn, address[] calldata path)\n external\n view\n returns (uint256[] memory amounts);\n\n function getAmountsIn(uint256 amountOut, address[] calldata path)\n external\n view\n returns (uint256[] memory amounts);\n\n function removeLiquidityETHSupportingFeeOnTransferTokens(\n address token,\n uint256 liquidity,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline\n ) external returns (uint256 amountETH);\n\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\n address token,\n uint256 liquidity,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline,\n bool approveMax,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external returns (uint256 amountETH);\n\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external;\n\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable;\n\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external;\n}\n"
},
"contracts/IPancakeSwapFactory.sol": {
"content": "pragma solidity ^0.7.4;\n\ninterface IPancakeSwapFactory {\n event PairCreated(\n address indexed token0,\n address indexed token1,\n address pair,\n uint256\n );\n\n function feeTo() external view returns (address);\n\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB)\n external\n view\n returns (address pair);\n\n function allPairs(uint256) external view returns (address pair);\n\n function allPairsLength() external view returns (uint256);\n\n function createPair(address tokenA, address tokenB)\n external\n returns (address pair);\n\n function setFeeTo(address) external;\n\n function setFeeToSetter(address) external;\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
}
}
}}