← 返回
开发者工具 Key 中文

trongrid-contract-analysis

Analyze TRON smart contracts including deployment info, ABI methods, transaction patterns, top callers, energy costs, and safety assessment. Use when a user...
分析TRON智能合约,涵盖部署信息、ABI方法、交易模式、主要调用者、能量消耗及安全评估。当用户...
greason
开发者工具 clawhub v1.0.2 2 版本 100000 Key: 需要
★ 0
Stars
📥 580
下载
💾 7
安装
2
版本
#latest

概述

Contract Analysis

Perform deep analysis of TRON smart contracts — deployment details, method signatures, call patterns, top callers, energy economics, and safety risk assessment.

MCP Server

Instructions

Step 1: Fetch Contract Basics

Run in parallel:

  1. getContractInfo — Contract name, deployer (origin_address), consume_user_resource_percent, origin_energy_limit, creation time, energy usage stats
  2. getContract — Full ABI definition, bytecode, whether ABI is available (indicates open-source status)

Step 2: Parse Contract Methods

From the ABI, categorize all methods:

  • Read-only (view/pure): Safe calls, no state changes
  • State-changing: transfers, approvals, settings
  • Admin/Owner: privileged ops (mint, pause, blacklist, upgrade)
  • Events: what the contract logs

Identify standard interfaces: TRC-20, TRC-721, TRC-1155, proxy/upgradeable patterns.

Step 3: Analyze Transaction Activity

  1. getContractTransactions — Total count, recent patterns, success/failure rate
  2. getEventsByContractAddress — Most frequent events, parameter patterns
  3. getContractInternalTransactions — Inter-contract calls, TRX transfers within execution

Step 4: Identify Top Callers

From transaction data, aggregate:

  • Top 5 by transaction count
  • Top 5 by value (TRX or token amount)
  • Classify callers: exchange, bot, regular user, other contract

Step 5: Estimate Energy Costs

Call estimateEnergy with common method calls to assess:

  • Typical energy cost per transaction type
  • Whether the contract is energy-efficient
  • Cost split between user and contract owner (based on consume_user_resource_percent)

Step 6: Safety Assessment

High Risk indicators:

  • No ABI (unverified/closed source)
  • Unlimited mint capability
  • Pause/freeze can lock user funds
  • Blacklist function, self-destruct, hidden transfer fees
  • Proxy pattern (upgradeable logic)
  • consume_user_resource_percent = 100 (users pay all energy)

Medium Risk indicators:

  • Very few unique callers vs. high tx count
  • Recently created with sudden high activity
  • Admin functions without timelock/multisig

Positive indicators:

  • Open-source verified, standard implementation
  • Timelock on admin functions, multisig requirements
  • Long history with consistent activity, diverse callers

Step 7: Compile Contract Report

## Contract Analysis: [address]

### Deployment
- Name: [name] | Deployer: [address]
- Deployed: [date] | Open Source: [Yes/No]
- Standard: [TRC-20/TRC-721/Custom]

### Methods
- Total: [count] (Read: [X], Write: [Y], Admin: [Z])

### Top Methods (by call frequency)
| Method | Calls | Avg Energy |
|--------|-------|------------|
| transfer() | XX,XXX | X,XXX |

### Top Callers
| Address | Tx Count | Label |
|---------|----------|-------|
| TXxx... | X,XXX | [Exchange/Bot/Unknown] |

### Activity
- Total Txs: [count] | Daily Avg: [count]
- Success Rate: [X.X%] | Unique Callers: [count]

### Energy Economics
- User Pays: [X%] | Avg Energy/Tx: [amount]

### Safety Score: [Safe / Caution / High Risk]
- Risk Factors: [list]
- Positive Factors: [list]
- Recommendation: [actionable advice]

Error Handling

ErrorCauseResolution
--------------------------
No ABI foundContract not verified or ABI clearedNote as unverified; analyze bytecode patterns and transaction data instead
Address is not a contractRegular account address providedInform user this is a regular account, suggest using trongrid-account-profiling skill
No transactionsNewly deployed or unused contractReport as inactive; check deployer's other contracts for context
Contract self-destructedContract no longer exists on-chainInform user; historical tx data may still be available

Examples

版本历史

共 2 个版本

  • v1.0.2 当前
    2026-03-29 21:44 安全 安全
  • v1.0.1
    2026-03-19 09:05

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 666 📥 323,652
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 920 📥 185,699
data-analysis

trongrid-block-info

greason
{"answer":"查询并分析波场区块,包含出块者信息、交易明细、奖励、销毁和网络负载。用于用户询问特定区块……"}
★ 0 📥 582