Created
February 14, 2020 07:43
-
-
Save dapplion/7a08cb7627fb4fe66e68b9d69af4e773 to your computer and use it in GitHub Desktop.
Test in3 interacting with ENS registar to get a resolver 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
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