Skip to content

Add Tempo chain support#689

Open
0xh3rman wants to merge 1 commit into
mainfrom
tempo
Open

Add Tempo chain support#689
0xh3rman wants to merge 1 commit into
mainfrom
tempo

Conversation

@0xh3rman

@0xh3rman 0xh3rman commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Fixes #660, adds Tempo with Relay + Uniswap v4. Tempo has no native gas token
(eth_getBalance is a sentinel, CALLVALUE is always 0; fees are USD-denominated but paid
in 6-dec TIP-20 stablecoins), so this is not a standard chain addition:

  1. New ChainStack::Tempo — all behavior keys off is_tempo_stack(), no per-chain branching
  2. Native asset = pathUSD (Celo native-is-an-ERC20 mechanism): balance via balanceOf,
    native sends encode ERC-20 transfer(), native swaps use the tokenized-native path
  3. Tempo Transaction (0x76): swaps sign as one atomic tx with calls = [approve, swap]
    and explicit fee_token; transfers/approvals stay type-2 (TIP-20 methods auto-pay in the token)
  4. Dynamic fee asset: fee_asset_id crosses UniFFI with the fee ceil-scaled to the fee
    token's decimals (gas values stay 18-dec for signing); resolution follows the spec precedence —
    FeeManager userTokens() preference → USD-currency() transfer auto-selection → pathUSD;
    explicit swap fee tokens restricted to fee-eligible pathUSD/USDC.e (fee AMM rejects e.g. cbBTC)
  5. Both apps consume the fee asset for display/validation; max-send subtracts the fee when paid
    from the sent token; single fee rate (priority is always 0) hides the picker
  6. RPC/indexing: 0x76 calls[] objects decode without failing blocks (last call = primary action),
    receipt feeToken mapped, indexed/confirmed fees scaled to the fee asset,
    inbound pathUSD logs keep the native asset identity
  7. AssetType::TIP20 + Postgres ALTER TYPE migration
  8. Uniswap v4 swap gas fallback 900k for tempo-stack (250k per new storage slot, first swap ~495k observed)

Simulator Screenshot - iPhone 17 - 2026-07-13 at 16 11 04 Simulator Screenshot - iPhone 17 - 2026-07-13 at 16 00 26 Simulator Screenshot - iPhone 17 - 2026-07-13 at 15 07 12 Simulator Screenshot - iPhone 17 - 2026-07-13 at 15 06 57

@0xh3rman 0xh3rman force-pushed the tempo branch 2 times, most recently from fe627d3 to 8318011 Compare July 14, 2026 06:29
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.

Integrate Tempo blockchain

1 participant