Skip to content

fix: encode success flag in EXECTYPE_TRY return data#52

Open
abhicris wants to merge 1 commit intoerc7579:mainfrom
kcolbchain:fix/executor-try-return-data
Open

fix: encode success flag in EXECTYPE_TRY return data#52
abhicris wants to merge 1 commit intoerc7579:mainfrom
kcolbchain:fix/executor-try-return-data

Conversation

@abhicris
Copy link
Copy Markdown

Summary

  • Encodes each element of the bytes[] returned by _tryExecute (batch) and the single-call TRY path in executeFromExecutor as abi.encode(bool success, bytes returnData)
  • Callers can now abi.decode(returnData[i], (bool, bytes)) to distinguish successful results from revert data
  • The TryExecuteUnsuccessful event continues to be emitted for failed calls (no change)

Fixes #51

Test plan

  • Existing tests pass (they use EXECTYPE_DEFAULT, not EXECTYPE_TRY, so are unaffected)
  • New test: call executeFromExecutor with EXECTYPE_TRY on a batch where one call reverts, decode returnData[i] and verify success == false for the failing call

🤖 Generated with Claude Code

When execType == EXECTYPE_TRY, the bytes[] returned by executeFromExecutor
now encodes each element as abi.encode(bool success, bytes returnData),
allowing the calling executor module to distinguish successful return data
from revert data.

Fixes erc7579#51

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

executeFromExecutor doesn't distinguish the return data of succesfull and failed calls when ExecType is 0x01

1 participant