@ensdomains/ensjs 4.2.0 → 4.2.3
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/clients/decorators/wallet.d.ts +2 -2
- package/dist/contracts/addEnsContracts.js +0 -2
- package/dist/contracts/addEnsContracts.js.map +1 -1
- package/dist/contracts/bulkRenewal.d.ts +6 -0
- package/dist/contracts/bulkRenewal.js +7 -0
- package/dist/contracts/bulkRenewal.js.map +1 -1
- package/dist/contracts/consts.d.ts +35 -59
- package/dist/contracts/consts.js +35 -60
- package/dist/contracts/consts.js.map +1 -1
- package/dist/contracts/ethRegistrarController.d.ts +394 -27
- package/dist/contracts/ethRegistrarController.js +180 -34
- package/dist/contracts/ethRegistrarController.js.map +1 -1
- package/dist/contracts/universalResolver.d.ts +234 -8
- package/dist/contracts/universalResolver.js +53 -4
- package/dist/contracts/universalResolver.js.map +1 -1
- package/dist/errors/utils.js +1 -0
- package/dist/errors/utils.js.map +1 -1
- package/dist/errors/version.d.ts +1 -1
- package/dist/errors/version.js +1 -1
- package/dist/errors/version.js.map +1 -1
- package/dist/functions/public/batch.js.map +1 -1
- package/dist/functions/public/getName.js.map +1 -1
- package/dist/functions/public/getRecords.js +2 -2
- package/dist/functions/public/getRecords.js.map +1 -1
- package/dist/functions/subgraph/client.js +1 -0
- package/dist/functions/subgraph/client.js.map +1 -1
- package/dist/functions/subgraph/getNamesForAddress.js +1 -0
- package/dist/functions/subgraph/getNamesForAddress.js.map +1 -1
- package/dist/functions/wallet/commitName.d.ts +1 -1
- package/dist/functions/wallet/commitName.js +2 -2
- package/dist/functions/wallet/commitName.js.map +1 -1
- package/dist/functions/wallet/registerName.d.ts +1 -1
- package/dist/functions/wallet/registerName.js +4 -7
- package/dist/functions/wallet/registerName.js.map +1 -1
- package/dist/functions/wallet/renewNames.d.ts +5 -3
- package/dist/functions/wallet/renewNames.js +4 -3
- package/dist/functions/wallet/renewNames.js.map +1 -1
- package/dist/utils/checkSafeUniversalResolverData.js.map +1 -1
- package/dist/utils/consts.d.ts +1 -0
- package/dist/utils/consts.js +1 -0
- package/dist/utils/consts.js.map +1 -1
- package/dist/utils/encoders/encodeAbi.js.map +1 -1
- package/dist/utils/generateFunction.js.map +1 -1
- package/dist/utils/index.d.ts +2 -3
- package/dist/utils/index.js +2 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/labels.js +4 -2
- package/dist/utils/labels.js.map +1 -1
- package/dist/utils/registerHelpers.d.ts +20 -27
- package/dist/utils/registerHelpers.js +19 -33
- package/dist/utils/registerHelpers.js.map +1 -1
- package/dist/wallet.d.ts +0 -2
- package/dist/wallet.js +0 -2
- package/dist/wallet.js.map +1 -1
- package/package.json +8 -9
- package/src/@types/dns-packet/index.d.ts +1 -0
- package/src/@types/pako.d.ts +4 -1
- package/src/clients/decorators/wallet.ts +2 -2
- package/src/contracts/addEnsContracts.ts +0 -2
- package/src/contracts/bulkRenewal.ts +7 -0
- package/src/contracts/consts.ts +39 -60
- package/src/contracts/ethRegistrarController.ts +181 -34
- package/src/contracts/universalResolver.ts +53 -4
- package/src/errors/utils.ts +1 -0
- package/src/errors/version.ts +1 -1
- package/src/functions/public/batch.ts +1 -0
- package/src/functions/public/getName.ts +1 -0
- package/src/functions/public/getRecords.ts +8 -2
- package/src/functions/subgraph/client.ts +1 -0
- package/src/functions/subgraph/getNamesForAddress.ts +1 -0
- package/src/functions/wallet/commitName.ts +2 -2
- package/src/functions/wallet/registerName.ts +4 -8
- package/src/functions/wallet/renewNames.ts +12 -3
- package/src/types.ts +2 -0
- package/src/utils/checkSafeUniversalResolverData.ts +1 -0
- package/src/utils/consts.ts +2 -0
- package/src/utils/encoders/encodeAbi.ts +1 -0
- package/src/utils/generateFunction.ts +6 -0
- package/src/utils/index.ts +5 -20
- package/src/utils/labels.ts +8 -4
- package/src/utils/registerHelpers.ts +40 -64
- package/src/wallet.ts +0 -14
- package/dist/functions/wallet/legacyCommitName.d.ts +0 -40
- package/dist/functions/wallet/legacyCommitName.js +0 -72
- package/dist/functions/wallet/legacyCommitName.js.map +0 -1
- package/dist/functions/wallet/legacyRegisterName.d.ts +0 -59
- package/dist/functions/wallet/legacyRegisterName.js +0 -93
- package/dist/functions/wallet/legacyRegisterName.js.map +0 -1
- package/dist/utils/legacyRegisterHelpers.d.ts +0 -48
- package/dist/utils/legacyRegisterHelpers.js +0 -45
- package/dist/utils/legacyRegisterHelpers.js.map +0 -1
- package/src/functions/wallet/legacyCommitName.ts +0 -127
- package/src/functions/wallet/legacyRegisterName.ts +0 -159
- package/src/utils/legacyRegisterHelpers.ts +0 -147
|
@@ -26,13 +26,20 @@ export const bulkRenewalRenewAllSnippet = [
|
|
|
26
26
|
{
|
|
27
27
|
inputs: [
|
|
28
28
|
{
|
|
29
|
+
internalType: 'string[]',
|
|
29
30
|
name: 'names',
|
|
30
31
|
type: 'string[]',
|
|
31
32
|
},
|
|
32
33
|
{
|
|
34
|
+
internalType: 'uint256',
|
|
33
35
|
name: 'duration',
|
|
34
36
|
type: 'uint256',
|
|
35
37
|
},
|
|
38
|
+
{
|
|
39
|
+
internalType: 'bytes32',
|
|
40
|
+
name: 'referrer',
|
|
41
|
+
type: 'bytes32',
|
|
42
|
+
},
|
|
36
43
|
],
|
|
37
44
|
name: 'renewAll',
|
|
38
45
|
outputs: [],
|
package/src/contracts/consts.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Account, Address, Chain, Client, Transport } from 'viem'
|
|
2
|
-
import {
|
|
2
|
+
import { mainnet, sepolia } from 'viem/chains'
|
|
3
3
|
import type { Assign, Prettify } from '../types.js'
|
|
4
4
|
|
|
5
5
|
type ChainContract = {
|
|
@@ -7,7 +7,7 @@ type ChainContract = {
|
|
|
7
7
|
blockCreated?: number
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export const supportedChains = [mainnet.id, sepolia.id
|
|
10
|
+
export const supportedChains = [mainnet.id, sepolia.id] as const
|
|
11
11
|
export const supportedContracts = [
|
|
12
12
|
'ensBaseRegistrarImplementation',
|
|
13
13
|
'ensBulkRenewal',
|
|
@@ -18,10 +18,13 @@ export const supportedContracts = [
|
|
|
18
18
|
'ensPublicResolver',
|
|
19
19
|
'ensRegistry',
|
|
20
20
|
'ensReverseRegistrar',
|
|
21
|
+
'ensDefaultReverseRegistrar',
|
|
21
22
|
'ensUniversalResolver',
|
|
23
|
+
'wrappedEthRegistrarController',
|
|
24
|
+
'wrappedPublicResolver',
|
|
25
|
+
'wrappedBulkRenewal',
|
|
22
26
|
'legacyEthRegistrarController',
|
|
23
27
|
'legacyPublicResolver',
|
|
24
|
-
'ensDefaultReverseRegistrar',
|
|
25
28
|
] as const
|
|
26
29
|
|
|
27
30
|
export type SupportedChain = (typeof supportedChains)[number]
|
|
@@ -33,7 +36,7 @@ export const addresses = {
|
|
|
33
36
|
address: '0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85',
|
|
34
37
|
},
|
|
35
38
|
ensBulkRenewal: {
|
|
36
|
-
address: '
|
|
39
|
+
address: '0xc649947a460B135e6B9a70Ee2FB429aDBB529290',
|
|
37
40
|
},
|
|
38
41
|
ensDnsRegistrar: {
|
|
39
42
|
address: '0xB32cB5677a7C971689228EC835800432B339bA2B',
|
|
@@ -42,13 +45,13 @@ export const addresses = {
|
|
|
42
45
|
address: '0x0fc3152971714E5ed7723FAFa650F86A4BaF30C5',
|
|
43
46
|
},
|
|
44
47
|
ensEthRegistrarController: {
|
|
45
|
-
address: '
|
|
48
|
+
address: '0x59E16fcCd424Cc24e280Be16E11Bcd56fb0CE547',
|
|
46
49
|
},
|
|
47
50
|
ensNameWrapper: {
|
|
48
51
|
address: '0xD4416b13d2b3a9aBae7AcD5D6C2BbDBE25686401',
|
|
49
52
|
},
|
|
50
53
|
ensPublicResolver: {
|
|
51
|
-
address: '
|
|
54
|
+
address: '0xF29100983E058B709F3D539b0c765937B804AC15',
|
|
52
55
|
},
|
|
53
56
|
ensRegistry: {
|
|
54
57
|
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
|
@@ -56,58 +59,26 @@ export const addresses = {
|
|
|
56
59
|
ensReverseRegistrar: {
|
|
57
60
|
address: '0xa58E81fe9b61B5c3fE2AFD33CF304c454AbFc7Cb',
|
|
58
61
|
},
|
|
59
|
-
ensUniversalResolver: {
|
|
60
|
-
address: '0xaBd80E8a13596fEeA40Fd26fD6a24c3fe76F05fB',
|
|
61
|
-
},
|
|
62
|
-
legacyEthRegistrarController: {
|
|
63
|
-
address: '0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5',
|
|
64
|
-
},
|
|
65
|
-
legacyPublicResolver: {
|
|
66
|
-
address: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
|
|
67
|
-
},
|
|
68
62
|
ensDefaultReverseRegistrar: {
|
|
69
63
|
address: '0x283F227c4Bd38ecE252C4Ae7ECE650B0e913f1f9',
|
|
70
64
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
ensBaseRegistrarImplementation: {
|
|
74
|
-
address: '0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85',
|
|
75
|
-
},
|
|
76
|
-
ensBulkRenewal: {
|
|
77
|
-
address: '0xbc4cfB363F948E64Cd73Da6438F64CB37E2e33d1',
|
|
78
|
-
},
|
|
79
|
-
ensDnsRegistrar: {
|
|
80
|
-
address: '0x458d278AEd4cE82BAeC384170f39198b01B8351c',
|
|
81
|
-
},
|
|
82
|
-
ensDnssecImpl: {
|
|
83
|
-
address: '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5',
|
|
84
|
-
},
|
|
85
|
-
ensEthRegistrarController: {
|
|
86
|
-
address: '0xF404D2F84BC1735f7D9948F032D61F5fFfD9D3C3',
|
|
87
|
-
},
|
|
88
|
-
ensNameWrapper: {
|
|
89
|
-
address: '0xab50971078225D365994dc1Edcb9b7FD72Bb4862',
|
|
90
|
-
},
|
|
91
|
-
ensPublicResolver: {
|
|
92
|
-
address: '0x5a692ffe769A9B3D0e61F7446F5cAED650044C36',
|
|
65
|
+
ensUniversalResolver: {
|
|
66
|
+
address: '0xeEeEEEeE14D718C2B47D9923Deab1335E144EeEe',
|
|
93
67
|
},
|
|
94
|
-
|
|
95
|
-
address: '
|
|
68
|
+
wrappedEthRegistrarController: {
|
|
69
|
+
address: '0x253553366Da8546fC250F225fe3d25d0C782303b',
|
|
96
70
|
},
|
|
97
|
-
|
|
98
|
-
address: '
|
|
71
|
+
wrappedPublicResolver: {
|
|
72
|
+
address: '0x231b0Ee14048e9dCcD1d247744d114a4EB5E8E63',
|
|
99
73
|
},
|
|
100
|
-
|
|
101
|
-
address: '
|
|
74
|
+
wrappedBulkRenewal: {
|
|
75
|
+
address: '0xa12159e5131b1eEf6B4857EEE3e1954744b5033A',
|
|
102
76
|
},
|
|
103
77
|
legacyEthRegistrarController: {
|
|
104
|
-
address: '
|
|
78
|
+
address: '0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5',
|
|
105
79
|
},
|
|
106
80
|
legacyPublicResolver: {
|
|
107
|
-
address: '
|
|
108
|
-
},
|
|
109
|
-
ensDefaultReverseRegistrar: {
|
|
110
|
-
address: '0x0000000000000000000000000000000000000000',
|
|
81
|
+
address: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
|
|
111
82
|
},
|
|
112
83
|
},
|
|
113
84
|
[sepolia.id]: {
|
|
@@ -115,7 +86,7 @@ export const addresses = {
|
|
|
115
86
|
address: '0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85',
|
|
116
87
|
},
|
|
117
88
|
ensBulkRenewal: {
|
|
118
|
-
address: '
|
|
89
|
+
address: '0x6394b694a8C0DC716e447802E568F0Fb2c4E0965',
|
|
119
90
|
},
|
|
120
91
|
ensDnsRegistrar: {
|
|
121
92
|
address: '0x5a07C75Ae469Bf3ee2657B588e8E6ABAC6741b4f',
|
|
@@ -124,22 +95,34 @@ export const addresses = {
|
|
|
124
95
|
address: '0xe62E4b6cE018Ad6e916fcC24545e20a33b9d8653',
|
|
125
96
|
},
|
|
126
97
|
ensEthRegistrarController: {
|
|
127
|
-
address: '
|
|
98
|
+
address: '0xfb3cE5D01e0f33f41DbB39035dB9745962F1f968',
|
|
128
99
|
},
|
|
129
100
|
ensNameWrapper: {
|
|
130
101
|
address: '0x0635513f179D50A207757E05759CbD106d7dFcE8',
|
|
131
102
|
},
|
|
132
103
|
ensPublicResolver: {
|
|
133
|
-
address: '
|
|
104
|
+
address: '0xE99638b40E4Fff0129D56f03b55b6bbC4BBE49b5',
|
|
134
105
|
},
|
|
135
106
|
ensRegistry: {
|
|
136
107
|
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
|
137
108
|
},
|
|
109
|
+
ensDefaultReverseRegistrar: {
|
|
110
|
+
address: '0x4F382928805ba0e23B30cFB75fC9E848e82DFD47',
|
|
111
|
+
},
|
|
138
112
|
ensReverseRegistrar: {
|
|
139
113
|
address: '0xA0a1AbcDAe1a2a4A2EF8e9113Ff0e02DD81DC0C6',
|
|
140
114
|
},
|
|
141
115
|
ensUniversalResolver: {
|
|
142
|
-
address: '
|
|
116
|
+
address: '0xeEeEEEeE14D718C2B47D9923Deab1335E144EeEe',
|
|
117
|
+
},
|
|
118
|
+
wrappedEthRegistrarController: {
|
|
119
|
+
address: '0x4477cAc137F3353Ca35060E01E5aEb777a1Ca01B',
|
|
120
|
+
},
|
|
121
|
+
wrappedPublicResolver: {
|
|
122
|
+
address: '0x8948458626811dd0c23EB25Cc74291247077cC51',
|
|
123
|
+
},
|
|
124
|
+
wrappedBulkRenewal: {
|
|
125
|
+
address: '0x4EF77b90762Eddb33C8Eba5B5a19558DaE53D7a1',
|
|
143
126
|
},
|
|
144
127
|
legacyEthRegistrarController: {
|
|
145
128
|
address: '0x7e02892cfc2Bfd53a75275451d73cF620e793fc0',
|
|
@@ -147,9 +130,6 @@ export const addresses = {
|
|
|
147
130
|
legacyPublicResolver: {
|
|
148
131
|
address: '0x0CeEC524b2807841739D3B5E161F5bf1430FFA48',
|
|
149
132
|
},
|
|
150
|
-
ensDefaultReverseRegistrar: {
|
|
151
|
-
address: '0x4F382928805ba0e23B30cFB75fC9E848e82DFD47',
|
|
152
|
-
},
|
|
153
133
|
},
|
|
154
134
|
} as const satisfies Record<
|
|
155
135
|
SupportedChain,
|
|
@@ -168,11 +148,6 @@ export const subgraphs = {
|
|
|
168
148
|
url: 'https://api.thegraph.com/subgraphs/name/ensdomains/ens',
|
|
169
149
|
},
|
|
170
150
|
},
|
|
171
|
-
17000: {
|
|
172
|
-
ens: {
|
|
173
|
-
url: 'https://api.studio.thegraph.com/query/49574/ensholesky/version/latest',
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
151
|
11155111: {
|
|
177
152
|
ens: {
|
|
178
153
|
url: 'https://api.studio.thegraph.com/query/49574/enssepolia/version/latest',
|
|
@@ -188,8 +163,12 @@ type EnsChainContracts = {
|
|
|
188
163
|
ensPublicResolver: ChainContract
|
|
189
164
|
ensRegistry: ChainContract
|
|
190
165
|
ensReverseRegistrar: ChainContract
|
|
166
|
+
ensDefaultReverseRegistrar: ChainContract
|
|
191
167
|
ensBulkRenewal: ChainContract
|
|
192
168
|
ensDnssecImpl: ChainContract
|
|
169
|
+
wrappedEthRegistrarController: ChainContract
|
|
170
|
+
wrappedPublicResolver: ChainContract
|
|
171
|
+
wrappedBulkRenewal: ChainContract
|
|
193
172
|
legacyEthRegistrarController: ChainContract
|
|
194
173
|
legacyPublicResolver: ChainContract
|
|
195
174
|
}
|
|
@@ -2,19 +2,52 @@ export const ethRegistrarControllerErrors = [
|
|
|
2
2
|
{
|
|
3
3
|
inputs: [
|
|
4
4
|
{
|
|
5
|
+
internalType: 'bytes32',
|
|
5
6
|
name: 'commitment',
|
|
6
7
|
type: 'bytes32',
|
|
7
8
|
},
|
|
8
9
|
],
|
|
10
|
+
name: 'CommitmentNotFound',
|
|
11
|
+
type: 'error',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
inputs: [
|
|
15
|
+
{
|
|
16
|
+
internalType: 'bytes32',
|
|
17
|
+
name: 'commitment',
|
|
18
|
+
type: 'bytes32',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
internalType: 'uint256',
|
|
22
|
+
name: 'minimumCommitmentTimestamp',
|
|
23
|
+
type: 'uint256',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
internalType: 'uint256',
|
|
27
|
+
name: 'currentTimestamp',
|
|
28
|
+
type: 'uint256',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
9
31
|
name: 'CommitmentTooNew',
|
|
10
32
|
type: 'error',
|
|
11
33
|
},
|
|
12
34
|
{
|
|
13
35
|
inputs: [
|
|
14
36
|
{
|
|
37
|
+
internalType: 'bytes32',
|
|
15
38
|
name: 'commitment',
|
|
16
39
|
type: 'bytes32',
|
|
17
40
|
},
|
|
41
|
+
{
|
|
42
|
+
internalType: 'uint256',
|
|
43
|
+
name: 'maximumCommitmentTimestamp',
|
|
44
|
+
type: 'uint256',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
internalType: 'uint256',
|
|
48
|
+
name: 'currentTimestamp',
|
|
49
|
+
type: 'uint256',
|
|
50
|
+
},
|
|
18
51
|
],
|
|
19
52
|
name: 'CommitmentTooOld',
|
|
20
53
|
type: 'error',
|
|
@@ -22,6 +55,7 @@ export const ethRegistrarControllerErrors = [
|
|
|
22
55
|
{
|
|
23
56
|
inputs: [
|
|
24
57
|
{
|
|
58
|
+
internalType: 'uint256',
|
|
25
59
|
name: 'duration',
|
|
26
60
|
type: 'uint256',
|
|
27
61
|
},
|
|
@@ -47,6 +81,7 @@ export const ethRegistrarControllerErrors = [
|
|
|
47
81
|
{
|
|
48
82
|
inputs: [
|
|
49
83
|
{
|
|
84
|
+
internalType: 'string',
|
|
50
85
|
name: 'name',
|
|
51
86
|
type: 'string',
|
|
52
87
|
},
|
|
@@ -54,6 +89,11 @@ export const ethRegistrarControllerErrors = [
|
|
|
54
89
|
name: 'NameNotAvailable',
|
|
55
90
|
type: 'error',
|
|
56
91
|
},
|
|
92
|
+
{
|
|
93
|
+
inputs: [],
|
|
94
|
+
name: 'ResolverRequiredForReverseRecord',
|
|
95
|
+
type: 'error',
|
|
96
|
+
},
|
|
57
97
|
{
|
|
58
98
|
inputs: [],
|
|
59
99
|
name: 'ResolverRequiredWhenDataSupplied',
|
|
@@ -62,6 +102,7 @@ export const ethRegistrarControllerErrors = [
|
|
|
62
102
|
{
|
|
63
103
|
inputs: [
|
|
64
104
|
{
|
|
105
|
+
internalType: 'bytes32',
|
|
65
106
|
name: 'commitment',
|
|
66
107
|
type: 'bytes32',
|
|
67
108
|
},
|
|
@@ -76,10 +117,12 @@ export const ethRegistrarControllerRentPriceSnippet = [
|
|
|
76
117
|
{
|
|
77
118
|
inputs: [
|
|
78
119
|
{
|
|
79
|
-
|
|
120
|
+
internalType: 'string',
|
|
121
|
+
name: 'label',
|
|
80
122
|
type: 'string',
|
|
81
123
|
},
|
|
82
124
|
{
|
|
125
|
+
internalType: 'uint256',
|
|
83
126
|
name: 'duration',
|
|
84
127
|
type: 'uint256',
|
|
85
128
|
},
|
|
@@ -89,14 +132,17 @@ export const ethRegistrarControllerRentPriceSnippet = [
|
|
|
89
132
|
{
|
|
90
133
|
components: [
|
|
91
134
|
{
|
|
135
|
+
internalType: 'uint256',
|
|
92
136
|
name: 'base',
|
|
93
137
|
type: 'uint256',
|
|
94
138
|
},
|
|
95
139
|
{
|
|
140
|
+
internalType: 'uint256',
|
|
96
141
|
name: 'premium',
|
|
97
142
|
type: 'uint256',
|
|
98
143
|
},
|
|
99
144
|
],
|
|
145
|
+
internalType: 'struct IPriceOracle.Price',
|
|
100
146
|
name: 'price',
|
|
101
147
|
type: 'tuple',
|
|
102
148
|
},
|
|
@@ -106,11 +152,77 @@ export const ethRegistrarControllerRentPriceSnippet = [
|
|
|
106
152
|
},
|
|
107
153
|
] as const
|
|
108
154
|
|
|
155
|
+
export const ethRegistrarControllerMakeCommitmentSnippet = [
|
|
156
|
+
...ethRegistrarControllerErrors,
|
|
157
|
+
{
|
|
158
|
+
inputs: [
|
|
159
|
+
{
|
|
160
|
+
components: [
|
|
161
|
+
{
|
|
162
|
+
internalType: 'string',
|
|
163
|
+
name: 'label',
|
|
164
|
+
type: 'string',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
internalType: 'address',
|
|
168
|
+
name: 'owner',
|
|
169
|
+
type: 'address',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
internalType: 'uint256',
|
|
173
|
+
name: 'duration',
|
|
174
|
+
type: 'uint256',
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
internalType: 'bytes32',
|
|
178
|
+
name: 'secret',
|
|
179
|
+
type: 'bytes32',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
internalType: 'address',
|
|
183
|
+
name: 'resolver',
|
|
184
|
+
type: 'address',
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
internalType: 'bytes[]',
|
|
188
|
+
name: 'data',
|
|
189
|
+
type: 'bytes[]',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
internalType: 'uint8',
|
|
193
|
+
name: 'reverseRecord',
|
|
194
|
+
type: 'uint8',
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
internalType: 'bytes32',
|
|
198
|
+
name: 'referrer',
|
|
199
|
+
type: 'bytes32',
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
internalType: 'struct IETHRegistrarController.Registration',
|
|
203
|
+
name: 'registration',
|
|
204
|
+
type: 'tuple',
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
name: 'makeCommitment',
|
|
208
|
+
outputs: [
|
|
209
|
+
{
|
|
210
|
+
internalType: 'bytes32',
|
|
211
|
+
name: 'commitment',
|
|
212
|
+
type: 'bytes32',
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
stateMutability: 'pure',
|
|
216
|
+
type: 'function',
|
|
217
|
+
},
|
|
218
|
+
] as const
|
|
219
|
+
|
|
109
220
|
export const ethRegistrarControllerCommitSnippet = [
|
|
110
221
|
...ethRegistrarControllerErrors,
|
|
111
222
|
{
|
|
112
223
|
inputs: [
|
|
113
224
|
{
|
|
225
|
+
internalType: 'bytes32',
|
|
114
226
|
name: 'commitment',
|
|
115
227
|
type: 'bytes32',
|
|
116
228
|
},
|
|
@@ -127,6 +239,7 @@ export const ethRegistrarControllerCommitmentsSnippet = [
|
|
|
127
239
|
{
|
|
128
240
|
inputs: [
|
|
129
241
|
{
|
|
242
|
+
internalType: 'bytes32',
|
|
130
243
|
name: '',
|
|
131
244
|
type: 'bytes32',
|
|
132
245
|
},
|
|
@@ -134,6 +247,7 @@ export const ethRegistrarControllerCommitmentsSnippet = [
|
|
|
134
247
|
name: 'commitments',
|
|
135
248
|
outputs: [
|
|
136
249
|
{
|
|
250
|
+
internalType: 'uint256',
|
|
137
251
|
name: '',
|
|
138
252
|
type: 'uint256',
|
|
139
253
|
},
|
|
@@ -148,36 +262,51 @@ export const ethRegistrarControllerRegisterSnippet = [
|
|
|
148
262
|
{
|
|
149
263
|
inputs: [
|
|
150
264
|
{
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
265
|
+
components: [
|
|
266
|
+
{
|
|
267
|
+
internalType: 'string',
|
|
268
|
+
name: 'label',
|
|
269
|
+
type: 'string',
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
internalType: 'address',
|
|
273
|
+
name: 'owner',
|
|
274
|
+
type: 'address',
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
internalType: 'uint256',
|
|
278
|
+
name: 'duration',
|
|
279
|
+
type: 'uint256',
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
internalType: 'bytes32',
|
|
283
|
+
name: 'secret',
|
|
284
|
+
type: 'bytes32',
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
internalType: 'address',
|
|
288
|
+
name: 'resolver',
|
|
289
|
+
type: 'address',
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
internalType: 'bytes[]',
|
|
293
|
+
name: 'data',
|
|
294
|
+
type: 'bytes[]',
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
internalType: 'uint8',
|
|
298
|
+
name: 'reverseRecord',
|
|
299
|
+
type: 'uint8',
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
internalType: 'bytes32',
|
|
303
|
+
name: 'referrer',
|
|
304
|
+
type: 'bytes32',
|
|
305
|
+
},
|
|
306
|
+
],
|
|
307
|
+
internalType: 'struct IETHRegistrarController.Registration',
|
|
308
|
+
name: 'registration',
|
|
309
|
+
type: 'tuple',
|
|
181
310
|
},
|
|
182
311
|
],
|
|
183
312
|
name: 'register',
|
|
@@ -192,13 +321,20 @@ export const ethRegistrarControllerRenewSnippet = [
|
|
|
192
321
|
{
|
|
193
322
|
inputs: [
|
|
194
323
|
{
|
|
195
|
-
|
|
324
|
+
internalType: 'string',
|
|
325
|
+
name: 'label',
|
|
196
326
|
type: 'string',
|
|
197
327
|
},
|
|
198
328
|
{
|
|
329
|
+
internalType: 'uint256',
|
|
199
330
|
name: 'duration',
|
|
200
331
|
type: 'uint256',
|
|
201
332
|
},
|
|
333
|
+
{
|
|
334
|
+
internalType: 'bytes32',
|
|
335
|
+
name: 'referrer',
|
|
336
|
+
type: 'bytes32',
|
|
337
|
+
},
|
|
202
338
|
],
|
|
203
339
|
name: 'renew',
|
|
204
340
|
outputs: [],
|
|
@@ -213,12 +349,14 @@ export const ethRegistrarControllerNameRegisteredEventSnippet = [
|
|
|
213
349
|
inputs: [
|
|
214
350
|
{
|
|
215
351
|
indexed: false,
|
|
216
|
-
|
|
352
|
+
internalType: 'string',
|
|
353
|
+
name: 'label',
|
|
217
354
|
type: 'string',
|
|
218
355
|
},
|
|
219
356
|
{
|
|
220
357
|
indexed: true,
|
|
221
|
-
|
|
358
|
+
internalType: 'bytes32',
|
|
359
|
+
name: 'labelhash',
|
|
222
360
|
type: 'bytes32',
|
|
223
361
|
},
|
|
224
362
|
{
|
|
@@ -229,19 +367,28 @@ export const ethRegistrarControllerNameRegisteredEventSnippet = [
|
|
|
229
367
|
},
|
|
230
368
|
{
|
|
231
369
|
indexed: false,
|
|
370
|
+
internalType: 'uint256',
|
|
232
371
|
name: 'baseCost',
|
|
233
372
|
type: 'uint256',
|
|
234
373
|
},
|
|
235
374
|
{
|
|
236
375
|
indexed: false,
|
|
376
|
+
internalType: 'uint256',
|
|
237
377
|
name: 'premium',
|
|
238
378
|
type: 'uint256',
|
|
239
379
|
},
|
|
240
380
|
{
|
|
241
381
|
indexed: false,
|
|
382
|
+
internalType: 'uint256',
|
|
242
383
|
name: 'expires',
|
|
243
384
|
type: 'uint256',
|
|
244
385
|
},
|
|
386
|
+
{
|
|
387
|
+
indexed: false,
|
|
388
|
+
internalType: 'bytes32',
|
|
389
|
+
name: 'referrer',
|
|
390
|
+
type: 'bytes32',
|
|
391
|
+
},
|
|
245
392
|
],
|
|
246
393
|
name: 'NameRegistered',
|
|
247
394
|
type: 'event',
|
|
@@ -47,6 +47,53 @@ export const universalResolverErrors = [
|
|
|
47
47
|
name: 'InvalidBatchGatewayResponse',
|
|
48
48
|
type: 'error',
|
|
49
49
|
},
|
|
50
|
+
{
|
|
51
|
+
inputs: [
|
|
52
|
+
{
|
|
53
|
+
internalType: 'address',
|
|
54
|
+
name: 'sender',
|
|
55
|
+
type: 'address',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
internalType: 'string[]',
|
|
59
|
+
name: 'urls',
|
|
60
|
+
type: 'string[]',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
internalType: 'bytes',
|
|
64
|
+
name: 'callData',
|
|
65
|
+
type: 'bytes',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
internalType: 'bytes4',
|
|
69
|
+
name: 'callbackFunction',
|
|
70
|
+
type: 'bytes4',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
internalType: 'bytes',
|
|
74
|
+
name: 'extraData',
|
|
75
|
+
type: 'bytes',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
name: 'OffchainLookup',
|
|
79
|
+
type: 'error',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
inputs: [
|
|
83
|
+
{
|
|
84
|
+
internalType: 'uint256',
|
|
85
|
+
name: 'offset',
|
|
86
|
+
type: 'uint256',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
internalType: 'uint256',
|
|
90
|
+
name: 'length',
|
|
91
|
+
type: 'uint256',
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
name: 'OffsetOutOfBoundsError',
|
|
95
|
+
type: 'error',
|
|
96
|
+
},
|
|
50
97
|
{
|
|
51
98
|
inputs: [
|
|
52
99
|
{
|
|
@@ -117,19 +164,21 @@ export const universalResolverErrors = [
|
|
|
117
164
|
const universalResolverReverse = {
|
|
118
165
|
inputs: [
|
|
119
166
|
{
|
|
120
|
-
|
|
167
|
+
internalType: 'bytes',
|
|
168
|
+
name: 'lookupAddress',
|
|
121
169
|
type: 'bytes',
|
|
122
170
|
},
|
|
123
171
|
{
|
|
172
|
+
internalType: 'uint256',
|
|
124
173
|
name: 'coinType',
|
|
125
174
|
type: 'uint256',
|
|
126
175
|
},
|
|
127
176
|
],
|
|
128
177
|
name: 'reverse',
|
|
129
178
|
outputs: [
|
|
130
|
-
{
|
|
131
|
-
{
|
|
132
|
-
{
|
|
179
|
+
{ internalType: 'string', name: 'name', type: 'string' },
|
|
180
|
+
{ internalType: 'address', name: 'resolver', type: 'address' },
|
|
181
|
+
{ internalType: 'address', name: 'reverseResolver', type: 'address' },
|
|
133
182
|
],
|
|
134
183
|
stateMutability: 'view',
|
|
135
184
|
type: 'function',
|
package/src/errors/utils.ts
CHANGED
|
@@ -79,6 +79,7 @@ export class FusesFuseNotAllowedError extends BaseError {
|
|
|
79
79
|
export class FusesInvalidUnnamedFuseError extends BaseError {
|
|
80
80
|
override name = 'FusesInvalidUnnamedFuseError'
|
|
81
81
|
|
|
82
|
+
// biome-ignore lint/suspicious/noExplicitAny: error class accepts invalid input of any type for error message
|
|
82
83
|
constructor({ fuse }: { fuse: any }) {
|
|
83
84
|
super(`${fuse} is not a valid unnamed fuse`, {
|
|
84
85
|
metaMessages: [
|
package/src/errors/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = 'v4.
|
|
1
|
+
export const version = 'v4.0.3-alpha.12'
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import multicallWrapper from './multicallWrapper.js'
|
|
14
14
|
|
|
15
15
|
type ExtractResult<TFunction extends BatchFunctionResult> = TFunction extends {
|
|
16
|
+
// biome-ignore lint/suspicious/noExplicitAny: conditional type needs to match any decode function signature for type extraction
|
|
16
17
|
decode: (...args: any[]) => Promise<infer U>
|
|
17
18
|
}
|
|
18
19
|
? U
|
|
@@ -49,6 +49,7 @@ export type GetNameParameters = {
|
|
|
49
49
|
strict?: boolean
|
|
50
50
|
/** Batch gateway URLs to use for resolving CCIP-read requests. */
|
|
51
51
|
gatewayUrls?: string[]
|
|
52
|
+
// biome-ignore lint/complexity/noBannedTypes: empty object represents no additional parameters in discriminated union
|
|
52
53
|
} & (GetNameCoinTypeParameters | GetNameChainIdParameters | {})
|
|
53
54
|
|
|
54
55
|
export type GetNameReturnType = {
|