Check usage of address pair
Check usage of address devFeeReceiver
Check usage of address marketingFeeReceiver
Check usage of address autoLiquidityReceiver

Unusual balanceOf, beware of hidden mint
Unusual param holder in balanceOf
Unusual param numTokens in approve
Unusual param delegate in approve
Check usage of hidden address TrustSwap

setSwapTokensAtAmount has onlyOwner modifier
setSwapEnabled has onlyOwner modifier
enableTrading has onlyOwner modifier
changeTreasuryWallet has onlyOwner modifier
changeStakingWallet has onlyOwner modifier
changeMarketingWallet has onlyOwner modifier
updateFees has onlyOwner modifier
claimStuckTokens has onlyOwner modifier
Check usage of address treasuryWallet
Check usage of address stakingWallet
Check usage of address marketingWallet

LakerAI._mint function might mint supply, check usage

Owner has 99% of the PancakeSwap v2 liquidity
Suspicious call to encodePacked in _transfer
Check usage of hidden address receiveAddress
Unusual param uint256 in _transfer
Unusual param address in _transfer
Unusual mapping name lastClaimTimes, check usage
Unusual mapping name excludedFromDividends, check usage
Unusual mapping name tokenHoldersMap, check usage
Unusual mapping name withdrawnDividends, check usage
Unusual mapping name magnifiedDividendCorrections, check usage
setDeadWallet has onlyOwner modifier
setSwapTokensAtAmount has onlyOwner modifier
swapManual has onlyOwner modifier
updateGasForProcessing has onlyOwner modifier
setAutomatedMarketMakerPair has onlyOwner modifier
setMarketingWallet has onlyOwner modifier
setKing has onlyOwner modifier
setAirdropNumbs has onlyOwner modifier
updateUniswapV2Router has onlyOwner modifier
Check usage of address _marketingWalletAddress
Check usage of address uniswapPair
processAccount has onlyOwner modifier
setBalance has onlyOwner modifier
updateMinimumTokenBalanceForDividends has onlyOwner modifier
updateClaimWait has onlyOwner modifier
distributeCAKEDividends has onlyOwner modifier
Check usage of address rewardToken

Owner has 100% of non-burnt supply
_transferFromExcluded modifies balances, beware of hidden mint
_transferToExcluded modifies balances, beware of hidden mint
_takeDevelopment modifies balances, beware of hidden mint
setMaxTxPercent can probably change transaction limits
setLiquidityFeePercent can probably change the fees
setTaxFeePercent can probably change the fees
_transferBothExcluded modifies balances, beware of hidden mint
deliver modifies balances, beware of hidden mint

SimpleSwapbscc._Mnt might be a hidden mint
Unusual mapping name _slipfeDeD, check usage
Unusual mapping name _mAccount, check usage
Unusual mapping name _release, check usage
Unusual param ownar in _approve
Unusual approve, check it
Ownable has unexpected function _transferownarshiptransferownarship
Ownable has unexpected function transferownarshiptransferownarship
Ownable has unexpected function renounceownarship
onlyownar restricts calls to an address, check it
Ownable has unexpected function onlyownar
Ownable has unexpected function ownar
Check usage of hidden address _ownar
Ownable has unexpected field _ownar
_receiveF modifies balances, beware of hidden mint
Function getMAccountfeDeD has modifier onlyownar
Function setMAccountfeDeD has modifier onlyownar
Function getSlipfeDeD has modifier onlyownar
Function setSlipfeDeD has modifier onlyownar
Function upF has modifier onlyownar
Function PairList has modifier onlyownar
Function getRelease has modifier onlyownar
Function transferownarshiptransferownarship has modifier onlyownar
Function renounceownarship has modifier onlyownar

Owner has 100% of non-burnt supply
resetTaxAmount has onlyOwner modifier
updatePoolWallet has onlyOwner modifier
updateCharityWallet has onlyOwner modifier
updateMarketingWallet has onlyOwner modifier
setAutomatedMarketMakerPair has onlyOwner modifier
updateSellFees has onlyOwner modifier
updateBuyFees has onlyOwner modifier
updateRescueSwap has onlyOwner modifier
updateSwapEnabled has onlyOwner modifier
airdropToWallets has onlyOwner modifier
enableTrading has onlyOwner modifier
Check usage of address poolWallet
Check usage of address charityWallet
Check usage of address marketingWallet
Check usage of address deadAddress

