microsoft / microsoft/semantic-kernel
Python: feat: Add Spraay batch payment plugin for Base (Python)
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 28.6k
- Forks
- 4.8k
- Avg merge
- 14h 13m
- Merged PRs (30d)
- 18
Description
Feature Request
I'd like to contribute a Spraay batch payment plugin for the Python SDK, enabling SK agents to batch-send ETH or ERC-20 tokens to up to 200 recipients in a single transaction on Base.
Why
Batch payments are a common onchain operation for DAOs, teams, and AI agents — payroll, airdrops, bounties, and reward distributions. As AI agents increasingly handle financial operations, having a native plugin for efficient batch payments enables Semantic Kernel developers to build payment automation without deep blockchain expertise.
What
A SpraayBatchPaymentPlugin class with four @kernel_function methods:
| Function | Description |
|---|---|
batch_eth |
Send equal ETH to multiple recipients |
batch_eth_variable |
Send variable ETH amounts per recipient |
batch_token |
Send equal ERC-20 tokens to multiple recipients |
batch_token_variable |
Send variable token amounts per recipient |
Features:
- Up to 200 recipients per transaction
- ~80% gas savings vs individual transfers
- Automatic ERC-20 token approval handling
- Chain ID verification, 10% gas buffer
- All parameters use
Annotatedtype hints for LLM function calling - Environment-based config (RPC URL, private key)
Protocol: Spraay — Contract 0x1646452F98E36A3c9Cfc3eDD8868221E207B5eEC on Base Mainnet.
Prior art: This tool has already been merged into Google ADK and published as a Strands Agents extension.
I have a working implementation with unit tests ready to submit as a PR. Happy to discuss the best location in the repo and any design feedback before opening the PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the repository’s Python plugin structure and reviewing the contributor’s existing implementation and unit tests. Confirm the appropriate plugin location and design with maintainers before adapting it. Done means a SpraayBatchPaymentPlugin exposes the four specified kernel functions, supports ETH and ERC-20 batch transfers on Base, and its unit tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- blockchain, payments
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100