web3-agent-kit 1.2.0__tar.gz → 1.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/PKG-INFO +103 -302
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/README.md +102 -301
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/pyproject.toml +1 -1
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/__init__.py +16 -2
- web3_agent_kit-1.3.0/src/airdrop/form_filler.py +683 -0
- web3_agent_kit-1.3.0/src/airdrop/wl_grinder.py +421 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/web3_agent_kit.egg-info/PKG-INFO +103 -302
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/web3_agent_kit.egg-info/SOURCES.txt +2 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/LICENSE +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/setup.cfg +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/setup.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/__init__.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/agent.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/base.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/dashboard.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/discovery.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/executor/__init__.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/executor/base_executor.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/executor/browser.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/executor/captcha_solver.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/executor/cli.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/executor/galxe_exec.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/executor/gleam_exec.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/executor/intract_exec.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/executor/layer3_exec.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/executor/plugin_registry.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/executor/port3_exec.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/executor/questn.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/executor/social_exec.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/executor/taskon.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/executor/zealy_exec.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/faucet.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/galxe.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/gleam.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/multi_wallet.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/onchain.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/referral.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/scheduler.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/social.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/tracker.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/airdrop/zealy.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/api/__init__.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/api/models.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/api/routes/__init__.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/api/routes/approval.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/api/routes/bridge.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/api/routes/dca.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/api/routes/gas.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/api/routes/portfolio.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/api/routes/swap.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/api/routes/wallet.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/api/routes/watcher.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/api/routes/yield_opt.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/approval_manager.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/bridge.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/chain.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/dca_bot.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/defi/__init__.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/gas_optimizer.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/llm.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/multi_wallet.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/plugins/__init__.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/plugins/examples/gas_tracker.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/portfolio.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/security/__init__.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/sniper.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/utils/__init__.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/wallet.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/wallet_watcher.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/src/yield_optimizer.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_airdrop.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_airdrop_new_modules.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_api.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_bridge.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_core.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_dca_bot.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_defi.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_executor.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_llm.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_multi_wallet.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_new_features.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_platforms.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_plugins.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_portfolio.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_security.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_sniper.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/tests/test_yield_optimizer.py +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/web3_agent_kit.egg-info/dependency_links.txt +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/web3_agent_kit.egg-info/requires.txt +0 -0
- {web3_agent_kit-1.2.0 → web3_agent_kit-1.3.0}/web3_agent_kit.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: web3-agent-kit
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: Open-source framework for building autonomous AI agents that interact with blockchain networks
|
|
5
5
|
Author-email: Maulana <khasbim240803@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -69,6 +69,7 @@ Building AI agents that interact with blockchains is **hard**. You need to juggl
|
|
|
69
69
|
| **Alerts** | Manual whale tracking | Auto-monitor wallets, instant alerts |
|
|
70
70
|
| **Multi-wallet** | Manage keys manually | Batch ops, consolidated portfolio, wallet groups |
|
|
71
71
|
| **Airdrops** | Manual quest hunting | Auto-track campaigns, multi-wallet farming, Sybil-safe |
|
|
72
|
+
| **Token Security** | Manual research | Honeypot detection, rug pull check, contract audit |
|
|
72
73
|
| **Extensibility** | Hard-coded logic | Plugin system — community can extend anything |
|
|
73
74
|
| **Error Handling** | Manual retry logic | Auto-fallback across LLM providers & RPCs |
|
|
74
75
|
|
|
@@ -143,6 +144,7 @@ Building AI agents that interact with blockchains is **hard**. You need to juggl
|
|
|
143
144
|
| **Yield Optimizer** | ✅ | ❌ | ❌ | ❌ |
|
|
144
145
|
| **Multi-Wallet** | ✅ | ❌ | ❌ | ❌ |
|
|
145
146
|
| **Airdrops** | ✅ | ❌ | ❌ | ❌ |
|
|
147
|
+
| **Token Security** | ✅ | ❌ | ❌ | ❌ |
|
|
146
148
|
| **Plugin System** | ✅ | ❌ | ❌ | ❌ |
|
|
147
149
|
| **Safety Rails** | ✅ Governor | ❌ | ❌ | ❌ |
|
|
148
150
|
| **Natural Language** | ✅ | Partial | ❌ | ❌ |
|
|
@@ -236,6 +238,38 @@ python my_agent.py
|
|
|
236
238
|
- 💾 **Persistent orders** — Survives restarts, stored on disk
|
|
237
239
|
- 🔔 **Callbacks** — Hook into execution events for notifications
|
|
238
240
|
|
|
241
|
+
### 🔒 Security Module (NEW!)
|
|
242
|
+
- 🍯 **Honeypot detection** — Check if token can be sold before buying
|
|
243
|
+
- 🧶 **Rug pull checker** — Assess rug pull risk factors
|
|
244
|
+
- 📝 **Contract audit** — Detect hidden mint, blacklist, pause, proxy patterns
|
|
245
|
+
- 💰 **Tax checker** — Buy/sell tax analysis
|
|
246
|
+
- 💧 **Liquidity analysis** — Locked %, lock duration
|
|
247
|
+
- 👥 **Holder analysis** — Concentration, whale detection
|
|
248
|
+
- 📊 **Safety score** — 0-100 score with risk levels
|
|
249
|
+
- 🌐 **GoPlus API** — Real-time token security data
|
|
250
|
+
- 📈 **DexScreener** — Liquidity data integration
|
|
251
|
+
|
|
252
|
+
### 🪂 Airdrop Automation (NEW!)
|
|
253
|
+
- 🔍 **Campaign Discovery** — Auto-scan 7 platforms (Galxe, Zealy, Layer3, QuestN, TaskOn, Intract, Port3)
|
|
254
|
+
- ⛓️ **On-chain Farming** — DeFi interactions for airdrops (Base, Ethereum, Arbitrum, Optimism, Scroll, Linea, zkSync)
|
|
255
|
+
- ⏰ **Daily Scheduler** — Automate recurring tasks with retry logic
|
|
256
|
+
- 📊 **Points Dashboard** — Track points across all platforms with history
|
|
257
|
+
- 🔗 **Referral Manager** — Generate, track, and optimize referral links
|
|
258
|
+
- 🚰 **Faucet Claimer** — Auto-claim testnet tokens from 12+ faucets
|
|
259
|
+
- 🤖 **Multi-wallet** — Sybil avoidance, wallet rotation
|
|
260
|
+
- 🔌 **Plugin System** — Extend with custom platform executors
|
|
261
|
+
|
|
262
|
+
### 🌐 REST API
|
|
263
|
+
- 📡 **18 endpoints** — Full HTTP API for all modules
|
|
264
|
+
- 🔑 **API key auth** — Secure access control
|
|
265
|
+
- 📖 **Swagger UI** — Interactive API documentation
|
|
266
|
+
- 🔄 **Auto-fallback** — Multi-provider LLM cascade
|
|
267
|
+
|
|
268
|
+
### 🔌 Plugin System
|
|
269
|
+
- 📦 **Plugin registry** — Discover and load plugins dynamically
|
|
270
|
+
- 🛠️ **Custom plugins** — Extend with your own tools
|
|
271
|
+
- 🔄 **Hot reload** — Add plugins without restarting
|
|
272
|
+
|
|
239
273
|
---
|
|
240
274
|
|
|
241
275
|
## 🌐 REST API
|
|
@@ -322,7 +356,8 @@ Features: balance check, token swap, portfolio tracking, token sniper, cross-cha
|
|
|
322
356
|
| `examples/airdrop_farmer.py` | Multi-chain airdrop farming |
|
|
323
357
|
| `examples/sniper_bot.py` | Token launch sniper |
|
|
324
358
|
| `examples/portfolio_tracker.py` | Portfolio tracking & reporting |
|
|
325
|
-
| `examples/
|
|
359
|
+
| `examples/airdrop_suite.py` | Full airdrop automation suite |
|
|
360
|
+
| `examples/security_analysis.py` | Token security analysis |
|
|
326
361
|
|
|
327
362
|
---
|
|
328
363
|
|
|
@@ -331,334 +366,98 @@ Features: balance check, token swap, portfolio tracking, token sniper, cross-cha
|
|
|
331
366
|
Multi-provider cascade with automatic fallback:
|
|
332
367
|
|
|
333
368
|
```python
|
|
334
|
-
from web3_agent_kit.llm import LLM
|
|
335
|
-
|
|
336
|
-
# Auto-detect from environment variables
|
|
337
|
-
llm = LLM()
|
|
369
|
+
from web3_agent_kit.llm import LLM, LLMConfig
|
|
338
370
|
|
|
339
|
-
#
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
371
|
+
# Use any LLM provider with automatic fallback
|
|
372
|
+
llm = LLM(LLMConfig(
|
|
373
|
+
providers=["anthropic", "openai", "groq", "deepseek"],
|
|
374
|
+
model="claude-3-5-sonnet-20241022",
|
|
375
|
+
))
|
|
343
376
|
|
|
344
|
-
#
|
|
345
|
-
|
|
377
|
+
# Natural language → structured action
|
|
378
|
+
action = llm.parse("Swap 0.1 ETH to USDC on Base")
|
|
379
|
+
# → {"tool": "uniswap", "action": "swap", "params": {...}}
|
|
346
380
|
```
|
|
347
381
|
|
|
348
|
-
**Supported providers:**
|
|
349
|
-
- **Anthropic** (Claude) — Best reasoning
|
|
350
|
-
- **OpenAI** (GPT-4) — General purpose
|
|
351
|
-
- **Groq** (Llama) — Fastest inference
|
|
352
|
-
- **DeepSeek** — Cheapest
|
|
353
|
-
- **OpenRouter** — Multi-model fallback
|
|
354
|
-
- **Kimi** — Long context
|
|
355
|
-
|
|
356
382
|
---
|
|
357
383
|
|
|
358
|
-
##
|
|
384
|
+
## 🔒 Security Module
|
|
359
385
|
|
|
360
|
-
|
|
386
|
+
Analyze tokens before interacting:
|
|
361
387
|
|
|
362
388
|
```python
|
|
363
|
-
from web3_agent_kit import
|
|
364
|
-
|
|
365
|
-
config = SniperConfig(
|
|
366
|
-
max_buy=0.005, # max 0.005 ETH per snipe
|
|
367
|
-
auto_buy=True, # auto-buy safe tokens
|
|
368
|
-
honeypot_check=True, # check if token is honeypot
|
|
369
|
-
min_liquidity=0.5, # min 0.5 ETH liquidity
|
|
370
|
-
)
|
|
371
|
-
|
|
372
|
-
sniper = TokenSniper(chain_manager, wallet, config, uniswap=uniswap)
|
|
373
|
-
|
|
374
|
-
# Scan recent blocks
|
|
375
|
-
pairs = sniper.scan_recent_blocks(num_blocks=100, chain=Chain.BASE)
|
|
376
|
-
|
|
377
|
-
# Or start live monitoring
|
|
378
|
-
sniper.start(chain=Chain.BASE, poll_interval=12)
|
|
379
|
-
```
|
|
389
|
+
from web3_agent_kit.security import TokenAnalyzer, SecurityConfig
|
|
380
390
|
|
|
381
|
-
|
|
391
|
+
analyzer = TokenAnalyzer(SecurityConfig(chain="base"))
|
|
382
392
|
|
|
383
|
-
|
|
393
|
+
# Quick check
|
|
394
|
+
result = analyzer.quick_check("0x...")
|
|
395
|
+
print(f"Is Honeypot: {result['is_honeypot']}")
|
|
384
396
|
|
|
385
|
-
|
|
397
|
+
# Full analysis
|
|
398
|
+
report = analyzer.analyze_token("0x...")
|
|
399
|
+
print(f"Safety Score: {report.safety_score}/100")
|
|
400
|
+
print(f"Risk Level: {report.risk_level.value}")
|
|
386
401
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
print(summary)
|
|
394
|
-
# 📊 Portfolio: 0x1234...
|
|
395
|
-
# 💰 Total Value: $12,345.67
|
|
396
|
-
#
|
|
397
|
-
# 🔗 ETHEREUM: $8,000.00
|
|
398
|
-
# Native: 1.5000 ETH ($5,250.00)
|
|
399
|
-
# USDC: 2750.0000 ($2,750.00)
|
|
400
|
-
#
|
|
401
|
-
# 🔗 BASE: $4,345.67
|
|
402
|
-
# Native: 1.2000 ETH ($4,200.00)
|
|
403
|
-
# USDC: 145.6700 ($145.67)
|
|
402
|
+
if report.is_honeypot:
|
|
403
|
+
print("🚨 HONEYPOT DETECTED!")
|
|
404
|
+
elif report.safety_score < 50:
|
|
405
|
+
print("⚠️ HIGH RISK TOKEN")
|
|
406
|
+
else:
|
|
407
|
+
print("✓ Safe to trade")
|
|
404
408
|
```
|
|
405
409
|
|
|
406
410
|
---
|
|
407
411
|
|
|
408
412
|
## 🪂 Airdrop Automation
|
|
409
413
|
|
|
410
|
-
|
|
414
|
+
Automate airdrop farming across multiple platforms:
|
|
411
415
|
|
|
412
416
|
```python
|
|
413
417
|
from web3_agent_kit.airdrop import (
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
tracker = AirdropTracker()
|
|
421
|
-
|
|
422
|
-
# Galxe integration
|
|
423
|
-
galxe = GalxePlatform(config=PlatformConfig(api_key="your_key"))
|
|
424
|
-
galxe.login({"api_key": "your_key"})
|
|
425
|
-
tasks = galxe.get_tasks("campaign_id")
|
|
426
|
-
for task in tasks:
|
|
427
|
-
galxe.complete_task(task)
|
|
428
|
-
|
|
429
|
-
# Social task automation
|
|
430
|
-
social = SocialTaskManager()
|
|
431
|
-
social.complete_social_task(TaskType.SOCIAL_TWITTER_FOLLOW, "defi_project")
|
|
432
|
-
social.complete_social_task(TaskType.SOCIAL_DISCORD_JOIN, "https://discord.gg/invite")
|
|
433
|
-
|
|
434
|
-
# Multi-wallet farming with Sybil avoidance
|
|
435
|
-
farmer = AirdropFarmer(
|
|
436
|
-
wallet_manager=manager,
|
|
437
|
-
group="airdrop",
|
|
438
|
-
config=SybilAvoidanceConfig(
|
|
439
|
-
min_delay_between_wallets=60,
|
|
440
|
-
max_delay_between_wallets=600,
|
|
441
|
-
max_tasks_per_wallet_per_day=10,
|
|
442
|
-
),
|
|
443
|
-
)
|
|
444
|
-
results = farmer.farm_campaign(campaign, execute=True)
|
|
445
|
-
|
|
446
|
-
# Export report
|
|
447
|
-
tracker.export_json("./airdrop_report.json")
|
|
448
|
-
tracker.export_csv("./airdrop_report.csv")
|
|
449
|
-
```
|
|
450
|
-
|
|
451
|
-
**Supported platforms:** Gleam.io, Zealy (Crew3), Galxe (Project Galaxy)
|
|
452
|
-
**Social tasks:** Twitter, Discord, Telegram, YouTube, GitHub
|
|
453
|
-
|
|
454
|
-
---
|
|
455
|
-
|
|
456
|
-
## 🌉 Bridge Agent
|
|
457
|
-
|
|
458
|
-
Cross-chain transfers via Li.Fi and Socket:
|
|
459
|
-
|
|
460
|
-
```python
|
|
461
|
-
from web3_agent_kit import BridgeAgent
|
|
462
|
-
|
|
463
|
-
bridge = BridgeAgent(chain_manager, wallet)
|
|
464
|
-
|
|
465
|
-
# Get best routes
|
|
466
|
-
routes = bridge.get_routes("ETH", 0.1, Chain.ETHEREUM, Chain.BASE)
|
|
467
|
-
|
|
468
|
-
for route in routes:
|
|
469
|
-
print(f"{route.bridge_name}: {route.amount_out:.6f} ETH (fee: ${route.fee_usd:.2f})")
|
|
470
|
-
|
|
471
|
-
# Execute transfer
|
|
472
|
-
result = bridge.transfer("ETH", 0.1, Chain.ETHEREUM, Chain.BASE)
|
|
473
|
-
print(f"TX: {result.tx_hash}")
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
---
|
|
477
|
-
|
|
478
|
-
## 🌾 Yield Optimizer
|
|
479
|
-
|
|
480
|
-
Auto-compound and compare yield across DeFi protocols:
|
|
481
|
-
|
|
482
|
-
```python
|
|
483
|
-
from web3_agent_kit import YieldOptimizer, YieldConfig, RiskLevel
|
|
484
|
-
|
|
485
|
-
optimizer = YieldOptimizer(wallet, Chain.ETHEREUM, YieldConfig(
|
|
486
|
-
min_apy=2.0,
|
|
487
|
-
max_risk=RiskLevel.MEDIUM,
|
|
488
|
-
auto_compound_threshold=25,
|
|
489
|
-
))
|
|
490
|
-
|
|
491
|
-
# Scan & compare
|
|
492
|
-
opportunities = optimizer.scan_opportunities("USDC")
|
|
493
|
-
best = optimizer.find_best("USDC", amount=10000)
|
|
494
|
-
|
|
495
|
-
# Deposit & auto-compound
|
|
496
|
-
optimizer.deposit(best, amount=10000)
|
|
497
|
-
optimizer.auto_compound_all()
|
|
498
|
-
```
|
|
499
|
-
|
|
500
|
-
**Protocols:** Aave V3, Compound V3, Morpho, Lido, Rocket Pool, Fluid
|
|
501
|
-
**Data source:** DeFiLlama API (real-time APY/TVL)
|
|
502
|
-
|
|
503
|
-
---
|
|
504
|
-
|
|
505
|
-
## 👛 Multi-Wallet Manager
|
|
506
|
-
|
|
507
|
-
Manage multiple wallets with batch operations:
|
|
508
|
-
|
|
509
|
-
```python
|
|
510
|
-
from web3_agent_kit import MultiWalletManager, Chain
|
|
511
|
-
|
|
512
|
-
manager = MultiWalletManager(chain=Chain.ETHEREUM)
|
|
513
|
-
|
|
514
|
-
# Create wallet groups
|
|
515
|
-
manager.create_wallet("trading-01", group="trading")
|
|
516
|
-
manager.create_wallet("airdrop-01", group="airdrop")
|
|
517
|
-
|
|
518
|
-
# Batch send from all airdrop wallets
|
|
519
|
-
results = manager.batch_send(
|
|
520
|
-
recipients=["0xAddr1", "0xAddr2"],
|
|
521
|
-
amount=0.001,
|
|
522
|
-
group_filter="airdrop",
|
|
418
|
+
CampaignDiscovery,
|
|
419
|
+
OnChainAirdropFarmer,
|
|
420
|
+
AirdropScheduler,
|
|
421
|
+
PointsDashboard,
|
|
422
|
+
ReferralManager,
|
|
423
|
+
FaucetClaimer,
|
|
523
424
|
)
|
|
524
425
|
|
|
525
|
-
#
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
**Features:** Wallet groups, batch send (native + ERC20), consolidated portfolio, fund consolidation.
|
|
530
|
-
|
|
531
|
-
---
|
|
532
|
-
|
|
533
|
-
## 🔌 Plugin System
|
|
534
|
-
|
|
535
|
-
Extend with community plugins:
|
|
536
|
-
|
|
537
|
-
```python
|
|
538
|
-
from web3_agent_kit.plugins import PluginManager
|
|
539
|
-
|
|
540
|
-
manager = PluginManager()
|
|
541
|
-
manager.load_dir("./my_plugins/")
|
|
542
|
-
manager.setup_all(agent)
|
|
543
|
-
|
|
544
|
-
# Plugins can hook into agent lifecycle
|
|
545
|
-
# manager.before_transaction(tx)
|
|
546
|
-
# manager.on_block(block_number)
|
|
547
|
-
```
|
|
548
|
-
|
|
549
|
-
**Create a plugin:**
|
|
550
|
-
|
|
551
|
-
```python
|
|
552
|
-
from web3_agent_kit.plugins import Plugin, PluginMeta
|
|
553
|
-
|
|
554
|
-
class MyPlugin(Plugin):
|
|
555
|
-
@property
|
|
556
|
-
def meta(self):
|
|
557
|
-
return PluginMeta(name="my-plugin", version="1.0.0",
|
|
558
|
-
description="Does cool things", author="You")
|
|
559
|
-
|
|
560
|
-
def setup(self, agent):
|
|
561
|
-
self.agent = agent
|
|
562
|
-
|
|
563
|
-
def execute(self, action, **kwargs):
|
|
564
|
-
return {"result": "done"}
|
|
565
|
-
```
|
|
566
|
-
|
|
567
|
-
**Discovery:** Local directories, Python entry points, or manual registration.
|
|
568
|
-
|
|
569
|
-
---
|
|
570
|
-
|
|
571
|
-
## 📁 Project Structure
|
|
572
|
-
|
|
573
|
-
```
|
|
574
|
-
web3-agent-kit/
|
|
575
|
-
├── src/
|
|
576
|
-
│ ├── __init__.py # Package exports
|
|
577
|
-
│ ├── agent.py # Agent framework + LLM reasoning
|
|
578
|
-
│ ├── llm.py # Multi-provider LLM client
|
|
579
|
-
│ ├── wallet.py # Wallet management + signing
|
|
580
|
-
│ ├── chain.py # Multi-chain RPC + config
|
|
581
|
-
│ ├── sniper.py # Token sniper + monitoring
|
|
582
|
-
│ ├── portfolio.py # Portfolio tracking + P&L
|
|
583
|
-
│ ├── bridge.py # Cross-chain bridge agent
|
|
584
|
-
│ ├── yield_optimizer.py # Yield optimizer + auto-compound
|
|
585
|
-
│ ├── multi_wallet.py # Multi-wallet manager + batch ops
|
|
586
|
-
│ ├── airdrop/ # Airdrop automation module
|
|
587
|
-
│ │ ├── __init__.py # Package exports
|
|
588
|
-
│ │ ├── base.py # Base platform abstraction
|
|
589
|
-
│ │ ├── gleam.py # Gleam.io automation
|
|
590
|
-
│ │ ├── zealy.py # Zealy quest automation
|
|
591
|
-
│ │ ├── galxe.py # Galxe campaign automation
|
|
592
|
-
│ │ ├── social.py # Social task helpers
|
|
593
|
-
│ │ ├── tracker.py # Airdrop tracker
|
|
594
|
-
│ │ └── multi_wallet.py # Multi-wallet farming
|
|
595
|
-
│ ├── plugins/
|
|
596
|
-
│ │ ├── __init__.py # Plugin system (base, registry, manager)
|
|
597
|
-
│ │ └── examples/
|
|
598
|
-
│ │ └── gas_tracker.py
|
|
599
|
-
│ ├── api/
|
|
600
|
-
│ │ ├── __init__.py # FastAPI REST API server
|
|
601
|
-
│ │ ├── models.py # Pydantic request/response models
|
|
602
|
-
│ │ └── routes/ # API route handlers
|
|
603
|
-
│ └── defi/
|
|
604
|
-
│ └── __init__.py # Uniswap, Aerodrome, Aave, Curve
|
|
605
|
-
├── examples/ # 15 ready-to-use examples
|
|
606
|
-
├── tests/ # Test suite
|
|
607
|
-
└── docs/ # Documentation
|
|
608
|
-
```
|
|
609
|
-
|
|
610
|
-
---
|
|
611
|
-
|
|
612
|
-
## ⚡ Benchmarks
|
|
426
|
+
# Discover new campaigns
|
|
427
|
+
discovery = CampaignDiscovery()
|
|
428
|
+
campaigns = discovery.discover_all()
|
|
613
429
|
|
|
614
|
-
|
|
430
|
+
# On-chain farming (dry run)
|
|
431
|
+
farmer = OnChainAirdropFarmer(OnChainConfig(chain="base", dry_run=True))
|
|
432
|
+
farmer.farm_plan("base_activity")
|
|
615
433
|
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
| Swap execution (no LLM) | ~1–3s | Direct RPC interaction |
|
|
620
|
-
| Portfolio fetch (7 chains) | ~2–4s | Parallel RPC calls |
|
|
621
|
-
| Sniper block scan (100 blocks) | ~5–10s | Per chain |
|
|
622
|
-
| Bridge route discovery | ~1–2s | Aggregator API latency |
|
|
623
|
-
|
|
624
|
-
*Benchmarks run on: Python 3.11, 4-core CPU, SSD, public RPC endpoints.*
|
|
625
|
-
|
|
626
|
-
---
|
|
434
|
+
# Schedule daily tasks
|
|
435
|
+
scheduler = AirdropScheduler()
|
|
436
|
+
scheduler.add_daily("galxe_checkin", "09:00", galxe_checkin_fn)
|
|
627
437
|
|
|
628
|
-
|
|
438
|
+
# Track points
|
|
439
|
+
dashboard = PointsDashboard(DashboardConfig(wallet="0x..."))
|
|
440
|
+
dashboard.sync_all()
|
|
629
441
|
|
|
630
|
-
|
|
442
|
+
# Generate referrals
|
|
443
|
+
manager = ReferralManager()
|
|
444
|
+
manager.generate_links(count=10)
|
|
631
445
|
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
governor = SpendGovernor(
|
|
636
|
-
limits=SpendLimits(
|
|
637
|
-
max_per_tx=0.1, # max 0.1 ETH per transaction
|
|
638
|
-
daily_limit=1.0, # max 1 ETH per day
|
|
639
|
-
),
|
|
640
|
-
require_confirm=True, # operator must confirm
|
|
641
|
-
)
|
|
642
|
-
|
|
643
|
-
# Kill switch for emergencies
|
|
644
|
-
governor.kill() # blocks all transactions
|
|
645
|
-
governor.unkill() # resume
|
|
446
|
+
# Claim testnet tokens
|
|
447
|
+
claimer = FaucetClaimer()
|
|
448
|
+
claimer.claim_all(wallet="0x...")
|
|
646
449
|
```
|
|
647
450
|
|
|
648
451
|
---
|
|
649
452
|
|
|
650
|
-
##
|
|
453
|
+
## 📊 Project Stats
|
|
651
454
|
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
| Polygon | ✅ | ✅ | ✅ |
|
|
659
|
-
| Avalanche | ✅ | — | ✅ |
|
|
660
|
-
| BSC | ✅ | — | ✅ |
|
|
661
|
-
| Solana | 🔜 | — | — |
|
|
455
|
+
- **Version:** 1.2.0
|
|
456
|
+
- **Modules:** 20+
|
|
457
|
+
- **Tests:** 565+
|
|
458
|
+
- **Examples:** 18
|
|
459
|
+
- **Chains:** 7+
|
|
460
|
+
- **License:** MIT
|
|
662
461
|
|
|
663
462
|
---
|
|
664
463
|
|
|
@@ -676,12 +475,14 @@ MIT License — see [LICENSE](LICENSE) for details.
|
|
|
676
475
|
|
|
677
476
|
## 🙏 Acknowledgments
|
|
678
477
|
|
|
679
|
-
|
|
680
|
-
- [
|
|
681
|
-
- [
|
|
682
|
-
- [
|
|
683
|
-
- [
|
|
478
|
+
- [Uniswap](https://uniswap.org/) — DEX protocol
|
|
479
|
+
- [Li.Fi](https://li.fi/) — Bridge aggregator
|
|
480
|
+
- [Socket](https://socket.tech/) — Bridge aggregator
|
|
481
|
+
- [GoPlus](https://gopluslabs.io/) — Token security API
|
|
482
|
+
- [DexScreener](https://dexscreener.com/) — DEX data
|
|
684
483
|
|
|
685
484
|
---
|
|
686
485
|
|
|
687
|
-
|
|
486
|
+
<p align="center">
|
|
487
|
+
Made with ❤️ by <a href="https://twitter.com/itseywacc">@itseywacc</a>
|
|
488
|
+
</p>
|