Skip to content

feat: add EVM payment method (e.g. Base) - #243

Open
vivbhandari wants to merge 1 commit into
tempoxyz:mainfrom
vivbhandari:feat/evm-method
Open

feat: add EVM payment method (e.g. Base)#243
vivbhandari wants to merge 1 commit into
tempoxyz:mainfrom
vivbhandari:feat/evm-method

Conversation

@vivbhandari

@vivbhandari vivbhandari commented Sep 8, 2026

Copy link
Copy Markdown

Summary

  • Adds mpp.methods.evm, ported from the ../mpp/evm.py prototype: a Method/Intent pair for standard EVM chains (Base by default) that settles charges with a plain ERC-20 transfer instead of Tempo's native account-abstraction transaction.
  • Client side builds and signs an EIP-1559 transaction calling transfer(address,uint256); server side broadcasts it and confirms the mined receipt contains a matching Transfer log, with optional Store-backed replay protection.
  • Ships behind a new evm extra (eth-account, eth-hash[pycryptodome]) and follows mpp.methods.tempo's package layout and lazy-export conventions (account.py, client.py, intents.py, _defaults.py, _rpc.py, lazy __init__.py/__init__.pyi).

Test plan

  • tests/test_evm.py (51 tests): account key handling, evm() factory defaults/overrides, client-side transaction building (incl. chain-id mismatch, gas-estimate fallback), server-side ChargeIntent verification (decode failures, revert/missing-log handling, receipt polling, replay protection, "already known" tx tolerance), and an end-to-end client→server flow.
  • tests/test_optional_deps.py / tests/test_import_isolation.py extended with evm-extra coverage mirroring the existing tempo-extra tests.
  • ruff check . / ruff format --check . clean
  • pyright clean (0 errors)
  • Full suite: 994 passed, 41 skipped (pre-existing integration tests requiring live infra)

🤖 Generated with Claude Code

Adds mpp.methods.evm, ported from the ../mpp/evm.py prototype: a
Method/Intent pair for standard EVM chains that settles charges with a
plain ERC-20 transfer instead of Tempo's native account-abstraction
transaction. Client-side builds and signs an EIP-1559 transaction;
server-side broadcasts it and confirms the mined receipt contains a
matching Transfer log, with optional Store-backed replay protection.

Ships behind a new "evm" extra (eth-account, eth-hash) and follows the
tempo method's package layout and lazy-export conventions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012oZVh6chEXJMiVkQ2Qsjej
@vivbhandari

Copy link
Copy Markdown
Author

@parvahuja
@brendanryan

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.

1 participant