Skip to content

wallet router sends ENS release/setPubkey transactions to the token contract instead of the registrar/resolver #7714

Description

@at0m1x19

Summary
Releasing an ENS username through the wallet router is broken: the built transaction
carries release(bytes32) calldata for the username registrar but is sent to the
SNT token contract, so the name is never released. Setting an ENS public key via the
router (setPubkey, resolver contract) is mis-targeted the same way.

Details

  • services/wallet/transfer/transaction_manager_route.go:176-186 — for non-native
    FromToken, ProcessorENSReleaseName / ProcessorENSPublicKeyName are in the list
    that overrides sendArgs.To = path.FromToken.Address (the token contract). Of the
    ENS processors only ENSRegister belongs there — it really calls approveAndCall on SNT.
  • services/wallet/router/pathprocessor/processor_ens_release.go:104BuildTransactionV2
    passes sendArgs verbatim to the transactor.
  • internal/transactions/transactor.go:389-419 — tx is built with To = args.To,
    Data = args.GetInput(); nothing later corrects the target before signing/sending.
  • Inconsistency: processor_ens_release.go:67-101 estimates gas against the correct
    registrar address from GetContractAddress, while the tx is sent to the token address.
    Same pattern in processor_ens_public_key.go (resolver vs token). Routing therefore
    succeeds without errors, masking the bug.
  • When FromToken is native the override is skipped and To stays input.AddrTo
    (router.go:823), which is not the registrar/resolver either — so neither branch
    targets the right contract.

Impact
ENSRelease and ENSSetPubKey send types are broken end-to-end via the router: users pay
gas for a transaction that can never release the name / set the pubkey.

Found in
Found while writing ENS functional tests in #7372;
the release-via-router test currently works around this by releasing via a direct contract call
(review thread: #7372 (comment)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions