diff --git a/package.json b/package.json index 09900885..d37a54ef 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.8.8", "ts-node": "^10.7.0", - "typescript": "^5.1.6" + "typescript": "^5.3.2" }, "resolutions": { "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@0.3.0-beta.13" diff --git a/packages/ensjs/.eslintrc.json b/packages/ensjs/.eslintrc.json index 2907f403..28e17e91 100644 --- a/packages/ensjs/.eslintrc.json +++ b/packages/ensjs/.eslintrc.json @@ -23,6 +23,11 @@ "leadingUnderscore": "allowSingleOrDouble", "trailingUnderscore": "allowSingleOrDouble" }, + { + "selector": "objectLiteralProperty", + "filter": { "regex": "\\d+", "match": true }, + "format": null + }, { "selector": "variable", "format": ["camelCase", "UPPER_CASE"], diff --git a/packages/ensjs/package.json b/packages/ensjs/package.json index 1255043d..bdf89db6 100644 --- a/packages/ensjs/package.json +++ b/packages/ensjs/package.json @@ -102,12 +102,12 @@ "@ensdomains/address-encoder": "1.0.0", "@ensdomains/content-hash": "3.1.0-rc.1", "@ensdomains/dnsprovejs": "^0.5.1", - "abitype": "^0.8.0", + "abitype": "^1.0.0", "dns-packet": "^5.3.1", "graphql": "^16.3.0", "graphql-request": "6.1.0", "pako": "^2.1.0", - "traverse": "^0.6.6" + "traverse": "^0.6.8" }, "devDependencies": { "@ensdomains/buffer": "^0.0.13", @@ -123,7 +123,7 @@ "@types/jest": "^27.4.1", "@types/node": "^20.3.3", "@types/pako": "^2.0.0", - "@types/traverse": "^0.6.32", + "@types/traverse": "^0.6.36", "cbor": "^8.1.0", "dotenv": "^16.0.0", "esbuild": "^0.15.6", @@ -143,11 +143,11 @@ "ts-node": "^10.9.2", "typedoc": "^0.24.8", "typedoc-plugin-markdown": "^4.0.0-next.16", - "typescript": "^5.1.6", - "viem": "^1.16.4", + "typescript": "5.3.2", + "viem": "^2.5.0", "wait-on": "^6.0.1" }, "peerDependencies": { - "viem": "^1.16.4" + "viem": "^2.5.0" } } diff --git a/packages/ensjs/src/clients/decorators/public.ts b/packages/ensjs/src/clients/decorators/public.ts index ee48ec19..509f3d18 100644 --- a/packages/ensjs/src/clients/decorators/public.ts +++ b/packages/ensjs/src/clients/decorators/public.ts @@ -102,6 +102,7 @@ export type EnsPublicActions = { name, gatewayUrls, strict, + supportedContentTypes, }: GetAbiRecordParameters) => Promise /** * Gets an address record for a name and specified coin diff --git a/packages/ensjs/src/contracts/addEnsContracts.ts b/packages/ensjs/src/contracts/addEnsContracts.ts index 7765f766..cacd7006 100644 --- a/packages/ensjs/src/contracts/addEnsContracts.ts +++ b/packages/ensjs/src/contracts/addEnsContracts.ts @@ -1,5 +1,5 @@ import type { Chain } from 'viem' -import { NoChainError, UnsupportedNetworkError } from '../errors/contracts.js' +import { NoChainError, UnsupportedChainError } from '../errors/contracts.js' import { addresses, subgraphs, @@ -24,19 +24,19 @@ import { */ export const addEnsContracts = (chain: TChain) => { if (!chain) throw new NoChainError() - if (!supportedChains.includes(chain.network as SupportedChain)) - throw new UnsupportedNetworkError({ - network: chain.network, - supportedNetworks: supportedChains, + if (!supportedChains.includes(chain.id as SupportedChain)) + throw new UnsupportedChainError({ + chainId: chain.id, + supportedChains, }) return { ...chain, contracts: { ...chain.contracts, - ...addresses[chain.network as SupportedChain], + ...addresses[chain.id as SupportedChain], }, subgraphs: { - ...subgraphs[chain.network as SupportedChain], + ...subgraphs[chain.id as SupportedChain], }, } as unknown as CheckedChainWithEns } diff --git a/packages/ensjs/src/contracts/consts.ts b/packages/ensjs/src/contracts/consts.ts index eb047d2c..78429774 100644 --- a/packages/ensjs/src/contracts/consts.ts +++ b/packages/ensjs/src/contracts/consts.ts @@ -13,12 +13,7 @@ type ChainContract = { blockCreated?: number } -export const supportedChains = [ - 'homestead', - 'goerli', - 'sepolia', - 'holesky', -] as const +export const supportedChains = [1, 5, 17000, 11155111] as const export const supportedContracts = [ 'ensBaseRegistrarImplementation', 'ensBulkRenewal', @@ -36,7 +31,7 @@ export type SupportedChain = (typeof supportedChains)[number] export type SupportedContract = (typeof supportedContracts)[number] export const addresses = { - homestead: { + 1: { ensBaseRegistrarImplementation: { address: '0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85', }, @@ -68,7 +63,7 @@ export const addresses = { address: '0x8cab227b1162f03b8338331adaad7aadc83b895e', }, }, - goerli: { + 5: { ensBaseRegistrarImplementation: { address: '0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85', }, @@ -100,68 +95,68 @@ export const addresses = { address: '0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1', }, }, - sepolia: { + 17000: { ensBaseRegistrarImplementation: { address: '0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85', }, ensBulkRenewal: { - address: '0x4EF77b90762Eddb33C8Eba5B5a19558DaE53D7a1', + address: '0xbc4cfB363F948E64Cd73Da6438F64CB37E2e33d1', }, ensDnsRegistrar: { - address: '0x5a07C75Ae469Bf3ee2657B588e8E6ABAC6741b4f', + address: '0x458d278AEd4cE82BAeC384170f39198b01B8351c', }, ensDnssecImpl: { - address: '0xe62E4b6cE018Ad6e916fcC24545e20a33b9d8653', + address: '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5', }, ensEthRegistrarController: { - address: '0xFED6a969AaA60E4961FCD3EBF1A2e8913ac65B72', + address: '0x179Be112b24Ad4cFC392eF8924DfA08C20Ad8583', }, ensNameWrapper: { - address: '0x0635513f179D50A207757E05759CbD106d7dFcE8', + address: '0xab50971078225D365994dc1Edcb9b7FD72Bb4862', }, ensPublicResolver: { - address: '0x8FADE66B79cC9f707aB26799354482EB93a5B7dD', + address: '0x9010A27463717360cAD99CEA8bD39b8705CCA238', }, ensRegistry: { address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e', }, ensReverseRegistrar: { - address: '0xA0a1AbcDAe1a2a4A2EF8e9113Ff0e02DD81DC0C6', + address: '0x132AC0B116a73add4225029D1951A9A707Ef673f', }, ensUniversalResolver: { - address: '0xBaBC7678D7A63104f1658c11D6AE9A21cdA09725', + address: '0x2548a7E09deE955c4d97688dcB6C5b24085725f5', }, }, - holesky: { + 11155111: { ensBaseRegistrarImplementation: { address: '0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85', }, ensBulkRenewal: { - address: '0xbc4cfB363F948E64Cd73Da6438F64CB37E2e33d1', + address: '0x4EF77b90762Eddb33C8Eba5B5a19558DaE53D7a1', }, ensDnsRegistrar: { - address: '0x458d278AEd4cE82BAeC384170f39198b01B8351c', + address: '0x5a07C75Ae469Bf3ee2657B588e8E6ABAC6741b4f', }, ensDnssecImpl: { - address: '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5', + address: '0xe62E4b6cE018Ad6e916fcC24545e20a33b9d8653', }, ensEthRegistrarController: { - address: '0x179Be112b24Ad4cFC392eF8924DfA08C20Ad8583', + address: '0xFED6a969AaA60E4961FCD3EBF1A2e8913ac65B72', }, ensNameWrapper: { - address: '0xab50971078225D365994dc1Edcb9b7FD72Bb4862', + address: '0x0635513f179D50A207757E05759CbD106d7dFcE8', }, ensPublicResolver: { - address: '0x9010A27463717360cAD99CEA8bD39b8705CCA238', + address: '0x8FADE66B79cC9f707aB26799354482EB93a5B7dD', }, ensRegistry: { address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e', }, ensReverseRegistrar: { - address: '0x132AC0B116a73add4225029D1951A9A707Ef673f', + address: '0xA0a1AbcDAe1a2a4A2EF8e9113Ff0e02DD81DC0C6', }, ensUniversalResolver: { - address: '0x2548a7E09deE955c4d97688dcB6C5b24085725f5', + address: '0xBaBC7678D7A63104f1658c11D6AE9A21cdA09725', }, }, } as const satisfies Record< @@ -176,24 +171,24 @@ type Subgraphs = { } export const subgraphs = { - homestead: { + 1: { ens: { url: 'https://api.thegraph.com/subgraphs/name/ensdomains/ens', }, }, - goerli: { + 5: { ens: { url: 'https://api.thegraph.com/subgraphs/name/ensdomains/ensgoerli', }, }, - sepolia: { + 17000: { ens: { - url: 'https://api.studio.thegraph.com/query/49574/enssepolia/version/latest', + url: 'https://api.studio.thegraph.com/query/49574/ensholesky/version/latest', }, }, - holesky: { + 11155111: { ens: { - url: 'https://api.studio.thegraph.com/query/49574/ensholesky/version/latest', + url: 'https://api.studio.thegraph.com/query/49574/enssepolia/version/latest', }, }, } as const satisfies Record @@ -231,11 +226,11 @@ export type ChainWithBaseContracts = Assign< > export type CheckedChainWithEns = - TChain['network'] extends SupportedChain + TChain['id'] extends SupportedChain ? TChain['contracts'] extends BaseChainContracts ? TChain & { - contracts: Prettify<(typeof addresses)[TChain['network']]> - subgraphs: (typeof subgraphs)[TChain['network']] + contracts: Prettify<(typeof addresses)[TChain['id']]> + subgraphs: (typeof subgraphs)[TChain['id']] } : never : never diff --git a/packages/ensjs/src/contracts/universalResolver.ts b/packages/ensjs/src/contracts/universalResolver.ts index eaf71e87..d8a3fbd3 100644 --- a/packages/ensjs/src/contracts/universalResolver.ts +++ b/packages/ensjs/src/contracts/universalResolver.ts @@ -67,6 +67,10 @@ const universalResolverReverse = { export const universalResolverReverseSnippet = [ ...universalResolverErrors, universalResolverReverse, +] as const + +export const universalResolverReverseWithGatewaysSnippet = [ + ...universalResolverErrors, { ...universalResolverReverse, inputs: [ @@ -108,6 +112,10 @@ const universalResolverResolve = { export const universalResolverResolveSnippet = [ ...universalResolverErrors, universalResolverResolve, +] as const + +export const universalResolverResolveWithGatewaysSnippet = [ + ...universalResolverErrors, { ...universalResolverResolve, inputs: [ @@ -159,6 +167,10 @@ const universalResolverResolveArray = { export const universalResolverResolveArraySnippet = [ ...universalResolverErrors, universalResolverResolveArray, +] as const + +export const universalResolverResolveArrayWithGatewaysSnippet = [ + ...universalResolverErrors, { ...universalResolverResolveArray, inputs: [ diff --git a/packages/ensjs/src/errors/contracts.ts b/packages/ensjs/src/errors/contracts.ts index 092b38ca..594c0373 100644 --- a/packages/ensjs/src/errors/contracts.ts +++ b/packages/ensjs/src/errors/contracts.ts @@ -1,27 +1,27 @@ import { BaseError } from './base.js' -export class UnsupportedNetworkError extends BaseError { - network: string +export class UnsupportedChainError extends BaseError { + chainId: number - supportedNetworks: readonly string[] + supportedChains: readonly number[] - override name = 'UnsupportedNetworkError' + override name = 'UnsupportedChainError' constructor({ - network, - supportedNetworks, + chainId, + supportedChains, details, }: { - network: string - supportedNetworks: readonly string[] + chainId: number + supportedChains: readonly number[] details?: string }) { - super(`Unsupported network: ${network}`, { - metaMessages: [`- Supported networks: ${supportedNetworks.join(', ')}`], + super(`Unsupported chain: ${chainId}`, { + metaMessages: [`- Supported chains: ${supportedChains.join(', ')}`], details, }) - this.network = network - this.supportedNetworks = supportedNetworks + this.chainId = chainId + this.supportedChains = supportedChains } } diff --git a/packages/ensjs/src/functions/public/_getAbi.test.ts b/packages/ensjs/src/functions/public/_getAbi.test.ts index 02b845c6..73020e6b 100644 --- a/packages/ensjs/src/functions/public/_getAbi.test.ts +++ b/packages/ensjs/src/functions/public/_getAbi.test.ts @@ -16,6 +16,6 @@ it('propagates error when strict is true', async () => { Params: (uint256, bytes) Data: 0x1234 (2 bytes) - Version: viem@1.16.3" + Version: viem@2.5.0" `) }) diff --git a/packages/ensjs/src/functions/public/_getAddr.test.ts b/packages/ensjs/src/functions/public/_getAddr.test.ts index 50efdad8..d43ea4aa 100644 --- a/packages/ensjs/src/functions/public/_getAddr.test.ts +++ b/packages/ensjs/src/functions/public/_getAddr.test.ts @@ -16,6 +16,6 @@ it('propagates error when strict is true', async () => { Params: (address) Data: 0x1234 (2 bytes) - Version: viem@1.16.3" + Version: viem@2.5.0" `) }) diff --git a/packages/ensjs/src/functions/public/_getContentHash.test.ts b/packages/ensjs/src/functions/public/_getContentHash.test.ts index af92175d..d42ac606 100644 --- a/packages/ensjs/src/functions/public/_getContentHash.test.ts +++ b/packages/ensjs/src/functions/public/_getContentHash.test.ts @@ -17,6 +17,6 @@ it('propagates error when strict is true', async () => { Params: (bytes) Data: 0x1234 (2 bytes) - Version: viem@1.16.3" + Version: viem@2.5.0" `) }) diff --git a/packages/ensjs/src/functions/public/_getText.test.ts b/packages/ensjs/src/functions/public/_getText.test.ts index 12237fe6..c400fcc8 100644 --- a/packages/ensjs/src/functions/public/_getText.test.ts +++ b/packages/ensjs/src/functions/public/_getText.test.ts @@ -16,6 +16,6 @@ it('propagates error when strict is true', async () => { Params: (string) Data: 0x1234 (2 bytes) - Version: viem@1.16.3" + Version: viem@2.5.0" `) }) diff --git a/packages/ensjs/src/functions/public/getAbiRecord.test.ts b/packages/ensjs/src/functions/public/getAbiRecord.test.ts index a6b8ff35..1c7dc074 100644 --- a/packages/ensjs/src/functions/public/getAbiRecord.test.ts +++ b/packages/ensjs/src/functions/public/getAbiRecord.test.ts @@ -1,8 +1,8 @@ import { RawContractError } from 'viem' import type { ClientWithEns } from '../../contracts/consts.js' import { publicClient } from '../../test/addTestContracts.js' -import getAbiRecord from './getAbiRecord.js' import { generateSupportedContentTypes } from '../../utils/generateSupportedContentTypes.js' +import getAbiRecord from './getAbiRecord.js' const dummyABI = [ { @@ -260,7 +260,7 @@ describe('getAbiRecord()', () => { function: resolve(bytes name, bytes data) args: (0x, 0x) - Version: viem@1.16.3" + Version: viem@2.5.0" `) }) }) diff --git a/packages/ensjs/src/functions/public/getAbiRecord.ts b/packages/ensjs/src/functions/public/getAbiRecord.ts index 8e658d5b..53dbe42d 100644 --- a/packages/ensjs/src/functions/public/getAbiRecord.ts +++ b/packages/ensjs/src/functions/public/getAbiRecord.ts @@ -44,10 +44,14 @@ const decode = async ( client: ClientWithEns, data: Hex | BaseError, passthrough: GenericPassthrough, - { strict }: Pick, + { + strict, + gatewayUrls, + }: Pick, ): Promise => { const urData = await universalWrapper.decode(client, data, passthrough, { strict, + gatewayUrls, }) if (!urData) return null return _getAbi.decode(client, urData.data, { strict }) @@ -76,7 +80,7 @@ type BatchableFunctionObject = GeneratedFunction */ const getAbiRecord = generateFunction({ encode, decode }) as (( client: ClientWithEns, - { name, strict }: GetAbiRecordParameters, + { name, strict, gatewayUrls, supportedContentTypes }: GetAbiRecordParameters, ) => Promise) & BatchableFunctionObject diff --git a/packages/ensjs/src/functions/public/getAddressRecord.test.ts b/packages/ensjs/src/functions/public/getAddressRecord.test.ts index bf34714b..5aafdc57 100644 --- a/packages/ensjs/src/functions/public/getAddressRecord.test.ts +++ b/packages/ensjs/src/functions/public/getAddressRecord.test.ts @@ -120,7 +120,7 @@ describe('getAddressRecord()', () => { function: resolve(bytes name, bytes data) args: (0x, 0x) - Version: viem@1.16.3" + Version: viem@2.5.0" `) }) }) diff --git a/packages/ensjs/src/functions/public/getAddressRecord.ts b/packages/ensjs/src/functions/public/getAddressRecord.ts index a8810424..fbf79bd2 100644 --- a/packages/ensjs/src/functions/public/getAddressRecord.ts +++ b/packages/ensjs/src/functions/public/getAddressRecord.ts @@ -44,10 +44,15 @@ const decode = async ( client: ClientWithEns, data: Hex | BaseError, passthrough: GenericPassthrough, - { coin, strict }: Pick, + { + coin, + strict, + gatewayUrls, + }: Pick, ): Promise => { const urData = await universalWrapper.decode(client, data, passthrough, { strict, + gatewayUrls, }) if (!urData) return null return _getAddr.decode(client, urData.data, { coin, strict }) @@ -76,7 +81,7 @@ type BatchableFunctionObject = GeneratedFunction */ const getAddressRecord = generateFunction({ encode, decode }) as (( client: ClientWithEns, - { name, coin, bypassFormat, strict }: GetAddressRecordParameters, + { name, coin, bypassFormat, strict, gatewayUrls }: GetAddressRecordParameters, ) => Promise) & BatchableFunctionObject diff --git a/packages/ensjs/src/functions/public/getContentHashRecord.test.ts b/packages/ensjs/src/functions/public/getContentHashRecord.test.ts index e557586e..bb33a4b8 100644 --- a/packages/ensjs/src/functions/public/getContentHashRecord.test.ts +++ b/packages/ensjs/src/functions/public/getContentHashRecord.test.ts @@ -66,7 +66,7 @@ describe('getContentHashRecord', () => { function: resolve(bytes name, bytes data) args: (0x, 0x) - Version: viem@1.16.3" + Version: viem@2.5.0" `) }) }) diff --git a/packages/ensjs/src/functions/public/getContentHashRecord.ts b/packages/ensjs/src/functions/public/getContentHashRecord.ts index 8bea2be0..4d19cee9 100644 --- a/packages/ensjs/src/functions/public/getContentHashRecord.ts +++ b/packages/ensjs/src/functions/public/getContentHashRecord.ts @@ -41,10 +41,14 @@ const decode = async ( client: ClientWithEns, data: Hex | BaseError, passthrough: GenericPassthrough, - { strict }: Pick, + { + strict, + gatewayUrls, + }: Pick, ): Promise => { const urData = await universalWrapper.decode(client, data, passthrough, { strict, + gatewayUrls, }) if (!urData) return null return _getContentHash.decode(client, urData.data, { strict }) @@ -73,7 +77,7 @@ type BatchableFunctionObject = GeneratedFunction */ const getContentHashRecord = generateFunction({ encode, decode }) as (( client: ClientWithEns, - { name, strict }: GetContentHashRecordParameters, + { name, strict, gatewayUrls }: GetContentHashRecordParameters, ) => Promise) & BatchableFunctionObject diff --git a/packages/ensjs/src/functions/public/getName.test.ts b/packages/ensjs/src/functions/public/getName.test.ts index 16043f80..9cccfe05 100644 --- a/packages/ensjs/src/functions/public/getName.test.ts +++ b/packages/ensjs/src/functions/public/getName.test.ts @@ -116,7 +116,7 @@ describe('getName', () => { function: reverse(bytes reverseName) args: (0x) - Version: viem@1.16.3" + Version: viem@2.5.0" `) }) }) diff --git a/packages/ensjs/src/functions/public/getName.ts b/packages/ensjs/src/functions/public/getName.ts index e08a75e3..5e795dbc 100644 --- a/packages/ensjs/src/functions/public/getName.ts +++ b/packages/ensjs/src/functions/public/getName.ts @@ -8,7 +8,10 @@ import { } from 'viem' import type { ClientWithEns } from '../../contracts/consts.js' import { getChainContractAddress } from '../../contracts/getChainContractAddress.js' -import { universalResolverReverseSnippet } from '../../contracts/universalResolver.js' +import { + universalResolverReverseSnippet, + universalResolverReverseWithGatewaysSnippet, +} from '../../contracts/universalResolver.js' import type { GenericPassthrough, TransactionRequestWithPassthrough, @@ -58,7 +61,7 @@ const encode = ( ...(gatewayUrls?.length ? { data: encodeFunctionData({ - abi: universalResolverReverseSnippet, + abi: universalResolverReverseWithGatewaysSnippet, functionName: 'reverse', args: [...args, gatewayUrls] as const, }), @@ -85,11 +88,13 @@ const decode = async ( _client: ClientWithEns, data: Hex | BaseError, passthrough: GenericPassthrough, - { address, allowMismatch, strict }: GetNameParameters, + { address, allowMismatch, strict, gatewayUrls }: GetNameParameters, ): Promise => { const isSafe = checkSafeUniversalResolverData(data, { strict, - abi: universalResolverReverseSnippet, + abi: gatewayUrls + ? universalResolverReverseWithGatewaysSnippet + : universalResolverReverseSnippet, args: passthrough.args, functionName: 'reverse', address: passthrough.address, diff --git a/packages/ensjs/src/functions/public/getRecords.test.ts b/packages/ensjs/src/functions/public/getRecords.test.ts index 11424c96..e6743cdc 100644 --- a/packages/ensjs/src/functions/public/getRecords.test.ts +++ b/packages/ensjs/src/functions/public/getRecords.test.ts @@ -144,8 +144,8 @@ describe('getRecords()', () => { function: resolve(bytes name, bytes[] data) args: (0x04746573740365746800, ["0x5678"]) - Docs: https://viem.sh/docs/contract/decodeErrorResult.html - Version: viem@1.16.3" + Docs: https://viem.sh/docs/contract/decodeErrorResult + Version: viem@2.5.0" `) }) }) diff --git a/packages/ensjs/src/functions/public/getRecords.ts b/packages/ensjs/src/functions/public/getRecords.ts index 3582db9f..183da3d2 100644 --- a/packages/ensjs/src/functions/public/getRecords.ts +++ b/packages/ensjs/src/functions/public/getRecords.ts @@ -10,7 +10,10 @@ import { } from 'viem' import type { ClientWithEns } from '../../contracts/consts.js' import { getChainContractAddress } from '../../contracts/getChainContractAddress.js' -import { universalResolverResolveArraySnippet } from '../../contracts/universalResolver.js' +import { + universalResolverResolveArraySnippet, + universalResolverResolveArrayWithGatewaysSnippet, +} from '../../contracts/universalResolver.js' import type { DecodedAddr, DecodedText, @@ -217,10 +220,10 @@ const encode = ( return { to, - ...(gatewayUrls?.length + ...(gatewayUrls ? { data: encodeFunctionData({ - abi: universalResolverResolveArraySnippet, + abi: universalResolverResolveArrayWithGatewaysSnippet, functionName: 'resolve', args: [...args, gatewayUrls] as const, }), @@ -362,6 +365,7 @@ const decode = async < coins, contentHash, abi, + gatewayUrls, }: GetRecordsParameters, ): Promise> => { const { calls } = passthrough @@ -381,7 +385,9 @@ const decode = async < } else { const isSafe = checkSafeUniversalResolverData(data, { strict: false, - abi: universalResolverResolveArraySnippet, + abi: gatewayUrls + ? universalResolverResolveArrayWithGatewaysSnippet + : universalResolverResolveArraySnippet, args: passthrough.args, functionName: 'resolve', address: passthrough.address, diff --git a/packages/ensjs/src/functions/public/getTextRecord.test.ts b/packages/ensjs/src/functions/public/getTextRecord.test.ts index 627954ea..f16233bb 100644 --- a/packages/ensjs/src/functions/public/getTextRecord.test.ts +++ b/packages/ensjs/src/functions/public/getTextRecord.test.ts @@ -57,7 +57,7 @@ describe('getTextRecord()', () => { function: resolve(bytes name, bytes data) args: (0x, 0x) - Version: viem@1.16.3" + Version: viem@2.5.0" `) }) }) diff --git a/packages/ensjs/src/functions/public/getTextRecord.ts b/packages/ensjs/src/functions/public/getTextRecord.ts index 54d859c5..c2836180 100644 --- a/packages/ensjs/src/functions/public/getTextRecord.ts +++ b/packages/ensjs/src/functions/public/getTextRecord.ts @@ -40,10 +40,14 @@ const decode = async ( client: ClientWithEns, data: Hex | BaseError, passthrough: GenericPassthrough, - { strict }: Pick, + { + strict, + gatewayUrls, + }: Pick, ): Promise => { const urData = await universalWrapper.decode(client, data, passthrough, { strict, + gatewayUrls, }) if (!urData) return null return _getText.decode(client, urData.data, { strict }) @@ -72,7 +76,7 @@ type BatchableFunctionObject = GeneratedFunction */ const getTextRecord = generateFunction({ encode, decode }) as (( client: ClientWithEns, - { name, key, strict }: GetTextRecordParameters, + { name, key, strict, gatewayUrls }: GetTextRecordParameters, ) => Promise) & BatchableFunctionObject diff --git a/packages/ensjs/src/functions/public/universalWrapper.test.ts b/packages/ensjs/src/functions/public/universalWrapper.test.ts index 789555c6..beb3b343 100644 --- a/packages/ensjs/src/functions/public/universalWrapper.test.ts +++ b/packages/ensjs/src/functions/public/universalWrapper.test.ts @@ -72,7 +72,7 @@ it('throws on result decode error when strict is true', async () => { Params: (bytes data, address resolver) Data: 0x1234 (2 bytes) - Version: viem@1.16.3" + Version: viem@2.5.0" `) }) @@ -115,7 +115,7 @@ it('throws on known contract error when strict is true', async () => { function: resolve(bytes name, bytes data) args: (0x, 0x) - Version: viem@1.16.3] + Version: viem@2.5.0] `) }) @@ -145,8 +145,8 @@ it('throws on unknown contract error when strict is false', async () => { function: resolve(bytes name, bytes data) args: (0x, 0x) - Docs: https://viem.sh/docs/contract/decodeErrorResult.html - Version: viem@1.16.3" + Docs: https://viem.sh/docs/contract/decodeErrorResult + Version: viem@2.5.0" `) }) @@ -176,7 +176,7 @@ it('throws on unknown contract error when strict is true', async () => { function: resolve(bytes name, bytes data) args: (0x, 0x) - Docs: https://viem.sh/docs/contract/decodeErrorResult.html - Version: viem@1.16.3" + Docs: https://viem.sh/docs/contract/decodeErrorResult + Version: viem@2.5.0" `) }) diff --git a/packages/ensjs/src/functions/public/universalWrapper.ts b/packages/ensjs/src/functions/public/universalWrapper.ts index c44783c8..96faab6a 100644 --- a/packages/ensjs/src/functions/public/universalWrapper.ts +++ b/packages/ensjs/src/functions/public/universalWrapper.ts @@ -10,7 +10,10 @@ import { } from 'viem' import type { ClientWithEns } from '../../contracts/consts.js' import { getChainContractAddress } from '../../contracts/getChainContractAddress.js' -import { universalResolverResolveSnippet } from '../../contracts/universalResolver.js' +import { + universalResolverResolveSnippet, + universalResolverResolveWithGatewaysSnippet, +} from '../../contracts/universalResolver.js' import type { GenericPassthrough, TransactionRequestWithPassthrough, @@ -57,7 +60,7 @@ const encode = ( ...(gatewayUrls?.length ? { data: encodeFunctionData({ - abi: universalResolverResolveSnippet, + abi: universalResolverResolveWithGatewaysSnippet, functionName: 'resolve', args: [...args, gatewayUrls] as const, }), @@ -84,11 +87,16 @@ const decode = async ( _client: ClientWithEns, data: Hex | BaseError, passthrough: GenericPassthrough, - { strict }: Pick, + { + strict, + gatewayUrls, + }: Pick, ): Promise => { const isSafe = checkSafeUniversalResolverData(data, { strict, - abi: universalResolverResolveSnippet, + abi: gatewayUrls + ? universalResolverResolveWithGatewaysSnippet + : universalResolverResolveSnippet, args: passthrough.args, functionName: 'resolve', address: passthrough.address, diff --git a/packages/ensjs/src/index.ts b/packages/ensjs/src/index.ts index 604a40a2..9de9ad9a 100644 --- a/packages/ensjs/src/index.ts +++ b/packages/ensjs/src/index.ts @@ -28,7 +28,7 @@ export { export { addEnsContracts } from './contracts/addEnsContracts.js' export { BaseError } from './errors/base.js' -export { NoChainError, UnsupportedNetworkError } from './errors/contracts.js' +export { NoChainError, UnsupportedChainError } from './errors/contracts.js' export { DnsDnssecVerificationFailedError, DnsInvalidAddressChecksumError, diff --git a/packages/ensjs/src/utils/checkSafeUniversalResolverData.test.ts b/packages/ensjs/src/utils/checkSafeUniversalResolverData.test.ts index 99ceac3b..360f338b 100644 --- a/packages/ensjs/src/utils/checkSafeUniversalResolverData.test.ts +++ b/packages/ensjs/src/utils/checkSafeUniversalResolverData.test.ts @@ -68,7 +68,7 @@ describe('checkSafeUniversalResolverData', () => { function: resolve(bytes name, bytes data) args: (0x, 0x) - Version: viem@1.16.3" + Version: viem@2.5.0" `) }) @@ -96,7 +96,7 @@ describe('checkSafeUniversalResolverData', () => { function: resolve(bytes name, bytes data) args: (ab, cd) - Version: viem@1.16.3" + Version: viem@2.5.0" `) }) @@ -127,8 +127,8 @@ describe('checkSafeUniversalResolverData', () => { function: resolve(bytes name, bytes data) args: (0x, 0x) - Docs: https://viem.sh/docs/contract/decodeErrorResult.html - Version: viem@1.16.3" + Docs: https://viem.sh/docs/contract/decodeErrorResult + Version: viem@2.5.0" `) }) @@ -159,8 +159,8 @@ describe('checkSafeUniversalResolverData', () => { function: resolve(bytes name, bytes data) args: (0x, 0x) - Docs: https://viem.sh/docs/contract/decodeErrorResult.html - Version: viem@1.16.3" + Docs: https://viem.sh/docs/contract/decodeErrorResult + Version: viem@2.5.0" `) }) }) diff --git a/packages/ensjs/tsconfig.base.json b/packages/ensjs/tsconfig.base.json index 55ed12f9..91077e1e 100644 --- a/packages/ensjs/tsconfig.base.json +++ b/packages/ensjs/tsconfig.base.json @@ -25,14 +25,14 @@ // Interop constraints "esModuleInterop": false, - "allowSyntheticDefaultImports": false, + "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, "verbatimModuleSyntax": true, "importHelpers": true, // This is only used for build validation. Since we do not have `tslib` installed, this will fail if we accidentally make use of anything that'd require injection of helpers. // Language and environment "moduleResolution": "NodeNext", - "module": "ESNext", + "module": "NodeNext", "target": "ES2021", // Setting this to `ES2021` enables native support for `Node v16+`: https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping. "lib": [ "ES2022", // By using ES2022 we get access to the `.cause` property on `Error` instances. diff --git a/packages/ensjs/tsconfig.build.json b/packages/ensjs/tsconfig.build.json index 7eddbd5e..8989e510 100644 --- a/packages/ensjs/tsconfig.build.json +++ b/packages/ensjs/tsconfig.build.json @@ -3,6 +3,7 @@ "include": ["./src"], "exclude": ["src/**/*.test.ts", "src/test/**/*", "./src/ABIs/**/*"], "compilerOptions": { + "moduleResolution": "node", "sourceMap": true, "rootDir": "./src", "paths": { diff --git a/packages/ensjs/tsconfig.json b/packages/ensjs/tsconfig.json index 9e43dfa9..8dd09591 100644 --- a/packages/ensjs/tsconfig.json +++ b/packages/ensjs/tsconfig.json @@ -13,10 +13,6 @@ "references": [{ "path": "./tsconfig.node.json" }], "compilerOptions": { "types": ["jest"], - "resolveJsonModule": true, - "paths": { - "abitype": ["./node_modules/abitype/dist"], - "viem": ["./node_modules/viem/_types"] - } + "resolveJsonModule": true } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index baef6581..ffee95d6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,10 +13,10 @@ importers: devDependencies: '@typescript-eslint/eslint-plugin': specifier: ^6.7.5 - version: 6.7.5(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.1.6) + version: 6.7.5(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.3.2) '@typescript-eslint/parser': specifier: ^6.7.5 - version: 6.7.5(eslint@8.51.0)(typescript@5.1.6) + version: 6.7.5(eslint@8.51.0)(typescript@5.3.2) eslint: specifier: ^8.51.0 version: 8.51.0 @@ -43,10 +43,10 @@ importers: version: 2.8.8 ts-node: specifier: ^10.7.0 - version: 10.9.1(@types/node@20.3.3)(typescript@5.1.6) + version: 10.9.1(@types/node@20.3.3)(typescript@5.3.2) typescript: - specifier: ^5.1.6 - version: 5.1.6 + specifier: ^5.3.2 + version: 5.3.2 dependenciesMeta: ens-contracts: built: false @@ -59,7 +59,7 @@ importers: version: link:../../packages/ensjs viem: specifier: ^1.2.9 - version: 1.2.9(typescript@5.1.6) + version: 1.2.9(typescript@5.3.2) examples/basic-tsnode-esm: dependencies: @@ -145,8 +145,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 abitype: - specifier: ^0.8.0 - version: 0.8.0(typescript@5.1.6) + specifier: ^1.0.0 + version: 1.0.0(typescript@5.3.2) dns-packet: specifier: ^5.3.1 version: 5.4.0 @@ -160,8 +160,8 @@ importers: specifier: ^2.1.0 version: 2.1.0 traverse: - specifier: ^0.6.6 - version: 0.6.6 + specifier: ^0.6.8 + version: 0.6.8 devDependencies: '@ensdomains/buffer': specifier: ^0.0.13 @@ -203,8 +203,8 @@ importers: specifier: ^2.0.0 version: 2.0.0 '@types/traverse': - specifier: ^0.6.32 - version: 0.6.32 + specifier: ^0.6.36 + version: 0.6.36 cbor: specifier: ^8.1.0 version: 8.1.0 @@ -216,7 +216,7 @@ importers: version: 0.15.6 eslint-plugin-jest: specifier: ^27.0.1 - version: 27.0.1(@typescript-eslint/eslint-plugin@6.7.5)(eslint@8.51.0)(jest@29.5.0)(typescript@5.1.6) + version: 27.0.1(@typescript-eslint/eslint-plugin@6.7.5)(eslint@8.51.0)(jest@29.5.0)(typescript@5.3.2) ethers: specifier: ^5.7.2 version: 5.7.2 @@ -228,7 +228,7 @@ importers: version: 8.0.3 hardhat: specifier: 2.16.1 - version: 2.16.1(ts-node@10.9.2)(typescript@5.1.6) + version: 2.16.1(ts-node@10.9.2)(typescript@5.3.2) hardhat-abi-exporter: specifier: ^2.8.0 version: 2.10.0(hardhat@2.16.1) @@ -252,22 +252,22 @@ importers: version: 0.8.16 ts-jest: specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.18.10)(esbuild@0.15.6)(jest@29.5.0)(typescript@5.1.6) + version: 29.1.1(@babel/core@7.18.10)(esbuild@0.15.6)(jest@29.5.0)(typescript@5.3.2) ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.3.68)(@types/node@20.3.3)(typescript@5.1.6) + version: 10.9.2(@swc/core@1.3.68)(@types/node@20.3.3)(typescript@5.3.2) typedoc: specifier: ^0.24.8 - version: 0.24.8(typescript@5.1.6) + version: 0.24.8(typescript@5.3.2) typedoc-plugin-markdown: specifier: ^4.0.0-next.16 version: 4.0.0-next.16(prettier@2.8.8)(typedoc@0.24.8) typescript: - specifier: ^5.1.6 - version: 5.1.6 + specifier: 5.3.2 + version: 5.3.2 viem: - specifier: ^1.16.4 - version: 1.16.4(typescript@5.1.6) + specifier: ^2.5.0 + version: 2.5.0(typescript@5.3.2) wait-on: specifier: ^6.0.1 version: 6.0.1 @@ -279,14 +279,14 @@ packages: engines: {node: '>=0.10.0'} dev: true + /@adraffy/ens-normalize@1.10.0: + resolution: {integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==} + dev: true + /@adraffy/ens-normalize@1.9.0: resolution: {integrity: sha512-iowxq3U30sghZotgl4s/oJRci6WPBfNO5YYgk2cIOMCHr3LeGPcsZjCEr+33Q4N+oV3OABDAtA+pyvWjbvBifQ==} dev: false - /@adraffy/ens-normalize@1.9.4: - resolution: {integrity: sha512-UK0bHA7hh9cR39V+4gl2/NnBBjoXIxkuWAPCaY4X7fbH4L/azIi7ilWOCjMUYfpJgraLUAqkRi2BqrjME8Rynw==} - dev: true - /@ampproject/remapping@2.2.0: resolution: {integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==} engines: {node: '>=6.0.0'} @@ -1936,7 +1936,7 @@ packages: chai: 4.3.6 ethereumjs-util: 7.1.5 fs-extra: 7.0.1 - hardhat: 2.16.1(ts-node@10.9.2)(typescript@5.1.6) + hardhat: 2.16.1(ts-node@10.9.2)(typescript@5.3.2) web3: 1.7.5 transitivePeerDependencies: - bufferutil @@ -1956,7 +1956,7 @@ packages: web3: ^1.0.0-beta.36 dependencies: '@types/bignumber.js': 5.0.0 - hardhat: 2.16.1(ts-node@10.9.2)(typescript@5.1.6) + hardhat: 2.16.1(ts-node@10.9.2)(typescript@5.3.2) web3: 1.7.5 dev: true @@ -2033,7 +2033,6 @@ packages: /@scure/base@1.1.5: resolution: {integrity: sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ==} - dev: false /@scure/bip32@1.1.0: resolution: {integrity: sha512-ftTW3kKX54YXLCxH6BB7oEEoJfoE2pIgw7MINKAs5PsS6nqKPuKk1haTF/EuHmYqG330t5GSrdmtRuHaY1a62Q==} @@ -2056,7 +2055,7 @@ packages: dependencies: '@noble/curves': 1.2.0 '@noble/hashes': 1.3.2 - '@scure/base': 1.1.3 + '@scure/base': 1.1.5 dev: true /@scure/bip39@1.1.0: @@ -2077,7 +2076,7 @@ packages: resolution: {integrity: sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==} dependencies: '@noble/hashes': 1.3.2 - '@scure/base': 1.1.3 + '@scure/base': 1.1.5 dev: true /@sentry/core@5.30.0: @@ -2640,8 +2639,8 @@ packages: resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} dev: true - /@types/traverse@0.6.32: - resolution: {integrity: sha512-RBz2uRZVCXuMg93WD//aTS5B120QlT4lR/gL+935QtGsKHLS6sCtZBaKfWjIfk7ZXv/r8mtGbwjVIee6/3XTow==} + /@types/traverse@0.6.36: + resolution: {integrity: sha512-0ko4fZgKQf2J/2FvDJHua9KZ19zJkfI5FxG1ZeEUhezEwuq6UL+4T0IxcBfmHilBeAj7OSUTwrm/lPnh8EB1/Q==} dev: true /@types/yargs-parser@21.0.0: @@ -2660,7 +2659,7 @@ packages: '@types/yargs-parser': 21.0.0 dev: true - /@typescript-eslint/eslint-plugin@6.7.5(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.1.6): + /@typescript-eslint/eslint-plugin@6.7.5(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.3.2): resolution: {integrity: sha512-JhtAwTRhOUcP96D0Y6KYnwig/MRQbOoLGXTON2+LlyB/N35SP9j1boai2zzwXb7ypKELXMx3DVk9UTaEq1vHEw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2672,10 +2671,10 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.9.1 - '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.3.2) '@typescript-eslint/scope-manager': 6.7.5 - '@typescript-eslint/type-utils': 6.7.5(eslint@8.51.0)(typescript@5.1.6) - '@typescript-eslint/utils': 6.7.5(eslint@8.51.0)(typescript@5.1.6) + '@typescript-eslint/type-utils': 6.7.5(eslint@8.51.0)(typescript@5.3.2) + '@typescript-eslint/utils': 6.7.5(eslint@8.51.0)(typescript@5.3.2) '@typescript-eslint/visitor-keys': 6.7.5 debug: 4.3.4(supports-color@8.1.1) eslint: 8.51.0 @@ -2683,13 +2682,13 @@ packages: ignore: 5.2.4 natural-compare: 1.4.0 semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@5.1.6) - typescript: 5.1.6 + ts-api-utils: 1.0.3(typescript@5.3.2) + typescript: 5.3.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@6.7.5(eslint@8.51.0)(typescript@5.1.6): + /@typescript-eslint/parser@6.7.5(eslint@8.51.0)(typescript@5.3.2): resolution: {integrity: sha512-bIZVSGx2UME/lmhLcjdVc7ePBwn7CLqKarUBL4me1C5feOd663liTGjMBGVcGr+BhnSLeP4SgwdvNnnkbIdkCw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2701,11 +2700,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 6.7.5 '@typescript-eslint/types': 6.7.5 - '@typescript-eslint/typescript-estree': 6.7.5(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.7.5(typescript@5.3.2) '@typescript-eslint/visitor-keys': 6.7.5 debug: 4.3.4(supports-color@8.1.1) eslint: 8.51.0 - typescript: 5.1.6 + typescript: 5.3.2 transitivePeerDependencies: - supports-color dev: true @@ -2726,7 +2725,7 @@ packages: '@typescript-eslint/visitor-keys': 6.7.5 dev: true - /@typescript-eslint/type-utils@6.7.5(eslint@8.51.0)(typescript@5.1.6): + /@typescript-eslint/type-utils@6.7.5(eslint@8.51.0)(typescript@5.3.2): resolution: {integrity: sha512-Gs0qos5wqxnQrvpYv+pf3XfcRXW6jiAn9zE/K+DlmYf6FcpxeNYN0AIETaPR7rHO4K2UY+D0CIbDP9Ut0U4m1g==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2736,12 +2735,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.7.5(typescript@5.1.6) - '@typescript-eslint/utils': 6.7.5(eslint@8.51.0)(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.7.5(typescript@5.3.2) + '@typescript-eslint/utils': 6.7.5(eslint@8.51.0)(typescript@5.3.2) debug: 4.3.4(supports-color@8.1.1) eslint: 8.51.0 - ts-api-utils: 1.0.3(typescript@5.1.6) - typescript: 5.1.6 + ts-api-utils: 1.0.3(typescript@5.3.2) + typescript: 5.3.2 transitivePeerDependencies: - supports-color dev: true @@ -2756,7 +2755,7 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@5.33.0(typescript@5.1.6): + /@typescript-eslint/typescript-estree@5.33.0(typescript@5.3.2): resolution: {integrity: sha512-tqq3MRLlggkJKJUrzM6wltk8NckKyyorCSGMq4eVkyL5sDYzJJcMgZATqmF8fLdsWrW7OjjIZ1m9v81vKcaqwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2771,13 +2770,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.7 - tsutils: 3.21.0(typescript@5.1.6) - typescript: 5.1.6 + tsutils: 3.21.0(typescript@5.3.2) + typescript: 5.3.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree@6.7.5(typescript@5.1.6): + /@typescript-eslint/typescript-estree@6.7.5(typescript@5.3.2): resolution: {integrity: sha512-NhJiJ4KdtwBIxrKl0BqG1Ur+uw7FiOnOThcYx9DpOGJ/Abc9z2xNzLeirCG02Ig3vkvrc2qFLmYSSsaITbKjlg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2792,13 +2791,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@5.1.6) - typescript: 5.1.6 + ts-api-utils: 1.0.3(typescript@5.3.2) + typescript: 5.3.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@5.33.0(eslint@8.51.0)(typescript@5.1.6): + /@typescript-eslint/utils@5.33.0(eslint@8.51.0)(typescript@5.3.2): resolution: {integrity: sha512-JxOAnXt9oZjXLIiXb5ZIcZXiwVHCkqZgof0O8KPgz7C7y0HS42gi75PdPlqh1Tf109M0fyUw45Ao6JLo7S5AHw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2807,7 +2806,7 @@ packages: '@types/json-schema': 7.0.11 '@typescript-eslint/scope-manager': 5.33.0 '@typescript-eslint/types': 5.33.0 - '@typescript-eslint/typescript-estree': 5.33.0(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 5.33.0(typescript@5.3.2) eslint: 8.51.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0(eslint@8.51.0) @@ -2816,7 +2815,7 @@ packages: - typescript dev: true - /@typescript-eslint/utils@6.7.5(eslint@8.51.0)(typescript@5.1.6): + /@typescript-eslint/utils@6.7.5(eslint@8.51.0)(typescript@5.3.2): resolution: {integrity: sha512-pfRRrH20thJbzPPlPc4j0UNGvH1PjPlhlCMq4Yx7EGjV7lvEeGX0U6MJYe8+SyFutWgSHsdbJ3BXzZccYggezA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2827,7 +2826,7 @@ packages: '@types/semver': 7.5.3 '@typescript-eslint/scope-manager': 6.7.5 '@typescript-eslint/types': 6.7.5 - '@typescript-eslint/typescript-estree': 6.7.5(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.7.5(typescript@5.3.2) eslint: 8.51.0 semver: 7.5.4 transitivePeerDependencies: @@ -2866,7 +2865,7 @@ packages: typescript: 5.0.4 dev: false - /@wagmi/chains@1.2.0(typescript@5.1.6): + /@wagmi/chains@1.2.0(typescript@5.3.2): resolution: {integrity: sha512-dmDRipsE54JfyudOBkuhEexqQWcrZqxn/qiujG8SBzMh/az/AH5xlJSA+j1CPWTx9+QofSMF3B7A4gb6XRmSaQ==} peerDependencies: typescript: '>=5.0.4' @@ -2874,19 +2873,7 @@ packages: typescript: optional: true dependencies: - typescript: 5.1.6 - dev: false - - /abitype@0.8.0(typescript@5.1.6): - resolution: {integrity: sha512-QqBuwc2trtaNd/kp4k0dSjVu3OQIYRAB4ww4LCPwfSECXcCGTD3imYovNYNjx0SyN3OHV0XUOzUVwnXP1kLsVQ==} - peerDependencies: - typescript: '>=4.9.4' - zod: ^3 >=3.19.1 - peerDependenciesMeta: - zod: - optional: true - dependencies: - typescript: 5.1.6 + typescript: 5.3.2 dev: false /abitype@0.8.11(typescript@5.0.4): @@ -2901,7 +2888,7 @@ packages: typescript: 5.0.4 dev: false - /abitype@0.8.11(typescript@5.1.6): + /abitype@0.8.11(typescript@5.3.2): resolution: {integrity: sha512-bM4v2dKvX08sZ9IU38IN5BKmN+ZkOSd2oI4a9f0ejHYZQYV6cDr7j+d95ga0z2XHG36Y4jzoG5Z7qDqxp7fi/A==} peerDependencies: typescript: '>=5.0.4' @@ -2910,22 +2897,21 @@ packages: zod: optional: true dependencies: - typescript: 5.1.6 + typescript: 5.3.2 dev: false - /abitype@0.9.8(typescript@5.1.6): - resolution: {integrity: sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==} + /abitype@1.0.0(typescript@5.3.2): + resolution: {integrity: sha512-NMeMah//6bJ56H5XRj8QCV4AwuW6hB6zqz2LnhhLdcWVQOsXki6/Pn3APeqxCma62nXIcmZWdu1DlHWS74umVQ==} peerDependencies: typescript: '>=5.0.4' - zod: ^3 >=3.19.1 + zod: ^3 >=3.22.0 peerDependenciesMeta: typescript: optional: true zod: optional: true dependencies: - typescript: 5.1.6 - dev: true + typescript: 5.3.2 /abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} @@ -4988,8 +4974,8 @@ packages: eslint: ^7.32.0 || ^8.2.0 eslint-plugin-import: ^2.25.3 dependencies: - '@typescript-eslint/eslint-plugin': 6.7.5(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.1.6) - '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.1.6) + '@typescript-eslint/eslint-plugin': 6.7.5(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.3.2) + '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.3.2) eslint: 8.51.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.26.0)(eslint@8.51.0) eslint-plugin-import: 2.26.0(@typescript-eslint/parser@6.7.5)(eslint@8.51.0) @@ -5054,7 +5040,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.3.2) debug: 3.2.7 eslint: 8.51.0 eslint-import-resolver-node: 0.3.6 @@ -5072,7 +5058,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.3.2) array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 @@ -5093,7 +5079,7 @@ packages: - supports-color dev: true - /eslint-plugin-jest@27.0.1(@typescript-eslint/eslint-plugin@6.7.5)(eslint@8.51.0)(jest@29.5.0)(typescript@5.1.6): + /eslint-plugin-jest@27.0.1(@typescript-eslint/eslint-plugin@6.7.5)(eslint@8.51.0)(jest@29.5.0)(typescript@5.3.2): resolution: {integrity: sha512-LosUsrkwVSs/8Z/I8Hqn5vWgTEsHrfIquDEKOsV8/cl+gbFR4tiRCE1AimEotsHjSC0Rx1tYm6vPhw8C3ktmmg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -5106,8 +5092,8 @@ packages: jest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 6.7.5(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.1.6) - '@typescript-eslint/utils': 5.33.0(eslint@8.51.0)(typescript@5.1.6) + '@typescript-eslint/eslint-plugin': 6.7.5(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.3.2) + '@typescript-eslint/utils': 5.33.0(eslint@8.51.0)(typescript@5.3.2) eslint: 8.51.0 jest: 29.5.0(@types/node@20.3.3)(ts-node@10.9.2) transitivePeerDependencies: @@ -6236,7 +6222,7 @@ packages: dependencies: '@ethersproject/abi': 5.6.4 delete-empty: 3.0.0 - hardhat: 2.16.1(ts-node@10.9.2)(typescript@5.1.6) + hardhat: 2.16.1(ts-node@10.9.2)(typescript@5.3.2) dev: true /hardhat-deploy-ethers@0.3.0-beta.13(ethers@5.7.2)(hardhat@2.16.1): @@ -6246,7 +6232,7 @@ packages: hardhat: ^2.0.0 dependencies: ethers: 5.7.2 - hardhat: 2.16.1(ts-node@10.9.2)(typescript@5.1.6) + hardhat: 2.16.1(ts-node@10.9.2)(typescript@5.3.2) dev: true /hardhat-deploy@0.11.12: @@ -6271,7 +6257,7 @@ packages: - utf-8-validate dev: true - /hardhat@2.16.1(ts-node@10.9.2)(typescript@5.1.6): + /hardhat@2.16.1(ts-node@10.9.2)(typescript@5.3.2): resolution: {integrity: sha512-QpBjGXFhhSYoYBGEHyoau/A63crZOP+i3GbNxzLGkL6IklzT+piN14+wGnINNCg5BLSKisQI/RAySPzaWRcx/g==} engines: {node: '>=14.0.0'} hasBin: true @@ -6329,9 +6315,9 @@ packages: solc: 0.7.3(debug@4.3.4) source-map-support: 0.5.21 stacktrace-parser: 0.1.10 - ts-node: 10.9.2(@swc/core@1.3.68)(@types/node@20.3.3)(typescript@5.1.6) + ts-node: 10.9.2(@swc/core@1.3.68)(@types/node@20.3.3)(typescript@5.3.2) tsort: 0.0.1 - typescript: 5.1.6 + typescript: 5.3.2 undici: 5.22.1 uuid: 8.3.2 ws: 7.4.6 @@ -7100,7 +7086,7 @@ packages: pretty-format: 29.5.0 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.2(@swc/core@1.3.68)(@types/node@20.3.3)(typescript@5.1.6) + ts-node: 10.9.2(@swc/core@1.3.68)(@types/node@20.3.3)(typescript@5.3.2) transitivePeerDependencies: - supports-color dev: true @@ -9906,8 +9892,9 @@ packages: /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - /traverse@0.6.6: - resolution: {integrity: sha512-kdf4JKs8lbARxWdp7RKdNzoJBhGUcIalSYibuGyHJbmk40pOysQ0+QPvlkCOICOivDWU2IJo2rkrxyTK2AH4fw==} + /traverse@0.6.8: + resolution: {integrity: sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA==} + engines: {node: '>= 0.4'} dev: false /tree-kill@1.2.2: @@ -9915,16 +9902,16 @@ packages: hasBin: true dev: false - /ts-api-utils@1.0.3(typescript@5.1.6): + /ts-api-utils@1.0.3(typescript@5.3.2): resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} engines: {node: '>=16.13.0'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.1.6 + typescript: 5.3.2 dev: true - /ts-jest@29.1.1(@babel/core@7.18.10)(esbuild@0.15.6)(jest@29.5.0)(typescript@5.1.6): + /ts-jest@29.1.1(@babel/core@7.18.10)(esbuild@0.15.6)(jest@29.5.0)(typescript@5.3.2): resolution: {integrity: sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -9955,7 +9942,7 @@ packages: lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.5.3 - typescript: 5.1.6 + typescript: 5.3.2 yargs-parser: 21.1.1 dev: true @@ -9990,7 +9977,7 @@ packages: yn: 3.1.1 dev: false - /ts-node@10.9.1(@types/node@20.3.3)(typescript@5.1.6): + /ts-node@10.9.1(@types/node@20.3.3)(typescript@5.3.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -10016,12 +10003,12 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.1.6 + typescript: 5.3.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true - /ts-node@10.9.2(@swc/core@1.3.68)(@types/node@20.3.3)(typescript@5.1.6): + /ts-node@10.9.2(@swc/core@1.3.68)(@types/node@20.3.3)(typescript@5.3.2): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: @@ -10048,7 +10035,7 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.1.6 + typescript: 5.3.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true @@ -10073,14 +10060,14 @@ packages: resolution: {integrity: sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==} dev: true - /tsutils@3.21.0(typescript@5.1.6): + /tsutils@3.21.0(typescript@5.3.2): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 5.1.6 + typescript: 5.3.2 dev: true /tunnel-agent@0.6.0: @@ -10195,10 +10182,10 @@ packages: typedoc: '>=0.24.0' dependencies: prettier: 2.8.8 - typedoc: 0.24.8(typescript@5.1.6) + typedoc: 0.24.8(typescript@5.3.2) dev: true - /typedoc@0.24.8(typescript@5.1.6): + /typedoc@0.24.8(typescript@5.3.2): resolution: {integrity: sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w==} engines: {node: '>= 14.14'} hasBin: true @@ -10209,7 +10196,7 @@ packages: marked: 4.3.0 minimatch: 9.0.3 shiki: 0.14.3 - typescript: 5.1.6 + typescript: 5.3.2 dev: true /typescript-logging@1.0.1: @@ -10224,8 +10211,8 @@ packages: hasBin: true dev: false - /typescript@5.1.6: - resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + /typescript@5.3.2: + resolution: {integrity: sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==} engines: {node: '>=14.17'} hasBin: true @@ -10416,29 +10403,6 @@ packages: extsprintf: 1.3.0 dev: true - /viem@1.16.4(typescript@5.1.6): - resolution: {integrity: sha512-T9ziN3EERXz0BtQSS2VJM+P1EJ2W7K7PviobFrmvWCEYmNQ/vJDhfFqGjvq0ZL9LVz9HvevCbenEy8oIdMEZ+w==} - peerDependencies: - typescript: '>=5.0.4' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@adraffy/ens-normalize': 1.9.4 - '@noble/curves': 1.2.0 - '@noble/hashes': 1.3.2 - '@scure/bip32': 1.3.2 - '@scure/bip39': 1.2.1 - abitype: 0.9.8(typescript@5.1.6) - isows: 1.0.3(ws@8.13.0) - typescript: 5.1.6 - ws: 8.13.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - zod - dev: true - /viem@1.2.9(typescript@5.0.4): resolution: {integrity: sha512-EnEbTuAAHv43unUgMISdQXbD9mrhZLvOdmf6eRGbDFl+XwP/PEzZAT79RaWAuDPnLXGMP1gBCJF++NFjSMukUw==} peerDependencies: @@ -10463,7 +10427,7 @@ packages: - zod dev: false - /viem@1.2.9(typescript@5.1.6): + /viem@1.2.9(typescript@5.3.2): resolution: {integrity: sha512-EnEbTuAAHv43unUgMISdQXbD9mrhZLvOdmf6eRGbDFl+XwP/PEzZAT79RaWAuDPnLXGMP1gBCJF++NFjSMukUw==} peerDependencies: typescript: '>=5.0.4' @@ -10476,10 +10440,10 @@ packages: '@noble/hashes': 1.3.0 '@scure/bip32': 1.3.0 '@scure/bip39': 1.2.0 - '@wagmi/chains': 1.2.0(typescript@5.1.6) - abitype: 0.8.11(typescript@5.1.6) + '@wagmi/chains': 1.2.0(typescript@5.3.2) + abitype: 0.8.11(typescript@5.3.2) isomorphic-ws: 5.0.0(ws@8.12.0) - typescript: 5.1.6 + typescript: 5.3.2 ws: 8.12.0 transitivePeerDependencies: - bufferutil @@ -10487,6 +10451,29 @@ packages: - zod dev: false + /viem@2.5.0(typescript@5.3.2): + resolution: {integrity: sha512-ytHXIWtlgPs4mcsGxXjJrQ25v+N4dE2hBzgCU8CVv4iXNh3PRFRgyYa7igZlmxiMVzkfSHHADOtivS980JhilA==} + peerDependencies: + typescript: '>=5.0.4' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@adraffy/ens-normalize': 1.10.0 + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@scure/bip32': 1.3.2 + '@scure/bip39': 1.2.1 + abitype: 1.0.0(typescript@5.3.2) + isows: 1.0.3(ws@8.13.0) + typescript: 5.3.2 + ws: 8.13.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + dev: true + /vscode-oniguruma@1.7.0: resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} dev: true