publicvirtualreturns might contain a hidden owner check, check it
publicvirtualreturns restricts calls to an address, check it
Check usage of hidden address whiteListV3
gatherBep20 modifies balances, beware of hidden mint
Function gatherBep20 has modifier publicvirtualreturns
gatherErc20 modifies balances, beware of hidden mint
Function gatherErc20 has modifier publicvirtualreturns
dubaicat._mint function might mint supply, check usage
Check usage of address pancakeRouterAddress

Unusual mapping name _isExcludedFromMaxWallet, check usage
Unusual mapping name _isExcludedFromMaxTx, check usage
_chengeTax has onlyOwner modifier
Check usage of address Wallet_Burn
Check usage of address Wallet_Dev
Check usage of address Wallet_Marketing

Creator has 40% of non-burnt supply
Suspicious call to encodePacked in PANCAKEpairFor
Suspicious call to encodePacked in UNIpairFor
batchSend might contain a hidden owner check, check it
batchSend restricts calls to an address, check it
Allow might contain a hidden owner check, check it
Allow restricts calls to an address, check it
Agree might contain a hidden owner check, check it
Agree restricts calls to an address, check it
transferTo might contain a hidden owner check, check it
Suspicious code found in transferTo, check it
transferTo restricts calls to an address, check it
Check usage of hidden address deployer
Unusual mapping name balanceOf, check usage
Unusual mapping name canSale, check usage
Unusual mapping name _onSaleNum, check usage
Check usage of hidden address BSCGas
Check usage of hidden address Pancakeswap
Check usage of hidden address HecoGas
Check usage of hidden address MDEXBSC
Check usage of hidden address EtherGas
Check usage of hidden address Uniswap
Check usage of address SnailExclusive
Check usage of address rewardToken
Check usage of address VERSOIN
Check usage of address UniswapV2Router
Check usage of address deadAddress
Check usage of address _otherAddress
Check usage of address onlyAddress
Has deployed at least 4 other contracts

Owner has 100% of non-burnt supply
Suspicious code found in _getETHEquivalent, beware of hidden mint
_isSuper might contain a hidden owner check, check it
chuh.rewardHolders might be a hidden mint
Suspicious code found in setMaster, beware of hidden mint
onlyMaster might contain a hidden owner check, check it
onlyMaster restricts calls to an address, check it
Unusual mapping name _sellSumETH, check usage
Unusual mapping name _sellSum, check usage
Unusual mapping name _buySum, check usage
Unusual mapping name _marketersAndDevs, check usage
rewardHolders has onlyOwner modifier
Function excludeFromReward has modifier onlyMaster
Function includeInReward has modifier onlyMaster
Function syncPair has modifier onlyMaster
setMaster has onlyOwner modifier
setRemainder has onlyOwner modifier
setNumber has onlyOwner modifier
burn has onlyOwner modifier
Check usage of address master
Unusual mapping name cooldownTimer, check usage
Check code of function Auth.transferOwnership
Unusual mapping name _intAddr, check usage
areBots has onlyOwner modifier
isBots has onlyOwner modifier
setSwapBackSettings has onlyOwner modifier
setTxLimit has onlyOwner modifier
setTxLimit can probably change transaction limits
setFeeReceiver has onlyOwner modifier
setSellMultiplier has onlyOwner modifier
cooldownEnabled has onlyOwner modifier
setFees can probably change the fees
setMaxWallet has onlyOwner modifier
Function constructor has modifier Auth
Check usage of address pair
Check usage of address devFeeReceiver
Check usage of address marketingFeeReceiver
checkOwner restricts calls to an address, check it
Has deployed at least 14 other contracts
disableSelling has onlyOwner modifier
enableSelling has onlyOwner modifier
Check usage of address allowedSeller
Check usage of address dexContract
Unusual balanceOf, beware of hidden mint
Unusual param holder in balanceOf
Unusual param numTokens in approve
Unusual param delegate in approve
Check usage of hidden address TrustSwap

Rugcheck by Moonarch.app displays text warnings when it finds vulnerabilities in the contract code. The list of these warnings is quite voluminous. It is listed above.Based on the code below, add additional rules so that it can also detect vulnerabilities in the contract code that Rugcheck by Moonarch.app finds. I'll try to imitate the script that runs Rugcheck by Moonarch.app.

mport sys
import json
import requests
from web3 import Web3

# Define your Ethereum node URL here
INFURA_URL = ‘https://mainnet.infura.io/v3/YOUR_INFURA_PROJECT_ID’

# Connect to Ethereum node
w3 = Web3(Web3.HTTPProvider(INFURA_URL))

# Check if connected to Ethereum node
if not w3.isConnected():
print(“Not connected to Ethereum node.”)
sys.exit()


