@ensdomains/ensjs 3.0.0-alpha.22 → 3.0.0-alpha.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/functions/burnFuses.js +1 -38
- package/dist/cjs/functions/commitName.js +2 -0
- package/dist/cjs/functions/createSubname.js +3 -2
- package/dist/cjs/functions/getHistory.js +19 -14
- package/dist/cjs/functions/getNames.js +1 -1
- package/dist/cjs/functions/{getFuses.js → getWrapperData.js} +10 -11
- package/dist/cjs/functions/registerName.js +2 -0
- package/dist/cjs/functions/renewNames.js +23 -3
- package/dist/cjs/functions/transferController.js +42 -0
- package/dist/cjs/functions/transferSubname.js +2 -2
- package/dist/cjs/functions/wrapName.js +3 -2
- package/dist/cjs/generated/factories/ETHRegistrarController__factory.js +137 -0
- package/dist/cjs/generated/factories/NameWrapper__factory.js +63 -39
- package/dist/cjs/generated/factories/PublicResolver__factory.js +69 -14
- package/dist/cjs/generated/factories/ReverseRegistrar__factory.js +13 -0
- package/dist/cjs/index.js +6 -3
- package/dist/cjs/utils/fuses.js +43 -1
- package/dist/cjs/utils/recordHelpers.js +5 -0
- package/dist/cjs/utils/registerHelpers.js +1 -0
- package/dist/cjs/utils/{wrapperExpiry.js → wrapper.js} +11 -4
- package/dist/esm/functions/burnFuses.mjs +2 -42
- package/dist/esm/functions/commitName.mjs +2 -0
- package/dist/esm/functions/createSubname.mjs +2 -1
- package/dist/esm/functions/getHistory.mjs +19 -14
- package/dist/esm/functions/getNames.mjs +1 -1
- package/dist/esm/functions/{getFuses.mjs → getWrapperData.mjs} +8 -9
- package/dist/esm/functions/registerName.mjs +2 -0
- package/dist/esm/functions/renewNames.mjs +23 -3
- package/dist/esm/functions/transferController.mjs +23 -0
- package/dist/esm/functions/transferSubname.mjs +1 -1
- package/dist/esm/functions/wrapName.mjs +2 -1
- package/dist/esm/generated/factories/ETHRegistrarController__factory.mjs +137 -0
- package/dist/esm/generated/factories/NameWrapper__factory.mjs +63 -39
- package/dist/esm/generated/factories/PublicResolver__factory.mjs +69 -14
- package/dist/esm/generated/factories/ReverseRegistrar__factory.mjs +13 -0
- package/dist/esm/index.mjs +6 -3
- package/dist/esm/utils/fuses.mjs +43 -1
- package/dist/esm/utils/recordHelpers.mjs +5 -0
- package/dist/esm/utils/registerHelpers.mjs +1 -0
- package/dist/esm/utils/{wrapperExpiry.mjs → wrapper.mjs} +9 -2
- package/dist/types/functions/burnFuses.d.ts +1 -11
- package/dist/types/functions/createSubname.d.ts +1 -1
- package/dist/types/functions/{getFuses.d.ts → getWrapperData.d.ts} +1 -1
- package/dist/types/functions/renewNames.d.ts +9 -2
- package/dist/types/functions/transferController.d.ts +6 -0
- package/dist/types/functions/transferSubname.d.ts +1 -1
- package/dist/types/functions/wrapName.d.ts +1 -1
- package/dist/types/generated/ETHRegistrarController.d.ts +42 -1
- package/dist/types/generated/NameWrapper.d.ts +66 -78
- package/dist/types/generated/PublicResolver.d.ts +51 -23
- package/dist/types/generated/ReverseRegistrar.d.ts +11 -0
- package/dist/types/generated/factories/ETHRegistrarController__factory.d.ts +12 -1
- package/dist/types/index.d.ts +5 -2
- package/dist/types/utils/fuses.d.ts +11 -0
- package/dist/types/utils/recordHelpers.d.ts +1 -0
- package/dist/types/utils/registerHelpers.d.ts +1 -0
- package/dist/types/utils/{wrapperExpiry.d.ts → wrapper.d.ts} +2 -1
- package/package.json +5 -4
- package/src/functions/burnFuses.test.ts +4 -4
- package/src/functions/burnFuses.ts +2 -65
- package/src/functions/commitName.ts +3 -0
- package/src/functions/createSubname.ts +2 -1
- package/src/functions/getHistory.ts +19 -13
- package/src/functions/getNames.test.ts +0 -1
- package/src/functions/getNames.ts +1 -1
- package/src/functions/getPrice.test.ts +9 -6
- package/src/functions/getProfile.test.ts +5 -6
- package/src/functions/getResolver.test.ts +2 -2
- package/src/functions/{getFuses.test.ts → getWrapperData.test.ts} +8 -6
- package/src/functions/{getFuses.ts → getWrapperData.ts} +6 -7
- package/src/functions/registerName.ts +3 -0
- package/src/functions/renewNames.test.ts +3 -3
- package/src/functions/renewNames.ts +36 -6
- package/src/functions/transferController.ts +28 -0
- package/src/functions/transferSubname.ts +1 -1
- package/src/functions/wrapName.test.ts +12 -3
- package/src/functions/wrapName.ts +3 -1
- package/src/generated/ETHRegistrarController.ts +104 -0
- package/src/generated/NameWrapper.ts +127 -90
- package/src/generated/PublicResolver.ts +114 -33
- package/src/generated/ReverseRegistrar.ts +20 -0
- package/src/generated/factories/ETHRegistrarController__factory.ts +137 -0
- package/src/generated/factories/NameWrapper__factory.ts +63 -39
- package/src/generated/factories/PublicResolver__factory.ts +69 -14
- package/src/generated/factories/ReverseRegistrar__factory.ts +13 -0
- package/src/index.ts +19 -5
- package/src/utils/fuses.ts +64 -0
- package/src/utils/recordHelpers.ts +7 -0
- package/src/utils/registerHelpers.ts +1 -1
- package/src/utils/{wrapperExpiry.ts → wrapper.ts} +8 -1
|
@@ -24,44 +24,7 @@ module.exports = __toCommonJS(burnFuses_exports);
|
|
|
24
24
|
var import_fuses = require("../utils/fuses");
|
|
25
25
|
var import_normalise = require("../utils/normalise");
|
|
26
26
|
async function burnFuses_default({ contracts, signer }, name, props) {
|
|
27
|
-
const
|
|
28
|
-
const hasNamedArray = "namedFusesToBurn" in props;
|
|
29
|
-
const hasUnnamedArray = "unnamedFusesToBurn" in props;
|
|
30
|
-
let encodedFuses = 0;
|
|
31
|
-
if (isNumber) {
|
|
32
|
-
if (props.fuseNumberToBurn > 2 ** 32 || props.fuseNumberToBurn < 1) {
|
|
33
|
-
throw new Error(
|
|
34
|
-
`Fuse number must be limited to uint32, ${props.fuseNumberToBurn} was too ${props.fuseNumberToBurn < 1 ? "low" : "high"}.`
|
|
35
|
-
);
|
|
36
|
-
} else if (props.fuseNumberToBurn % 1 !== 0) {
|
|
37
|
-
throw new Error(
|
|
38
|
-
`Fuse number must be an integer, ${props.fuseNumberToBurn} was not.`
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
encodedFuses = props.fuseNumberToBurn;
|
|
42
|
-
} else {
|
|
43
|
-
if (!hasNamedArray && !hasUnnamedArray) {
|
|
44
|
-
throw new Error("Please provide fuses to burn");
|
|
45
|
-
}
|
|
46
|
-
if (hasNamedArray) {
|
|
47
|
-
for (const fuse of props.namedFusesToBurn) {
|
|
48
|
-
if (!(fuse in import_fuses.fuseEnum)) {
|
|
49
|
-
throw new Error(`${fuse} is not a valid named fuse.`);
|
|
50
|
-
}
|
|
51
|
-
encodedFuses |= import_fuses.fuseEnum[fuse];
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
if (hasUnnamedArray) {
|
|
55
|
-
for (const fuse of props.unnamedFusesToBurn) {
|
|
56
|
-
if (!import_fuses.unnamedFuses.includes(fuse)) {
|
|
57
|
-
throw new Error(
|
|
58
|
-
`${fuse} is not a valid unnamed fuse. If you are trying to burn a named fuse, use the namedFusesToBurn property.`
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
encodedFuses |= fuse;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
27
|
+
const encodedFuses = (0, import_fuses.validateFuses)(props);
|
|
65
28
|
const nameWrapper = (await contracts.getNameWrapper()).connect(signer);
|
|
66
29
|
const hash = (0, import_normalise.namehash)(name);
|
|
67
30
|
return nameWrapper.populateTransaction.setFuses(hash, encodedFuses);
|
|
@@ -22,10 +22,12 @@ __export(commitName_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(commitName_exports);
|
|
24
24
|
var import_registerHelpers = require("../utils/registerHelpers");
|
|
25
|
+
var import_wrapper = require("../utils/wrapper");
|
|
25
26
|
async function commitName_default({ contracts }, name, { resolverAddress, ...params }) {
|
|
26
27
|
const labels = name.split(".");
|
|
27
28
|
if (labels.length !== 2 || labels[1] !== "eth")
|
|
28
29
|
throw new Error("Currently only .eth TLD registrations are supported");
|
|
30
|
+
(0, import_wrapper.wrappedLabelLengthCheck)(labels[0]);
|
|
29
31
|
const controller = await contracts.getEthRegistrarController();
|
|
30
32
|
const resolver = await contracts.getPublicResolver(
|
|
31
33
|
void 0,
|
|
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(createSubname_exports);
|
|
|
30
30
|
var import_ethers = require("ethers");
|
|
31
31
|
var import_generateFuseInput = __toESM(require("../utils/generateFuseInput"));
|
|
32
32
|
var import_normalise = require("../utils/normalise");
|
|
33
|
-
var
|
|
33
|
+
var import_wrapper = require("../utils/wrapper");
|
|
34
34
|
async function createSubname_default({
|
|
35
35
|
contracts,
|
|
36
36
|
signer,
|
|
@@ -61,8 +61,9 @@ async function createSubname_default({
|
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
63
|
case "nameWrapper": {
|
|
64
|
+
(0, import_wrapper.wrappedLabelLengthCheck)(label);
|
|
64
65
|
const nameWrapper = (await contracts.getNameWrapper()).connect(signer);
|
|
65
|
-
const expiry = await (0,
|
|
66
|
+
const expiry = await (0, import_wrapper.makeExpiry)(
|
|
66
67
|
{ getExpiry },
|
|
67
68
|
name,
|
|
68
69
|
"expiry" in wrapperArgs ? wrapperArgs.expiry : void 0
|
|
@@ -24,6 +24,8 @@ module.exports = __toCommonJS(getHistory_exports);
|
|
|
24
24
|
var import_address_encoder = require("@ensdomains/address-encoder");
|
|
25
25
|
var import_ethers = require("ethers");
|
|
26
26
|
var import_contentHash = require("../utils/contentHash");
|
|
27
|
+
var import_labels = require("../utils/labels");
|
|
28
|
+
var import_normalise = require("../utils/normalise");
|
|
27
29
|
const eventFormat = {
|
|
28
30
|
Domain: {
|
|
29
31
|
NewOwner: (args) => ({ owner: args.owner.id }),
|
|
@@ -90,8 +92,8 @@ const mapEvents = (eventArray, type) => eventArray.map(
|
|
|
90
92
|
async function getHistory({ gqlInstance }, name) {
|
|
91
93
|
const { client } = gqlInstance;
|
|
92
94
|
const query = gqlInstance.gql`
|
|
93
|
-
query getHistory($
|
|
94
|
-
|
|
95
|
+
query getHistory($namehash: String!, $labelhash: String!) {
|
|
96
|
+
domain(id: $namehash) {
|
|
95
97
|
events {
|
|
96
98
|
id
|
|
97
99
|
blockNumber
|
|
@@ -117,7 +119,7 @@ async function getHistory({ gqlInstance }, name) {
|
|
|
117
119
|
}
|
|
118
120
|
}
|
|
119
121
|
owner {
|
|
120
|
-
registrations (where: {
|
|
122
|
+
registrations (where: { id: $labelhash }) {
|
|
121
123
|
events {
|
|
122
124
|
id
|
|
123
125
|
blockNumber
|
|
@@ -187,18 +189,21 @@ async function getHistory({ gqlInstance }, name) {
|
|
|
187
189
|
}
|
|
188
190
|
`;
|
|
189
191
|
const label = name.split(".")[0];
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
+
const nameHash = (0, import_normalise.namehash)(name);
|
|
193
|
+
const labelHash = (0, import_labels.labelhash)(label);
|
|
194
|
+
const { domain } = await client.request(query, {
|
|
195
|
+
namehash: nameHash,
|
|
196
|
+
labelhash: labelHash
|
|
197
|
+
});
|
|
198
|
+
if (!domain)
|
|
192
199
|
return;
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
] = domains;
|
|
200
|
+
const {
|
|
201
|
+
events: domainEvents,
|
|
202
|
+
owner: {
|
|
203
|
+
registrations: [{ events: registrationEvents }]
|
|
204
|
+
},
|
|
205
|
+
resolver: { events: resolverEvents }
|
|
206
|
+
} = domain;
|
|
202
207
|
const domainHistory = mapEvents(domainEvents, "Domain");
|
|
203
208
|
const registrationHistory = mapEvents(registrationEvents, "Registration");
|
|
204
209
|
const resolverHistory = mapEvents(
|
|
@@ -16,11 +16,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
21
|
-
default: () =>
|
|
19
|
+
var getWrapperData_exports = {};
|
|
20
|
+
__export(getWrapperData_exports, {
|
|
21
|
+
default: () => getWrapperData_default
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(getWrapperData_exports);
|
|
24
24
|
var import_ethers = require("ethers");
|
|
25
25
|
var import_fuses = require("../utils/fuses");
|
|
26
26
|
var import_normalise = require("../utils/normalise");
|
|
@@ -34,11 +34,10 @@ const raw = async ({ contracts }, name) => {
|
|
|
34
34
|
const decode = async ({ contracts }, data) => {
|
|
35
35
|
const nameWrapper = await contracts?.getNameWrapper();
|
|
36
36
|
try {
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
} = nameWrapper.interface.decodeFunctionResult("getData", data);
|
|
37
|
+
const [owner, _fuses, expiry] = nameWrapper.interface.decodeFunctionResult(
|
|
38
|
+
"getData",
|
|
39
|
+
data
|
|
40
|
+
);
|
|
42
41
|
const fuses = import_ethers.BigNumber.from(_fuses);
|
|
43
42
|
const fuseObj = Object.fromEntries(
|
|
44
43
|
Object.keys(import_fuses.fuseEnum).map((fuse) => [
|
|
@@ -59,11 +58,11 @@ const decode = async ({ contracts }, data) => {
|
|
|
59
58
|
owner
|
|
60
59
|
};
|
|
61
60
|
} catch (e) {
|
|
62
|
-
console.error("Error decoding
|
|
61
|
+
console.error("Error decoding wrapper data: ", e);
|
|
63
62
|
return;
|
|
64
63
|
}
|
|
65
64
|
};
|
|
66
|
-
var
|
|
65
|
+
var getWrapperData_default = {
|
|
67
66
|
raw,
|
|
68
67
|
decode
|
|
69
68
|
};
|
|
@@ -22,10 +22,12 @@ __export(registerName_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(registerName_exports);
|
|
24
24
|
var import_registerHelpers = require("../utils/registerHelpers");
|
|
25
|
+
var import_wrapper = require("../utils/wrapper");
|
|
25
26
|
async function registerName_default({ contracts }, name, { resolverAddress, value, ...params }) {
|
|
26
27
|
const labels = name.split(".");
|
|
27
28
|
if (labels.length !== 2 || labels[1] !== "eth")
|
|
28
29
|
throw new Error("Currently only .eth TLD registrations are supported");
|
|
30
|
+
(0, import_wrapper.wrappedLabelLengthCheck)(labels[0]);
|
|
29
31
|
const controller = await contracts.getEthRegistrarController();
|
|
30
32
|
const _resolver = await contracts.getPublicResolver(
|
|
31
33
|
void 0,
|
|
@@ -18,13 +18,33 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var renewNames_exports = {};
|
|
20
20
|
__export(renewNames_exports, {
|
|
21
|
-
default: () => renewNames_default
|
|
21
|
+
default: () => renewNames_default,
|
|
22
|
+
renewNameWithData: () => renewNameWithData
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(renewNames_exports);
|
|
24
|
-
|
|
25
|
+
var import_fuses = require("../utils/fuses");
|
|
26
|
+
var import_registerHelpers = require("../utils/registerHelpers");
|
|
27
|
+
async function renewNameWithData({ contracts }, name, {
|
|
25
28
|
duration,
|
|
26
|
-
value
|
|
29
|
+
value,
|
|
30
|
+
fuses,
|
|
31
|
+
wrapperExpiry = import_registerHelpers.MAX_INT_64
|
|
27
32
|
}) {
|
|
33
|
+
const labels = name.split(".");
|
|
34
|
+
if (labels.length !== 2 || labels[1] !== "eth") {
|
|
35
|
+
throw new Error("Currently only .eth TLD renewals are supported");
|
|
36
|
+
}
|
|
37
|
+
const encodedFuses = fuses ? (0, import_fuses.validateFuses)(fuses) : 0;
|
|
38
|
+
const controller = await contracts.getEthRegistrarController();
|
|
39
|
+
return controller.populateTransaction.renewWithFuses(
|
|
40
|
+
labels[0],
|
|
41
|
+
duration,
|
|
42
|
+
encodedFuses,
|
|
43
|
+
wrapperExpiry,
|
|
44
|
+
{ value }
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
async function renewNames_default({ contracts }, nameOrNames, { duration, value }) {
|
|
28
48
|
const names = Array.isArray(nameOrNames) ? nameOrNames : [nameOrNames];
|
|
29
49
|
const labels = names.map((name) => {
|
|
30
50
|
const label = name.split(".");
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var transferController_exports = {};
|
|
20
|
+
__export(transferController_exports, {
|
|
21
|
+
default: () => transferController_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(transferController_exports);
|
|
24
|
+
var import_ethers = require("ethers");
|
|
25
|
+
async function transferController_default({ contracts, signer }, name, {
|
|
26
|
+
newOwner,
|
|
27
|
+
isOwner
|
|
28
|
+
}) {
|
|
29
|
+
const baseRegistrar = (await contracts?.getBaseRegistrar()).connect(signer);
|
|
30
|
+
const registry = (await contracts?.getRegistry()).connect(signer);
|
|
31
|
+
const labels = name.split(".");
|
|
32
|
+
if (isOwner) {
|
|
33
|
+
return registry.populateTransaction.setOwner(
|
|
34
|
+
import_ethers.ethers.utils.solidityKeccak256(["string"], [labels[0]]),
|
|
35
|
+
newOwner
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
return baseRegistrar.populateTransaction.reclaim(
|
|
39
|
+
import_ethers.ethers.utils.solidityKeccak256(["string"], [labels[0]]),
|
|
40
|
+
newOwner
|
|
41
|
+
);
|
|
42
|
+
}
|
|
@@ -23,7 +23,7 @@ __export(transferSubname_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(transferSubname_exports);
|
|
24
24
|
var import_ethers = require("ethers");
|
|
25
25
|
var import_normalise = require("../utils/normalise");
|
|
26
|
-
var
|
|
26
|
+
var import_wrapper = require("../utils/wrapper");
|
|
27
27
|
async function transferSubname_default({
|
|
28
28
|
contracts,
|
|
29
29
|
signer,
|
|
@@ -44,7 +44,7 @@ async function transferSubname_default({
|
|
|
44
44
|
}
|
|
45
45
|
case "nameWrapper": {
|
|
46
46
|
const nameWrapper = (await contracts.getNameWrapper()).connect(signer);
|
|
47
|
-
const expiry = await (0,
|
|
47
|
+
const expiry = await (0, import_wrapper.makeExpiry)(
|
|
48
48
|
{ getExpiry },
|
|
49
49
|
labels.join("."),
|
|
50
50
|
"expiry" in wrapperArgs ? wrapperArgs.expiry : void 0
|
|
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(wrapName_exports);
|
|
|
30
30
|
var import_ethers = require("ethers");
|
|
31
31
|
var import_generateFuseInput = __toESM(require("../utils/generateFuseInput"));
|
|
32
32
|
var import_hexEncodedName = require("../utils/hexEncodedName");
|
|
33
|
-
var
|
|
33
|
+
var import_wrapper = require("../utils/wrapper");
|
|
34
34
|
async function wrapETH({ contracts }, labels, wrappedOwner, expiry, decodedFuses, resolverAddress, signer, address) {
|
|
35
35
|
const nameWrapper = await contracts?.getNameWrapper();
|
|
36
36
|
const baseRegistrar = (await contracts.getBaseRegistrar()).connect(signer);
|
|
@@ -75,6 +75,7 @@ async function wrapName_default({
|
|
|
75
75
|
if (!resolverAddress)
|
|
76
76
|
resolverAddress = publicResolver.address;
|
|
77
77
|
const labels = name.split(".");
|
|
78
|
+
(0, import_wrapper.wrappedLabelLengthCheck)(labels[0]);
|
|
78
79
|
if (labels.length === 2 && labels[1] === "eth") {
|
|
79
80
|
switch (typeof fuseOptions) {
|
|
80
81
|
case "object": {
|
|
@@ -97,7 +98,7 @@ async function wrapName_default({
|
|
|
97
98
|
throw new Error(`Invalid fuseOptions type: ${typeof fuseOptions}`);
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
|
-
const expiryToUse = await (0,
|
|
101
|
+
const expiryToUse = await (0, import_wrapper.makeExpiry)({ getExpiry }, name, expiry);
|
|
101
102
|
return wrapETH(
|
|
102
103
|
{ contracts },
|
|
103
104
|
labels,
|
|
@@ -59,6 +59,92 @@ const _abi = [
|
|
|
59
59
|
stateMutability: "nonpayable",
|
|
60
60
|
type: "constructor"
|
|
61
61
|
},
|
|
62
|
+
{
|
|
63
|
+
inputs: [
|
|
64
|
+
{
|
|
65
|
+
internalType: "bytes32",
|
|
66
|
+
name: "commitment",
|
|
67
|
+
type: "bytes32"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
name: "CommitmentTooNew",
|
|
71
|
+
type: "error"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
inputs: [
|
|
75
|
+
{
|
|
76
|
+
internalType: "bytes32",
|
|
77
|
+
name: "commitment",
|
|
78
|
+
type: "bytes32"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
name: "CommitmentTooOld",
|
|
82
|
+
type: "error"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
inputs: [
|
|
86
|
+
{
|
|
87
|
+
internalType: "uint256",
|
|
88
|
+
name: "duration",
|
|
89
|
+
type: "uint256"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
name: "DurationTooShort",
|
|
93
|
+
type: "error"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
inputs: [],
|
|
97
|
+
name: "InsufficientValue",
|
|
98
|
+
type: "error"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
inputs: [],
|
|
102
|
+
name: "MaxCommitmentAgeTooHigh",
|
|
103
|
+
type: "error"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
inputs: [],
|
|
107
|
+
name: "MaxCommitmentAgeTooLow",
|
|
108
|
+
type: "error"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
inputs: [
|
|
112
|
+
{
|
|
113
|
+
internalType: "string",
|
|
114
|
+
name: "name",
|
|
115
|
+
type: "string"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
name: "NameNotAvailable",
|
|
119
|
+
type: "error"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
inputs: [],
|
|
123
|
+
name: "ResolverRequiredWhenDataSupplied",
|
|
124
|
+
type: "error"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
inputs: [
|
|
128
|
+
{
|
|
129
|
+
internalType: "bytes32",
|
|
130
|
+
name: "node",
|
|
131
|
+
type: "bytes32"
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
name: "Unauthorised",
|
|
135
|
+
type: "error"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
inputs: [
|
|
139
|
+
{
|
|
140
|
+
internalType: "bytes32",
|
|
141
|
+
name: "commitment",
|
|
142
|
+
type: "bytes32"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
name: "UnexpiredCommitmentExists",
|
|
146
|
+
type: "error"
|
|
147
|
+
},
|
|
62
148
|
{
|
|
63
149
|
anonymous: false,
|
|
64
150
|
inputs: [
|
|
@@ -340,6 +426,29 @@ const _abi = [
|
|
|
340
426
|
stateMutability: "view",
|
|
341
427
|
type: "function"
|
|
342
428
|
},
|
|
429
|
+
{
|
|
430
|
+
inputs: [
|
|
431
|
+
{
|
|
432
|
+
internalType: "address",
|
|
433
|
+
name: "_token",
|
|
434
|
+
type: "address"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
internalType: "address",
|
|
438
|
+
name: "_to",
|
|
439
|
+
type: "address"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
internalType: "uint256",
|
|
443
|
+
name: "_amount",
|
|
444
|
+
type: "uint256"
|
|
445
|
+
}
|
|
446
|
+
],
|
|
447
|
+
name: "recoverFunds",
|
|
448
|
+
outputs: [],
|
|
449
|
+
stateMutability: "nonpayable",
|
|
450
|
+
type: "function"
|
|
451
|
+
},
|
|
343
452
|
{
|
|
344
453
|
inputs: [
|
|
345
454
|
{
|
|
@@ -411,6 +520,34 @@ const _abi = [
|
|
|
411
520
|
stateMutability: "payable",
|
|
412
521
|
type: "function"
|
|
413
522
|
},
|
|
523
|
+
{
|
|
524
|
+
inputs: [
|
|
525
|
+
{
|
|
526
|
+
internalType: "string",
|
|
527
|
+
name: "name",
|
|
528
|
+
type: "string"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
internalType: "uint256",
|
|
532
|
+
name: "duration",
|
|
533
|
+
type: "uint256"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
internalType: "uint32",
|
|
537
|
+
name: "fuses",
|
|
538
|
+
type: "uint32"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
internalType: "uint64",
|
|
542
|
+
name: "wrapperExpiry",
|
|
543
|
+
type: "uint64"
|
|
544
|
+
}
|
|
545
|
+
],
|
|
546
|
+
name: "renewWithFuses",
|
|
547
|
+
outputs: [],
|
|
548
|
+
stateMutability: "payable",
|
|
549
|
+
type: "function"
|
|
550
|
+
},
|
|
414
551
|
{
|
|
415
552
|
inputs: [],
|
|
416
553
|
name: "renounceOwnership",
|