Skip to content

refactor(script): dedup gas currency symbol lookup#13886

Open
joohhnnn wants to merge 2 commits intofoundry-rs:masterfrom
joohhnnn:script-gas-currency-symbol
Open

refactor(script): dedup gas currency symbol lookup#13886
joohhnnn wants to merge 2 commits intofoundry-rs:masterfrom
joohhnnn:script-gas-currency-symbol

Conversation

@joohhnnn
Copy link
Copy Markdown

While testing Tempo compatibility, found that forge script displays "ETH" as the gas currency on Tempo (chain 4217), which uses USDC as its gas token.

The fix is upstream in alloy-rs/chains#266, which adds native_currency_symbol() for Tempo chains. Once that lands and alloy-chains is bumped, the existing .unwrap_or("ETH") fallback will correctly resolve to "USDC".

This PR deduplicates the symbol lookup (repeated in simulate.rs, receipts.rs, broadcast.rs) into a shared gas_currency_symbol() helper to keep things clean.

Also found a separate issue — gas price estimates are inflated on Tempo (~41000 gwei vs actual 20 gwei). Filed as #13885

@zerosnacks
Copy link
Copy Markdown
Member

small merge conflict & nit; otherwise lgtm

@joohhnnn joohhnnn force-pushed the script-gas-currency-symbol branch from 3f76801 to d345402 Compare March 27, 2026 18:40
@joohhnnn
Copy link
Copy Markdown
Author

small merge conflict & nit; otherwise lgtm

Fixed the conflict and nit :)

@joohhnnn joohhnnn requested a review from zerosnacks March 27, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants