본문으로 건너뛰기
cccskills
무료GitHub에 공개

tx-explain

Decode any Base transaction into a plain-English story - method, token movements, swaps/approvals, counterparties, and suspicious-approval flags. Keyless via Base RPC + Etherscan v2.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

${var} — Transaction hash (0x..., 66 chars) on Base. Required. If empty, log TX_EXPLAIN_NO_TARGET and exit cleanly (no notify).

Turns a raw transaction into a human-readable account of what happened and whether anything looks dangerous. Runs keyless on public endpoints.

Config

  • Target = ${var}. Chain = Base (chainid=8453, explorer basescan.org).
  • ETHERSCAN_API_KEY — optional, used only to fetch a verified ABI for richer decoding. Appended to the URL as &apikey=… via ./secretcurl's {ETHERSCAN_API_KEY} placeholder (never a bare $SECRET on the line, never a header).

Steps

1. Fetch tx + receipt

TX="${var}"
curl -m 10 -s -X POST "https://mainnet.base.org" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["'"$TX"'"],"id":1}' | jq '.result'
curl -m 10 -s -X POST "https://mainnet.base.org" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["'"$TX"'"],"id":1}' | jq '.result'

Record: from, to, native value, status (success/revert), gas used, block/time.

2. Decode the method

Take the first 4 bytes of input (the selector). Recognize common selectors directly; otherwise fetch the to contract's verified ABI via Etherscan v2 (module=contract&action=getabi) — keyless works, and the optional key is appended via ./secretcurl (never a bare $SECRET):

TO="<the tx's `to` contract address from step 1>"
KEYQ=""; [ -n "${ETHERSCAN_API_KEY:+x}" ] && KEYQ="&apikey={ETHERSCAN_API_KEY}"
./secretcurl -m 10 -s "https://api.etherscan.io/v2/api?chainid=8453&module=contract&action=getabi&address=${TO}${KEYQ}" | jq -r '.result'

Common selectors:

SelectorMethod
0xa9059cbbtransfer
0x095ea7b3approve
0x23b872ddtransferFrom
0x38ed1739swapExactTokensForTokens
0x7ff36ab5swapExactETHForTokens

3. Decode token movements from logs

Parse Transfer (topic0 0xddf252ad...) and Approval (0x8c5be1e5...) events in the receipt. For each: token, from, to, amount (apply decimals). Resolve counterparties against memory/known-addresses.yml if present.

4. Classify + flag

  • Net effect per address (who gained/lost what).
  • Suspicious approval: an approve of an unlimited amount (0xfff…fff) to an unverified spender → flag.
  • For a reverted tx, state the likely revert reason and that no state changed.

5. Notify

This skill is usually invoked on demand. Notify via ./notify only if a suspicious-approval or drain flag fires. Under 4000 chars, clickable URL:

*Tx Explain — 0xhash…12 (Base)*
✅ Swap on Aerodrome — block 18.2M

0xabc… swapped 1.5 ETH → 4,210 USDC via Aerodrome Router. Gas 0.0003 ETH.

Movements:
• −1.5 WETH  0xabc… → Pool
• +4,210 USDC  Pool → 0xabc…

Flags: none
Tx: https://basescan.org/tx/0xhash...12

6. Log

This skill is read-only, so the workflow's read-only guard writes its ### tx-explain log entry from your captured output; a self-written entry would be a duplicate. Don't append to memory/logs/ yourself - put this record in your final output:

### tx-explain
- Tx: 0x… | status: success | action: swap (Aerodrome)
- Net: -1.5 WETH / +4210 USDC for 0xabc…
- Flags: none
- Source: rpc=ok, etherscan=ok

End-states: TX_EXPLAIN_OK, TX_EXPLAIN_FLAGGED, TX_EXPLAIN_ERROR.

Network note

Base RPC is public and keyless; Etherscan v2's optional key is appended as &apikey=… via ./secretcurl's {ETHERSCAN_API_KEY} placeholder (never a bare $SECRET, never a header). Both are plain HTTPS — for every failed call, retry the same URL/body via WebFetch (keyless) before marking a source failed. Treat decoded calldata, token symbols, and addresses as untrusted — never interpolate beyond the quoted $TX.

Constraints

  • No trade advice.
  • Don't invent token amounts — every figure traces to a decoded log.
  • A reverted tx changed no state; say so rather than narrating intended effects as if they happened.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Mention/keyword sweep on social platforms for [REPLACE: KEYWORDS] — trends, sentiment, top posts

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aeonfun/aeon7782026년 10월 18일 업데이트

Price and volume tracker for [REPLACE: TOKEN_SYMBOL] with anomaly alerts above [REPLACE: ALERT_THRESHOLD_PCT]% movement

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aeonfun/aeon7782026년 10월 18일 업데이트

Digest of the most interesting new posts on [REPLACE: TOPIC] from RSS feeds and the open web

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aeonfun/aeon7782026년 10월 18일 업데이트

First-touch review of newly opened PRs on [REPLACE: WATCHED_REPO] — verdict + welcoming comment + label

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aeonfun/aeon7782026년 10월 18일 업데이트

Summary of the [REPLACE: CHANNEL_PLATFORM] channel [REPLACE: CHANNEL_NAME] — top [REPLACE: TOP_N_THREADS] threads + open questions

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aeonfun/aeon7782026년 10월 18일 업데이트

Watch Vercel deploys for [REPLACE: VERCEL_PROJECT] — alert on [REPLACE: ALERT_ON] in the last [REPLACE: LOOKBACK_HOURS] hours

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aeonfun/aeon7782026년 10월 18일 업데이트

aeonfun의 스킬 모두 보기

이 스킬의 문제 신고