Spraay batch payment tool for Strands Agents — send ETH/ERC-20 tokens to up to 200 recipients in one transaction on Base.
Project description
💧 Strands Agents Spraay
Spraay batch payment tool for Strands Agents — send ETH or ERC-20 tokens to up to 200 recipients in a single transaction on Base with ~80% gas savings.
Installation
pip install strands-agents-spraay
Quick Start
from strands import Agent
from strands_spraay import spraay_batch_payment
agent = Agent(tools=[spraay_batch_payment])
# The agent can now handle batch payment requests
agent("Send 0.01 ETH to 0xAAA..., 0xBBB..., and 0xCCC... using batch payment")
Environment Variables
| Variable | Description | Required |
|---|---|---|
SPRAAY_PRIVATE_KEY or PRIVATE_KEY |
Wallet private key for signing transactions | Yes |
BASE_RPC_URL |
Base RPC endpoint | No (defaults to https://mainnet.base.org) |
Actions
| Action | Description |
|---|---|
batch_eth |
Send equal ETH to all recipients |
batch_eth_variable |
Send different ETH amounts per recipient |
batch_token |
Send equal ERC-20 tokens to all recipients |
batch_token_variable |
Send different token amounts per recipient |
Direct Tool Usage
from strands import Agent
from strands_spraay import spraay_batch_payment
agent = Agent(tools=[spraay_batch_payment])
# Equal ETH batch
agent.tool.spraay_batch_payment(
action="batch_eth",
recipients=["0xAAA...", "0xBBB..."],
amount="0.01"
)
# Variable ETH batch
agent.tool.spraay_batch_payment(
action="batch_eth_variable",
recipients=["0xAAA...", "0xBBB..."],
amounts=["0.01", "0.05"]
)
# Equal token batch (USDC on Base)
agent.tool.spraay_batch_payment(
action="batch_token",
recipients=["0xAAA...", "0xBBB..."],
amount="100",
token_address="0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
)
# Variable token batch
agent.tool.spraay_batch_payment(
action="batch_token_variable",
recipients=["0xAAA...", "0xBBB..."],
amounts=["100", "250"],
token_address="0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
)
Features
- Up to 200 recipients per transaction
- ~80% gas savings vs individual transfers
- Automatic token approval handling for ERC-20 transfers
- 0.3% protocol fee
- Full input validation — address format, recipient limits, amount checks
- Chain ID verification — prevents sending to wrong network
- 10% gas buffer on estimates to prevent out-of-gas errors
- Environment-based config — RPC URL, private key via env vars
Protocol Details
- Contract:
0x1646452F98E36A3c9Cfc3eDD8868221E207B5eEC(Base Mainnet) - Chain: Base (Chain ID 8453)
- Website: spraay.app
Development
# Clone and install
git clone https://github.com/plagtech/strands-agents-spraay.git
cd strands-agents-spraay
pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Format & lint
hatch run prepare
License
Apache-2.0 — see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file strands_agents_spraay-0.1.0.tar.gz.
File metadata
- Download URL: strands_agents_spraay-0.1.0.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.12.10 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86e97c140e6eb5ebcd9ec5708f44ec18002f116f5988c8a7924746b81ea10f89
|
|
| MD5 |
2bbd30b72b4cecdf922f2e6ef34bcb54
|
|
| BLAKE2b-256 |
c114414b48a8fb1a1021bed26402af69b42ee92a2f26a1d7149891cb551edde0
|
File details
Details for the file strands_agents_spraay-0.1.0-py3-none-any.whl.
File metadata
- Download URL: strands_agents_spraay-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.12.10 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fbd6e33377ec63d81feee2404a8d924f0b6ec78e22fdb920187c2475175dd94
|
|
| MD5 |
9a37dabd3031e268f78c02d2000f913a
|
|
| BLAKE2b-256 |
5deab79bfb6d87c2b13ce25fbf06606b35f20be42649233e0d42f079d4b8e7e0
|