From 8ef018cb649a919d968bfaba69d741203b62f2ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20D=C3=ADaz?= Date: Tue, 16 Apr 2024 10:49:31 -0300 Subject: [PATCH] feat: Remove unused ethereum testnet and adds polygon amoy (#184) feat: Remove unused ethereum testnet blockchains and adds polygon amoy testnet suppport --- src/contracts.ts | 78 ++++++++++++++---------------------------------- src/helpers.ts | 2 +- test/urn.spec.ts | 27 +++++++++++++++++ 3 files changed, 50 insertions(+), 57 deletions(-) diff --git a/src/contracts.ts b/src/contracts.ts index 29ed0fb..e2909a6 100644 --- a/src/contracts.ts +++ b/src/contracts.ts @@ -107,6 +107,8 @@ export = ( }, "sepolia": { "MANAToken": "0xfa04d2e2ba9aec166c93dfeeba7427b2303befa9", + "ERC20Predicate": "0x4258c75b752c812b7fa586bdeb259f2d4bd17f4f", + "RootChainManagerProxy": "0x34F5A25B627f50Bb3f5cAb72807c4D4F405a9232", "LANDRegistry": "0xe8737b4d17df2f54fff5193a225561a9ff99b11f", "LANDProxy": "0x42f4ba48791e2de32f5fbf553441c2672864bb33", "Marketplace": "0x5e1870e444e4a25333494c3cfda0609f13fd806a", @@ -186,6 +188,26 @@ export = ( "UpgradeableBeacon": "0xDDb3781Fff645325C8896AA1F067bAa381607ecc", "POI": "0xFEC09d5C192aaf7Ec7E2C89Cc8D3224138391B2E" }, + "amoy": { + "MetaTxForwarder": "0x3dd1fef020741386bf9c8d905b7e2b02a668ccda", + "MANAToken": "0x7ad72b9f944ea9793cf4055d88f81138cc2c63a0", + "CollectionImplementation": "0x3195e88ae10704b359764cb38e429d24f1c2f781", + "Rarities": "0xddb3781fff645325c8896aa1f067baa381607ecc", + "RaritiesWithOracle": "0x25b6b4bac4adb582a0abd475439da6730777fbf7", + "Committee": "0x53c9c388000b6fc91b91fb466742d0e869785c3b", + "CollectionManager ": "0x5309ae874fc4eb21adcd63f8b6c3f766cc3b1849", + "Forwarder": "0x7b1fe9de545b22cb553766817b84d655ce8121c9", + "CollectionFactoryV3": "0x802de0c509add2ee29de24de7225daaff4741c43", + "CollectionStore": "0xe36abc9ec616c83caaa386541380829106149d68", + "TPR": "0x41e07f9d48586df0ac59a09a940ffdf4af306a13", + "ChainlinkOracle": "0x7474ae33311ad160ed35c8d9cea95f0856ca782a", + "DummyDataFeed": "0xa9158e22f89bb3f69c5600338895cb5fb81e5090", + "RoyaltiesManager": "0x0cff059845c6abee7de396d00091016ad72fd324", + "MarketplaceV2": "0x0c8ad1f6aadf89d2eb19f01a100a6143108fe2b0", + "ERC721Bid": "0x4b66eab79cc03a96fb6275cfcdf23c0db431606d", + "UpgradeableBeacon": "0x1a91dd8d4eeddc2fac31f36818604b7093dc95e0", + "POI": "0x7a0fad6854de8df1245da952cd3ae7f6893154c1" + }, "mumbai": { "dAppsAdmin": "0xb919da06d5f81777B13Fc5CBd48635E19500Fbf5", "MetaTxForwarder": "0xBF6755A83C0dCDBB2933A96EA778E00b717d7004", @@ -213,62 +235,6 @@ export = ( "ERC721Bid": "0x78Dd92c8941dBC7BE54E2a9390D58aD28AD97afD", "UpgradeableBeacon": "0x0c8ad1f6aadf89d2eb19f01a100a6143108fe2b0", "POI": "0x08E5a5288D6bBa9383724C57175C03A37fe83A2A" - }, - "kovan": { - "MANAToken": "0x230fc362413d9e862326c2c7084610a5a2fdf78a", - "LANDRegistry": "0x2059291430b9aa2F79547f657816eFb816b36614", - "LANDProxy": "0x537263c440943f6a6808bCb8CcB3fe03EE838aD1", - "Marketplace": "0x6f44f195999f06aeb5872db96cdc517f1e839f13" - }, - "rinkeby": { - "MANAToken": "0x28bce5263f5d7f4eb7e8c6d5d78275ca455bac63", - "LANDProxy": "0x28bef22df3e2040a4be64a9ca0e8b5ae2b91462d", - "LANDRegistry": "0xbeea8bfb0e582be1c3fb464824e61c218ba0c1b1", - "EstateRegistry": "0x3f0b58ad7a8b27d0e5573cd1ca7d456e2f6d4884", - "Multisig": "0x0de35b8b47b129877e0efca24e294b61d7e7eee3", - "MANAMiniMeToken": "0xfb2712a1246f712b889692c7ce55fec25c06bc33", - "LANDMiniMeToken": "0x576c4577aAd561EA79acbd49215a0cC1473BfCCA", - "EstateMiniMeToken": "0x2b98C125733035cDE09d311F988845808EE270E6", - "DAOVotingPower": "0xe65835cd7c9311866ae5d260a1eb7b963899ca14", - "VestingImpl": "0x8493bb6ae17e12c062b0eb1fe780cc0b2df16bb2", - "VestingFactory": "0x64c9f713a743458ab22ec49d88dd00621f528786" - }, - "ropsten": { - "PrivateNodeWallet": "0x62ba62ff92917edf8ac0386fa10e3b27950bce8d", - "MANAToken": "0x2a8fd99c19271f4f04b1b7b9c4f7cf264b626edb", - "LANDRegistry": "0x255baf4096cb1723c00c4b4390a4b3028ecaa8ba", - "LANDProxy": "0x7a73483784ab79257bb11b96fd62a2c3ae4fb75b", - "TerraformReserve": "0x4bc79175f1f6fded07f04aa1b4b0465ecff6f1b3", - "ReturnVesting": "0x58c7e6e382c1c19c132b0361c12cbc33e2b13076", - "LegacyMarketplace": "0x80faa2b517b84a5aec1078d3600eab4c0b3aff56", - "Marketplace": "0x3d2f10c76b115db93a418ed286ca0c5abfdbf5d0", - "MarketplaceProxy": "0x5424912699dabaa5f2998750c1c66e73d67ad219", - "ServiceLocator": "0xb240b30c12d2a9ea6ba3abbf663d9ae265fbebeb", - "MortgageHelper": "0x0e4c24f71c8679b8af8e5a22aac3816e2b23f1cc", - "MortgageManager": "0x31ebb4ffd5e34acfc87ea21a0c56157188f3f0e1", - "RCNEngine": "0xbeE217bfe06C6FAaa2d5f2e06eBB84C5fb70d9bF", - "RCNToken": "0x2f45b6fb2f28a73f110400386da31044b2e953d4", - "KyberOracle": "0x4931d0621360187199de494a1469165079b31bfc", - "DecentralandInvite": "0x7557dfa02f3bd7d274851e3f627de2ed2ff390e8", - "EstateRegistry": "0x60e315992d5e62457215dd1e6a49d1ceb7983dfc", - "EstateProxy": "0x124bf28a423b2ca80b3846c3aa0eb944fe7ebb95", - "ERC721Bid": "0x250fa138c0a994799c7a49df3097dc71e37b3d6f", - "BidMANABurner": "0x01f43c3133b83086d4776027fbd152fa8a685fb4", - "AvatarNameRegistry": "0xd127F8d9C736d91Acdee34645e0b4C9db7178160", - "AvatarNameRegistryProxy": "0x2d794a7c956624fb93Eb3ff6E48D5b5d6dBA127b", - "ExclusiveMasksCollection": "0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0", - "DCLRegistrar": "0xeb6f5d94d79f0750781cc962908b161b95192f53", - "DCLController": "0xd4e92f6ea18412dbae8b2d2b69e498a2d1064fa2", - "Catalyst": "0xadd085f2318e9678bbb18b3e0711328f902b374b", - "BuyAdapter": "0xd1e4e2880ff56cd0d5c68da9bed58bfbf0150948", - "AdapterFeeCollector": "0x5DC888024cB599CfDdb9E6483ED6bAe1fA9e9D18", - "AdapterConverter": "0x2782eb28Dcb1eF4E7632273cd4e347e130Ce4646", - "POIAllowlist": "0x5DC4a5C214f2161F0D5595a6dDd9352409aE3Ab4", - "NAMEDenylist": "0x20c6f1e86eba703a14414a0cbc1b55c89dba7a0f", - "CollectionsV2Factory": "0x16d8bac5b67a6b782a9081377bec413bc5bb56a6", - "VestingImpl": "0xc243b243a2033348730420ea55239767802a19d0", - "VestingFactory": "0xcbfa36f59246ae43cb827a77f6ca955b93dd6042", - "BatchVesting": "0xedbea1174b892f88a836f61de395f5f155d4d2a9" } } ) as Record> diff --git a/src/helpers.ts b/src/helpers.ts index 1c6b975..ece8b1f 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -9,7 +9,7 @@ const collections: Collection[] = [] const lowerCasedContracts: Record> = {} -const validNetworks = new Set(['ethereum', 'kovan', 'rinkeby', 'goerli', 'sepolia', 'matic', 'mumbai']) +const validNetworks = new Set(['ethereum', 'goerli', 'sepolia', 'matic', 'mumbai', 'amoy']) for (const network in contracts) { lowerCasedContracts[network] = Object.create(null) diff --git a/test/urn.spec.ts b/test/urn.spec.ts index 4b05d08..977cdf6 100644 --- a/test/urn.spec.ts +++ b/test/urn.spec.ts @@ -299,6 +299,33 @@ describe('Basic use cases', function () { type: 'blockchain-collection-third-party-name' }) + testValidUrnToInclude('urn:decentraland:amoy:collections-thirdparty:aThirdParty:summerCollection:hat', { + contractAddress: '0x41e07f9d48586df0ac59a09a940ffdf4af306a13', + collectionId: 'summerCollection', + itemId: 'hat', + blockchain: 'ethereum', + thirdPartyName: 'aThirdParty', + network: 'amoy', + type: 'blockchain-collection-third-party' + }) + + testValidUrnToInclude('urn:decentraland:amoy:collections-thirdparty:aThirdParty:winterCollection', { + contractAddress: '0x41e07f9d48586df0ac59a09a940ffdf4af306a13', + collectionId: 'winterCollection', + blockchain: 'ethereum', + thirdPartyName: 'aThirdParty', + network: 'amoy', + type: 'blockchain-collection-third-party-collection' + }) + + testValidUrnToInclude('urn:decentraland:amoy:collections-thirdparty:aThirdParty', { + contractAddress: '0x41e07f9d48586df0ac59a09a940ffdf4af306a13', + blockchain: 'ethereum', + thirdPartyName: 'aThirdParty', + network: 'amoy', + type: 'blockchain-collection-third-party-name' + }) + // TODO: Add this when matic has the contract for TPW too // testValidUrnToInclude("urn:decentraland:matic:collections-thirdparty:aThirdParty:summerCollection:hat", { // contractAddress: "0xC6349360CF0143Bf54FDC376060532C044883b8C",