如何創建蜜罐令牌
您也可以觀看影片教學:YouTube
第 1 部分:使用 Metamask 和 Remix Ethereum 建立蜜罐代幣
將檔案命名為任意名稱,請務必在末尾加上 .sol,例如:
ether.sol


4)點選面板左側的圖標,如下圖:


接下來需要選擇編譯器,如下: 0.8.20...


然後點選Compile按鈕


5)程式碼編譯成功後,點選面板左側的圖標,如下圖:


選擇Injected Provider – MetaMask,因為我們使用的是這個錢包:


根據您所需的代幣發行網絡配置 Metamask 錢包中的網絡。 您可以在以太坊主網、幣安智能鏈、基礎主網和任何其他網路上發行代幣。 我們選擇幣安智能鍊是因為它的費用最低。
您可以在此處閱讀有關在 Metamask 錢包中更改網絡的說明
在 Metamask 彈出視窗中,確認將您的錢包連接到該網站:


6) 在"Contract"部分,選擇合約__Token__ - 您的檔案名,如下所示:


接下來,按一下箭頭:
此步驟是配置令牌所必需的


輸入要建立的令牌的參數:
_TOKENNAME – 令牌的全名
_TOKENSYMBOL – 令牌的縮寫名稱
_MINTAMOUNT – 發行的代幣數量


7) 完成代幣設定後,點選"transact"按鈕:


在 Metamask 彈出視窗中,確認交易:
確保 Metamask 已連接到 Remix IDE


8)太棒了! 您的代幣已創建,現在您可以將其添加到您的錢包中。
為此,請轉到您的 Metamask 錢包:


接下來,前往"Activity"部分並點選"Contract deployment":


點選"View on block explorer":


複製您代幣的合約地址,點擊按鈕,如下圖:


9) 返回 Metamask
前往"Tokens"部分,然後點選"Import tokens":


貼上複製的合約位址,點選"Next",然後點選"Import":


偉大的! 您的代幣已添加到您的錢包中。
這種創建代幣的方法適用於任何其他網路。
第2部分. 在 Uniswap 或 PancakeSwap 上列出代幣並啟用"Honeypot 代幣"模式
合约核实
在增加流動性之前,我們需要驗證智能合約,以便投資者不會迴避購買我們的代幣。 經過驗證的智能合約顯著提高了代幣的受歡迎程度。此外,如果我們已經驗證了智能合約,我們可以根據您發行代幣的網絡,透過 Basescan、etherscan 或 bscscan 來管理合約功能。
1) 進入Metamask錢包,進入"Activity"部分,點選"Contract Deployment".


2) 點選"View on block explorer":


3) 點選您的代幣的藍色合約地址:


4) 在此頁面,點選"Contract",然後點選"Verify and Publish":


5) 接下來,進行如下所示的設定。 之後,點選"Continue":


6)回到智能合約的原始碼,將其完全複製並貼上到此處。
您也可以從 Remix Ethereum 複製編譯後的程式碼。
"不允許更改程式碼,因為您將無法通過驗證。您必須貼上與編譯到 Remix Ethereum 中的相同程式碼。"
原始碼:蜜罐令牌




7) 進行驗證,點選"Verify and Publish"


8) 您應該看到如下所示的成功訊息。 如果您有不同的訊息,請仔細檢查您執行的所有步驟以確保它們正確。


祝贺你! 您的合同已成功验证,现在我们可以继续增加流动性。
增加流动性
在啟用"Honeypot Token"模式並阻止其他人出售之前,我們需要在Uniswap(以太坊/基礎網絡)或PancakeSwap(幣安智能鍊網路)添加流動性。
添加流動性後,我們可以取得流動性池的地址,隨後透過"setOptions"功能禁止代幣銷售。
*透過這種方法,套利機器人或人將無法在 PancakeSwap 和 Uniswap 上出售您的代幣,在您啟用蜜罐模式之前,蜜罐偵測器不會掃描代幣。*
增加流動性的核心是在 DEX 交易所上架您的代幣。
如果您在乙太坊主網/基礎主網路上發行了 ERC-20 代幣,請參閱為 Uniswap 新增流動性的說明: 說明
如果您在 BNB 鏈上發行了 BEP-20 代幣,請參閱為 PancakeSwap 添加流動性的說明: 說明
一旦您為 Uniswap 或 PancakeSwap 添加流動性,您的代幣就會自動在去中心化交易所 coinmarketcap 和 dexscreener 上列出。
在這裡您可以查看您的代幣圖表和其他資訊:coinmarketcap < br>簡單將您的令牌地址插入網站的搜尋欄中並獲取資訊。
启用"蜜罐令牌"模式
當我們為代幣添加流動性後,我們就可以進入禁止向其他人出售代幣的階段
為此,請轉到您的 Metamask 錢包
進入"Activity"部分,點選最後一個增加流動性的操作"Add Liquidity ETH":


接下來,點選"View on block explorer":


接下來,前往"Logs"部分:


複製流動性池位址:


找到 "setOptions" 函數,將複製的位址貼到此處:


新增地址後,展開"setOptions"函數,點選"Transact"按鈕:


在Metamask彈出視窗中確認交易:


偉大的,現在只有您可以出售您的代幣! 其他人購買後將無法出售此代幣! 當嘗試向其他買家出售代幣時,會出現錯誤:

現在我們可以透過按鍵來開啟和關閉「蜜罐令牌」模式
為了關閉「蜜罐令牌」模式,我們需要找到" deinitialize」函數< /span> 並點擊它:


之後,在 Metamask 彈出視窗中確認交易:


「蜜罐令牌」模式已成功停用,現在我們可以重新啟用它< /span>跨度 >
為了啟用恢復「蜜罐令牌」模式,我們需要找到"初始化」函數並點擊它:
之後,在Metamask彈出視窗中確認交易


這種方法的優點是您可以在任何方便的時候啟用"蜜罐令牌”模式。毫無戒心的投資者將無法再出售代幣。您也可以隨時開啟和關閉「蜜罐令牌」模式。
在白名單中新增和刪除地址
啟用"蜜罐代幣”模式後添加到白名單的地址可以像您一樣出售代幣。您可以在白名單中新增和刪除地址。
為了將地址添加到白名單,您需要找到"viewHolders"函數並插入您想要允許出售代幣的錢包地址:


新增位址後,展開"viewHolders"功能,點選"Transact"按鈕,在Metamask彈窗中確認交易向上視窗:


為了從白名單中刪除地址,您需要找到"getHolders"函數並插入您想要禁止出售代幣的錢包地址:


插入位址後,展開"getHolders"功能,點選"交易"按鈕,在介面中確認交易Metamask 彈出視窗:


請記住,這些文章僅用於教育目的!
若要新增或刪除始終屬於您的流動性,您可以閱讀說明:
如有任何問題或個別訂單,請寫信至:ethercodeinnovation7@gmail.com
我們將根據您的要求開發客製化智能合約。