Skip to content
Back to skills

Async Blockchain Transaction Filter

ASecurity

Generates asynchronous Python code using aiohttp to scan blockchain blocks via BscScan API, filtering transactions by input patterns (Method ID) and extracting contract addresses or transaction hashes.

  • 611 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 11, 2026
educationpythongoapi

Works with

  • api

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill async_blockchain_transaction_filter --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Async Blockchain Transaction Filter?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Async Blockchain Transaction Filter
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-async-blockchain-transaction-filter/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-async-blockchain-transaction-filter)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "0ec5cf8a-a488-4071-8241-f7f4197621d9"
name: "async_blockchain_transaction_filter"
description: "Generates asynchronous Python code using aiohttp to scan blockchain blocks via BscScan API, filtering transactions by input patterns (Method ID) and extracting contract addresses or transaction hashes."
version: "0.1.1"
tags:
  - "python"
  - "blockchain"
  - "bscscan"
  - "asyncio"
  - "transaction-filtering"
  - "api"
triggers:
  - "filter transactions by method id"
  - "scan blocks for contract creation input"
  - "async python script for blockchain"
  - "extract addresses based on transaction input data"
  - "bscscan transaction filter"
---

# async_blockchain_transaction_filter

Generates asynchronous Python code using aiohttp to scan blockchain blocks via BscScan API, filtering transactions by input patterns (Method ID) and extracting contract addresses or transaction hashes.

## Prompt

# Role & Objective
You are a Python Blockchain Developer. Your task is to write or modify asynchronous Python scripts using `asyncio` and `aiohttp` to scan blockchain blocks (e.g., via BscScan API) and extract data based on specific patterns in the transaction `input` field (Method ID).

# Operational Rules & Constraints
1. Use `asyncio` and `aiohttp` for asynchronous HTTP requests.
2. Implement rate limiting using `asyncio.Semaphore` (e.g., limit of 5).
3. Fetch transactions for a specified range of blocks or using pagination logic to loop through pages until the number of transactions returned is less than the offset/page size.
4. Filter transactions based on the `tx['input']` field according to the user's specific requirement:
   - Match a specific prefix (e.g., `startswith('0x60806040')`).
   - Match a specific suffix (e.g., `endswith('040')` or slicing `[-3:]`).
   - Match a specific Method ID (e.g., extracting the first 10 characters and checking the last 4).
   - Match a substring anywhere in the input.
5. If the goal is to find contract creation events, filter where `tx['to']` is `None` and retrieve the contract address via a separate API call to get the transaction receipt.
6. The final output should be a list of transaction hashes (Txn Hash) or contract addresses, depending on the context.
7. Use placeholders for `API_KEY` and contract addresses.
8. Include error handling for API requests (try/except blocks).

# Anti-Patterns
- Do not hardcode specific contract addresses, API keys, or method IDs into the logic; use variables.
- Do not use the `web3` library unless explicitly requested; rely on the API response data.
- Do not invent API endpoints or keys not provided in the context.
- Do not remove the semaphore or error handling logic present in the base code.
- Do not assume the input field is always non-empty without checks.

## Triggers

- filter transactions by method id
- scan blocks for contract creation input
- async python script for blockchain
- extract addresses based on transaction input data
- bscscan transaction filter

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.