Skip to content

Instantly share code, notes, and snippets.

@dapplion
Created February 14, 2020 07:43
Show Gist options
  • Save dapplion/7a08cb7627fb4fe66e68b9d69af4e773 to your computer and use it in GitHub Desktop.
Save dapplion/7a08cb7627fb4fe66e68b9d69af4e773 to your computer and use it in GitHub Desktop.
Test in3 interacting with ENS registar to get a resolver address
const In3Client = require("in3").default;
// use the In3Client
const in3 = new In3Client({
proof: "standard",
signatureCount: 1,
chainId: "mainnet",
replaceLatestBlock: 50
});
// admin.dnp.dappnode.eth
const testNamehash =
"0x7b7d7491331e736fd597441c99888477186663492ab03d120b4556f27c6ce41f";
const ensMainnet = "0x314159265dD8dbb310642f98f50C066173C1259b";
in3.eth
.callFn(ensMainnet, "resolver(bytes32):address", testNamehash)
.then(_ => console.log("resolveAddress:", _.toString()), console.error);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment