2022-09-15 22:20:48 -04:00
|
|
|
import assert from "assert";
|
|
|
|
|
2023-02-02 03:06:15 -05:00
|
|
|
import { connect, setupProviders } from "./create-provider.js";
|
|
|
|
|
|
|
|
setupProviders();
|
2022-09-15 22:20:48 -04:00
|
|
|
|
|
|
|
describe("Test EIP-2544 ENS wildcards", function() {
|
2022-10-20 05:00:49 -04:00
|
|
|
const provider = connect("goerli");
|
2022-09-15 22:20:48 -04:00
|
|
|
|
|
|
|
it("Resolves recursively", async function() {
|
|
|
|
const resolver = await provider.getResolver("ricmoose.hatch.eth");
|
|
|
|
assert.ok(resolver, "failed to get resolver");
|
|
|
|
|
2022-10-20 05:00:49 -04:00
|
|
|
assert.equal(resolver.address, "0x15abA1fa74Bfdecd63A71218DC632d4328Db8168", "address");
|
2022-09-15 22:20:48 -04:00
|
|
|
assert.equal(await resolver.supportsWildcard(), true, "supportsWildcard()");
|
|
|
|
|
|
|
|
// Test pass-through avatar
|
|
|
|
assert.equal(await resolver.getAvatar(), "https:/\/static.ricmoo.com/uploads/profile-06cb9c3031c9.jpg", "getAvatar()");
|
|
|
|
|
2022-10-20 05:00:49 -04:00
|
|
|
assert.equal(await resolver.getAddress(), "0x4B711A377B1b3534749FBe5e59Bcf7F94d92EA98", "getAddress()");
|
2022-09-15 22:20:48 -04:00
|
|
|
});
|
|
|
|
});
|