-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
getEnsName fails with "reverseWithGateways" contract reversion in v2.35.1 #3926
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
needs reproductionMisc: Needs ReproductionMisc: Needs Reproduction
Description
Check existing issues
- I checked there isn't already an issue for the bug I encountered.
Viem Version
2.35.1
Current Behavior
The getEnsName function is failing to resolve ENS names due to a contract reversion in the reverseWithGateways function call.
ContractFunctionExecutionError: The contract function "reverseWithGateways" reverted.
Contract Call:
address: 0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62
function: reverseWithGateways(bytes reverseName, uint256 coinType, string[] gateways)
args: (0xa13d49fCbf79EAF6A0a58cBDD3361422DB4eAfF1, 60, ["x-batch-gateway:true"])
Docs: https://viem.sh/docs/contract/readContract
Version: viem@2.35.1
at getContractError (webpack-internal:///(app-pages-browser)/../../node_modules/viem/_esm/utils/errors/getContractError.js:39:12)
at readContract (webpack-internal:///(app-pages-browser)/../../node_modules/viem/_esm/actions/public/readContract.js:67:98)
at async getEnsName (webpack-internal:///(app-pages-browser)/../../node_modules/viem/_esm/actions/ens/getEnsName.js:67:24)
at async fetchProfileData (webpack-internal:///(app-pages-browser)/./hooks/useProfileData/index.ts:50:25)
It is happening when we call getEnsName fn from wagmi/core package (this happened exactly after we upgraded viem to 2.35.1)
const ensName = await getEnsName(config, { chainId: 1, address: ethereumAddress as `0x${string}` });
Expected Behavior
The function should successfully resolve the ENS name for the given Ethereum address or return null if no ENS name exists.
Steps To Reproduce
No response
Link to Minimal Reproducible Example
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs reproductionMisc: Needs ReproductionMisc: Needs Reproduction