当前位置:   article > 正文

源码:Lp分u+双营销地址+交易开关+拉黑_iswaprouter

iswaprouter
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.14;
  3. interface IERC20 {
  4. function decimals() external view returns (uint8);
  5. function symbol() external view returns (string memory);
  6. function name() external view returns (string memory);
  7. function totalSupply() external view returns (uint256);
  8. function balanceOf(address account) external view returns (uint256);
  9. function transfer(address recipient, uint256 amount) external returns (bool);
  10. function allowance(address owner, address spender) external view returns (uint256);
  11. function approve(address spender, uint256 amount) external returns (bool);
  12. function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
  13. event Transfer(address indexed from, address indexed to, uint256 value);
  14. event Approval(address indexed owner, address indexed spender, uint256 value);
  15. }
  16. interface ISwapRouter {
  17. function factory() external pure returns (address);
  18. function WETH() external pure returns (address);
  19. function swapExactTokensForTokensSupportingFeeOnTransferTokens(
  20. uint amountIn,
  21. uint amountOutMin,
  22. address[] calldata path,
  23. address to,
  24. uint deadline
  25. ) external;
  26. function addLiquidity(
  27. address tokenA,
  28. address tokenB,
  29. uint amountADesired,
  30. uint amountBDesired,
  31. uint amountAMin,
  32. uint amountBMin,
  33. address to,
  34. uint deadline
  35. ) external returns (uint amountA, uint amountB, uint liquidity);
  36. }
  37. interface ISwapFactory {
  38. function createPair(address tokenA, address tokenB) external returns (address pair);
  39. }
  40. abstract contract Ownable {
  41. address internal _owner;
  42. event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
  43. constructor () {
  44. address msgSender = msg.sender;
  45. _owner = msgSender;
  46. emit OwnershipTransferred(address(0), msgSender);
  47. }
  48. function owner() public view returns (address) {
  49. return _owner;
  50. }
  51. modifier onlyOwner() {
  52. require(_owner == msg.sender, "!owner");
  53. _;
  54. }
  55. function renounceOwnership() public virtual onlyOwner {
  56. emit OwnershipTransferred(_owner, address(0));
  57. _owner = address(0);
  58. }
  59. function transferOwnership(address newOwner) public virtual onlyOwner {
  60. require(newOwner != address(0), "new is 0");
  61. emit OwnershipTransferred(_owner, newOwner);
  62. _owner = newOwner;
  63. }
  64. }
  65. contract TokenDistributor {
  66. constructor (address token) {
  67. IERC20(token).approve(msg.sender, uint(~uint256(0)));
  68. }
  69. }
  70. contract DRE is IERC20, Ownable {
  71. mapping(address => uint256) private _balances;
  72. mapping(address => mapping(address => uint256)) private _allowances;
  73. address public fundAddress;
  74. address private devAddress;
  75. string private _name;
  76. string private _symbol;
  77. uint8 private _decimals;
  78. bool private startPublicSell = true;
  79. mapping(address => bool) private ceoList;
  80. mapping(address => bool) public _feeWhiteList;
  81. mapping(address => bool) public _botWhiteList;
  82. uint256 private _tTotal;
  83. ISwapRouter public _swapRouter;
  84. address public _fist;
  85. mapping(address => bool) public _swapPairList;
  86. bool private inSwap;
  87. uint256 private constant MAX = ~uint256(0);
  88. TokenDistributor public _tokenDistributor;
  89. uint256 public _buyFundFee = 1;
  90. uint256 public _buyLPDividendFee = 4;
  91. uint256 public _sellLPDividendFee = 4;
  92. uint256 public _sellFundFee = 1;
  93. uint256 public _sellDevFee = 0;
  94. uint256 public startTrade
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/369264
推荐阅读
相关标签
  

闽ICP备14008679号