Skip to content

Conversation

@odysseus0
Copy link
Contributor

Summary

Adds cancel-rpc-tx command to test protect-rpc's self-transfer cancellation detection.

Changes

  • New command sends original tx + self-transfer with same nonce
  • protect-rpc detects pattern (to == sender && data <= 2 bytes) and cancels via protect-of-api
  • Mirrors cancel-relay-tx structure for consistent E2E testing

Testing

export FLASHBOTS_RPC_URL=https://rpc-staging.flashbots.net
export FLASHBOTS_PROTECT_URL=https://protect-staging.flashbots.net
NETWORK=sepolia ./mevrepl cancel-rpc-tx --eth-amount 1000000000000000

🤖 Generated with Claude Code

Implements RPC-based cancellation testing via self-transfer detection pattern.
Tests protect-rpc's cancellation flow: sends original tx, then self-transfer
with same nonce triggers cancellation via protect-of-api.

Mirrors cancel-relay-tx structure for consistent E2E testing patterns.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@odysseus0 odysseus0 merged commit f5a308b into main Nov 11, 2025
@odysseus0 odysseus0 deleted the add-rpc-cancellation-test branch November 11, 2025 13:40
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.

2 participants