@ensdomains/ensjs 3.0.0-alpha.50 → 3.0.0-alpha.51

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.
@@ -37,19 +37,19 @@ const addresses = {
37
37
  "1": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5",
38
38
  "3": "0xa5627AB7Ae47063B533622C34FEBDb52d3281dF8",
39
39
  "4": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5",
40
- "5": "0x5642D2E447567672723512a0D7b2E85994BB2FEb"
40
+ "5": "0xCc5e7dB10E65EED1BBD105359e7268aa660f6734"
41
41
  },
42
42
  Multicall: "0xcA11bde05977b3631167028862bE2a173976CA11",
43
43
  NameWrapper: {
44
44
  "1": "0x0000000000000000000000000000000000000000",
45
45
  "3": "0xF82155e2a43Be0871821E9654Fc8Ae894FB8307C",
46
46
  "4": "0x0000000000000000000000000000000000000000",
47
- "5": "0x23d86f0bf4900978B191378B134519371Da52f75"
47
+ "5": "0x114D4603199df73e7D157787f8778E21fCd13066"
48
48
  },
49
49
  PublicResolver: {
50
50
  "1": "0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41",
51
51
  "3": "0x13F0659Ee6bb7484C884FEeFb7F75C93951ef837",
52
- "5": "0x342cf18D3e41DE491aa1a3067574C849AdA6a2Ad"
52
+ "5": "0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750"
53
53
  },
