@ensdomains/ensjs 4.0.2 → 4.0.3-alpha.11
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/contracts/consts.js +26 -0
- package/dist/cjs/contracts/consts.js.map +1 -1
- package/dist/cjs/contracts/ethRegistrarController.js +41 -1
- package/dist/cjs/contracts/ethRegistrarController.js.map +1 -1
- package/dist/cjs/contracts/index.js +16 -2
- package/dist/cjs/contracts/index.js.map +1 -1
- package/dist/cjs/contracts/legacyEthRegistrarController.js +187 -0
- package/dist/cjs/contracts/legacyEthRegistrarController.js.map +1 -0
- package/dist/cjs/errors/register.js +23 -0
- package/dist/cjs/errors/register.js.map +1 -0
- package/dist/cjs/errors/version.js +1 -1
- package/dist/cjs/errors/version.js.map +1 -1
- package/dist/cjs/functions/wallet/legacyCommitName.js +50 -0
- package/dist/cjs/functions/wallet/legacyCommitName.js.map +1 -0
- package/dist/cjs/functions/wallet/legacyRegisterName.js +58 -0
- package/dist/cjs/functions/wallet/legacyRegisterName.js.map +1 -0
- package/dist/cjs/utils/index.js +9 -1
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/legacyRegisterHelpers.js +55 -0
- package/dist/cjs/utils/legacyRegisterHelpers.js.map +1 -0
- package/dist/cjs/wallet.js +5 -1
- package/dist/cjs/wallet.js.map +1 -1
- package/dist/esm/contracts/consts.js +26 -0
- package/dist/esm/contracts/consts.js.map +1 -1
- package/dist/esm/contracts/ethRegistrarController.js +40 -0
- package/dist/esm/contracts/ethRegistrarController.js.map +1 -1
- package/dist/esm/contracts/index.js +2 -1
- package/dist/esm/contracts/index.js.map +1 -1
- package/dist/esm/contracts/legacyEthRegistrarController.js +184 -0
- package/dist/esm/contracts/legacyEthRegistrarController.js.map +1 -0
- package/dist/esm/errors/register.js +19 -0
- package/dist/esm/errors/register.js.map +1 -0
- package/dist/esm/errors/version.js +1 -1
- package/dist/esm/errors/version.js.map +1 -1
- package/dist/esm/functions/wallet/legacyCommitName.js +72 -0
- package/dist/esm/functions/wallet/legacyCommitName.js.map +1 -0
- package/dist/esm/functions/wallet/legacyRegisterName.js +94 -0
- package/dist/esm/functions/wallet/legacyRegisterName.js.map +1 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/legacyRegisterHelpers.js +45 -0
- package/dist/esm/utils/legacyRegisterHelpers.js.map +1 -0
- package/dist/esm/wallet.js +2 -0
- package/dist/esm/wallet.js.map +1 -1
- package/dist/types/clients/decorators/wallet.d.ts +4 -4
- package/dist/types/clients/wallet.d.ts +4 -4
- package/dist/types/contracts/consts.d.ts +27 -1
- package/dist/types/contracts/consts.d.ts.map +1 -1
- package/dist/types/contracts/ethRegistrarController.d.ts +31 -0
- package/dist/types/contracts/ethRegistrarController.d.ts.map +1 -1
- package/dist/types/contracts/index.d.ts +2 -1
- package/dist/types/contracts/index.d.ts.map +1 -1
- package/dist/types/contracts/legacyEthRegistrarController.d.ts +263 -0
- package/dist/types/contracts/legacyEthRegistrarController.d.ts.map +1 -0
- package/dist/types/errors/register.d.ts +10 -0
- package/dist/types/errors/register.d.ts.map +1 -0
- package/dist/types/errors/version.d.ts +1 -1
- package/dist/types/errors/version.d.ts.map +1 -1
- package/dist/types/functions/wallet/legacyCommitName.d.ts +41 -0
- package/dist/types/functions/wallet/legacyCommitName.d.ts.map +1 -0
- package/dist/types/functions/wallet/legacyRegisterName.d.ts +60 -0
- package/dist/types/functions/wallet/legacyRegisterName.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/legacyRegisterHelpers.d.ts +49 -0
- package/dist/types/utils/legacyRegisterHelpers.d.ts.map +1 -0
- package/dist/types/wallet.d.ts +2 -0
- package/dist/types/wallet.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/contracts/consts.ts +28 -0
- package/src/contracts/ethRegistrarController.ts +41 -0
- package/src/contracts/index.ts +15 -0
- package/src/contracts/legacyEthRegistrarController.ts +194 -0
- package/src/errors/register.ts +22 -0
- package/src/errors/version.ts +1 -1
- package/src/functions/wallet/legacyCommitName.ts +127 -0
- package/src/functions/wallet/legacyRegisterName.ts +161 -0
- package/src/utils/index.ts +15 -0
- package/src/utils/legacyRegisterHelpers.ts +147 -0
- package/src/wallet.ts +14 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
export declare const legacyEthRegistrarControllerAvailableSnippet: readonly [{
|
|
2
|
+
readonly constant: true;
|
|
3
|
+
readonly inputs: readonly [{
|
|
4
|
+
readonly internalType: "string";
|
|
5
|
+
readonly name: "name";
|
|
6
|
+
readonly type: "string";
|
|
7
|
+
}];
|
|
8
|
+
readonly name: "available";
|
|
9
|
+
readonly outputs: readonly [{
|
|
10
|
+
readonly internalType: "bool";
|
|
11
|
+
readonly name: "";
|
|
12
|
+
readonly type: "bool";
|
|
13
|
+
}];
|
|
14
|
+
readonly payable: false;
|
|
15
|
+
readonly stateMutability: "view";
|
|
16
|
+
readonly type: "function";
|
|
17
|
+
}];
|
|
18
|
+
export declare const legacyEthRegistrarControllerCommitSnippet: readonly [{
|
|
19
|
+
readonly constant: false;
|
|
20
|
+
readonly inputs: readonly [{
|
|
21
|
+
readonly internalType: "bytes32";
|
|
22
|
+
readonly name: "commitment";
|
|
23
|
+
readonly type: "bytes32";
|
|
24
|
+
}];
|
|
25
|
+
readonly name: "commit";
|
|
26
|
+
readonly outputs: readonly [];
|
|
27
|
+
readonly payable: false;
|
|
28
|
+
readonly stateMutability: "nonpayable";
|
|
29
|
+
readonly type: "function";
|
|
30
|
+
}];
|
|
31
|
+
export declare const legacyEthRegistrarControllerCommitmentsSnippet: readonly [{
|
|
32
|
+
readonly constant: true;
|
|
33
|
+
readonly inputs: readonly [{
|
|
34
|
+
readonly internalType: "bytes32";
|
|
35
|
+
readonly name: "";
|
|
36
|
+
readonly type: "bytes32";
|
|
37
|
+
}];
|
|
38
|
+
readonly name: "commitments";
|
|
39
|
+
readonly outputs: readonly [{
|
|
40
|
+
readonly internalType: "uint256";
|
|
41
|
+
readonly name: "";
|
|
42
|
+
readonly type: "uint256";
|
|
43
|
+
}];
|
|
44
|
+
readonly payable: false;
|
|
45
|
+
readonly stateMutability: "view";
|
|
46
|
+
readonly type: "function";
|
|
47
|
+
}];
|
|
48
|
+
export declare const legacyEthRegistrarControllerMakeCommitmentSnippet: readonly [{
|
|
49
|
+
readonly constant: true;
|
|
50
|
+
readonly inputs: readonly [{
|
|
51
|
+
readonly internalType: "string";
|
|
52
|
+
readonly name: "name";
|
|
53
|
+
readonly type: "string";
|
|
54
|
+
}, {
|
|
55
|
+
readonly internalType: "address";
|
|
56
|
+
readonly name: "owner";
|
|
57
|
+
readonly type: "address";
|
|
58
|
+
}, {
|
|
59
|
+
readonly internalType: "bytes32";
|
|
60
|
+
readonly name: "secret";
|
|
61
|
+
readonly type: "bytes32";
|
|
62
|
+
}];
|
|
63
|
+
readonly name: "makeCommitment";
|
|
64
|
+
readonly outputs: readonly [{
|
|
65
|
+
readonly internalType: "bytes32";
|
|
66
|
+
readonly name: "";
|
|
67
|
+
readonly type: "bytes32";
|
|
68
|
+
}];
|
|
69
|
+
readonly payable: false;
|
|
70
|
+
readonly stateMutability: "pure";
|
|
71
|
+
readonly type: "function";
|
|
72
|
+
}];
|
|
73
|
+
export declare const legacyEthRegistrarControllerMakeCommitmentWithConfigSnippet: readonly [{
|
|
74
|
+
readonly constant: true;
|
|
75
|
+
readonly inputs: readonly [{
|
|
76
|
+
readonly internalType: "string";
|
|
77
|
+
readonly name: "name";
|
|
78
|
+
readonly type: "string";
|
|
79
|
+
}, {
|
|
80
|
+
readonly internalType: "address";
|
|
81
|
+
readonly name: "owner";
|
|
82
|
+
readonly type: "address";
|
|
83
|
+
}, {
|
|
84
|
+
readonly internalType: "bytes32";
|
|
85
|
+
readonly name: "secret";
|
|
86
|
+
readonly type: "bytes32";
|
|
87
|
+
}, {
|
|
88
|
+
readonly internalType: "address";
|
|
89
|
+
readonly name: "resolver";
|
|
90
|
+
readonly type: "address";
|
|
91
|
+
}, {
|
|
92
|
+
readonly internalType: "address";
|
|
93
|
+
readonly name: "addr";
|
|
94
|
+
readonly type: "address";
|
|
95
|
+
}];
|
|
96
|
+
readonly name: "makeCommitmentWithConfig";
|
|
97
|
+
readonly outputs: readonly [{
|
|
98
|
+
readonly internalType: "bytes32";
|
|
99
|
+
readonly name: "";
|
|
100
|
+
readonly type: "bytes32";
|
|
101
|
+
}];
|
|
102
|
+
readonly payable: false;
|
|
103
|
+
readonly stateMutability: "pure";
|
|
104
|
+
readonly type: "function";
|
|
105
|
+
}];
|
|
106
|
+
export declare const legacyEthRegistrarControllerRegisterSnippet: readonly [{
|
|
107
|
+
readonly constant: false;
|
|
108
|
+
readonly inputs: readonly [{
|
|
109
|
+
readonly internalType: "string";
|
|
110
|
+
readonly name: "name";
|
|
111
|
+
readonly type: "string";
|
|
112
|
+
}, {
|
|
113
|
+
readonly internalType: "address";
|
|
114
|
+
readonly name: "owner";
|
|
115
|
+
readonly type: "address";
|
|
116
|
+
}, {
|
|
117
|
+
readonly internalType: "uint256";
|
|
118
|
+
readonly name: "duration";
|
|
119
|
+
readonly type: "uint256";
|
|
120
|
+
}, {
|
|
121
|
+
readonly internalType: "bytes32";
|
|
122
|
+
readonly name: "secret";
|
|
123
|
+
readonly type: "bytes32";
|
|
124
|
+
}];
|
|
125
|
+
readonly name: "register";
|
|
126
|
+
readonly outputs: readonly [];
|
|
127
|
+
readonly payable: true;
|
|
128
|
+
readonly stateMutability: "payable";
|
|
129
|
+
readonly type: "function";
|
|
130
|
+
}];
|
|
131
|
+
export declare const legacyEthRegistrarControllerRegisterWithConfigSnippet: readonly [{
|
|
132
|
+
readonly constant: false;
|
|
133
|
+
readonly inputs: readonly [{
|
|
134
|
+
readonly internalType: "string";
|
|
135
|
+
readonly name: "name";
|
|
136
|
+
readonly type: "string";
|
|
137
|
+
}, {
|
|
138
|
+
readonly internalType: "address";
|
|
139
|
+
readonly name: "owner";
|
|
140
|
+
readonly type: "address";
|
|
141
|
+
}, {
|
|
142
|
+
readonly internalType: "uint256";
|
|
143
|
+
readonly name: "duration";
|
|
144
|
+
readonly type: "uint256";
|
|
145
|
+
}, {
|
|
146
|
+
readonly internalType: "bytes32";
|
|
147
|
+
readonly name: "secret";
|
|
148
|
+
readonly type: "bytes32";
|
|
149
|
+
}, {
|
|
150
|
+
readonly internalType: "address";
|
|
151
|
+
readonly name: "resolver";
|
|
152
|
+
readonly type: "address";
|
|
153
|
+
}, {
|
|
154
|
+
readonly internalType: "address";
|
|
155
|
+
readonly name: "addr";
|
|
156
|
+
readonly type: "address";
|
|
157
|
+
}];
|
|
158
|
+
readonly name: "registerWithConfig";
|
|
159
|
+
readonly outputs: readonly [];
|
|
160
|
+
readonly payable: true;
|
|
161
|
+
readonly stateMutability: "payable";
|
|
162
|
+
readonly type: "function";
|
|
163
|
+
}];
|
|
164
|
+
export declare const legacyEthRegistrarControllerRenewSnippet: readonly [{
|
|
165
|
+
readonly constant: false;
|
|
166
|
+
readonly inputs: readonly [{
|
|
167
|
+
readonly internalType: "string";
|
|
168
|
+
readonly name: "name";
|
|
169
|
+
readonly type: "string";
|
|
170
|
+
}, {
|
|
171
|
+
readonly internalType: "uint256";
|
|
172
|
+
readonly name: "duration";
|
|
173
|
+
readonly type: "uint256";
|
|
174
|
+
}];
|
|
175
|
+
readonly name: "renew";
|
|
176
|
+
readonly outputs: readonly [];
|
|
177
|
+
readonly payable: true;
|
|
178
|
+
readonly stateMutability: "payable";
|
|
179
|
+
readonly type: "function";
|
|
180
|
+
}];
|
|
181
|
+
export declare const legacyEthRegistrarControllerRentPriceSnippet: readonly [{
|
|
182
|
+
readonly constant: true;
|
|
183
|
+
readonly inputs: readonly [{
|
|
184
|
+
readonly internalType: "string";
|
|
185
|
+
readonly name: "name";
|
|
186
|
+
readonly type: "string";
|
|
187
|
+
}, {
|
|
188
|
+
readonly internalType: "uint256";
|
|
189
|
+
readonly name: "duration";
|
|
190
|
+
readonly type: "uint256";
|
|
191
|
+
}];
|
|
192
|
+
readonly name: "rentPrice";
|
|
193
|
+
readonly outputs: readonly [{
|
|
194
|
+
readonly internalType: "uint256";
|
|
195
|
+
readonly name: "";
|
|
196
|
+
readonly type: "uint256";
|
|
197
|
+
}];
|
|
198
|
+
readonly payable: false;
|
|
199
|
+
readonly stateMutability: "view";
|
|
200
|
+
readonly type: "function";
|
|
201
|
+
}];
|
|
202
|
+
export declare const legacyEthRegistrarControllerSupportsInterfaceSnippet: readonly [{
|
|
203
|
+
readonly constant: true;
|
|
204
|
+
readonly inputs: readonly [{
|
|
205
|
+
readonly internalType: "bytes4";
|
|
206
|
+
readonly name: "interfaceID";
|
|
207
|
+
readonly type: "bytes4";
|
|
208
|
+
}];
|
|
209
|
+
readonly name: "supportsInterface";
|
|
210
|
+
readonly outputs: readonly [{
|
|
211
|
+
readonly internalType: "bool";
|
|
212
|
+
readonly name: "";
|
|
213
|
+
readonly type: "bool";
|
|
214
|
+
}];
|
|
215
|
+
readonly payable: false;
|
|
216
|
+
readonly stateMutability: "pure";
|
|
217
|
+
readonly type: "function";
|
|
218
|
+
}];
|
|
219
|
+
export declare const legacyEthRegistrarControllerTransferOwnershipSnippet: readonly [{
|
|
220
|
+
readonly constant: false;
|
|
221
|
+
readonly inputs: readonly [{
|
|
222
|
+
readonly internalType: "address";
|
|
223
|
+
readonly name: "newOwner";
|
|
224
|
+
readonly type: "address";
|
|
225
|
+
}];
|
|
226
|
+
readonly name: "transferOwnership";
|
|
227
|
+
readonly outputs: readonly [];
|
|
228
|
+
readonly payable: false;
|
|
229
|
+
readonly stateMutability: "nonpayable";
|
|
230
|
+
readonly type: "function";
|
|
231
|
+
}];
|
|
232
|
+
export declare const legacyEthRegistrarControllerNameRegisteredEventSnippet: readonly [{
|
|
233
|
+
readonly anonymous: false;
|
|
234
|
+
readonly inputs: readonly [{
|
|
235
|
+
readonly indexed: false;
|
|
236
|
+
readonly internalType: "string";
|
|
237
|
+
readonly name: "name";
|
|
238
|
+
readonly type: "string";
|
|
239
|
+
}, {
|
|
240
|
+
readonly indexed: true;
|
|
241
|
+
readonly internalType: "bytes32";
|
|
242
|
+
readonly name: "label";
|
|
243
|
+
readonly type: "bytes32";
|
|
244
|
+
}, {
|
|
245
|
+
readonly indexed: true;
|
|
246
|
+
readonly internalType: "address";
|
|
247
|
+
readonly name: "owner";
|
|
248
|
+
readonly type: "address";
|
|
249
|
+
}, {
|
|
250
|
+
readonly indexed: false;
|
|
251
|
+
readonly internalType: "uint256";
|
|
252
|
+
readonly name: "cost";
|
|
253
|
+
readonly type: "uint256";
|
|
254
|
+
}, {
|
|
255
|
+
readonly indexed: false;
|
|
256
|
+
readonly internalType: "uint256";
|
|
257
|
+
readonly name: "expires";
|
|
258
|
+
readonly type: "uint256";
|
|
259
|
+
}];
|
|
260
|
+
readonly name: "NameRegistered";
|
|
261
|
+
readonly type: "event";
|
|
262
|
+
}];
|
|
263
|
+
//# sourceMappingURL=legacyEthRegistrarController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacyEthRegistrarController.d.ts","sourceRoot":"","sources":["../../../src/contracts/legacyEthRegistrarController.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;EAU/C,CAAA;AAEV,eAAO,MAAM,yCAAyC;;;;;;;;;;;;EAU5C,CAAA;AAEV,eAAO,MAAM,8CAA8C;;;;;;;;;;;;;;;;EAUjD,CAAA;AAEV,eAAO,MAAM,iDAAiD;;;;;;;;;;;;;;;;;;;;;;;;EAcpD,CAAA;AAEV,eAAO,MAAM,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgB9D,CAAA;AAEV,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;EAe9C,CAAA;AAEV,eAAO,MAAM,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBxD,CAAA;AAEV,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;EAa3C,CAAA;AAEV,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;EAa/C,CAAA;AAEV,eAAO,MAAM,oDAAoD;;;;;;;;;;;;;;;;EAUvD,CAAA;AAEV,eAAO,MAAM,oDAAoD;;;;;;;;;;;;EAUvD,CAAA;AAEV,eAAO,MAAM,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCzD,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Address } from 'viem';
|
|
2
|
+
import { BaseError } from './base.js';
|
|
3
|
+
export declare class LegacyRegistrationInvalidConfigError extends BaseError {
|
|
4
|
+
name: string;
|
|
5
|
+
constructor({ resolverAddress, address, }: {
|
|
6
|
+
resolverAddress?: Address;
|
|
7
|
+
address?: Address;
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=register.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/errors/register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAGrC,qBAAa,oCAAqC,SAAQ,SAAS;IACxD,IAAI,SAAyC;gBAE1C,EACV,eAAe,EACf,OAAO,GACR,EAAE;QACD,eAAe,CAAC,EAAE,OAAO,CAAA;QACzB,OAAO,CAAC,EAAE,OAAO,CAAA;KAClB;CAQF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "v4.0.
|
|
1
|
+
export declare const version = "v4.0.3-alpha.11";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/errors/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/errors/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type Account, type Hash, type Transport } from 'viem';
|
|
2
|
+
import type { ChainWithEns, ClientWithAccount } from '../../contracts/consts.js';
|
|
3
|
+
import type { Prettify, SimpleTransactionRequest, WriteTransactionParameters } from '../../types.js';
|
|
4
|
+
import { type LegacyRegistrationParameters } from '../../utils/legacyRegisterHelpers.js';
|
|
5
|
+
export type LegacyCommitNameDataParameters = LegacyRegistrationParameters;
|
|
6
|
+
export type LegacyCommitNameDataReturnType = SimpleTransactionRequest;
|
|
7
|
+
export type LegacyCommitNameParameters<TChain extends ChainWithEns, TAccount extends Account | undefined, TChainOverride extends ChainWithEns | undefined> = Prettify<LegacyCommitNameDataParameters & WriteTransactionParameters<TChain, TAccount, TChainOverride>>;
|
|
8
|
+
export type LegacyCommitNameReturnType = Hash;
|
|
9
|
+
export declare const makeFunctionData: <TChain extends ChainWithEns, TAccount extends Account | undefined>(wallet: ClientWithAccount<Transport, TChain, TAccount>, args: LegacyCommitNameDataParameters) => LegacyCommitNameDataReturnType;
|
|
10
|
+
/**
|
|
11
|
+
* Commits a name to be registered
|
|
12
|
+
* @param wallet - {@link ClientWithAccount}
|
|
13
|
+
* @param parameters - {@link LegacyCommitNameParameters}
|
|
14
|
+
* @returns Transaction hash. {@link LegacyCommitNameReturnType}
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* import { createWalletClient, custom } from 'viem'
|
|
18
|
+
* import { mainnet } from 'viem/chains'
|
|
19
|
+
* import { addEnsContracts } from '@ensdomains/ensjs'
|
|
20
|
+
* import { commitName } from '@ensdomains/ensjs/wallet'
|
|
21
|
+
* import { randomSecret } from '@ensdomains/ensjs/utils'
|
|
22
|
+
*
|
|
23
|
+
* const wallet = createWalletClient({
|
|
24
|
+
* chain: addEnsContracts(mainnet),
|
|
25
|
+
* transport: custom(window.ethereum),
|
|
26
|
+
* })
|
|
27
|
+
* const secret = randomSecret()
|
|
28
|
+
* const hash = await commitName(wallet, {
|
|
29
|
+
* name: 'example.eth',
|
|
30
|
+
* owner: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7',
|
|
31
|
+
* duration: 31536000, // 1 year
|
|
32
|
+
* secret,
|
|
33
|
+
* })
|
|
34
|
+
* // 0x...
|
|
35
|
+
*/
|
|
36
|
+
declare function legacyCommitName<TChain extends ChainWithEns, TAccount extends Account | undefined, TChainOverride extends ChainWithEns | undefined = ChainWithEns>(wallet: ClientWithAccount<Transport, TChain, TAccount>, { name, owner, duration, secret, resolverAddress, address, ...txArgs }: LegacyCommitNameParameters<TChain, TAccount, TChainOverride>): Promise<LegacyCommitNameReturnType>;
|
|
37
|
+
declare namespace legacyCommitName {
|
|
38
|
+
var makeFunctionData: <TChain extends ChainWithEns, TAccount extends Account | undefined>(wallet: ClientWithAccount<Transport, TChain, TAccount>, args: LegacyRegistrationParameters) => SimpleTransactionRequest;
|
|
39
|
+
}
|
|
40
|
+
export default legacyCommitName;
|
|
41
|
+
//# sourceMappingURL=legacyCommitName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacyCommitName.d.ts","sourceRoot":"","sources":["../../../../src/functions/wallet/legacyCommitName.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,IAAI,EAET,KAAK,SAAS,EACf,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAIhF,OAAO,KAAK,EACV,QAAQ,EACR,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,sCAAsC,CAAA;AAG7C,MAAM,MAAM,8BAA8B,GAAG,4BAA4B,CAAA;AAEzE,MAAM,MAAM,8BAA8B,GAAG,wBAAwB,CAAA;AAErE,MAAM,MAAM,0BAA0B,CACpC,MAAM,SAAS,YAAY,EAC3B,QAAQ,SAAS,OAAO,GAAG,SAAS,EACpC,cAAc,SAAS,YAAY,GAAG,SAAS,IAC7C,QAAQ,CACV,8BAA8B,GAC5B,0BAA0B,CAAC,MAAM,EAAE,QAAQ,EAAE,cAAc,CAAC,CAC/D,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAA;AAE7C,eAAO,MAAM,gBAAgB,oIAKrB,8BAA8B,KACnC,8BAoBF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,iBAAe,gBAAgB,CAC7B,MAAM,SAAS,YAAY,EAC3B,QAAQ,SAAS,OAAO,GAAG,SAAS,EACpC,cAAc,SAAS,YAAY,GAAG,SAAS,GAAG,YAAY,EAE9D,MAAM,EAAE,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EACtD,EACE,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,MAAM,EACN,eAA+B,EAC/B,OAAuB,EACvB,GAAG,MAAM,EACV,EAAE,0BAA0B,CAAC,MAAM,EAAE,QAAQ,EAAE,cAAc,CAAC,GAC9D,OAAO,CAAC,0BAA0B,CAAC,CAcrC;kBA7Bc,gBAAgB;;;AAiC/B,eAAe,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type Account, type Hash, type Transport } from 'viem';
|
|
2
|
+
import type { ChainWithEns, ClientWithAccount } from '../../contracts/consts.js';
|
|
3
|
+
import type { Prettify, SimpleTransactionRequest, WriteTransactionParameters } from '../../types.js';
|
|
4
|
+
import { type LegacyRegistrationParameters } from '../../utils/legacyRegisterHelpers.js';
|
|
5
|
+
export type LegacyRegisterNameDataParameters = LegacyRegistrationParameters & {
|
|
6
|
+
/** Value of registration */
|
|
7
|
+
value: bigint;
|
|
8
|
+
};
|
|
9
|
+
export type LegacyRegisterNameDataReturnType = SimpleTransactionRequest & {
|
|
10
|
+
value: bigint;
|
|
11
|
+
};
|
|
12
|
+
export type LegacyRegisterNameParameters<TChain extends ChainWithEns, TAccount extends Account | undefined, TChainOverride extends ChainWithEns | undefined> = Prettify<LegacyRegisterNameDataParameters & WriteTransactionParameters<TChain, TAccount, TChainOverride>>;
|
|
13
|
+
export type LegacyRegisterNameReturnType = Hash;
|
|
14
|
+
export declare const makeFunctionData: <TChain extends ChainWithEns, TAccount extends Account | undefined>(wallet: ClientWithAccount<Transport, TChain, TAccount>, { value, ...args }: LegacyRegisterNameDataParameters) => LegacyRegisterNameDataReturnType;
|
|
15
|
+
/**
|
|
16
|
+
* Registers a name on ENS
|
|
17
|
+
* @param wallet - {@link ClientWithAccount}
|
|
18
|
+
* @param parameters - {@link RegisterNameParameters}
|
|
19
|
+
* @returns Transaction hash. {@link LegacyRegisterNameReturnType}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* import { createPublicClient, createWalletClient, http, custom } from 'viem'
|
|
23
|
+
* import { mainnet } from 'viem/chains'
|
|
24
|
+
* import { addEnsContracts } from '@ensdomains/ensjs'
|
|
25
|
+
* import { getPrice } from '@ensdomains/ensjs/public'
|
|
26
|
+
* import { randomSecret } from '@ensdomains/ensjs/utils'
|
|
27
|
+
* import { commitName, registerName } from '@ensdomains/ensjs/wallet'
|
|
28
|
+
*
|
|
29
|
+
* const mainnetWithEns = addEnsContracts(mainnet)
|
|
30
|
+
* const client = createPublicClient({
|
|
31
|
+
* chain: mainnetWithEns,
|
|
32
|
+
* transport: http(),
|
|
33
|
+
* })
|
|
34
|
+
* const wallet = createWalletClient({
|
|
35
|
+
* chain: mainnetWithEns,
|
|
36
|
+
* transport: custom(window.ethereum),
|
|
37
|
+
* })
|
|
38
|
+
* const secret = randomSecret()
|
|
39
|
+
* const params = {
|
|
40
|
+
* name: 'example.eth',
|
|
41
|
+
* owner: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7',
|
|
42
|
+
* duration: 31536000, // 1 year
|
|
43
|
+
* secret,
|
|
44
|
+
* }
|
|
45
|
+
*
|
|
46
|
+
* const commitmentHash = await commitName(wallet, params)
|
|
47
|
+
* await client.waitForTransactionReceipt({ hash: commitmentHash }) // wait for commitment to finalise
|
|
48
|
+
* await new Promise((resolve) => setTimeout(resolve, 60 * 1_000)) // wait for commitment to be valid
|
|
49
|
+
*
|
|
50
|
+
* const { base, premium } = await getPrice(client, { nameOrNames: params.name, duration: params.duration })
|
|
51
|
+
* const value = (base + premium) * 110n / 100n // add 10% to the price for buffer
|
|
52
|
+
* const hash = await registerName(wallet, { ...params, value })
|
|
53
|
+
* // 0x...
|
|
54
|
+
*/
|
|
55
|
+
declare function legacyRegisterName<TChain extends ChainWithEns, TAccount extends Account | undefined, TChainOverride extends ChainWithEns | undefined = ChainWithEns>(wallet: ClientWithAccount<Transport, TChain, TAccount>, { name, owner, duration, secret, resolverAddress, address, value, ...txArgs }: LegacyRegisterNameParameters<TChain, TAccount, TChainOverride>): Promise<LegacyRegisterNameReturnType>;
|
|
56
|
+
declare namespace legacyRegisterName {
|
|
57
|
+
var makeFunctionData: <TChain extends ChainWithEns, TAccount extends Account | undefined>(wallet: ClientWithAccount<Transport, TChain, TAccount>, { value, ...args }: LegacyRegisterNameDataParameters) => LegacyRegisterNameDataReturnType;
|
|
58
|
+
}
|
|
59
|
+
export default legacyRegisterName;
|
|
60
|
+
//# sourceMappingURL=legacyRegisterName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacyRegisterName.d.ts","sourceRoot":"","sources":["../../../../src/functions/wallet/legacyRegisterName.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,IAAI,EAET,KAAK,SAAS,EACf,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CA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ordOptions, } from './generateRecordCa
|
|
|
15
15
|
export { generateSupportedContentTypes } from './generateSupportedContentTypes.js';
|
|
16
16
|
export { bytesToPacket, packetToBytes } from './hexEncodedName.js';
|
|
17
17
|
export { checkIsDecrypted, checkLabel, decodeLabelhash, decryptName, encodeLabelhash, isEncodedLabelhash, saveLabel, saveName, } from './labels.js';
|
|
18
|
+
export { makeLegacyCommitment, makeLegacyCommitmentFromTuple, makeLegacyCommitmentTuple, makeLegacyCommitmentWithConfigTuple, makeLegacyRegistrationTuple, makeLegacyRegistrationWithConfigTuple, isLegacyRegistrationWithConfigParameters, type LegacyCommitmentTuple, type LegacyCommitmentWithConfigTuple, type LegacyRegistrationParameters, type LegacyRegistrationWithConfigParameters, type LegacyRegistrationTuple, type LegacyRegistrationWithConfigTuple, } from './legacyRegisterHelpers.js';
|
|
18
19
|
export { makeSafeSecondsDate } from './makeSafeSecondsDate.js';
|
|
19
20
|
export { beautify, emoji, isCombiningMark, namehash, normalise, normaliseFragment, shouldEscape, split, tokenise, type DisallowedToken, type EmojiToken, type IgnoredToken, type Label, type MappedToken, type NFCToken, type StopToken, type TextToken, type Token, type ValidToken, } from './normalise.js';
|
|
20
21
|
export { makeCommitment, makeCommitmentFromTuple, makeCommitmentTuple, makeRegistrationTuple, randomSecret, type CommitmentTuple, type RegistrationParameters, type RegistrationTuple, } from './registerHelpers.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EACL,gBAAgB,EAChB,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,GAChC,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,eAAe,GACrB,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,qBAAqB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c,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EACL,uBAAuB,EACvB,KAAK,aAAa,GACnB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAA;AAClF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,SAAS,EACT,QAAQ,GACT,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EACL,QAAQ,EACR,KAAK,EACL,eAAe,EACf,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,UAAU,GAChB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,GACvB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,aAAa,EACb,UAAU,EACV,YAAY,EACZ,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,UAAU,EACV,cAAc,EACd,uBAAuB,GACxB,MAAM,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EACL,gBAAgB,EAChB,KAAK,0BAA0B,EAC/B,KAAK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,EACZ,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,GACvB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,aAAa,EACb,UAAU,EACV,YAAY,EACZ,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,UAAU,EACV,cAAc,EACd,uBAAuB,GACxB,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type Address, type Hex } from 'viem';
|
|
2
|
+
export type LegacyRegistrationParameters = {
|
|
3
|
+
/** Name to register */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Address to set owner to */
|
|
6
|
+
owner: Address;
|
|
7
|
+
/** Duration of registration */
|
|
8
|
+
duration: number;
|
|
9
|
+
/** Random 32 bytes to use for registration */
|
|
10
|
+
secret: Hex;
|
|
11
|
+
/** Custom resolver address, defaults to empty address */
|
|
12
|
+
resolverAddress?: Address;
|
|
13
|
+
/** Address to set upon registration, defaults to empty address */
|
|
14
|
+
address?: Address;
|
|
15
|
+
};
|
|
16
|
+
export type LegacyRegistrationWithConfigParameters = LegacyRegistrationParameters & {
|
|
17
|
+
resolverAddress: Address;
|
|
18
|
+
address?: Address;
|
|
19
|
+
};
|
|
20
|
+
export declare const isLegacyRegistrationWithConfigParameters: (params: LegacyRegistrationParameters) => params is LegacyRegistrationWithConfigParameters;
|
|
21
|
+
export type LegacyCommitmentTuple = [label: string, owner: Address, secret: Hex];
|
|
22
|
+
export type LegacyCommitmentWithConfigTuple = [
|
|
23
|
+
label: string,
|
|
24
|
+
owner: Address,
|
|
25
|
+
resolverAddress: Address,
|
|
26
|
+
address: Address,
|
|
27
|
+
secret: Hex
|
|
28
|
+
];
|
|
29
|
+
export type LegacyRegistrationTuple = [
|
|
30
|
+
label: string,
|
|
31
|
+
owner: Address,
|
|
32
|
+
duration: bigint,
|
|
33
|
+
secret: Hex
|
|
34
|
+
];
|
|
35
|
+
export type LegacyRegistrationWithConfigTuple = [
|
|
36
|
+
label: string,
|
|
37
|
+
owner: Address,
|
|
38
|
+
duration: bigint,
|
|
39
|
+
secret: Hex,
|
|
40
|
+
resolverAddress: Address,
|
|
41
|
+
address: Address
|
|
42
|
+
];
|
|
43
|
+
export declare const makeLegacyCommitmentTuple: (params: LegacyRegistrationParameters) => LegacyCommitmentTuple;
|
|
44
|
+
export declare const makeLegacyCommitmentWithConfigTuple: (params: LegacyRegistrationWithConfigParameters) => LegacyCommitmentWithConfigTuple;
|
|
45
|
+
export declare const makeLegacyRegistrationTuple: ({ name, owner, secret, duration, }: LegacyRegistrationParameters) => LegacyRegistrationTuple;
|
|
46
|
+
export declare const makeLegacyRegistrationWithConfigTuple: ({ name, owner, secret, duration, resolverAddress, address, }: LegacyRegistrationWithConfigParameters) => LegacyRegistrationWithConfigTuple;
|
|
47
|
+
export declare const makeLegacyCommitmentFromTuple: ([label, ...others]: LegacyCommitmentTuple | LegacyCommitmentWithConfigTuple) => Hex;
|
|
48
|
+
export declare const makeLegacyCommitment: (params: LegacyRegistrationParameters | LegacyRegistrationWithConfigParameters) => Hex;
|
|
49
|
+
//# sourceMappingURL=legacyRegisterHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacyRegisterHelpers.d.ts","sourceRoot":"","sources":["../../../src/utils/legacyRegisterHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,GAAG,EAET,MAAM,MAAM,CAAA;AAIb,MAAM,MAAM,4BAA4B,GAAG;IACzC,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,8BAA8B;IAC9B,KAAK,EAAE,OAAO,CAAA;IACd,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,8CAA8C;IAC9C,MAAM,EAAE,GAAG,CAAA;IACX,yDAAyD;IACzD,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,kEAAkE;IAClE,OAAO,CAAC,EAAE,OA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 export { default as clearRecords, type ClearRecordsDataParameters, type ClearRec
|
|
|
2
2
|
export { default as commitName, type CommitNameDataParameters, type CommitNameDataReturnType, type CommitNameParameters, type CommitNameReturnType, } from './functions/wallet/commitName.js';
|
|
3
3
|
export { default as createSubname, type CreateSubnameDataParameters, type CreateSubnameDataReturnType, type CreateSubnameParameters, type CreateSubnameReturnType, } from './functions/wallet/createSubname.js';
|
|
4
4
|
export { default as deleteSubname, type DeleteSubnameDataParameters, type DeleteSubnameDataReturnType, type DeleteSubnameParameters, type DeleteSubnameReturnType, } from './functions/wallet/deleteSubname.js';
|
|
5
|
+
export { default as legacyCommitName, type LegacyCommitNameDataParameters, type LegacyCommitNameDataReturnType, type LegacyCommitNameParameters, type LegacyCommitNameReturnType, } from './functions/wallet/legacyCommitName.js';
|
|
6
|
+
export { default as legacyRegisterName, type LegacyRegisterNameDataParameters, type LegacyRegisterNameDataReturnType, type LegacyRegisterNameParameters, type LegacyRegisterNameReturnType, } from './functions/wallet/legacyRegisterName.js';
|
|
5
7
|
export { default as registerName, type RegisterNameDataParameters, type RegisterNameDataReturnType, type RegisterNameParameters, type RegisterNameReturnType, } from './functions/wallet/registerName.js';
|
|
6
8
|
export { default as renewNames, type RenewNamesDataParameters, type RenewNamesDataReturnType, type RenewNamesParameters, type RenewNamesReturnType, } from './functions/wallet/renewNames.js';
|
|
7
9
|
export { default as setAbiRecord, type SetAbiRecordDataParameters, type SetAbiRecordDataReturnType, type SetAbiRecordParameters, type SetAbiRecordReturnType, } from './functions/wallet/setAbiRecord.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,YAAY,EACvB,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,GAC5B,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACL,OAAO,IAAI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,OAAO,EACL,OAAO,IAAI,aAAa,EACxB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,GAC7B,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,OAAO,IAAI,YAAY,EACvB,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,GAC5B,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACL,OAAO,IAAI,UAAU,EACrB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,OAAO,IAAI,QAAQ,EACnB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,gCAAgC,CAAA"}
|
package/package.json
CHANGED
package/src/contracts/consts.ts
CHANGED
|
@@ -18,6 +18,8 @@ export const supportedContracts = [
|
|
|
18
18
|
'ensRegistry',
|
|
19
19
|
'ensReverseRegistrar',
|
|
20
20
|
'ensUniversalResolver',
|
|
21
|
+
'legacyEthRegistrarController',
|
|
22
|
+
'legacyPublicResolver',
|
|
21
23
|
] as const
|
|
22
24
|
|
|
23
25
|
export type SupportedChain = (typeof supportedChains)[number]
|
|
@@ -55,6 +57,12 @@ export const addresses = {
|
|
|
55
57
|
ensUniversalResolver: {
|
|
56
58
|
address: '0xce01f8eee7E479C928F8919abD53E553a36CeF67',
|
|
57
59
|
},
|
|
60
|
+
legacyEthRegistrarController: {
|
|
61
|
+
address: '0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5',
|
|
62
|
+
},
|
|
63
|
+
legacyPublicResolver: {
|
|
64
|
+
address: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
|
|
65
|
+
},
|
|
58
66
|
},
|
|
59
67
|
5: {
|
|
60
68
|
ensBaseRegistrarImplementation: {
|
|
@@ -87,6 +95,12 @@ export const addresses = {
|
|
|
87
95
|
ensUniversalResolver: {
|
|
88
96
|
address: '0x898A1182F3C2BBBF0b16b4DfEf63E9c3e9eB4821',
|
|
89
97
|
},
|
|
98
|
+
legacyEthRegistrarController: {
|
|
99
|
+
address: '0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5',
|
|
100
|
+
},
|
|
101
|
+
legacyPublicResolver: {
|
|
102
|
+
address: '0xDaaF96c344f63131acadD0Ea35170E7892d3dfBA',
|
|
103
|
+
},
|
|
90
104
|
},
|
|
91
105
|
17000: {
|
|
92
106
|
ensBaseRegistrarImplementation: {
|
|
@@ -119,6 +133,12 @@ export const addresses = {
|
|
|
119
133
|
ensUniversalResolver: {
|
|
120
134
|
address: '0xa6ac935d4971e3cd133b950ae053becd16fe7f3b',
|
|
121
135
|
},
|
|
136
|
+
legacyEthRegistrarController: {
|
|
137
|
+
address: '0xf13fC748601fDc5afA255e9D9166EB43f603a903',
|
|
138
|
+
},
|
|
139
|
+
legacyPublicResolver: {
|
|
140
|
+
address: '0xc5e43b622b5e6C379a984E9BdB34E9A545564fA5',
|
|
141
|
+
},
|
|
122
142
|
},
|
|
123
143
|
11155111: {
|
|
124
144
|
ensBaseRegistrarImplementation: {
|
|
@@ -151,6 +171,12 @@ export const addresses = {
|
|
|
151
171
|
ensUniversalResolver: {
|
|
152
172
|
address: '0xc8af999e38273d658be1b921b88a9ddf005769cc',
|
|
153
173
|
},
|
|
174
|
+
legacyEthRegistrarController: {
|
|
175
|
+
address: '0x7e02892cfc2Bfd53a75275451d73cF620e793fc0',
|
|
176
|
+
},
|
|
177
|
+
legacyPublicResolver: {
|
|
178
|
+
address: '0x0CeEC524b2807841739D3B5E161F5bf1430FFA48',
|
|
179
|
+
},
|
|
154
180
|
},
|
|
155
181
|
} as const satisfies Record<
|
|
156
182
|
SupportedChain,
|
|
@@ -195,6 +221,8 @@ type EnsChainContracts = {
|
|
|
195
221
|
ensReverseRegistrar: ChainContract
|
|
196
222
|
ensBulkRenewal: ChainContract
|
|
197
223
|
ensDnssecImpl: ChainContract
|
|
224
|
+
legacyEthRegistrarController: ChainContract
|
|
225
|
+
legacyPublicResolver: ChainContract
|
|
198
226
|
}
|
|
199
227
|
|
|
200
228
|
type BaseChainContracts = {
|
|
@@ -206,3 +206,44 @@ export const ethRegistrarControllerRenewSnippet = [
|
|
|
206
206
|
type: 'function',
|
|
207
207
|
},
|
|
208
208
|
] as const
|
|
209
|
+
|
|
210
|
+
export const ethRegistrarControllerNameRegisteredEventSnippet = [
|
|
211
|
+
{
|
|
212
|
+
anonymous: false,
|
|
213
|
+
inputs: [
|
|
214
|
+
{
|
|
215
|
+
indexed: false,
|
|
216
|
+
name: 'name',
|
|
217
|
+
type: 'string',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
indexed: true,
|
|
221
|
+
name: 'label',
|
|
222
|
+
type: 'bytes32',
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
indexed: true,
|
|
226
|
+
internalType: 'address',
|
|
227
|
+
name: 'owner',
|
|
228
|
+
type: 'address',
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
indexed: false,
|
|
232
|
+
name: 'baseCost',
|
|
233
|
+
type: 'uint256',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
indexed: false,
|
|
237
|
+
name: 'premium',
|
|
238
|
+
type: 'uint256',
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
indexed: false,
|
|
242
|
+
name: 'expires',
|
|
243
|
+
type: 'uint256',
|
|
244
|
+
},
|
|
245
|
+
],
|
|
246
|
+
name: 'NameRegistered',
|
|
247
|
+
type: 'event',
|
|
248
|
+
},
|
|
249
|
+
] as const
|