Skip to content

Don't trust a link is the correct URL, instead use ENSURL to verify Ethereum data.

Notifications You must be signed in to change notification settings

Pryority/ENSURL

Repository files navigation

ENSURL

Have you been warned to not click the link in a tweet because of potential wallet drainers? Don't trust the link is the correct URL, verify with ENSURL.


Example of a Fake/Malicious Link (12/19/2023)

Drainer Demo

Check URL Text Record

import { addEnsContracts } from "@ensdomains/ensjs";
import { getTextRecord } from "@ensdomains/ensjs/public";
import { createPublicClient, http } from "viem";
import { mainnet } from "viem/chains";

const client = createPublicClient({
  chain: addEnsContracts(mainnet),
  transport: http(),
});
const url = await getTextRecord(client, {
  name: "ens.eth",
  key: "url",
});
console.log(url);

Using ENSURL

Option 1

  1. Clone the repository.
  2. Install dependencies with bun install.
  3. Update .eth name in index.ts to the desired name to have URL fetched.
  4. Run bun check to view the URL in the console.

Server/Runtime Demo

Program Demo

Option 2

  1. Open up a new tab of a browser like Chrome, Brave or Firefox.
  2. Copy and paste the entire contents of out/index.js into the console.
  3. Update the default "ens.eth" name to the ENS name you want to check.
  4. Once updated, hit enter or return and wait for the URL to be fetched from Ethereum. You should see the URL printed on the next line in your browser console.

Check the demo below to understand the instructions better.

Browser Demo

Browser Demo

About

Don't trust a link is the correct URL, instead use ENSURL to verify Ethereum data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published