Skip to content

feat(tempo): decode precompile errors with access key details and hints - #5228

Merged
jxom merged 12 commits into
mainfrom
jxom/tempo-precompile-errors
Oct 14, 2026
Merged

jxom merged 12 commits into
mainfrom
jxom/tempo-precompile-errors

Conversation

@jxom

@jxom jxom commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Tempo actions now throw typed TempoExecutionError subclasses, defined in each action module, with decoded arguments, onchain details fetched by multicall, and resolution hints. Precompile errors previously surfaced as undecoded selectors.

@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
viem Ready Ready Preview Oct 14, 2026 12:32am UTC

Request Review

@changeset-bot

changeset-bot Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fc82df9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T00:41:19.491031Z fc82df9 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/viem@5228

commit: 6daa41a

@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: e67ca0fe49

ℹ️ 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/tempo/internal/errors.ts Resolved
Comment thread src/tempo/internal/errors.ts Resolved
Comment thread src/tempo/internal/errors.ts Resolved

@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: 3911d08efc

ℹ️ 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/tempo/errors.ts Resolved
Comment thread src/tempo/internal/errors.ts Resolved
Comment thread src/tempo/errors.ts Resolved
Comment thread src/tempo/internal/errors.ts Resolved

@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: 9fdfe01fd1

ℹ️ 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/tempo/actions/accounts.ts Resolved
Comment thread src/tempo/actions/dex.ts Resolved
Comment thread src/tempo/actions/fee.ts Resolved
jxom added 2 commits October 14, 2026 10:28
- Skip Solidity `Error` and `Panic` reverts
- Detect fee payment failures from missing revert data
- Replay reverted receipts to recover revert data
- Keep keychain errors about another key off the signer
- Format timestamps beyond the `Date` range as seconds
- Wrap Earn deployment writes

@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: 21e95d2ffd

ℹ️ 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/tempo/internal/errors.test.ts Resolved
Comment thread src/tempo/internal/errors.ts Resolved
Comment thread src/tempo/internal/errors.ts Resolved
- Load `resolveError` with a dynamic import on failure
- Add `Errors.ExecutionErrorType` to wrapped read action `ErrorType` unions
- Fall back to the base error when revert data has no arguments
- Read the fee balance of a local `feePayer` and skip external fee payers

@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: 967d70043d

ℹ️ 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/tempo/internal/resolveError.ts Resolved
jxom added 3 commits October 14, 2026 11:23
…out stubs

- Skip `*Error` exports and `errorResolvers` in `DecorateNamespace`
- Move the `AccountKeychain` fallback into `errorResolvers`
- Encode contract call data before replaying reverted receipts
- Unexport `Resolver`
- Replace the fake transport tests with real reverts and direct resolver calls
@jxom
jxom merged commit b86b380 into main Oct 14, 2026
5 of 6 checks passed
@jxom
jxom deleted the jxom/tempo-precompile-errors branch October 14, 2026 00:28

@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: fc82df9c7b

ℹ️ 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".

functionName: parameters.functionName,
})
: undefined)
if (!reverted || !to || !data) return undefined

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 Replay calls-based sync transactions

When a calls-based sync action such as earn.depositSync or zone.depositSync is submitted with explicit gas and its receipt reverts, the wrapper reaches this branch with parameters.calls but no top-level to, data, address, or ABI, so replay returns undefined and the action still throws TransactionReceiptRevertedError instead of the advertised Tempo error. The fresh evidence after the prior replay fix is that the newly wrapped batch actions pass only a calls array; recover the serialized batch or otherwise replay its calls before giving up.

Useful? React with 👍 / 👎.

Comment thread src/tempo/actions/earn.ts
WaitForPrivateRedeemTimeoutError,
type WaitForPrivateRedeemTimeoutErrorType,
} from '../errors.js'
import { withExecutionError } from '../internal/errors.js'

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 Wrap the compound-policy write

The remaining direct write in configureExitSafePolicy still calls writeContractSync without withExecutionError, so an access-key validation failure or core registry error from createCompoundPolicy escapes as a generic contract/receipt error while the surrounding policy and token writes produce typed Tempo errors. The fresh evidence after the omitted-write fix is that this is still the sole direct write call under src/tempo/actions; wrap it and include Errors.ExecutionErrorType in this action's error union.

Useful? React with 👍 / 👎.

This branch was successfully deployed

1 active deployment
Preview — fc82df9c Deployed Oct 14, 2026 by vercel[bot]
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