2022-09-15 22:58:45 -04:00
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
2023-04-25 20:04:48 +09:00
|
|
|
const tslib_1 = require("tslib");
|
|
|
|
const assert_1 = tslib_1.__importDefault(require("assert"));
|
2022-09-15 22:58:45 -04:00
|
|
|
const create_provider_js_1 = require("./create-provider.js");
|
2023-02-02 04:05:47 -05:00
|
|
|
(0, create_provider_js_1.setupProviders)();
|
2022-09-15 22:58:45 -04:00
|
|
|
describe("Test EIP-2544 ENS wildcards", function () {
|
2024-04-17 01:09:22 -04:00
|
|
|
const provider = (0, create_provider_js_1.connect)("sepolia");
|
2022-09-15 22:58:45 -04:00
|
|
|
it("Resolves recursively", async function () {
|
2024-02-02 04:17:59 -05:00
|
|
|
this.timeout(10000);
|
2022-09-15 22:58:45 -04:00
|
|
|
const resolver = await provider.getResolver("ricmoose.hatch.eth");
|
|
|
|
assert_1.default.ok(resolver, "failed to get resolver");
|
2024-04-17 01:09:22 -04:00
|
|
|
assert_1.default.equal(resolver.address, "0x657D81B1E647A56457ff035Af22898411673f7FD", "address");
|
2022-09-15 22:58:45 -04:00
|
|
|
assert_1.default.equal(await resolver.supportsWildcard(), true, "supportsWildcard()");
|
|
|
|
// Test pass-through avatar
|
|
|
|
assert_1.default.equal(await resolver.getAvatar(), "https:/\/static.ricmoo.com/uploads/profile-06cb9c3031c9.jpg", "getAvatar()");
|
2024-04-17 01:09:22 -04:00
|
|
|
assert_1.default.equal(await resolver.getAddress(), "0xF0d6e3fC0f5A23aAAA4933700438b6313Dd331bD", "getAddress()");
|
2022-09-15 22:58:45 -04:00
|
|
|
});
|
|
|
|
});
|
2024-02-02 04:17:59 -05:00
|
|
|
describe("Test ENS-DNS gasless resolver", function () {
|
|
|
|
it("Resolved almonit.org", async function () {
|
|
|
|
this.timeout(10000);
|
|
|
|
const provider = (0, create_provider_js_1.connect)("mainnet");
|
|
|
|
const addr = await provider.resolveName("almonit.org");
|
|
|
|
assert_1.default.equal(addr, "0x0D59d0f7DcC0fBF0A3305cE0261863aAf7Ab685c", "addr");
|
|
|
|
});
|
|
|
|
});
|
2022-09-15 22:58:45 -04:00
|
|
|
//# sourceMappingURL=test-providers-wildcard.js.map
|