@ensdomains/ensjs 3.0.0-beta.10 → 3.0.0-beta.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.
Files changed (41) hide show
  1. package/contracts/OldestResolver.json +170 -0
  2. package/contracts/UniversalResolverv2.json +628 -0
  3. package/dist/cjs/contracts/consts.js +2 -2
  4. package/dist/cjs/contracts/universalResolver.js +46 -1
  5. package/dist/cjs/contracts/universalResolver.js.map +1 -1
  6. package/dist/cjs/errors/version.js +1 -1
  7. package/dist/cjs/functions/public/getRecords.js +5 -5
  8. package/dist/cjs/functions/public/getRecords.js.map +1 -1
  9. package/dist/cjs/functions/wallet/registerName.js.map +1 -1
  10. package/dist/cjs/utils/generateRecordCallArray.js +4 -3
  11. package/dist/cjs/utils/generateRecordCallArray.js.map +1 -1
  12. package/dist/cjs/utils/getRevertErrorData.js +4 -1
  13. package/dist/cjs/utils/getRevertErrorData.js.map +1 -1
  14. package/dist/esm/contracts/consts.js +2 -2
  15. package/dist/esm/contracts/universalResolver.js +46 -1
  16. package/dist/esm/contracts/universalResolver.js.map +1 -1
  17. package/dist/esm/errors/version.js +1 -1
  18. package/dist/esm/functions/public/getRecords.js +5 -9
  19. package/dist/esm/functions/public/getRecords.js.map +1 -1
  20. package/dist/esm/functions/wallet/registerName.js.map +1 -1
  21. package/dist/esm/utils/generateRecordCallArray.js +4 -3
  22. package/dist/esm/utils/generateRecordCallArray.js.map +1 -1
  23. package/dist/esm/utils/getRevertErrorData.js +4 -1
  24. package/dist/esm/utils/getRevertErrorData.js.map +1 -1
  25. package/dist/types/clients/wallet.d.ts +6 -6
  26. package/dist/types/contracts/consts.d.ts +2 -2
  27. package/dist/types/contracts/universalResolver.d.ts +133 -1
  28. package/dist/types/contracts/universalResolver.d.ts.map +1 -1
  29. package/dist/types/errors/version.d.ts +1 -1
  30. package/dist/types/functions/public/getRecords.d.ts.map +1 -1
  31. package/dist/types/functions/wallet/registerName.d.ts.map +1 -1
  32. package/dist/types/utils/generateRecordCallArray.d.ts +5 -5
  33. package/dist/types/utils/generateRecordCallArray.d.ts.map +1 -1
  34. package/dist/types/utils/getRevertErrorData.d.ts.map +1 -1
  35. package/package.json +2 -2
  36. package/src/contracts/consts.ts +3 -3
  37. package/src/contracts/universalResolver.ts +46 -1
  38. package/src/errors/version.ts +1 -1
  39. package/src/functions/public/getRecords.ts +5 -9
  40. package/src/utils/generateRecordCallArray.ts +7 -5
  41. package/src/utils/getRevertErrorData.ts +3 -1
@@ -6,6 +6,31 @@ export declare const universalResolverErrors: readonly [{
6
6
  readonly inputs: readonly [];
7
7
  readonly name: "ResolverWildcardNotSupported";
8
8
  readonly type: "error";
9
+ }, {
10
+ readonly inputs: readonly [];
11
+ readonly name: "ResolverNotContract";
12
+ readonly type: "error";
13
+ }, {
14
+ readonly inputs: readonly [{
15
+ readonly name: "returnData";
16
+ readonly type: "bytes";
17
+ }];
18
+ readonly name: "ResolverError";
19
+ readonly type: "error";
20
+ }, {
21
+ readonly inputs: readonly [{
22
+ readonly components: readonly [{
23
+ readonly name: "status";
24
+ readonly type: "uint16";
25
+ }, {
26
+ readonly name: "message";
27
+ readonly type: "string";
28
+ }];
29
+ readonly name: "errors";
30
+ readonly type: "tuple[]";
31
+ }];
32
+ readonly name: "HttpError";
33
+ readonly type: "error";
9
34
  }];
