Skip to content

feat(tempo): support from on token.burn - #5166

Merged
jxom merged 2 commits into
wevm:mainfrom
decofe:tempo-burn-at
Sep 30, 2026
Merged

jxom merged 2 commits into
wevm:mainfrom
decofe:tempo-burn-at

Conversation

@decofe

@decofe decofe commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Adds viem support for TIP-1006 burnAt, which activates in the Tempo T12 network upgrade (tempoxyz/tempo#7935), by adding an optional from to token.burn. It also syncs the Tempo ABIs.

Changes

  • token.burn, token.burnSync and token.burn.call accept an optional from:
    • With from, the call is burnAt(from, amount), which requires BURN_AT_ROLE.
    • Without it, behavior is unchanged: burn(amount), or burnWithMemo when memo is set.
    • from and memo can't be combined (OneOf), since burnAt has no memo variant.
  • burn.extractEvent accepts either a Burn or a BurnAt log. burnSync returns { amount, from, receipt }, plus burner when the burn went through burnAt.
  • Ran pnpm gen:tempo-abis:
    • tempoxyz/tempo@6ef1f81 adds burnAt(address,uint256), BURN_AT_ROLE() and BurnAt(address indexed burner, address indexed from, uint256 indexed amount).
    • tempoxyz/zones@22318d9 adds token-enablement cursor functions and errors, and makes submitBatch overloaded and verify single-signature.
    • Added ExecutionError messages for TokenEnablementCursorNotInitialized() and InvalidTokenEnablementTransition().
  • Earn ABIs stay at tempoxyz/earn@d6373e4, the commit already on main. Latest earn (1f4b4f6) overloads withdrawExact and renames the engine contracts, which breaks actions/earn.ts typing, so it should be its own migration.
  • Documented from on the token.burn docs page and added a changeset.

The 'burnAt' token role for grantRoles, hasRole and related actions comes from ox's TokenRole and is added in wevm/ox#497.

Validation

  • tsc -b: no errors in src/tempo. The only errors are pre-existing ones in files that import generated test contracts, which weren't built in this environment.
  • biome check passes.
  • Added a burn.call + from case to token.test.ts. It wasn't run here because the suite needs a local Tempo node.
  • Checked with a script: burn.call produces burn, burnWithMemo or burnAt as expected, and extractEvent decodes both Burn and BurnAt logs.

Prompted by: @max-digi

@vercel

vercel Bot commented Sep 30, 2026

Copy link
Copy Markdown

@max-digi is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5e1c761

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

@pkg-pr-new

pkg-pr-new Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 297a69e

jxom and others added 2 commits September 30, 2026 22:57
Co-authored-by: decofe <256792747+decofe@users.noreply.github.com>
Co-authored-by: decofe <256792747+decofe@users.noreply.github.com>
@decofe decofe changed the title feat(tempo): add token.burnAt actions feat(tempo): support from on token.burn Sep 30, 2026
@jxom
jxom merged commit f9f9d1b into wevm:main Sep 30, 2026
23 of 32 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 30, 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.

2 participants