├── catz.jpeg └── catzcoin.sol /catz.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/catzcoin/Catzcoin/HEAD/catz.jpeg -------------------------------------------------------------------------------- /catzcoin.sol: -------------------------------------------------------------------------------- 1 | 2 | // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a98814b930910220d5b5ba25ed2d4dcf45e48315/contracts/utils/Context.sol 3 | 4 | // SPDX-License-Identifier: MIT 5 | 6 | pragma solidity ^0.8.0; 7 | 8 | /* 9 | * @dev Provides information about the current execution context, including the 10 | * sender of the transaction and its data. While these are generally available 11 | * via msg.sender and msg.data, they should not be accessed in such a direct 12 | * manner, since when dealing with meta-transactions the account sending and 13 | * paying for execution may not be the actual sender (as far as an application 14 | * is concerned). 15 | * 16 | * This contract is only required for intermediate, library-like contracts. 17 | */ 18 | abstract contract Context { 19 | function _msgSender() internal view virtual returns (address) { 20 | return msg.sender; 21 | } 22 | 23 | function _msgData() internal view virtual returns (bytes calldata) { 24 | this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 25 | return msg.data; 26 | } 27 | } 28 | 29 | 30 | // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a98814b930910220d5b5ba25ed2d4dcf45e48315/contracts/token/ERC20/IERC20.sol 31 | 32 | pragma solidity ^0.8.0; 33 | 34 | /** 35 | * @dev Interface of the ERC20 standard as defined in the EIP. 36 | */ 37 | interface IERC20 { 38 | /** 39 | * @dev Returns the amount of tokens in existence. 40 | */ 41 | function totalSupply() external view returns (uint256); 42 | 43 | /** 44 | * @dev Returns the amount of tokens owned by `account`. 45 | */ 46 | function balanceOf(address account) external view returns (uint256); 47 | 48 | /** 49 | * @dev Moves `amount` tokens from the caller's account to `recipient`. 50 | * 51 | * Returns a boolean value indicating whether the operation succeeded. 52 | * 53 | * Emits a {Transfer} event. 54 | */ 55 | function transfer(address recipient, uint256 amount) external returns (bool); 56 | 57 | /** 58 | * @dev Returns the remaining number of tokens that `spender` will be 59 | * allowed to spend on behalf of `owner` through {transferFrom}. This is 60 | * zero by default. 61 | * 62 | * This value changes when {approve} or {transferFrom} are called. 63 | */ 64 | function allowance(address owner, address spender) external view returns (uint256); 65 | 66 | /** 67 | * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. 68 | * 69 | * Returns a boolean value indicating whether the operation succeeded. 70 | * 71 | * IMPORTANT: Beware that changing an allowance with this method brings the risk 72 | * that someone may use both the old and the new allowance by unfortunate 73 | * transaction ordering. One possible solution to mitigate this race 74 | * condition is to first reduce the spender's allowance to 0 and set the 75 | * desired value afterwards: 76 | * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 77 | * 78 | * Emits an {Approval} event. 79 | */ 80 | function approve(address spender, uint256 amount) external returns (bool); 81 | 82 | /** 83 | * @dev Moves `amount` tokens from `sender` to `recipient` using the 84 | * allowance mechanism. `amount` is then deducted from the caller's 85 | * allowance. 86 | * 87 | * Returns a boolean value indicating whether the operation succeeded. 88 | * 89 | * Emits a {Transfer} event. 90 | */ 91 | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); 92 | 93 | /** 94 | * @dev Emitted when `value` tokens are moved from one account (`from`) to 95 | * another (`to`). 96 | * 97 | * Note that `value` may be zero. 98 | */ 99 | event Transfer(address indexed from, address indexed to, uint256 value); 100 | 101 | /** 102 | * @dev Emitted when the allowance of a `spender` for an `owner` is set by 103 | * a call to {approve}. `value` is the new allowance. 104 | */ 105 | event Approval(address indexed owner, address indexed spender, uint256 value); 106 | } 107 | 108 | // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a98814b930910220d5b5ba25ed2d4dcf45e48315/contracts/token/ERC20/extensions/IERC20Metadata.sol 109 | 110 | 111 | pragma solidity ^0.8.0; 112 | 113 | 114 | /** 115 | * @dev Interface for the optional metadata functions from the ERC20 standard. 116 | * 117 | * _Available since v4.1._ 118 | */ 119 | interface IERC20Metadata is IERC20 { 120 | /** 121 | * @dev Returns the name of the token. 122 | */ 123 | function name() external view returns (string memory); 124 | 125 | /** 126 | * @dev Returns the symbol of the token. 127 | */ 128 | function symbol() external view returns (string memory); 129 | 130 | /** 131 | * @dev Returns the decimals places of the token. 132 | */ 133 | function decimals() external view returns (uint8); 134 | } 135 | 136 | // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a98814b930910220d5b5ba25ed2d4dcf45e48315/contracts/token/ERC20/ERC20.sol 137 | 138 | 139 | pragma solidity ^0.8.0; 140 | 141 | 142 | 143 | 144 | /** 145 | * @dev Implementation of the {IERC20} interface. 146 | * 147 | * This implementation is agnostic to the way tokens are created. This means 148 | * that a supply mechanism has to be added in a derived contract using {_mint}. 149 | * For a generic mechanism see {ERC20PresetMinterPauser}. 150 | * 151 | * TIP: For a detailed writeup see our guide 152 | * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How 153 | * to implement supply mechanisms]. 154 | * 155 | * We have followed general OpenZeppelin guidelines: functions revert instead 156 | * of returning `false` on failure. This behavior is nonetheless conventional 157 | * and does not conflict with the expectations of ERC20 applications. 158 | * 159 | * Additionally, an {Approval} event is emitted on calls to {transferFrom}. 160 | * This allows applications to reconstruct the allowance for all accounts just 161 | * by listening to said events. Other implementations of the EIP may not emit 162 | * these events, as it isn't required by the specification. 163 | * 164 | * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} 165 | * functions have been added to mitigate the well-known issues around setting 166 | * allowances. See {IERC20-approve}. 167 | */ 168 | contract ERC20 is Context, IERC20, IERC20Metadata { 169 | mapping (address => uint256) private _balances; 170 | 171 | mapping (address => mapping (address => uint256)) private _allowances; 172 | 173 | uint256 private _totalSupply; 174 | 175 | string private _name = "CatzCoin"; 176 | string private _symbol = "CATZ"; 177 | 178 | /** 179 | * @dev Sets the values for {name} and {symbol}. 180 | * 181 | * The defaut value of {decimals} is 18. To select a different value for 182 | * {decimals} you should overload it. 183 | * 184 | * All two of these values are immutable: they can only be set once during 185 | * construction. 186 | */ 187 | 188 | /** 189 | * @dev Returns the name of the token. 190 | */ 191 | function name() public view virtual override returns (string memory) { 192 | return _name; 193 | } 194 | 195 | /** 196 | * @dev Returns the symbol of the token, usually a shorter version of the 197 | * name. 198 | */ 199 | function symbol() public view virtual override returns (string memory) { 200 | return _symbol; 201 | } 202 | 203 | /** 204 | * @dev Returns the number of decimals used to get its user representation. 205 | * For example, if `decimals` equals `2`, a balance of `505` tokens should 206 | * be displayed to a user as `5,05` (`505 / 10 ** 2`). 207 | * 208 | * Tokens usually opt for a value of 18, imitating the relationship between 209 | * Ether and Wei. This is the value {ERC20} uses, unless this function is 210 | * overridden; 211 | * 212 | * NOTE: This information is only used for _display_ purposes: it in 213 | * no way affects any of the arithmetic of the contract, including 214 | * {IERC20-balanceOf} and {IERC20-transfer}. 215 | */ 216 | function decimals() public view virtual override returns (uint8) { 217 | return 18; 218 | } 219 | 220 | /** 221 | * @dev See {IERC20-totalSupply}. 222 | */ 223 | function totalSupply() public view virtual override returns (uint256) { 224 | return _totalSupply; 225 | } 226 | 227 | /** 228 | * @dev See {IERC20-balanceOf}. 229 | */ 230 | function balanceOf(address account) public view virtual override returns (uint256) { 231 | return _balances[account]; 232 | } 233 | 234 | /** 235 | * @dev See {IERC20-transfer}. 236 | * 237 | * Requirements: 238 | * 239 | * - `recipient` cannot be the zero address. 240 | * - the caller must have a balance of at least `amount`. 241 | */ 242 | function transfer(address recipient, uint256 amount) public virtual override returns (bool) { 243 | _transfer(_msgSender(), recipient, amount); 244 | return true; 245 | } 246 | 247 | /** 248 | * @dev See {IERC20-allowance}. 249 | */ 250 | function allowance(address owner, address spender) public view virtual override returns (uint256) { 251 | return _allowances[owner][spender]; 252 | } 253 | 254 | /** 255 | * @dev See {IERC20-approve}. 256 | * 257 | * Requirements: 258 | * 259 | * - `spender` cannot be the zero address. 260 | */ 261 | function approve(address spender, uint256 amount) public virtual override returns (bool) { 262 | _approve(_msgSender(), spender, amount); 263 | return true; 264 | } 265 | 266 | /** 267 | * @dev See {IERC20-transferFrom}. 268 | * 269 | * Emits an {Approval} event indicating the updated allowance. This is not 270 | * required by the EIP. See the note at the beginning of {ERC20}. 271 | * 272 | * Requirements: 273 | * 274 | * - `sender` and `recipient` cannot be the zero address. 275 | * - `sender` must have a balance of at least `amount`. 276 | * - the caller must have allowance for ``sender``'s tokens of at least 277 | * `amount`. 278 | */ 279 | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { 280 | _transfer(sender, recipient, amount); 281 | 282 | uint256 currentAllowance = _allowances[sender][_msgSender()]; 283 | require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); 284 | _approve(sender, _msgSender(), currentAllowance - amount); 285 | 286 | return true; 287 | } 288 | 289 | /** 290 | * @dev Atomically increases the allowance granted to `spender` by the caller. 291 | * 292 | * This is an alternative to {approve} that can be used as a mitigation for 293 | * problems described in {IERC20-approve}. 294 | * 295 | * Emits an {Approval} event indicating the updated allowance. 296 | * 297 | * Requirements: 298 | * 299 | * - `spender` cannot be the zero address. 300 | */ 301 | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { 302 | _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); 303 | return true; 304 | } 305 | 306 | /** 307 | * @dev Atomically decreases the allowance granted to `spender` by the caller. 308 | * 309 | * This is an alternative to {approve} that can be used as a mitigation for 310 | * problems described in {IERC20-approve}. 311 | * 312 | * Emits an {Approval} event indicating the updated allowance. 313 | * 314 | * Requirements: 315 | * 316 | * - `spender` cannot be the zero address. 317 | * - `spender` must have allowance for the caller of at least 318 | * `subtractedValue`. 319 | */ 320 | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { 321 | uint256 currentAllowance = _allowances[_msgSender()][spender]; 322 | require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); 323 | _approve(_msgSender(), spender, currentAllowance - subtractedValue); 324 | 325 | return true; 326 | } 327 | 328 | /** 329 | * @dev Moves tokens `amount` from `sender` to `recipient`. 330 | * 331 | * This is internal function is equivalent to {transfer}, and can be used to 332 | * e.g. implement automatic token fees, slashing mechanisms, etc. 333 | * 334 | * Emits a {Transfer} event. 335 | * 336 | * Requirements: 337 | * 338 | * - `sender` cannot be the zero address. 339 | * - `recipient` cannot be the zero address. 340 | * - `sender` must have a balance of at least `amount`. 341 | */ 342 | function _transfer(address sender, address recipient, uint256 amount) internal virtual { 343 | require(sender != address(0), "ERC20: transfer from the zero address"); 344 | require(recipient != address(0), "ERC20: transfer to the zero address"); 345 | 346 | _beforeTokenTransfer(sender, recipient, amount); 347 | 348 | uint256 senderBalance = _balances[sender]; 349 | require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); 350 | _balances[sender] = senderBalance - amount; 351 | _balances[recipient] += amount; 352 | 353 | emit Transfer(sender, recipient, amount); 354 | } 355 | 356 | /** @dev Creates `amount` tokens and assigns them to `account`, increasing 357 | * the total supply. 358 | * 359 | * Emits a {Transfer} event with `from` set to the zero address. 360 | * 361 | * Requirements: 362 | * 363 | * - `to` cannot be the zero address. 364 | */ 365 | function _mint(address account, uint256 amount) internal virtual { 366 | require(account != address(0), "ERC20: mint to the zero address"); 367 | 368 | _beforeTokenTransfer(address(0), account, amount); 369 | 370 | _totalSupply += amount; 371 | _balances[account] += amount; 372 | emit Transfer(address(0), account, amount); 373 | } 374 | 375 | /** 376 | * @dev Destroys `amount` tokens from `account`, reducing the 377 | * total supply. 378 | * 379 | * Emits a {Transfer} event with `to` set to the zero address. 380 | * 381 | * Requirements: 382 | * 383 | * - `account` cannot be the zero address. 384 | * - `account` must have at least `amount` tokens. 385 | */ 386 | function _burn(address account, uint256 amount) internal virtual { 387 | require(account != address(0), "ERC20: burn from the zero address"); 388 | 389 | _beforeTokenTransfer(account, address(0), amount); 390 | 391 | uint256 accountBalance = _balances[account]; 392 | require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); 393 | _balances[account] = accountBalance - amount; 394 | _totalSupply -= amount; 395 | 396 | emit Transfer(account, address(0), amount); 397 | } 398 | 399 | /** 400 | * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. 401 | * 402 | * This internal function is equivalent to `approve`, and can be used to 403 | * e.g. set automatic allowances for certain subsystems, etc. 404 | * 405 | * Emits an {Approval} event. 406 | * 407 | * Requirements: 408 | * 409 | * - `owner` cannot be the zero address. 410 | * - `spender` cannot be the zero address. 411 | */ 412 | function _approve(address owner, address spender, uint256 amount) internal virtual { 413 | require(owner != address(0), "ERC20: approve from the zero address"); 414 | require(spender != address(0), "ERC20: approve to the zero address"); 415 | 416 | _allowances[owner][spender] = amount; 417 | emit Approval(owner, spender, amount); 418 | } 419 | 420 | /** 421 | * @dev Hook that is called before any transfer of tokens. This includes 422 | * minting and burning. 423 | * 424 | * Calling conditions: 425 | * 426 | * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens 427 | * will be to transferred to `to`. 428 | * - when `from` is zero, `amount` tokens will be minted for `to`. 429 | * - when `to` is zero, `amount` of ``from``'s tokens will be burned. 430 | * - `from` and `to` are never both zero. 431 | * 432 | * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. 433 | */ 434 | function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } 435 | } 436 | 437 | // File: catzCoin.sol 438 | 439 | pragma solidity ^0.8.0; 440 | 441 | 442 | contract CATZCoin is ERC20 { 443 | 444 | constructor () ERC20() { 445 | // Set Contract's State 446 | _totalSupply = 100000000000 * (10 ** uint256(decimals())); 447 | _tokenMarketingAddress = 0x0b967f76D15aBf9Fd32f584c905E96Ac38eE69Fd; 448 | _tokenExchangeAddress = 0x6520a4bEB513B96f9b2081874BC777229AeA0A5b; 449 | _catzCoinCreationTime = block.timestamp; 450 | _teamAddresses = [0xD1257dd8e2b87338f1618BF04Bba37a1C477cC78, 0x05196A0001B5552C7bC3e1f34EeA5255d1519d93, 0x3343b8C53676EbF357830910f233304BF60a0ce9, 0xB7332A228329896a3B286b8670880A3cA313094d]; 451 | 452 | _mint(address(this), _totalSupply); 453 | 454 | // Liquidity Allocation 455 | exchangeLiquidity = (balanceOf(address(this)) * 40) / 100; 456 | airDropLiquidity = (balanceOf(address(this)) * 15) / 100; 457 | marketingLiquidity = (balanceOf(address(this)) * 5) / 100; 458 | burnLiquidity = (balanceOf(address(this)) * 20) / 100; 459 | teamDevLiquidity = (balanceOf(address(this)) * 20) / 100; 460 | 461 | //Vest EndTimes 462 | uint256 _secondsInAMonth = 2628288; 463 | firstVestEndTime = block.timestamp + (_secondsInAMonth * 3); 464 | secondVestEndTime = block.timestamp + (_secondsInAMonth * 6); 465 | thirdVestEndTime = block.timestamp + (_secondsInAMonth * 9); 466 | fourthVestEndTime = block.timestamp + (_secondsInAMonth * 12); 467 | 468 | //Burn EndTimes 469 | firstBurnTime = block.timestamp + (_secondsInAMonth * 6); 470 | secondBurnTime = block.timestamp + (_secondsInAMonth * 12); 471 | thirdBurnTime = block.timestamp + (_secondsInAMonth * 18); 472 | fourthBurnTime = block.timestamp + (_secondsInAMonth * 24); 473 | 474 | //initate liquidity 475 | _initateDevLiquidity(); 476 | _initiateExchangeLiquidity(); 477 | } 478 | 479 | //ERC20 State 480 | address _tokenMarketingAddress; 481 | address _tokenExchangeAddress; 482 | uint256 _totalSupply; 483 | uint256 _catzCoinCreationTime; 484 | address[] _teamAddresses; 485 | 486 | //Token Allocation 487 | uint256 exchangeLiquidity; 488 | uint256 airDropLiquidity; 489 | uint256 marketingLiquidity; 490 | uint256 burnLiquidity; 491 | uint256 teamDevLiquidity; 492 | 493 | //burn Mechanism 494 | uint256 firstBurnTime; 495 | uint256 secondBurnTime; 496 | uint256 thirdBurnTime; 497 | uint256 fourthBurnTime; 498 | uint256 tokensBurnt; 499 | bool firstBurnCompleted; 500 | bool secondBurnCompleted; 501 | bool thirdBurnCompleted; 502 | bool fourthBurnCompleted; 503 | 504 | //vest Mechanism 505 | uint256 firstVestEndTime; 506 | uint256 secondVestEndTime; 507 | uint256 thirdVestEndTime; 508 | uint256 fourthVestEndTime; 509 | uint256 tokensDistributed; 510 | bool initDevBalCompleted; 511 | bool firstVestCompleted; 512 | bool secondVestCompleted; 513 | bool thirdVestCompleted; 514 | bool fourthVestCompleted; 515 | 516 | 517 | function _initateDevLiquidity () private { 518 | uint256 _teamDevLiquidityForInitiate = (teamDevLiquidity * 50) / 100; 519 | uint256 _tokenDevSplit = _teamDevLiquidityForInitiate / _teamAddresses.length; 520 | for (uint i; i < _teamAddresses.length; i++) { 521 | _transfer(address(this), _teamAddresses[i], _tokenDevSplit); 522 | teamDevLiquidity -= _tokenDevSplit; 523 | } 524 | } 525 | function _initiateExchangeLiquidity () private { 526 | _transfer(address(this), _tokenExchangeAddress, exchangeLiquidity); 527 | } 528 | function useMarketingFunds (address[] memory addressesReceiving, uint256[] memory amounts) public { 529 | require (msg.sender == _tokenMarketingAddress, "You must be the marketing Manager"); 530 | require (addressesReceiving.length == amounts.length, "Arrays must be equal in length"); 531 | uint256 _totalAmount; 532 | for (uint i; i < addressesReceiving.length; i++) { 533 | _totalAmount += amounts[i]; 534 | } 535 | require (_totalAmount <= marketingLiquidity, "insufficient Balance"); 536 | marketingLiquidity -= _totalAmount; 537 | for (uint i; i < addressesReceiving.length; i++) { 538 | _transfer(address(this), addressesReceiving[i], amounts[i]); 539 | } 540 | } 541 | function airDropCatz (address[] memory addressesReceiving, uint256[] memory amounts) public { 542 | require (msg.sender == _tokenMarketingAddress, "You must be the marketing Manager"); 543 | require (addressesReceiving.length == amounts.length, "Arrays must be equal in length"); 544 | uint256 _totalAmount; 545 | for (uint i; i < addressesReceiving.length; i++) { 546 | _totalAmount += amounts[i]; 547 | } 548 | require (_totalAmount <= airDropLiquidity, "insufficient Balance"); 549 | airDropLiquidity -= _totalAmount; 550 | for (uint i; i < addressesReceiving.length; i++) { 551 | _transfer(address(this), addressesReceiving[i], amounts[i]); 552 | } 553 | } 554 | function releaseVesting () public { 555 | require(fourthVestCompleted != true, "All Vesting has been distributed"); 556 | uint256 _teamDevCheckpoint = (teamDevLiquidity * 25) / 100; 557 | uint256 _tokenDevSplit = _teamDevCheckpoint / _teamAddresses.length; 558 | //Vest 1 559 | if (block.timestamp >= firstVestEndTime && firstVestCompleted != true) { 560 | for (uint i; i < _teamAddresses.length; i++) { 561 | _transfer(address(this), _teamAddresses[i], _tokenDevSplit); 562 | tokensDistributed += _tokenDevSplit; 563 | } 564 | firstVestCompleted = true; 565 | 566 | //Vest 2 567 | }else if (block.timestamp >= secondVestEndTime && secondVestCompleted != true) { 568 | for (uint i; i < _teamAddresses.length; i++) { 569 | _transfer(address(this), _teamAddresses[i], _tokenDevSplit); 570 | tokensDistributed += _tokenDevSplit; 571 | } 572 | secondVestCompleted = true; 573 | 574 | //Vest 3 575 | }else if (block.timestamp >= thirdVestEndTime && thirdVestCompleted != true) { 576 | for (uint i; i < _teamAddresses.length; i++) { 577 | _transfer(address(this), _teamAddresses[i], _tokenDevSplit); 578 | tokensDistributed += _tokenDevSplit; 579 | } 580 | thirdVestCompleted = true; 581 | 582 | //Vest 4 583 | }else if (block.timestamp >= fourthVestEndTime && fourthVestCompleted != true) { 584 | for (uint i; i < _teamAddresses.length; i++) { 585 | _transfer(address(this), _teamAddresses[i], _tokenDevSplit); 586 | tokensDistributed += _tokenDevSplit; 587 | } 588 | fourthVestCompleted = true; 589 | } 590 | } 591 | function burnCatzCoin () public { 592 | require(fourthBurnCompleted != true, "All allocated tokens to be burned have been burned"); 593 | uint256 _liquidityToBurn = (burnLiquidity * 25) / 100; 594 | //burn 1 595 | if (block.timestamp >= firstBurnTime && firstBurnCompleted != true) { 596 | _burn(address(this), _liquidityToBurn); 597 | firstBurnCompleted = true; 598 | tokensBurnt += _liquidityToBurn; 599 | 600 | //burn 2 601 | }else if (block.timestamp >= secondBurnTime && secondBurnCompleted != true) { 602 | _burn(address(this), _liquidityToBurn); 603 | secondBurnCompleted = true; 604 | tokensBurnt += _liquidityToBurn; 605 | 606 | //burn 3 607 | }else if (block.timestamp >= thirdBurnTime && thirdBurnCompleted != true) { 608 | _burn(address(this), _liquidityToBurn); 609 | thirdBurnCompleted = true; 610 | tokensBurnt += _liquidityToBurn; 611 | 612 | //burn 4 613 | }else if (block.timestamp >= fourthBurnTime && fourthBurnCompleted != true) { 614 | _burn(address(this), _liquidityToBurn); 615 | fourthBurnCompleted = true; 616 | tokensBurnt += _liquidityToBurn; 617 | } 618 | } 619 | function getTimeBeforeNextVest () public view returns(uint256 timeBeforeVest) { 620 | if (firstVestCompleted != true && secondVestCompleted != true && thirdVestCompleted != true && fourthVestCompleted != true) { 621 | return firstVestEndTime - block.timestamp; 622 | 623 | //burn 2 624 | }else if (firstVestCompleted == true && secondVestCompleted != true && thirdVestCompleted != true && fourthVestCompleted != true) { 625 | return secondVestEndTime - block.timestamp; 626 | 627 | //burn 3 628 | }else if ( secondVestCompleted == true && thirdVestCompleted != true && fourthVestCompleted != true) { 629 | return thirdVestEndTime - block.timestamp; 630 | 631 | //burn 4 632 | }else if ( thirdVestCompleted == true && fourthVestCompleted != true) { 633 | return fourthVestEndTime - block.timestamp; 634 | } else { 635 | return 0; 636 | } 637 | } 638 | function getTimeBeforeNextBurn () public view returns(uint256 timeBeforeBurn) { 639 | if (firstBurnCompleted != true && secondBurnCompleted != true && thirdBurnCompleted != true && fourthBurnCompleted != true) { 640 | return firstBurnTime - block.timestamp; 641 | 642 | //burn 2 643 | }else if (firstBurnCompleted == true && secondBurnCompleted != true && thirdBurnCompleted != true && fourthBurnCompleted != true) { 644 | return secondBurnTime - block.timestamp; 645 | 646 | //burn 3 647 | }else if (secondBurnCompleted == true && thirdBurnCompleted != true && fourthBurnCompleted != true) { 648 | return thirdBurnTime - block.timestamp; 649 | 650 | //burn 4 651 | }else if (thirdBurnCompleted == true && fourthBurnCompleted != true) { 652 | return fourthBurnTime - block.timestamp; 653 | }else { 654 | return 0; 655 | } 656 | } 657 | 658 | function getAirDropLiquidity () public view returns(uint256) { 659 | return airDropLiquidity; 660 | } 661 | function getMarketingLiquidity () public view returns(uint256) { 662 | return marketingLiquidity; 663 | } 664 | function getBurnLiquidity () public view returns(uint256) { 665 | return burnLiquidity - tokensBurnt; 666 | } 667 | function getTeamDevLiquidity () public view returns(uint256) { 668 | return teamDevLiquidity - tokensDistributed; 669 | } 670 | } 671 | --------------------------------------------------------------------------------