crypto-safety-check
v1.0.0
Published
On-chain token safety checker — honeypot detection, rug pull analysis, ownership concentration, tax checks via GoPlus API
Maintainers
Readme
crypto-safety-check
On-chain token safety checker — detect honeypots, rug pulls, ownership concentration, and hidden taxes before you trade.
Features
- ERC20 validation — verifies basic token contract functions
- Contract code check — detects EOA addresses posing as tokens
- Ownership analysis — flags concentrated token holdings by owner
- Honeypot detection — via GoPlus Security API (free, no key needed)
- Tax analysis — detects hidden buy/sell taxes
- Sell restriction check — flags tokens that prevent full selling
Supported Chains
| Chain | RPC |
|----------|----------------------------------------|
| Ethereum | https://ethereum-rpc.publicnode.com |
| BSC | https://bsc-dataseed1.binance.org |
Installation
npm install -g crypto-safety-checkCLI Usage
# Check a token on Ethereum (default)
crypto-safety-check 0xdAC17F958D2ee523a2206206994597C13D831ec7
# Check a token on BSC
crypto-safety-check 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56 bscOutput is JSON:
{
"safe": true,
"score": 85,
"warnings": [],
"details": {
"symbol": "USDT",
"decimals": 6,
"totalSupply": "...",
"codeSize": 12345
}
}Exit code: 0 if safe, 1 if unsafe.
Programmatic Usage
import { checkTokenSafety } from 'crypto-safety-check';
const result = await checkTokenSafety('0xdAC17F958D2ee523a2206206994597C13D831ec7', 'eth');
console.log(result.safe); // true/false
console.log(result.score); // 0-100
console.log(result.warnings); // string[]
console.log(result.details); // { symbol, decimals, totalSupply, goplus, ... }Safety Score
| Score | Meaning | |--------|----------------------| | 80-100 | Likely safe | | 60-79 | Some concerns | | 0-59 | High risk — avoid |
Warning Codes
HONEYPOT— token cannot be soldHIGH_CONCENTRATION— owner holds >50% of supplyMODERATE_CONCENTRATION— owner holds >20% of supplyHIGH_BUY_TAX/HIGH_SELL_TAX— tax >10%CANNOT_SELL_ALL— selling all tokens is blockedNOT_OPEN_SOURCE— contract source not verifiedINVALID_ERC20— not a valid ERC20 tokenNO_CONTRACT— address has no contract code
License
MIT