54
54
  ENSRegistry: {
55
55
  "1": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e",
@@ -63,10 +63,8 @@ const addresses = {
63
63
  "5": "0x4f7A657451358a22dc397d5eE7981FfC526cd856"
64
64
  },
65
65
  UniversalResolver: {
66
- "1": "0x74E20Bd2A1fE0cdbe45b9A1d89cb7e0a45b36376",
67
- "3": "0x74e20bd2a1fe0cdbe45b9a1d89cb7e0a45b36376",
68
- "4": "0x74e20bd2a1fe0cdbe45b9a1d89cb7e0a45b36376",
69
- "5": "0x687c30Cc44bFA39A1449e86E172BF002E7b3f0b0"
66
+ "1": "0xE4Acdd618deED4e6d2f03b9bf62dc6118FC9A4da",
67
+ "5": "0xA292E2E58d4ddEb29C33c63173d0E8B7a2A4c62e"
70
68
  },
71
69
  BulkRenewal: {
72
70
  "1": "0xfF252725f6122A92551A5FA9a6b6bf10eb0Be035",
@@ -210,7 +210,7 @@ const getDataForName = async ({
210
210
  recordData = [...resolvedData["0"]];
211
211
  resolverAddress = resolvedData["1"];
212
212
  for (let i = 0; i < recordData.length; i += 1) {
213
- if (recordData[i].startsWith("0x0d1947a9")) {
213
+ if (recordData[i].startsWith("0x0d1947a9") || recordData[i] === "0x") {
214
214
  calls[i] = null;
215
215
  recordData[i] = null;
216
216
  }
@@ -15,19 +15,19 @@ var addresses = {
15
15
  "1": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5",
16
16
  "3": "0xa5627AB7Ae47063B533622C34FEBDb52d3281dF8",
17
17
  "4": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5",
18
- "5": "0x5642D2E447567672723512a0D7b2E85994BB2FEb"
18
+ "5": "0xCc5e7dB10E65EED1BBD105359e7268aa660f6734"
19
19
  },
20
20
  Multicall: "0xcA11bde05977b3631167028862bE2a173976CA11",
21
21
  NameWrapper: {
22
22
  "1": "0x0000000000000000000000000000000000000000",
23
23
  "3": "0xF82155e2a43Be0871821E9654Fc8Ae894FB8307C",
24
24
  "4": "0x0000000000000000000000000000000000000000",
25
- "5": "0x23d86f0bf4900978B191378B134519371Da52f75"
25
+ "5": "0x114D4603199df73e7D157787f8778E21fCd13066"
26
26
  },
27
27
  PublicResolver: {
28
28
  "1": "0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41",
29
29
  "3": "0x13F0659Ee6bb7484C884FEeFb7F75C93951ef837",
30
- "5": "0x342cf18D3e41DE491aa1a3067574C849AdA6a2Ad"
30
+ "5": "0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750"
31
31
  },
32
32
  ENSRegistry: {
33
33
  "1": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e",
@@ -41,10 +41,8 @@ var addresses = {
41
41
  "5": "0x4f7A657451358a22dc397d5eE7981FfC526cd856"
42
42
  },
43
43
  UniversalResolver: {
44
- "1": "0x74E20Bd2A1fE0cdbe45b9A1d89cb7e0a45b36376",
45
- "3": "0x74e20bd2a1fe0cdbe45b9a1d89cb7e0a45b36376",
46
- "4": "0x74e20bd2a1fe0cdbe45b9a1d89cb7e0a45b36376",
47
- "5": "0x687c30Cc44bFA39A1449e86E172BF002E7b3f0b0"
44
+ "1": "0xE4Acdd618deED4e6d2f03b9bf62dc6118FC9A4da",
45
+ "5": "0xA292E2E58d4ddEb29C33c63173d0E8B7a2A4c62e"
48
46
  },
49
47
  BulkRenewal: {
50
48
  "1": "0xfF252725f6122A92551A5FA9a6b6bf10eb0Be035",
@@ -188,7 +188,7 @@ var getDataForName = async ({
188
188
  recordData = [...resolvedData["0"]];
189
189
  resolverAddress = resolvedData["1"];
190
190
  for (let i = 0; i < recordData.length; i += 1) {
191
- if (recordData[i].startsWith("0x0d1947a9")) {
191
+ if (recordData[i].startsWith("0x0d1947a9") || recordData[i] === "0x") {
192
192
  calls[i] = null;
193
193
  recordData[i] = null;
194
194
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ensdomains/ensjs",
3
- "version": "3.0.0-alpha.50",
3
+ "version": "3.0.0-alpha.51",
4
4
  "description": "ENS javascript library for contract interaction",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.mjs",
@@ -73,7 +73,7 @@
73
73
  },
74
74
  "devDependencies": {
75
75
  "@ensdomains/buffer": "^0.0.13",
76
- "@ensdomains/ens-contracts": "^0.0.17",
76
+ "@ensdomains/ens-contracts": "0.0.17",
77
77
  "@ensdomains/ens-test-env": "0.3.7",
78
78
  "@ethersproject/abi": "^5.6.4",
79
79
  "@ethersproject/abstract-provider": "^5.7.0",
@@ -20,19 +20,19 @@ const addresses: Record<
20
20
  '1': '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5',
21
21
  '3': '0xa5627AB7Ae47063B533622C34FEBDb52d3281dF8',
22
22
  '4': '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5',
23
- '5': '0x5642D2E447567672723512a0D7b2E85994BB2FEb',
23
+ '5': '0xCc5e7dB10E65EED1BBD105359e7268aa660f6734',
24
24
  },
25
25
  Multicall: '0xcA11bde05977b3631167028862bE2a173976CA11',
26
26
  NameWrapper: {
27
27
  '1': '0x0000000000000000000000000000000000000000',
28
28
  '3': '0xF82155e2a43Be0871821E9654Fc8Ae894FB8307C',
29
29
  '4': '0x0000000000000000000000000000000000000000',
30
- '5': '0x23d86f0bf4900978B191378B134519371Da52f75',
30
+ '5': '0x114D4603199df73e7D157787f8778E21fCd13066',
31
31
  },
32
32
  PublicResolver: {
33
33
  '1': '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
34
34
  '3': '0x13F0659Ee6bb7484C884FEeFb7F75C93951ef837',
35
- '5': '0x342cf18D3e41DE491aa1a3067574C849AdA6a2Ad',
35
+ '5': '0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750',
36
36
  },
37
37
  ENSRegistry: {
38
38
  '1': '0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e',
@@ -46,10 +46,8 @@ const addresses: Record<
46
46
  '5': '0x4f7A657451358a22dc397d5eE7981FfC526cd856',
47
47
  },
48
48
  UniversalResolver: {
49
- '1': '0x74E20Bd2A1fE0cdbe45b9A1d89cb7e0a45b36376',
50
- '3': '0x74e20bd2a1fe0cdbe45b9a1d89cb7e0a45b36376',
51
- '4': '0x74e20bd2a1fe0cdbe45b9a1d89cb7e0a45b36376',
52
- '5': '0x687c30Cc44bFA39A1449e86E172BF002E7b3f0b0',
49
+ '1': '0xE4Acdd618deED4e6d2f03b9bf62dc6118FC9A4da',
50
+ '5': '0xA292E2E58d4ddEb29C33c63173d0E8B7a2A4c62e',
53
51
  },
54
52
  BulkRenewal: {
55
53
  '1': '0xfF252725f6122A92551A5FA9a6b6bf10eb0Be035',
@@ -29,6 +29,21 @@ describe('CCIP', () => {
29
29
  )
30
30
  }
31
31
  })
32
+ it('should return a profile from arb-resolver.eth', async () => {
33
+ const result = await ensInstance.getProfile('arb-resolver.eth', {
34
+ fallback: {
35
+ texts: ['email', 'description'],
36
+ contentHash: true,
37
+ coinTypes: ['LTC', '60'],
38
+ },
39
+ })
40
+ expect(result).toBeTruthy()
41
+ if (result) {
42
+ expect(result.address).toBe(
43
+ '0xA5313060f9FA6B607AC8Ca8728a851166c9f6127',
44
+ )
45
+ }
46
+ })
32
47
  })
33
48
  describe('batch', () => {
34
49
  it('allows batch ccip', async () => {
@@ -305,7 +305,9 @@ const getDataForName = async (
305
305
  for (let i = 0; i < recordData.length; i += 1) {
306
306
  // error code for reverted call in batch
307
307
  // this is expected when using offchain resolvers, so should be ignored
308
- if (recordData[i]!.startsWith('0x0d1947a9')) {
308
+ // Error((uint16, string)[])
309
+ // or if data is 0x, clear the call so there is no decoding errors
310
+ if (recordData[i]!.startsWith('0x0d1947a9') || recordData[i] === '0x') {
309
311
  calls[i] = null
310
312
  recordData[i] = null
311
313
  }