1

My goal is to be able to get an account at a particular arbitrary Ethereum address (unused as of now).

I was wondering whether I can do that by buying an ENS resolve domain.

If I buy an ENS domain specified as my address of choice (0x....), what will my target contract see as the msg.sender? The address under the hood or my bought ENS address?

1 Answer 1

2

Your contract will see your address. You can get the resolver address on chain but you can't resolve the name on chain.

See an example of getting the resolver here:

https://docs.ens.domains/contract-developer-guide/resolving-names-on-chain

Once you have the resolver you can resolve the name in the front end. Resolving the name to an address happens in the library you are using. eg: ethers, wagmi and such. They will translate the name to an address before going to chain.

Once on chain, your name is an address.

1
  • 1
    Aah, got it, thank you!
    – Mila A
    Commented Oct 21, 2023 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.