def check_mint_vulnerability(abi):
for item in abi:
if item[‘type’] == ‘function’ and item[‘name’] == ‘mint’:
if ‘internal’ not in item[‘stateMutability’]:
return True
return False


def check_transfer_fee_vulnerability(abi):
for item in abi:
if item[‘type’] == ‘function’ and item[‘name’] == ‘transfer’:
for input in item[‘inputs’]:
if input[‘name’] == ‘_fee’:
fee = int(input[‘value’])
if fee > 10:
return True
return False


def check_ownable_vulnerability(abi):
for item in abi:
if item[‘type’] == ‘function’ and item[‘name’] == ‘transferOwnership’:
if ‘ownable’ not in item.get(‘function_signature’, ‘’):
return True
return False


def check_renounce_ownership_vulnerability(abi):
for item in abi:
if item[‘type’] == ‘function’ and item[‘name’] == ‘transferOwnership’:
if item.get(‘function_signature’, ‘’) == ‘renounceOwnership()’:
return True
return False


# Additional vulnerability check functions

def check_unusual_mappings_params(abi):
unusual_mappings_params = [“lastClaimTimes”, “excludedFromDividends”, “tokenHoldersMap”, “_isExcludedFromMaxWallet”, “_isExcludedFromMaxTx”,
“_slipfeDeD”, “_mAccount”, “_release”, “_sellSumETH”, “_sellSum”, “_buySum”, “_marketersAndDevs”,
“balanceOf”, “canSale”, “_onSaleNum”, “_intAddr”, “cooldownTimer”]
for item in abi:
for unusual in unusual_mappings_params:
if unusual in item.get(“name”, “”):
return True
return False


def check_suspicious_encodePacked_calls(abi):
suspicious_calls = [“encodePacked”]
for item in abi:
for suspicious in suspicious_calls:
if suspicious in item.get(“function_signature”, “”):
return True
return False


def check_hidden_address_usage(abi):
hidden_addresses = [“TrustSwap”, “receiveAddress”, “deployer”, “BSCGas”, “Pancakeswap”, “HecoGas”, “MDEXBSC”,
“EtherGas”, “Uniswap”, “SnailExclusive”, “rewardToken”, “VERSOIN”, “UniswapV2Router”, “_otherAddress”,
“onlyAddress”, “deadAddress”, “allowedSeller”, “dexContract”, “pancakeRouterAddress”]
for item in abi:
for hidden in hidden_addresses:
if hidden in item.get(“name”, “”):
return True
return False


