Skip to content

feat(evm): add evm2 call execution - #368

Merged
jxom merged 1 commit into
jxom/evm2-wasmfrom
jxom/evm2-call
Aug 4, 2026
Merged

feat(evm): add evm2 call execution#368
jxom merged 1 commit into
jxom/evm2-wasmfrom
jxom/evm2-call

Conversation

@jxom

@jxom jxom commented Aug 4, 2026

Copy link
Copy Markdown
Member

Publishes ox/evm: Evm.create, Evm.callTx, and Evm.readAccountInfo over
the evm2 engine, with Database, Ethereum, SpecId, and TxResult.

Read-only execution only. State a transaction writes is discarded, which is
evm2's own call_tx path rather than a partial version of one; the transaction
lifecycle and pending state follow separately.

Every Evm.create option is optional: database defaults to an empty in-memory
source, specId to SpecId.latest, and chainId sits flat on the options
rather than nested. Precompile and handler-registry selection arrives with the
configuration surface, so until then the specification determines them.

Stacked on #366, which this targets.

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ox Ready Ready Preview Aug 4, 2026 6:40am

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Aug 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/ox@368

commit: 4bd86ed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a02483182e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/evm/TxResult.ts Outdated
Comment thread package.json

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d260e21d2e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/evm/Evm.ts Outdated
Comment thread src/evm/Evm.ts Outdated
Comment thread src/evm/Database.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 837eed1a17

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/evm/Evm.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: edf3ff54e0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/evm/Database.ts Outdated
Comment thread src/evm/Evm.ts
Comment thread src/evm/Database.ts Outdated
Publishes ox/evm with Evm.create, Evm.callTx, and Evm.readAccountInfo over the
evm2 engine, plus Database, Ethereum, ExecutionConfig, Precompiles, SpecId, and
TxResult. Adds the READ_ACCOUNT ABI operation.
@jxom
jxom merged commit 3822716 into jxom/evm2-wasm Aug 4, 2026
15 checks passed
@jxom
jxom deleted the jxom/evm2-call branch August 4, 2026 06:42

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4bd86ed9eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/evm/Evm.ts
}

export declare namespace callTx {
type ErrorType =

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add MissingBlockHashError to callTx's union

The earlier error-union expansion remains incomplete after the new missing-block-hash behavior: when a contract requests an unseeded retained height, Database.fromMemory().getBlockHash throws the exported Database.MissingBlockHashError directly, as the deterministic test demonstrates, but this union cannot represent or narrow that runtime failure because Errors.GlobalErrorType only has the literal name 'Error'. Include Database.MissingBlockHashError in callTx.ErrorType.

Useful? React with 👍 / 👎.

Comment thread src/evm/TxResult.ts
* @example
* ```ts twoslash
* // @noErrors
* import { TxResult } from 'ox/evm'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Import Evm in the remaining gas examples

Fresh evidence after the namespace-call fix is that the regularGasSpent and stateGasSpent examples now invoke Evm.callTx(...) but still import only TxResult (the second occurrence is at line 157). Since @noErrors suppresses the unresolved identifier, both invalid imports reach generated documentation; import Evm in both snippets.

Useful? React with 👍 / 👎.


Added `ox/evm`, an EVM backed by `alloy-rs/evm2` compiled to WebAssembly, with read-only transaction execution.

```ts

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the extra changeset example

The changeset continues past its one-sentence summary into a fenced code example, so the published release entry does not follow this repository's requirement that changeset entries consist of a single past-tense sentence. Keep the summary and remove the additional block.

AGENTS.md reference: AGENTS.md:L120-L120

Useful? React with 👍 / 👎.

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