fix(spraay): align tool ABI with the deployed contract - #182
Open
plagtech wants to merge 3 commits into
Open
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
plagtech
force-pushed
the
fix/spraay-abi-alignment
branch
from
September 7, 2026 18:53
14317a9 to
51a9f01
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Spraay tool ABI merged in #95 declares four functions (
spraayETH,spraayToken,spraayETHVariable,spraayTokenVariable) whose selectorsdo not exist in the deployed contract's bytecode
(
0x1646452F98E36A3c9Cfc3eDD8868221E207B5eECon Base), so every paymentcall reverts at gas estimation. Two further issues surfaced while testing
the fix end to end: the
"gas": 0placeholder blocks estimation on thedefault Base RPC, and using the confirmed (rather than pending) nonce makes
back-to-back sends collide.
All failures are loud and pre-broadcast — no funds were ever at risk, and
the contract has no on-chain record of calls to the missing selectors.
Fix
the Sourcify-verified source):
sprayEqual(token, recipients, amount)for equal sends (
address(0)= ETH), andsprayETH/sprayTokenwithRecipient[]structs for variable sendsfeeBps()(owner-adjustable on-chain) witha safe fallback
build_transactionestimates (no zero placeholder), then a 10%buffer is applied
"pending"so sequential sends don't collideNo public API changes: tool names, signatures, and return shapes are
unchanged, so existing agents need no code changes.
Verification
ABI to the verified contract interface
in the deployed bytecode
0x8701665d9ef5c99c14d548e89f5f4fa3eab0ff0841d696adff33f0a3be83e1ff(sprayEqual)0x795ff187a8426ff0c2439fefd2339e0ab5105a349a900dac5e9b7b8fb11a7507(sprayEqual)0xa93e4b1b0ab99a30bcb3607190954e89ed15d09dc52c61e23e088805c4f27700(sprayETH,variable amounts — consecutive block with the previous tx, exercising the
sequential-send path)