Repository navigation
fix: resolve ambiguous console.log overload for uint8 - #679
Open
Alicepoltora wants to merge 2 commits into
Open
Alicepoltora wants to merge 2 commits into
Alicepoltora wants to merge 2 commits into
Conversation
Foundry's console.log has overloads for (string, uint256) but not (string, uint8). Passing a uint8 value causes an ambiguous overload compilation error. Cast feeAdapterDecimals to uint256 explicitly. Fixes circlefin#564
The same ambiguous console.log overload reported in circlefin#564 also affects the TOKEN_DECIMALS logging in deploy-fiat-token.s.sol and deploy-fiat-token-celo.s.sol, where tokenDecimals is uint8. Cast to uint256 explicitly so the (string, uint256) overload resolves uniquely.
noelportillo
approved these changes
Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #564
Problem
console.log("FEE_ADAPTER_DECIMALS: '%s'", feeAdapterDecimals)wherefeeAdapterDecimalsisuint8causes an ambiguous overload compilation error (Member "log" not unique after argument-dependent lookup) with forge-std versions that declare both(string, uint256)and(string, int256)overloads (e.g. v1.9.1, v1.9.2):uint8implicitly converts to both, so overload resolution fails.Fix
Cast the
uint8values touint256explicitly so the(string, uint256)overload resolves uniquely:scripts/deploy/celo/deploy-fee-adapter.s.sol—feeAdapterDecimals(reported in adapter.s.sol:65:9: TypeError: Member "log" not unique after argument-dependent lookup in type(library console). console.log("FEE_ADAPTER_DECIMALS: '%s'", feeAdapterDecimals) #564)scripts/deploy/deploy-fiat-token.s.sol—tokenDecimalsscripts/deploy/celo/deploy-fiat-token-celo.s.sol—tokenDecimalsVerification
forge buildandforge testpass with the pinned forge-std (v1.7.6)forge buildfails withError (6675)before this change and passes after it when using forge-std v1.9.1yarn compile,yarn static-check,yarn fmt:checkpass