Skip to content

feat(std-lib): TxUtils tx-context helpers (isSeismicTx / isSignedRead) - #232

Open
HenryMBaldwin wants to merge 3 commits into
mainfrom
hbai__txtype-precompile
Open

feat(std-lib): TxUtils tx-context helpers (isSeismicTx / isSignedRead)#232
HenryMBaldwin wants to merge 3 commits into
mainfrom
hbai__txtype-precompile

Conversation

@HenryMBaldwin

@HenryMBaldwin HenryMBaldwin commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

TxUtils helpers for the tx-context feature. Companion PRs: revm #227, evm #58, reth #457, foundry #220.

  • TxUtils.txType() / isSeismicTx() / isSignedRead() read the 0x6A precompile via staticcall — stock Solidity, no ssolc builtin. Fail-closed on an unavailable precompile/selector or wrong return length.
  • isSignedRead() implies isSeismicTx(); NatSpec states it reports a node classification, not caller authorization or a confidentiality guarantee.
  • Tests 7/7 against an sforge carrying the precompile + cheatcodes.

Note: the CI contracts-test job is red until the installed sforge includes the 0x6A precompile and the vm.txType/vm.signedRead cheatcodes; the suite passes 7/7 against an sforge built from foundry #220.

@linear-code

linear-code Bot commented Aug 5, 2026

Copy link
Copy Markdown

SEI-69

@HenryMBaldwin HenryMBaldwin changed the title feat(std-lib): TxUtils via tx-info precompile (staticcall, no ssolc builtin) feat(std-lib): TxUtils via tx-type precompile (staticcall, no ssolc builtin) Aug 7, 2026
Add TxUtils reading the 0x6A tx-context precompile via staticcall (no ssolc
builtin): txType(), isSeismicTx(), isSignedRead(), fail-closed on an unavailable
precompile/selector, with sharpened NatSpec. Include the signed-reads doc update
(provisional signed-read twin with fresh encryption metadata) and runtime tests.
@HenryMBaldwin
HenryMBaldwin force-pushed the hbai__txtype-precompile branch from ec8a44d to 0ae237e Compare August 24, 2026 19:05
… (P2.1/P2.2)

NatSpec: isSignedRead() reports a node classification; it does not itself
authenticate or authorize the caller, and is not a confidentiality guarantee.
Test: vm.signedRead(true) with a non-Seismic tx type still reads false, so
vm.txType(0x4A) must be paired with it (isSignedRead implies isSeismicTx).
@HenryMBaldwin HenryMBaldwin changed the title feat(std-lib): TxUtils via tx-type precompile (staticcall, no ssolc builtin) feat(std-lib): TxUtils tx-context helpers (isSeismicTx / isSignedRead) Aug 24, 2026
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