tempo icon indicating copy to clipboard operation
tempo copied to clipboard

fix: restrict TIP-20 fee token inference to transfer operations only

Open jenpaff opened this issue 3 weeks ago • 0 comments

Describe the feature

User Story

As a stablecoin issuer I want to deploy and configure a new TIP-20 token So that I can mint tokens and set up permissions without my transactions stalling

Problem

Deploying a new TIP-20 stalls on grantRole()/mint() because the fee waterfall uses the new token (which has no balance/liquidity) for fees.

Solution

Only infer tx.to as fee token for transfer, transferWithMemo, startReward when feePayer == tx.origin. All other functions (grantRole, mint, burn, etc.) fall back to PathUSD.

Fixes https://github.com/tempoxyz/tempo/issues/1112 (since it means that calls to grantRole and mint no longer override the default fee token rules).

Checklist:

  • [ ] merge spec https://github.com/tempoxyz/tempo/pull/1337
  • [ ] merge impl
  • [ ] re-test https://github.com/tempoxyz/tempo/issues/1112

Additional context

No response

jenpaff avatar Dec 09 '25 17:12 jenpaff