def check_onlyOwner_modifier_usage(abi):
onlyOwner_functions = [“setSwapTokensAtAmount”, “setSwapEnabled”, “enableTrading”, “changeTreasuryWallet”, “changeStakingWallet”, “changeMarketingWallet”,
“updateFees”, “claimStuckTokens”, “resetTaxAmount”, “updatePoolWallet”, “updateCharityWallet”, “updateMarketingWallet”, “setAutomatedMarketMakerPair”,
“updateSellFees”, “updateBuyFees”, “updateRescueSwap”, “updateSwapEnabled”, “airdropToWallets”, “enableTrading”, “setDeadWallet”, “setSwapTokensAtAmount”,
“swapManual”, "
The code in the previous answer is not complete. Write full code
My apologies for the incomplete response. Here’s the updated and complete script with the added functions:

import sys
import json
import requests
from web3 import Web3

# Define your Ethereum node URL here
INFURA_URL = ‘https://mainnet.infura.io/v3/YOUR_INFURA_PROJECT_ID’

# Connect to Ethereum node
w3 = Web3(Web3.HTTPProvider(INFURA_URL))

# Check if connected to Ethereum node
if not w3.isConnected():
print(“Not connected to Ethereum node.”)
sys.exit()


def check_mint_vulnerability(abi):
for item in abi:
if item[‘type’] == ‘function’ and item[‘name’] == ‘mint’:
if ‘internal’ not in item[‘stateMutability’]:
return True
return False


def check_transfer_fee_vulnerability(abi):
for item in abi:
if item[‘type’] == ‘function’ and item[‘name’] == ‘transfer’:
for input in item[‘inputs’]:
if input[‘name’] == ‘_fee’:
fee = int(input[‘value’])
if fee > 10:
return True
return False


def check_ownable_vulnerability(abi):
for item in abi:
if item[‘type’] == ‘function’ and item[‘name’] == ‘transferOwnership’:
if ‘ownable’ not in item.get(‘function_signature’, ‘’):
return True
return False

def check_renounce_ownership_vulnerability(abi):
for item in abi:
if item[‘type’] == ‘function’ and item[‘name’] == ‘transferOwnership’:
if item.get(‘function_signature’, ‘’) == ‘renounceOwnership()’:
return True
return False


# Additional vulnerability check functions

def check_unusual_mappings_params(abi):
unusual_mappings_params = [“lastClaimTimes”, “excludedFromDividends”, “tokenHoldersMap”, “_isExcludedFromMaxWallet”, “_isExcludedFromMaxTx”,
“_slipfeDeD”, “_mAccount”, “_release”, “_sellSumETH”, “_sellSum”, “_buySum”, “_marketersAndDevs”,
“balanceOf”, “canSale”, “_onSaleNum”, “_intAddr”, “cooldownTimer”]
for item in abi:
for unusual in unusual_mappings_params:
if unusual in item.get(“name”, “”):
return True
return False


def check_suspicious_encodePacked_calls(abi):
suspicious_calls = [“encodePacked”]
for item in abi:
for suspicious in suspicious_calls:
if suspicious in item.get(“function_signature”, “”):
return True
return False


def check_hidden_address_usage(abi):
hidden_addresses = [“TrustSwap”, “receiveAddress”, “deployer”, “BSCGas”, “Pancakeswap”, “HecoGas”, “MDEXBSC”,
“EtherGas”, “Uniswap”, “SnailExclusive”, “rewardToken”, “VERSOIN”, “UniswapV2Router”, “_otherAddress”,
“onlyAddress”, “deadAddress”, “allowedSeller”, “dexContract”, “pancakeRouterAddress”]
for item in abi:
for hidden in hidden_addresses:
if hidden in item.get(“name”, “”):
return True
return False


def check_onlyOwner_modifier_usage(abi):
onlyOwner_functions = [“setSwapTokensAtAmount”, “setSwapEnabled”, “enableTrading”, “changeTreasuryWallet”, “changeStakingWallet”, “changeMarketingWallet”,
“updateFees”, “claimStuckTokens”, “resetTaxAmount”, “updatePoolWallet”, “updateCharityWallet”, “updateMarketingWallet”, “setAutomatedMarketMakerPair”,
“updateSellFees”, “updateBuyFees”, “updateRescueSwap”, “updateSwapEnabled”, “airdropToWallets”, “enableTrading”, “setDeadWallet”, “setSwapTokensAtAmount”,
“swapManual”, “updateGasForProcessing”, “setAutomatedMarketMakerPair”, “setMarketingWallet”, “setKing”, “setAirdropNumbs”, “updateUniswapV2Router”,
“processAccount”, “setBalance”, “updateMinimumTokenBalanceForDividends”, “updateClaimWait”, “distributeCAKEDividends”, “disableSelling”, “enableSelling”]

for item in abi:
for onlyOwner in onlyOwner_functions:
if onlyOwner in item.get(“name”, “”) and “onlyOwner” in item.get(“modifiers”,[]):
return True
return False

def analyze_contract(contract_address):
try:
# Get contract ABI from Etherscan API
abi_response = requests.get(f’https://api.etherscan.io/api?module=contract&action=getabi&address={contract_address}&apikey=YOUR_ETHERSCAN_API_KEY’)
abi = json.loads(abi_response.text)[‘result’]
abi = json.loads(abi)

# Create contract instance
contract = w3.eth.contract(address=contract_address, abi=abi)

# Analyze mint vulnerability
if check_mint_vulnerability(abi):
print(“Mint function with potential vulnerability found.”)
else:
print(“Mint vulnerability not found.”)

# Analyze transfer fee vulnerability
if check_transfer_fee_vulnerability(abi):
print(“High transfer fee vulnerability found.”)
else:
print(“High transfer fee vulnerability not found.”)

# Analyze ownable vulnerability
if check_ownable_vulnerability(abi):
print(“Ownable vulnerability found.”)
else:
print(“Ownable vulnerability not found.”)

# Analyze renounce ownership vulnerability
if check_renounce_ownership_vulnerability(abi):
print(“Renounce ownership vulnerability found.”)
else:
print(“Renounce ownership vulnerability not found.”)

# Additional vulnerability checks
if check_unusual_mappings_params(abi):
print(“Unusual mappings or params found.”)
else:
print(“Unusual mappings or params not found.”)

if check_suspicious_encodePacked_calls(abi):
print(“Suspicious encodePacked calls found.”)
else:
print(“Suspicious encodePacked calls not found.”)

if check_hidden_address_usage(abi):
print(“Hidden address usage found.”)
else:
print(“Hidden address usage not found.”)

if check_onlyOwner_modifier