How to create a honeypot token
Part 1. Using Metamask and Remix Ethereum to create a honeypot token
1) Go to the website metamask
Register your wallet and install the extension in your browser
2) Go to the website Remix Ethereum
Click "Create a new file"
Name the file by any name, be sure to add .sol at the end, example:
ether.sol
3) Copy our Honeypot code to create a token here
Paste the code:
4) Click on the icon on the left side of the panel as shown below:
Next you need to select the compiler, as shown below: 0.8.20...
Then click the "Compile" button
5) After successfully compiling the code, click on the icon on the left side of the panel as shown below:
Select "Injected Provider – MetaMask", since we are using this wallet:
Set up the network in the Metamask wallet according to the desired network for issuing tokens. You can issue tokens on the Ethereum Mainnet, Binance Smart Chain, Base Mainnet and any others. We chose Binance Smart Chain because it has low commissions.
You can read the instructions for changing the network in the Metamask wallet here
In the Metamask pop-up window, confirm connecting your wallet to the site:
6) In the "Contract" section, select the contract __Token__ - the name of your file, as shown below:
Next, click on the arrow:
This step is necessary to configure the token
Enter the parameters of the token to be created:
_TOKENNAME – full name of the token
_TOKENSYMBOL – abbreviated name of the token
_MINTAMOUNT – number of tokens issued
7) After completing the token setup, click the "transact" button:
In the Metamask pop-up window, confirm the transaction:
Make sure Metamask is connected to Remix IDE
8) Your token has been created, now you can add it to your wallet.
To do this, go to your Metamask wallet:
Next, go to the "Activity" section and click "Contract deployment":
Click "View on block explorer":
Copy the contract address of your token, click on the button as shown below:
9) Return to Metamask
Go to the "Tokens" section and click "Import tokens":
Paste the copied contract address, click "Next" and then "Import":
Great! Your tokens have been added to your wallet.
This method of creating tokens works in any other networks.
Part 2. Listing the token on Uniswap or PancakeSwap and enabling the "Honeypot token" mode
Contract verification
Before adding liquidity, we need to verify the smart contract so that investors do not shy away from buying our token. A verified smart contract significantly increases the popularity of the token. Also, if we have verified the smart contract, we can manage the contract functions via basescan, etherscan or bscscan depending on the network on which you issued the tokens.
1) Go to the Metamask wallet, go to the "Activity" section, click "Contract Deployment".
2) Click "View on block explorer":
3) Click on the blue contract address of your token:
4) On this page, click "Contract", then click "Verify and Publish":
5) Next, set the settings as shown below. After that, click "Continue":
6) Go back to the source code of the smart contract, copy it completely and paste it here.
You can also copy the compiled code from Remix Ethereum.
*Changes to the code are not allowed, as you will not be able to pass verification. You must paste the same code that you compiled into Remix Ethereum.*
Source code: honeypot token
7) Go through verification, click "Verify and Publish"
8) You should see a success message as shown below. If you have a different message, carefully check all the steps you followed to make sure they are correct.
Congratulations! Your contract has been successfully verified, now we can move on to adding liquidity.
Adding liquidity
Before enabling the "Honeypot Token" mode and preventing other people from selling, we need to add liquidity in Uniswap (Ethereum/Base Network) or PancakeSwap (Binance Smart Chain Network).
After adding liquidity, we can get the address of the liquidity pool and subsequently, through the "setOptions" function, prohibit the sale of tokens.
*With this approach, no arbitrage bots or people will be able to sell your tokens on PancakeSwap and Uniswap, also the token will not be scanned by honeypot detectors until you enable Honeypot mode.*
At its core, adding liquidity is listing your token on DEX exchanges.
If you issued tokens ERC-20 on the Ethereum Mainnet/Base Mainnet network, see the instructions for adding liquidity in Uniswap: instructions
If you issued tokens BEP-20 on the BNB Chain network, see the instructions for adding liquidity in PancakeSwap: instructions
Once you add liquidity to Uniswap or PancakeSwap, your token is automatically listed on the decentralized exchanges coinmarketcap and dexscreener.
On CoinMarketCap you can see your token’s chart and trading history: coinmarketcap
Simple insert the address of your token into the search bar of the site and get information.
Enabling the "Honeypot token" mode
After we have added liquidity to the token, we can proceed to the stage of prohibiting the sale of tokens to other people
To do this, go to your Metamask wallet
Go to the "Activity" section and click on the last operation to add liquidity "Add Liquidity ETH":
Next, click "View on block explorer":
Next, go to the "Logs" section:
Copy the liquidity pool address:
After this we need to return to Remix Ethereum
What should I do if you have closed the Ethereum Remix? Go to the instructions
Expand the functions of the contract:
Find the "setOptions" function, paste the copied address there:
After adding the address, expand the "setOptions" function and click the "Transact" button:
Confirm the transaction in the Metamask pop-up window:
Great, now only you can sell your token! Other people will not be able to sell this token after purchase! When trying to sell tokens to other buyers, an error will occur:
The advantage of this approach is that you can enable the "Scam token" mode at any time convenient for you. The unsuspecting investor will no longer be able to sell the tokens.
Please remember that these articles are for educational purposes!
To add or remove liquidity that always belongs to you, you can read the instructions:
For any questions or individual orders, please write to: https://t.me/VictorPinard
We can develop a custom smart contract for you according to your requirements.