10
35
  export declare const universalResolverReverseSnippet: readonly [{
11
36
  readonly inputs: readonly [];
@@ -15,6 +40,31 @@ export declare const universalResolverReverseSnippet: readonly [{
15
40
  readonly inputs: readonly [];
16
41
  readonly name: "ResolverWildcardNotSupported";
17
42
  readonly type: "error";
43
+ }, {
44
+ readonly inputs: readonly [];
45
+ readonly name: "ResolverNotContract";
46
+ readonly type: "error";
47
+ }, {
48
+ readonly inputs: readonly [{
49
+ readonly name: "returnData";
50
+ readonly type: "bytes";
51
+ }];
52
+ readonly name: "ResolverError";
53
+ readonly type: "error";
54
+ }, {
55
+ readonly inputs: readonly [{
56
+ readonly components: readonly [{
57
+ readonly name: "status";
58
+ readonly type: "uint16";
59
+ }, {
60
+ readonly name: "message";
61
+ readonly type: "string";
62
+ }];
63
+ readonly name: "errors";
64
+ readonly type: "tuple[]";
65
+ }];
66
+ readonly name: "HttpError";
67
+ readonly type: "error";
18
68
  }, {
19
69
  readonly inputs: readonly [{
20
70
  readonly name: "reverseName";
@@ -45,6 +95,31 @@ export declare const universalResolverResolveSnippet: readonly [{
45
95
  readonly inputs: readonly [];
46
96
  readonly name: "ResolverWildcardNotSupported";
47
97
  readonly type: "error";
98
+ }, {
99
+ readonly inputs: readonly [];
100
+ readonly name: "ResolverNotContract";
101
+ readonly type: "error";
102
+ }, {
103
+ readonly inputs: readonly [{
104
+ readonly name: "returnData";
105
+ readonly type: "bytes";
106
+ }];
107
+ readonly name: "ResolverError";
108
+ readonly type: "error";
109
+ }, {
110
+ readonly inputs: readonly [{
111
+ readonly components: readonly [{
112
+ readonly name: "status";
113
+ readonly type: "uint16";
114
+ }, {
115
+ readonly name: "message";
116
+ readonly type: "string";
117
+ }];
118
+ readonly name: "errors";
119
+ readonly type: "tuple[]";
120
+ }];
121
+ readonly name: "HttpError";
122
+ readonly type: "error";
48
123
  }, {
49
124
  readonly inputs: readonly [{
50
125
  readonly name: "name";
@@ -72,6 +147,31 @@ export declare const universalResolverResolveArraySnippet: readonly [{
72
147
  readonly inputs: readonly [];
73
148
  readonly name: "ResolverWildcardNotSupported";
74
149
  readonly type: "error";
150
+ }, {
151
+ readonly inputs: readonly [];
152
+ readonly name: "ResolverNotContract";
153
+ readonly type: "error";
154
+ }, {
155
+ readonly inputs: readonly [{
156
+ readonly name: "returnData";
157
+ readonly type: "bytes";
158
+ }];
159
+ readonly name: "ResolverError";
160
+ readonly type: "error";
161
+ }, {
162
+ readonly inputs: readonly [{
163
+ readonly components: readonly [{
164
+ readonly name: "status";
165
+ readonly type: "uint16";
166
+ }, {
167
+ readonly name: "message";
168
+ readonly type: "string";
169
+ }];
170
+ readonly name: "errors";
171
+ readonly type: "tuple[]";
172
+ }];
173
+ readonly name: "HttpError";
174
+ readonly type: "error";
75
175
  }, {
76
176
  readonly inputs: readonly [{
77
177
  readonly name: "name";
@@ -82,8 +182,15 @@ export declare const universalResolverResolveArraySnippet: readonly [{
82
182
  }];
83
183
  readonly name: "resolve";
84
184
  readonly outputs: readonly [{
185
+ readonly components: readonly [{
186
+ readonly name: "success";
187
+ readonly type: "bool";
188
+ }, {
189
+ readonly name: "returnData";
190
+ readonly type: "bytes";
191
+ }];
85
192
  readonly name: "";
86
- readonly type: "bytes[]";
193
+ readonly type: "tuple[]";
87
194
  }, {
88
195
  readonly name: "";
89
196
  readonly type: "address";
@@ -99,6 +206,31 @@ export declare const universalResolverFindResolverSnippet: readonly [{
99
206
  readonly inputs: readonly [];
100
207
  readonly name: "ResolverWildcardNotSupported";
101
208
  readonly type: "error";
209
+ }, {
210
+ readonly inputs: readonly [];
211
+ readonly name: "ResolverNotContract";
212
+ readonly type: "error";
213
+ }, {
214
+ readonly inputs: readonly [{
215
+ readonly name: "returnData";
216
+ readonly type: "bytes";
217
+ }];
218
+ readonly name: "ResolverError";
219
+ readonly type: "error";
220
+ }, {
221
+ readonly inputs: readonly [{
222
+ readonly components: readonly [{
223
+ readonly name: "status";
224
+ readonly type: "uint16";
225
+ }, {
226
+ readonly name: "message";
227
+ readonly type: "string";
228
+ }];
229
+ readonly name: "errors";
230
+ readonly type: "tuple[]";
231
+ }];
232
+ readonly name: "HttpError";
233
+ readonly type: "error";
102
234
  }, {
103
235
  readonly inputs: readonly [{
104
236
  readonly name: "name";
@@ -1 +1 @@
1
- {"version":3,"file":"universalResolver.d.ts","sourceRoot":"","sources":["../../../src/contracts/universalResolver.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB;;;;;;;;EAW1B,CAAA;AAEV,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBlC,CAAA;AAEV,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BlC,CAAA;AAEV,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BvC,CAAA;AAEV,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;EAuBvC,CAAA"}
1
+ {"version":3,"file":"universalResolver.d.ts","sourceRoot":"","sources":["../../../src/contracts/universalResolver.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8C1B,CAAA;AAEV,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBlC,CAAA;AAEV,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BlC,CAAA;AAEV,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCvC,CAAA;AAEV,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBvC,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const version = "v3.0.0-beta.10";
1
+ export declare const version = "v3.0.0-beta.11";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getRecords.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/getRecords.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAQT,KAAK,OAAO,EACZ,KAAK,GAAG,EACT,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAG9D,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,wBAAwB,EACxB,iCAAiC,EAClC,MAAM,gBAAgB,CAAA;AAKvB,OAAgB,EAAE,KAAK,wBAAwB,EAAE,MAAM,cAAc,CAAA;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;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,QAAA,MAAM,UAAU,kDAGN,aAAa,4GAGE,CAAA;AAEzB,eAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"getRecords.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/getRecords.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAQT,KAAK,OAAO,EACZ,KAAK,GAAG,EACT,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAG9D,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,wBAAwB,EACxB,iCAAiC,EAClC,MAAM,gBAAgB,CAAA;AAKvB,OAAgB,EAAE,KAAK,wBAAwB,EAAE,MAAM,cAAc,CAAA;AAErE,OAAwB,EACtB,KAAK,gCAAgC,EACtC,MAAM,sBAAsB,CAAA;AAI7B,MAAM,MAAM,oBAAoB,GAAG;IACjC,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,0EAA0E;IAC1E,QAAQ,CAAC,EAAE;QACT,uBAAuB;QACvB,OAAO,EAAE,OAAO,CAAA;QAChB,0DAA0D;QAC1D,YAAY,CAAC,EAAE,OAAO,CAAA;KACvB,CAAA;IACD,uBAAuB;IACvB,OAAO,EAAE;QACP,4BAA4B;QAC5B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;QAChB,kCAAkC;QAClC,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;QAC3B,uCAAuC;QACvC,WAAW,CAAC,EAAE,OAAO,CAAA;QACrB,8BAA8B;QAC9B,GAAG,CAAC,EAAE,OAAO,CAAA;KACd,CAAA;CACF,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,6CAA6C;IAC7C,WAAW,EAAE,gCAAgC,CAAA;CAC9C,CAAA;AAED,KAAK,aAAa,GAAG;IACnB,oCAAoC;IACpC,GAAG,EAAE,wBAAwB,CAAA;CAC9B,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAKP,0BAA0B,KAC7C,0BAuBF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,iBAAe,YAAY,CACzB,MAAM,SAAS,YAAY,EAC3B,QAAQ,SAAS,OAAO,GAAG,SAAS,EACpC,cAAc,SAAS,YAAY,GAAG,SAAS,GAAG,YAAY,EAE9D,MAAM,EAAE,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAClD,EACE,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,MAAM,EACN,eAAe,EACf,OAAO,EACP,aAAa,EACb,KAAK,EACL,KAAK,EACL,GAAG,MAAM,EACV,EAAE,sBAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,cAAc,CAAC,GAC1D,OAAO,CAAC,sBAAsB,CAAC,CAiBjC;kBAnCc,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuC3B,eAAe,YAAY,CAAA"}
@@ -1,27 +1,27 @@
1
1
  import { type Hex } from 'viem';
2
2
  import type { Prettify } from '../types.js';
3
- import { type EncodeSetAbiParameters } from './encoders/encodeSetAbi.js';
3
+ import type { EncodedAbi } from './encoders/encodeAbi.js';
4
4
  import { type EncodeSetAddrParameters } from './encoders/encodeSetAddr.js';
5
5
  import { type EncodeSetTextParameters } from './encoders/encodeSetText.js';
6
6
  export type RecordOptions = Prettify<{
7
7
  /** Clears all current records */
8
8
  clearRecords?: boolean;
9
9
  /** ContentHash value */
10
- contentHash?: string;
10
+ contentHash?: string | null;
11
11
  /** Array of text records */
12
12
  texts?: Omit<EncodeSetTextParameters, 'namehash'>[];
13
13
  /** Array of coin records */
14
14
  coins?: Omit<EncodeSetAddrParameters, 'namehash'>[];
15
15
  /** ABI value */
16
- abi?: Omit<EncodeSetAbiParameters, 'namehash'>;
16
+ abi?: EncodedAbi | null;
17
17
  }>;
18
18
  export declare const generateRecordCallArray: ({ namehash, clearRecords, contentHash, texts, coins, abi, }: {
19
19
  namehash: Hex;
20
20
  } & {
21
21
  clearRecords?: boolean | undefined;
22
- contentHash?: string | undefined;
22
+ contentHash?: string | null | undefined;
23
23
  texts?: Omit<EncodeSetTextParameters, "namehash">[] | undefined;
24
24
  coins?: Omit<EncodeSetAddrParameters, "namehash">[] | undefined;
25
- abi?: Omit<EncodeSetAbiParameters, "namehash"> | undefined;
25
+ abi?: EncodedAbi | null | undefined;
26
26
  }) => Hex[];
27
27
  //# sourceMappingURL=generateRecordCallArray.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generateRecordCallArray.d.ts","sourceRoot":"","sources":["../../../src/utils/generateRecordCallArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAA;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,6BAA6B,CAAA;AAEpC,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;IACnC,iCAAiC;IACjC,Y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C,CAAA;AAEF,eAAO,MAAM,uBAAuB;cAOrB,GAAG;;;;;;;MAAqB,GAAG,EAiCzC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"getRevertErrorData.d.ts","sourceRoot":"","sources":["../../../src/utils/getRevertErrorData.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,QAAS,OAAO,8BAI9C,CAAA"}
1
+ {"version":3,"file":"getRevertErrorData.d.ts","sourceRoot":"","sources":["../../../src/utils/getRevertErrorData.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,QAAS,OAAO,8BAM9C,CAAA"}
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "peerDependencies": {
17
17
  "viem": "^1.16.4"
18
18
  },
19
- "version": "3.0.0-beta.10",
19
+ "version": "3.0.0-beta.11",
20
20
  "files": [
21
21
  "dist/",
22
22
  "src/",
@@ -96,4 +96,4 @@
96
96
  "sideEffects": false,
97
97
  "license": "MIT",
98
98
  "repository": "git@github.com:ensdomains/ensjs-v3.git"
99
- }
99
+ }
@@ -59,7 +59,7 @@ export const addresses = {
59
59
  address: '0x21745FF62108968fBf5aB1E07961CC0FCBeB2364',
60
60
  },
61
61
  ensUniversalResolver: {
62
- address: '0x9380F1974D2B7064eA0c0EC251968D8c69f0Ae31',
62
+ address: '0x20814C8e689187DfF7C93A9239ea22385d13b9F1',
63
63
  },
64
64
  },
65
65
  goerli: {
@@ -91,7 +91,7 @@ export const addresses = {
91
91
  address: '0xF427c4AdED8B6dfde604865c1a7E953B160C26f0',
92
92
  },
93
93
  ensUniversalResolver: {
94
- address: '0x3952Be0b2186f8B113193a84b69bD71ad3fc1ae3',
94
+ address: '0xaac727b9451268d7779F699dbaF6c2eAE571C369',
95
95
  },
96
96
  },
97
97
  sepolia: {
@@ -123,7 +123,7 @@ export const addresses = {
123
123
  address: '0x7b3ada1c8f012bae747cf99d6cbbf70d040b84cf',
124
124
  },
125
125
  ensUniversalResolver: {
126
- address: '0x21B000Fd62a880b2125A61e36a284BB757b76025',
126
+ address: '0x64da0719987c29e0CEC0113D605996c6a4D4aB0c',
127
127
  },
128
128
  },
129
129
  } as const satisfies Record<
@@ -9,6 +9,41 @@ export const universalResolverErrors = [
9
9
  name: 'ResolverWildcardNotSupported',
10
10
  type: 'error',
11
11
  },
12
+ {
13
+ inputs: [],
14
+ name: 'ResolverNotContract',
15
+ type: 'error',
16
+ },
17
+ {
18
+ inputs: [
19
+ {
20
+ name: 'returnData',
21
+ type: 'bytes',
22
+ },
23
+ ],
24
+ name: 'ResolverError',
25
+ type: 'error',
26
+ },
27
+ {
28
+ inputs: [
29
+ {
30
+ components: [
31
+ {
32
+ name: 'status',
33
+ type: 'uint16',
34
+ },
35
+ {
36
+ name: 'message',
37
+ type: 'string',
38
+ },
39
+ ],
40
+ name: 'errors',
41
+ type: 'tuple[]',
42
+ },
43
+ ],
44
+ name: 'HttpError',
45
+ type: 'error',
46
+ },
12
47
  ] as const
13
48
 
14
49
  export const universalResolverReverseSnippet = [
@@ -77,8 +112,18 @@ export const universalResolverResolveArraySnippet = [
77
112
  name: 'resolve',
78
113
  outputs: [
79
114
  {
115
+ components: [
116
+ {
117
+ name: 'success',
118
+ type: 'bool',
119
+ },
120
+ {
121
+ name: 'returnData',
122
+ type: 'bytes',
123
+ },
124
+ ],
80
125
  name: '',
81
- type: 'bytes[]',
126
+ type: 'tuple[]',
82
127
  },
83
128
  {
84
129
  name: '',
@@ -1 +1 @@
1
- export const version = 'v3.0.0-beta.10'
1
+ export const version = 'v3.0.0-beta.11'
@@ -256,17 +256,13 @@ const decode = async <TParams extends GetRecordsParameters>(
256
256
  data,
257
257
  })
258
258
  ;[, resolverAddress] = result
259
- recordData = [...result[0]]
260
- for (let i = 0; i < recordData.length; i += 1) {
261
- // error code for reverted call in batch
262
- // this is expected when using offchain resolvers, so should be ignored
263
- // Error((uint16, string)[])
264
- // or if data is 0x, clear the call so there is no decoding errors
265
- if (recordData[i]!.startsWith('0x0d1947a9') || recordData[i] === '0x') {
259
+ recordData = result[0].map((item, i) => {
260
+ if (!item.success) {
266
261
  calls[i] = null
267
- recordData[i] = null
262
+ return null
268
263
  }
269
- }
264
+ return item.returnData
265
+ })
270
266
  }
271
267
 
272
268
  const filteredCalls = calls.filter((x) => x) as CallObj[]
@@ -1,5 +1,6 @@
1
1
  import { type Hex } from 'viem'
2
2
  import type { Prettify } from '../types.js'
3
+ import type { EncodedAbi } from './encoders/encodeAbi.js'
3
4
  import { encodeClearRecords } from './encoders/encodeClearRecords.js'
4
5
  import {
5
6
  encodeSetAbi,
@@ -19,13 +20,13 @@ export type RecordOptions = Prettify<{
19
20
  /** Clears all current records */
20
21
  clearRecords?: boolean
21
22
  /** ContentHash value */
22
- contentHash?: string
23
+ contentHash?: string | null
23
24
  /** Array of text records */
24
25
  texts?: Omit<EncodeSetTextParameters, 'namehash'>[]
25
26
  /** Array of coin records */
26
27
  coins?: Omit<EncodeSetAddrParameters, 'namehash'>[]
27
28
  /** ABI value */
28
- abi?: Omit<EncodeSetAbiParameters, 'namehash'>
29
+ abi?: EncodedAbi | null
29
30
  }>
30
31
 
31
32
  export const generateRecordCallArray = ({
@@ -42,13 +43,14 @@ export const generateRecordCallArray = ({
42
43
  calls.push(encodeClearRecords(namehash))
43
44
  }
44
45
 
45
- if (typeof contentHash === 'string') {
46
+ if (contentHash !== undefined) {
46
47
  const data = encodeSetContentHash({ namehash, contentHash })
47
48
  if (data) calls.push(data)
48
49
  }
49
50
 
50
- if (abi) {
51
- const data = encodeSetAbi({ namehash, ...abi } as EncodeSetAbiParameters)
51
+ if (abi !== undefined) {
52
+ const abi_ = abi ?? { contentType: 0, encodedData: null }
53
+ const data = encodeSetAbi({ namehash, ...abi_ } as EncodeSetAbiParameters)
52
54
  if (data) calls.push(data)
53
55
  }
54
56
 
@@ -3,5 +3,7 @@ import { BaseError, RawContractError } from 'viem'
3
3
  export const getRevertErrorData = (err: unknown) => {
4
4
  if (!(err instanceof BaseError)) return undefined
5
5
  const error = err.walk() as RawContractError
6
- return typeof error.data === 'object' ? error.data.data : error.data
6
+ const hex = typeof error.data === 'object' ? error.data.data : error.data
7
+ if (hex === '0x') return undefined
8
+ return hex
7
9
  }