Skip to content

feat: add EIP-8130 ITransactionContext and INonceManager interfaces#148

Open
chunter-cb wants to merge 2 commits into
mainfrom
hh/eip-8130-interfaces
Open

feat: add EIP-8130 ITransactionContext and INonceManager interfaces#148
chunter-cb wants to merge 2 commits into
mainfrom
hh/eip-8130-interfaces

Conversation

@chunter-cb

Copy link
Copy Markdown

Summary

Add Solidity interfaces for the two EIP-8130 system precompiles and wire them into StdPrecompiles, aligned with the latest EIP-8130 spec naming.

  • ITransactionContext: resolved sender / payer / sender actor id of the in-flight EIP-8130 account-abstraction transaction (getTransactionSender, getTransactionPayer, getTransactionSenderActorId). Zero values outside an EIP-8130 transaction.
  • INonceManager: 2D nonce manager (getNonce(account, nonceKey)) enabling concurrent AA execution, plus the NonceIncremented event and revert errors.

Addresses match the EIP-8130 constant table: NONCE_MANAGER_ADDRESS = 0x8130..aa01, TX_CONTEXT_ADDRESS = 0x8130..aa02.

Supersedes #137 (closed when base-std main history was rewritten; this branch is re-based on the current main).

Test plan

  • forge build
  • forge fmt --check

Add Solidity interfaces for the two EIP-8130 system precompiles and wire them
into StdPrecompiles, aligned with the latest EIP-8130 spec naming:

- ITransactionContext: resolved sender / payer / sender actor id of the
  in-flight EIP-8130 account-abstraction transaction (getTransactionSender,
  getTransactionPayer, getTransactionSenderActorId). Zero values outside an
  EIP-8130 transaction.
- INonceManager: 2D nonce manager (getNonce(account, nonceKey)) enabling
  concurrent AA execution, plus the NonceIncremented event and revert errors.

Addresses match the EIP-8130 constant table: NONCE_MANAGER_ADDRESS = 0x8130..aa01,
TX_CONTEXT_ADDRESS = 0x8130..aa02.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Interface Coverage

✅ All interface functions have test coverage.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

📊 Forge Coverage (src/lib/)

🟢 ≥99% across all metrics.

File Lines Stmts Branches Funcs
🟢 B20FactoryLib.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockActivationRegistry.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockActivationRegistryStorage.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockB20.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockB20Asset.sol 100.00% 100.00% 100.00% 100.00%
🟡 MockB20Factory.sol 98.95% 99.08% 100.00% 100.00%
🟢 MockB20Stablecoin.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockB20Storage.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockPolicyRegistry.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockPolicyRegistryStorage.sol 100.00% 100.00% 100.00% 100.00%
Total 99.86% 99.88% 100.00% 100.00%

Full report: download artifact. To browse locally: make coverage (runs forge coverage + genhtml + opens the HTML report).

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

✅ Fork tests: all 602 passed

base/base is fully in sync with the base-std spec.

Correct the NatSpec: on non-EIP-8130 transactions the transaction-context
precompile is not populated and the getters fall back to tx.origin rather
than the zero value. getTransactionSender / getTransactionPayer return
tx.origin and getTransactionSenderActorId returns bytes32(bytes20(tx.origin)).
@chunter-cb chunter-cb marked this pull request as ready for review June 9, 2026 19:11
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