Last active
May 31, 2023 17:28
-
-
Save svanas/332f5198420900512483ed6ebcea1376 to your computer and use it in GitHub Desktop.
ENS resolve address
This file contains 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
TAddress.FromName(TWeb3.Create( | |
Ethereum.SetRPC('https://mainnet.infura.io/v3/your-project-id')), // Ethereum mainnet | |
'thecoinoffering.eth', // Ethereum domain name | |
procedure(addr: TAddress; err: IError) | |
begin | |
TThread.Synchronize(nil, procedure | |
begin | |
if Assigned(err) then | |
MessageDlg(err.Message, TMsgDlgType.mtError, [TMsgDlgBtn.mbOK], 0) | |
else | |
ShowMessage(addr); | |
end); | |
end); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment