Is it possible to use a ENS name as an address in solidity, instead of having to use the usual long address?
address public _address = myname.eth;
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
You can't do it like you present above, but you could call the ENS contract to get the resolver contract address, then call the resolver contract to get the name's contract address...
This would cost a bit of gas though, so you're probably best just looking up the address and entering it in directly; unless of course you need it to be continuously up to date with the current live address.