diff --git a/README.md b/README.md index 0122e89..ea2b546 100644 --- a/README.md +++ b/README.md @@ -10,22 +10,23 @@ npm i @dcl/urn-resolver import { parseUrn } from '@dcl/urn-resolver' const parsed = await parseUrn("urn:decentraland:sepolia:LAND:-10,-13?atBlock=151231111") -=> { - uri: URL { - href: 'urn:decentraland:sepolia:LAND:-10,-13?atBlock=151231111', - protocol: 'urn:', - pathname: 'decentraland:sepolia:LAND:-10,-13', - search: '?atBlock=151231111', - searchParams: URLSearchParams { 'atBlock' => '151231111' }, - }, - blockchain: 'ethereum', - type: 'blockchain-asset', - network: 'sepolia', - contractAddress: '0x7a73483784ab79257bb11b96fd62a2c3ae4fb75b', - id: '0xfffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffff3', - x: -10, - y: -13 -} +// returns +// { +// uri: URL { +// href: 'urn:decentraland:sepolia:LAND:-10,-13?atBlock=151231111', +// protocol: 'urn:', +// pathname: 'decentraland:sepolia:LAND:-10,-13', +// search: '?atBlock=151231111', +// searchParams: URLSearchParams { 'atBlock' => '151231111' }, +// }, +// blockchain: 'ethereum', +// type: 'blockchain-asset', +// network: 'sepolia', +// contractAddress: '0x7a73483784ab79257bb11b96fd62a2c3ae4fb75b', +// id: '0xfffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffff3', +// x: -10, +// y: -13 +// } ``` # Registered routes @@ -39,9 +40,10 @@ const parsed = await parseUrn("urn:decentraland:sepolia:LAND:-10,-13?atBlock=151 - `decentraland:{network}:collections-v2:{contract(0x[a-fA-F0-9]+)}:{id}:{tokenId}`: Resolve an ethereum wearable item from collections v2 by contract address and token id - `decentraland:{network}:LAND:{x},{y}`: Resolves the ethereum asset of a LAND position. - `decentraland:{network}:LAND:{tokenId}`: Resolves the ethereum asset of a LAND by tokenId. -- `decentraland:{network}:collections-thirdparty:{thirdPartyName}:{collectionId}:{itemId}`: Resolves the ethereum asset of an item of a third party collection, currently only supported on polygon +- `decentraland:{network}:collections-thirdparty:{thirdPartyName}`: Resolves the ethereum asset of a third party provider, currently only supported on polygon - `decentraland:{network}:collections-thirdparty:{thirdPartyName}:{collectionId}`: Resolves the ethereum asset of a third party collection, currently only supported on polygon -- `decentraland:{network}:collections-thirdparty:{thirdPartyName}`: Resolves the ethereum asset of all collections from a third party, currently only supported on polygon +- `decentraland:{network}:collections-thirdparty:{thirdPartyName}:{collectionId}:{itemId}`: Resolves the ethereum asset of a third party collection asset, currently only supported on polygon +- `decentraland:{network}:collections-thirdparty:{thirdPartyName}:{collectionId}:{itemId}:{nftChain}:{nftContractAddress(0x[a-fA-F0-9]+)}:{nftTokenId([0-9]+)}`: Resolves the ethereum asset of a third party collection item, currently only supported on polygon # DecentralandAssetIdentifier @@ -53,14 +55,15 @@ It is an union type defined in the file [src/types.ts](src/types.ts), in that fi You will need to install `jq`. If you are using MacOS you can install it by running: `brew install jq`. -The lib is being [built with node 14.x](.github/workflows/ci.yml). +The lib is being [built with node 18.x](.github/workflows/build-and-publish.yml). ```bash -make build +yarn +yarn build ``` ## Test ```bash -make test +yarn test ``` diff --git a/src/contracts.ts b/src/contracts.ts index 1ee0baf..69ce30b 100644 --- a/src/contracts.ts +++ b/src/contracts.ts @@ -132,35 +132,7 @@ export = ( "Catalyst": "0x9b5091588a4bae0a5ea54a35af3c31f57a68ed37", "POIAllowlist": "0xff7fcdbeaf0a5f2c408564036a9afaef9f38182d" }, - "goerli": { - "MANAToken": "0xe7fDae84ACaba2A5Ba817B6E6D8A2d415DBFEdbe", - "ERC20Predicate": "0xdD6596F2029e6233DEFfaCa316e6A95217d4Dc34", - "RootChainManagerProxy": "0xbbd7cbfa79faee899eaf900f13c9065bf03b1a74", - "RootChainProxy": "0x2890ba17efe978480615e330ecb65333b880928e", - "LANDRegistry": "0x0cfF059845c6Abee7De396d00091016ad72FD324", - "LANDProxy": "0x25b6B4bac4aDB582a0ABd475439dA6730777Fbf7", - "EstateRegistry": "0x5309aE874FC4eB21adCd63f8b6C3f766Cc3B1849", - "EstateProxy": "0xC9A46712E6913c24d15b46fF12221a79c4e251DC", - "RentalsProxyAdmin": "0xa924cbea79a031baa05d76908644d5c5bedeaaed", - "RentalsProxy": "0x92159c78f0f4523b9c60382bb888f30f10a46b3b", - "RentalsImplementation": "0x619cf59b03a4e0c42850429e154ff7fd1d966b3c", - "MarketplaceProxy": "0x5d01fbD3E22892be40F69bdAE7Ad921C8cdA2085", - "MarketplaceImplementation": "0x09B389B3523870798f46555fef26B4476A973E6E", - "MarketplaceLegacyNFT": "0x0fFc7E6D72eE2F287B877533454210621b1B7822", - "DCLRegistrar": "0x6b8da2752827cf926215b43bb8E46Fd7b9dDac35", - "DCLController": "0x6fF05B6271BBEd8F16a46e6073d27aD94224E0Ac", - "DCLControllerV2": "0xe23b047c8ee33d0c423676544bca6d2c9d3faa49", - "ERC721Bid": "0xd7dC1C183B8fFaED6b7f30fFC616Ff81B66812e5", - "ExclusiveMasksCollection": "0x1f0880E0b4514DC58e68B9BE91693bFA8C067ac1", - "NAMEDenylist": "0x71c84760df0537f7db286274817462dc2e6c1366", - "Catalyst": "0x380e46851c47b73b6aa9bea50cf3b50e2cf637cf", - "POIAllowlist": "0xb8c7a7afd42675ab61f0a3732f8d0491825a933b", - "VestingImpl": "0xa1c496c3beca1832a8434ac77ee3a1a53881c12e", - "PeriodicTokenVestingImpl": "0x3b2149a7573e2b0dd157307d427b9380f8f1b2a1", - "VestingFactory": "0x11a970e744ff69db8f461c2d0fc91d4293914301", - "BatchVestings": "0x651440486194aeca2cfff6e344bd604dda8a2d7f" - }, - "matic": { + "matic": { "MetaTxForwarder": "0x0baBda04f62C549A09EF3313Fe187f29c099FF3C", "MANAToken": "0xA1c57f48F0Deb89f569dFbE6E2B7f46D33606fD4", "ChildChainManagerProxy": "0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa", @@ -207,6 +179,37 @@ export = ( "UpgradeableBeacon": "0x1a91dd8d4eeddc2fac31f36818604b7093dc95e0", "POI": "0x7a0fad6854de8df1245da952cd3ae7f6893154c1" }, + "arbitrum": { + "GRTMultisig": "0x9be99A553C598898Ff4718e6b1A25Cc37e398943" + }, + "goerli": { + "MANAToken": "0xe7fDae84ACaba2A5Ba817B6E6D8A2d415DBFEdbe", + "ERC20Predicate": "0xdD6596F2029e6233DEFfaCa316e6A95217d4Dc34", + "RootChainManagerProxy": "0xbbd7cbfa79faee899eaf900f13c9065bf03b1a74", + "RootChainProxy": "0x2890ba17efe978480615e330ecb65333b880928e", + "LANDRegistry": "0x0cfF059845c6Abee7De396d00091016ad72FD324", + "LANDProxy": "0x25b6B4bac4aDB582a0ABd475439dA6730777Fbf7", + "EstateRegistry": "0x5309aE874FC4eB21adCd63f8b6C3f766Cc3B1849", + "EstateProxy": "0xC9A46712E6913c24d15b46fF12221a79c4e251DC", + "RentalsProxyAdmin": "0xa924cbea79a031baa05d76908644d5c5bedeaaed", + "RentalsProxy": "0x92159c78f0f4523b9c60382bb888f30f10a46b3b", + "RentalsImplementation": "0x619cf59b03a4e0c42850429e154ff7fd1d966b3c", + "MarketplaceProxy": "0x5d01fbD3E22892be40F69bdAE7Ad921C8cdA2085", + "MarketplaceImplementation": "0x09B389B3523870798f46555fef26B4476A973E6E", + "MarketplaceLegacyNFT": "0x0fFc7E6D72eE2F287B877533454210621b1B7822", + "DCLRegistrar": "0x6b8da2752827cf926215b43bb8E46Fd7b9dDac35", + "DCLController": "0x6fF05B6271BBEd8F16a46e6073d27aD94224E0Ac", + "DCLControllerV2": "0xe23b047c8ee33d0c423676544bca6d2c9d3faa49", + "ERC721Bid": "0xd7dC1C183B8fFaED6b7f30fFC616Ff81B66812e5", + "ExclusiveMasksCollection": "0x1f0880E0b4514DC58e68B9BE91693bFA8C067ac1", + "NAMEDenylist": "0x71c84760df0537f7db286274817462dc2e6c1366", + "Catalyst": "0x380e46851c47b73b6aa9bea50cf3b50e2cf637cf", + "POIAllowlist": "0xb8c7a7afd42675ab61f0a3732f8d0491825a933b", + "VestingImpl": "0xa1c496c3beca1832a8434ac77ee3a1a53881c12e", + "PeriodicTokenVestingImpl": "0x3b2149a7573e2b0dd157307d427b9380f8f1b2a1", + "VestingFactory": "0x11a970e744ff69db8f461c2d0fc91d4293914301", + "BatchVestings": "0x651440486194aeca2cfff6e344bd604dda8a2d7f" + }, "mumbai": { "dAppsAdmin": "0xb919da06d5f81777B13Fc5CBd48635E19500Fbf5", "MetaTxForwarder": "0xBF6755A83C0dCDBB2933A96EA778E00b717d7004", diff --git a/src/resolvers.ts b/src/resolvers.ts index 7cf976e..6e55055 100644 --- a/src/resolvers.ts +++ b/src/resolvers.ts @@ -2,23 +2,20 @@ import { createParser, getCollection, getContract, isValidNetwork, RouteMap } fr import { LandUtils } from './land-utils' import { BlockchainAsset, - OffChainAsset, - BlockchainCollectionV1Asset, - BlockchainCollectionV2Asset, - BlockchainLandAsset, - DecentralandAssetIdentifier, - BlockchainCollectionV1, - BlockchainCollectionV2, BlockchainCollectionThirdParty, BlockchainCollectionThirdPartyCollection, + BlockchainCollectionThirdPartyItem, BlockchainCollectionThirdPartyName, - EntityV3Asset, + BlockchainCollectionV1, + BlockchainCollectionV1Asset, BlockchainCollectionV1Item, + BlockchainCollectionV2, + BlockchainCollectionV2Asset, BlockchainCollectionV2Item, - BlockchainCollectionLinkedWearablesProvider, - BlockchainCollectionLinkedWearablesCollection, - BlockchainCollectionLinkedWearablesAsset, - BlockchainCollectionLinkedWearablesItem + BlockchainLandAsset, + DecentralandAssetIdentifier, + EntityV3Asset, + OffChainAsset } from './types' /** @@ -58,25 +55,15 @@ export const resolvers: RouteMap = { // resolve LAND by position 'decentraland:{network}:LAND:{position}': resolveLandAsset, - // resolve third party names - 'decentraland:{network}:collections-thirdparty:{thirdPartyName}': resolveThirdPartyCollectionName, + // resolve third party provider + 'decentraland:{network}:collections-thirdparty:{thirdPartyName}': resolveThirdPartyProvider, // resolve third party collections - 'decentraland:{network}:collections-thirdparty:{thirdPartyName}:{collectionId}': - resolveThirdPartyCollectionOnlyCollection, + 'decentraland:{network}:collections-thirdparty:{thirdPartyName}:{collectionId}': resolveThirdPartyCollection, // resolve third party assets - 'decentraland:{network}:collections-thirdparty:{thirdPartyName}:{collectionId}:{itemId}': resolveThirdPartyCollection, - - // resolve linked wearable provider names - 'decentraland:{network}:collections-linked-wearables:{linkedWearableProvider}': resolveLinkedWearableProvider, - // resolve linked wearable collections - 'decentraland:{network}:collections-linked-wearables:{linkedWearableProvider}:{contractAddressChain}:{collectionId(0x[a-fA-F0-9]+)}': - resolveLinkedWearableCollection, - // resolve linked wearable assets - 'decentraland:{network}:collections-linked-wearables:{linkedWearableProvider}:{contractAddressChain}:{collectionId(0x[a-fA-F0-9]+)}:{itemId}': - resolveLinkedWearableAsset, - // resolve linked wearable items - 'decentraland:{network}:collections-linked-wearables:{linkedWearableProvider}:{contractAddressChain}:{collectionId(0x[a-fA-F0-9]+)}:{itemId}:{tokenId([0-9]+)}': - resolveLinkedWearableItem, + 'decentraland:{network}:collections-thirdparty:{thirdPartyName}:{collectionId}:{itemId}': resolveThirdPartyAsset, + // resolve third party items + 'decentraland:{network}:collections-thirdparty:{thirdPartyName}:{collectionId}:{itemId}:{nftChain}:{nftContractAddress(0x[a-fA-F0-9]+)}:{nftTokenId([0-9]+)}': + resolveThirdPartyItem, // resolve 721 assets 'decentraland:{network}:erc721:{contract(0x[a-fA-F0-9]+)}:{tokenId}': resolveErc721Asset @@ -455,34 +442,7 @@ export async function resolveCollectionV2( return result } - -export async function resolveThirdPartyCollection( - uri: URL, - groups: Record<'network' | 'thirdPartyName' | 'collectionId' | 'itemId', string> -): Promise { - let result: BlockchainCollectionThirdParty | undefined = undefined - if (!isValidNetwork(groups.network)) return - - const contract = await getContract(groups.network, 'TPR') - - if (contract) { - result = { - namespace: 'decentraland', - uri, - blockchain: 'ethereum', - type: 'blockchain-collection-third-party', - network: groups.network === 'ethereum' ? 'mainnet' : groups.network.toLowerCase(), - thirdPartyName: groups.thirdPartyName, - collectionId: groups.collectionId, - itemId: groups.itemId, - contractAddress: contract - } - } - - return result -} - -export async function resolveThirdPartyCollectionName( +export async function resolveThirdPartyProvider( uri: URL, groups: Record<'network' | 'thirdPartyName', string> ): Promise { @@ -498,15 +458,15 @@ export async function resolveThirdPartyCollectionName( blockchain: 'ethereum', type: 'blockchain-collection-third-party-name', network: groups.network === 'ethereum' ? 'mainnet' : groups.network.toLowerCase(), - thirdPartyName: groups.thirdPartyName, - contractAddress: contract + contractAddress: contract, + thirdPartyName: groups.thirdPartyName } } return result } -export async function resolveThirdPartyCollectionOnlyCollection( +export async function resolveThirdPartyCollection( uri: URL, groups: Record<'network' | 'thirdPartyName' | 'collectionId', string> ): Promise { @@ -522,70 +482,20 @@ export async function resolveThirdPartyCollectionOnlyCollection( blockchain: 'ethereum', type: 'blockchain-collection-third-party-collection', network: groups.network === 'ethereum' ? 'mainnet' : groups.network.toLowerCase(), - thirdPartyName: groups.thirdPartyName, - collectionId: groups.collectionId, - contractAddress: contract - } - } - - return result -} - -export async function resolveLinkedWearableProvider( - uri: URL, - groups: Record<'network' | 'linkedWearableProvider', string> -): Promise { - let result: BlockchainCollectionLinkedWearablesProvider | undefined = undefined - if (!isValidNetwork(groups.network)) return - - const contract = await getContract(groups.network, 'TPR') - - if (contract) { - result = { - namespace: 'decentraland', - uri, - blockchain: 'ethereum', - type: 'blockchain-collection-linked-wearables-provider', - network: groups.network === 'ethereum' ? 'mainnet' : groups.network.toLowerCase(), - linkedWearableProvider: groups.linkedWearableProvider, - contractAddress: contract - } - } - - return result -} - -export async function resolveLinkedWearableCollection( - uri: URL, - groups: Record<'network' | 'linkedWearableProvider' | 'contractAddressChain' | 'collectionId', string> -): Promise { - let result: BlockchainCollectionLinkedWearablesCollection | undefined = undefined - if (!isValidNetwork(groups.network)) return - - const contract = await getContract(groups.network, 'TPR') - - if (contract) { - result = { - namespace: 'decentraland', - uri, - blockchain: 'ethereum', - type: 'blockchain-collection-linked-wearables-collection', contractAddress: contract, - network: groups.network === 'ethereum' ? 'mainnet' : groups.network.toLowerCase(), - linkedWearableProvider: groups.linkedWearableProvider, - linkedWearableContractAddressChain: groups.contractAddressChain, - linkedWearableContractAddress: groups.collectionId + thirdPartyName: groups.thirdPartyName, + collectionId: groups.collectionId } } return result } -export async function resolveLinkedWearableAsset( +export async function resolveThirdPartyAsset( uri: URL, - groups: Record<'network' | 'linkedWearableProvider' | 'contractAddressChain' | 'collectionId' | 'itemId', string> -): Promise { - let result: BlockchainCollectionLinkedWearablesAsset | undefined = undefined + groups: Record<'network' | 'thirdPartyName' | 'collectionId' | 'itemId', string> +): Promise { + let result: BlockchainCollectionThirdParty | undefined = undefined if (!isValidNetwork(groups.network)) return const contract = await getContract(groups.network, 'TPR') @@ -595,29 +505,29 @@ export async function resolveLinkedWearableAsset( namespace: 'decentraland', uri, blockchain: 'ethereum', - type: 'blockchain-collection-linked-wearables-asset', + type: 'blockchain-collection-third-party', network: groups.network === 'ethereum' ? 'mainnet' : groups.network.toLowerCase(), contractAddress: contract, - linkedWearableProvider: groups.linkedWearableProvider, - linkedWearableContractAddressChain: groups.contractAddressChain, - linkedWearableContractAddress: groups.collectionId, - id: groups.itemId + thirdPartyName: groups.thirdPartyName, + collectionId: groups.collectionId, + itemId: groups.itemId } } return result } -export async function resolveLinkedWearableItem( +export async function resolveThirdPartyItem( uri: URL, groups: Record< - 'network' | 'linkedWearableProvider' | 'contractAddressChain' | 'collectionId' | 'itemId' | 'tokenId', + 'network' | 'thirdPartyName' | 'collectionId' | 'itemId' | 'nftChain' | 'nftContractAddress' | 'nftTokenId', string > -): Promise { - let result: BlockchainCollectionLinkedWearablesItem | undefined = undefined - if (!isValidNetwork(groups.network)) return - +): Promise { + let result: BlockchainCollectionThirdPartyItem | undefined = undefined + if (!isValidNetwork(groups.network)) { + return undefined + } const contract = await getContract(groups.network, 'TPR') if (contract) { @@ -625,14 +535,16 @@ export async function resolveLinkedWearableItem( namespace: 'decentraland', uri, blockchain: 'ethereum', - type: 'blockchain-collection-linked-wearables-item', + type: 'blockchain-collection-third-party-item', network: groups.network === 'ethereum' ? 'mainnet' : groups.network.toLowerCase(), contractAddress: contract, - linkedWearableProvider: groups.linkedWearableProvider, - linkedWearableContractAddressChain: groups.contractAddressChain, - linkedWearableContractAddress: groups.collectionId, - id: groups.itemId, - tokenId: groups.tokenId + + thirdPartyName: groups.thirdPartyName, + collectionId: groups.collectionId, + itemId: groups.itemId, + nftChain: groups.nftChain, + nftContractAddress: groups.nftContractAddress, + nftTokenId: groups.nftTokenId } } diff --git a/src/types.ts b/src/types.ts index 3d8b857..f180c46 100644 --- a/src/types.ts +++ b/src/types.ts @@ -148,75 +148,44 @@ export type BlockchainCollectionThirdParty = BaseBlockchainAsset & { /** * @public */ -export type BlockchainCollectionThirdPartyCollection = BaseBlockchainAsset & { - namespace: 'decentraland' - type: 'blockchain-collection-third-party-collection' - - thirdPartyName: string - collectionId: string -} - -/** - * @public - */ -export type BlockchainCollectionThirdPartyName = BaseBlockchainAsset & { - namespace: 'decentraland' - type: 'blockchain-collection-third-party-name' - - thirdPartyName: string -} - -/** - * @alpha - */ -export type BlockchainCollectionLinkedWearablesProvider = BaseBlockchainAsset & { - namespace: 'decentraland' - type: 'blockchain-collection-linked-wearables-provider' +export type BlockchainCollectionThirdPartyItem = Omit & { + type: 'blockchain-collection-third-party-item' /** - * Third Linked Wearable Provider (as defined in the TPR smart contract: thirdPartyName) + * The blockchain where the linked wearable contract is deployed */ - linkedWearableProvider: string -} - -/** - * @alpha - */ -export type BlockchainCollectionLinkedWearablesCollection = Omit< - BlockchainCollectionLinkedWearablesProvider, - 'type' -> & { - namespace: 'decentraland' - type: 'blockchain-collection-linked-wearables-collection' + nftChain: string /** - * The blockchain where the contract is deployed + * Contract address of the linked wearable collection */ - linkedWearableContractAddressChain: string + nftContractAddress: string + /** - * Contract address of the collection + * Token ID of the item in the linked wearable collection */ - linkedWearableContractAddress: string + nftTokenId: string } /** - * @alpha + * @public */ -export type BlockchainCollectionLinkedWearablesAsset = Omit & { +export type BlockchainCollectionThirdPartyCollection = BaseBlockchainAsset & { namespace: 'decentraland' - type: 'blockchain-collection-linked-wearables-asset' + type: 'blockchain-collection-third-party-collection' - id: string + thirdPartyName: string + collectionId: string } /** - * @alpha + * @public */ -export type BlockchainCollectionLinkedWearablesItem = Omit & { +export type BlockchainCollectionThirdPartyName = BaseBlockchainAsset & { namespace: 'decentraland' - type: 'blockchain-collection-linked-wearables-item' + type: 'blockchain-collection-third-party-name' - tokenId: string + thirdPartyName: string } /** @@ -270,7 +239,4 @@ export type DecentralandAssetIdentifier = | BlockchainCollectionThirdPartyName | BlockchainCollectionThirdPartyCollection | BlockchainCollectionThirdParty - | BlockchainCollectionLinkedWearablesProvider - | BlockchainCollectionLinkedWearablesCollection - | BlockchainCollectionLinkedWearablesAsset - | BlockchainCollectionLinkedWearablesItem + | BlockchainCollectionThirdPartyItem diff --git a/test/parse-urn.spec.ts b/test/parse-urn.spec.ts index 0233b8b..e09dca5 100644 --- a/test/parse-urn.spec.ts +++ b/test/parse-urn.spec.ts @@ -1,9 +1,9 @@ import { RFC2141 } from 'urn-lib' import { - BlockchainCollectionLinkedWearablesAsset, - BlockchainCollectionLinkedWearablesCollection, - BlockchainCollectionLinkedWearablesItem, - BlockchainCollectionLinkedWearablesProvider, + BlockchainCollectionThirdParty, + BlockchainCollectionThirdPartyCollection, + BlockchainCollectionThirdPartyItem, + BlockchainCollectionThirdPartyName, DecentralandAssetIdentifier, parseUrn } from '../src' @@ -444,55 +444,50 @@ describe('Tests for parseUrn function', function () { const testCases: DecentralandAssetIdentifier[] = [ { namespace: 'decentraland', - uri: new URL('urn:decentraland:matic:collections-linked-wearables:aThirdParty'), + uri: new URL('urn:decentraland:amoy:collections-thirdparty:aThirdParty'), blockchain: 'ethereum', - network: 'matic', - contractAddress: '0x1f8063CC04398Be214a7d8dD25B6b6e2b870d99e', - type: 'blockchain-collection-linked-wearables-provider', - linkedWearableProvider: 'aThirdParty' - } as BlockchainCollectionLinkedWearablesProvider, + network: 'amoy', + contractAddress: '0x41e07f9d48586df0ac59a09a940ffdf4af306a13', + type: 'blockchain-collection-third-party-name', + thirdPartyName: 'aThirdParty' + } as BlockchainCollectionThirdPartyName, { namespace: 'decentraland', - uri: new URL( - 'urn:decentraland:matic:collections-linked-wearables:aThirdParty:mainnet:0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d' - ), + uri: new URL('urn:decentraland:amoy:collections-thirdparty:aThirdParty:summerCollection'), blockchain: 'ethereum', - network: 'matic', - contractAddress: '0x1f8063CC04398Be214a7d8dD25B6b6e2b870d99e', - type: 'blockchain-collection-linked-wearables-collection', - linkedWearableProvider: 'aThirdParty', - linkedWearableContractAddressChain: 'mainnet', - linkedWearableContractAddress: '0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d' - } as BlockchainCollectionLinkedWearablesCollection, + network: 'amoy', + contractAddress: '0x41e07f9d48586df0ac59a09a940ffdf4af306a13', + type: 'blockchain-collection-third-party-collection', + thirdPartyName: 'aThirdParty', + collectionId: 'summerCollection' + } as BlockchainCollectionThirdPartyCollection, { namespace: 'decentraland', - uri: new URL( - 'urn:decentraland:matic:collections-linked-wearables:aThirdParty:mainnet:0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d:some_asset_id' - ), + uri: new URL('urn:decentraland:amoy:collections-thirdparty:aThirdParty:summerCollection:hat'), blockchain: 'ethereum', - network: 'matic', - contractAddress: '0x1f8063CC04398Be214a7d8dD25B6b6e2b870d99e', - type: 'blockchain-collection-linked-wearables-asset', - linkedWearableProvider: 'aThirdParty', - linkedWearableContractAddressChain: 'mainnet', - linkedWearableContractAddress: '0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d', - id: 'some_asset_id' - } as BlockchainCollectionLinkedWearablesAsset, + network: 'amoy', + contractAddress: '0x41e07f9d48586df0ac59a09a940ffdf4af306a13', + type: 'blockchain-collection-third-party', + thirdPartyName: 'aThirdParty', + collectionId: 'summerCollection', + itemId: 'hat' + } as BlockchainCollectionThirdParty, { namespace: 'decentraland', uri: new URL( - 'urn:decentraland:matic:collections-linked-wearables:aThirdParty:mainnet:0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d:some_asset_id:123456789' + 'urn:decentraland:amoy:collections-thirdparty:aThirdParty:summerCollection:hat:sepolia:0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d:123456789' ), blockchain: 'ethereum', - network: 'matic', - contractAddress: '0x1f8063CC04398Be214a7d8dD25B6b6e2b870d99e', - type: 'blockchain-collection-linked-wearables-item', - linkedWearableProvider: 'aThirdParty', - linkedWearableContractAddressChain: 'mainnet', - linkedWearableContractAddress: '0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d', - id: 'some_asset_id', - tokenId: '123456789' - } as BlockchainCollectionLinkedWearablesItem + network: 'amoy', + contractAddress: '0x41e07f9d48586df0ac59a09a940ffdf4af306a13', + type: 'blockchain-collection-third-party-item', + thirdPartyName: 'aThirdParty', + collectionId: 'summerCollection', + itemId: 'hat', + nftChain: 'sepolia', + nftContractAddress: '0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d', + nftTokenId: '123456789' + } as BlockchainCollectionThirdPartyItem ] const cases: [string, DecentralandAssetIdentifier][] = testCases.map((asset: DecentralandAssetIdentifier) => [