From f96f9f765d42bb57f319c1825f0ce0848847de57 Mon Sep 17 00:00:00 2001 From: Ignacio Mazzara Date: Mon, 8 Feb 2021 11:34:28 -0300 Subject: [PATCH] Feat: add more wearables (#252) * feat: add new collections * feat: add collection to webapp --- indexer/src/data/.addresses.ts | 4 + indexer/src/data/wearables/atari_launch.ts | 85 +++++++++++++++++++ indexer/src/data/wearables/index.ts | 2 + indexer/src/data/wearables/ml_liondance.ts | 37 ++++++++ indexer/src/handlers/parcel.ts | 4 + indexer/src/modules/category/index.ts | 4 +- indexer/src/modules/wearable/index.ts | 2 + .../vendor/decentraland/ContractService.ts | 12 +++ 8 files changed, 149 insertions(+), 1 deletion(-) create mode 100644 indexer/src/data/wearables/atari_launch.ts create mode 100644 indexer/src/data/wearables/ml_liondance.ts diff --git a/indexer/src/data/.addresses.ts b/indexer/src/data/.addresses.ts index a310f75e36..fd50e6d2eb 100644 --- a/indexer/src/data/.addresses.ts +++ b/indexer/src/data/.addresses.ts @@ -7,6 +7,7 @@ export const Marketplace = '{{address:Marketplace}}' export const DCLRegistrar = '{{address:DCLRegistrar}}' +export const AtariLaunch = '{{address:AtariLaunch}}' export const BinanceUsCollection = '{{address:BinanceUsCollection}}' export const ChinaFlying = '{{address:ChinaFlying}}' export const CommunityContestCollection = @@ -30,6 +31,7 @@ export const Halloween2020Collection = '{{address:Halloween2020Collection}}' export const MCHCollection = '{{address:MCHCollection}}' export const MemeDontBuyThis = '{{address:MemeDontBuyThis}}' export const MFSammichgamer = '{{address:MFSammichgamer}}' +export const MLLiondance = '{{address:MLLiondance}}' export const MLPekingopera = '{{address:MLPekingopera}}' export const Moonshot2020Collection = '{{address:Moonshot2020Collection}}' export const PMDreamverseEminence = '{{address:PMDreamverseEminence}}' @@ -47,3 +49,5 @@ export const WZWonderbot = '{{address:WZWonderbot}}' export const Xmas2019Collection = '{{address:Xmas2019Collection}}' export const Xmas2020Collection = '{{address:Xmas2020Collection}}' export const XmashUp2020 = '{{address:XmashUp2020}}' + + diff --git a/indexer/src/data/wearables/atari_launch.ts b/indexer/src/data/wearables/atari_launch.ts new file mode 100644 index 0000000000..3b2c22f876 --- /dev/null +++ b/indexer/src/data/wearables/atari_launch.ts @@ -0,0 +1,85 @@ +import { Wearable } from './Wearable' + +export let atari_launch: Wearable[] = [ + new Wearable( + 'atari_blue_hat', + 'Blue Atari Cap', + "Atari's signature logo on a blue cap.", + 'hat', + 'epic', + ['BaseMale', 'BaseFemale'] + ), + new Wearable( + 'atari_green_hat', + 'Green Atari Cap', + "Atari's signature logo on a green cap.", + 'hat', + 'epic', + ['BaseMale', 'BaseFemale'] + ), + new Wearable( + 'atari_orange_hat', + 'Orange Atari Cap', + "Atari's signature logo on an orange cap.", + 'hat', + 'epic', + ['BaseMale', 'BaseFemale'] + ), + new Wearable( + 'atari_purple_hat', + 'Purple Atari Cap', + "Atari's signature logo on a purple cap.", + 'hat', + 'epic', + ['BaseMale', 'BaseFemale'] + ), + new Wearable( + 'atari_red_hat', + 'Red Atari Cap', + "Atari's signature logo on a red cap.", + 'hat', + 'epic', + ['BaseMale', 'BaseFemale'] + ), + new Wearable( + 'atari_blue_upper_body', + 'Blue Atari Tee', + "Atari's signature logo on a blue tee.", + 'upper_body', + 'epic', + ['BaseMale', 'BaseFemale'] + ), + new Wearable( + 'atari_green_upper_body', + 'Green Atari Tee', + "Atari's signature logo on a green tee.", + 'upper_body', + 'epic', + ['BaseMale', 'BaseFemale'] + ), + new Wearable( + 'atari_orange_upper_body', + 'Orange Atari Tee', + "Atari's signature logo on an orange tee.", + 'upper_body', + 'epic', + ['BaseMale', 'BaseFemale'] + ), + new Wearable( + 'atari_purple_upper_body', + 'Purple Atari Tee', + "Atari's signature logo on a purple tee.", + 'upper_body', + 'epic', + ['BaseMale', 'BaseFemale'] + ), + new Wearable( + 'atari_red_upper_body', + 'Red Atari Tee', + "Atari's signature logo on a red tee.", + 'upper_body', + 'epic', + ['BaseMale', 'BaseFemale'] + ) +] + diff --git a/indexer/src/data/wearables/index.ts b/indexer/src/data/wearables/index.ts index 0ea4aaeb3e..e82b2d9589 100644 --- a/indexer/src/data/wearables/index.ts +++ b/indexer/src/data/wearables/index.ts @@ -1,5 +1,6 @@ export * from './Wearable' +export * from './atari_launch' export * from './binance_us_collection' export * from './china_flying' export * from './community_contest' @@ -21,6 +22,7 @@ export * from './halloween_2020' export * from './mch_collection' export * from './meme_dontbuythis' export * from './mf_sammichgamer' +export * from './ml_liondance' export * from './ml_pekingopera' export * from './moonshot_2020' export * from './pm_dreamverse_eminence' diff --git a/indexer/src/data/wearables/ml_liondance.ts b/indexer/src/data/wearables/ml_liondance.ts new file mode 100644 index 0000000000..f11e8cf45d --- /dev/null +++ b/indexer/src/data/wearables/ml_liondance.ts @@ -0,0 +1,37 @@ +import { Wearable } from './Wearable' + +export let ml_liondance: Wearable[] = [ + new Wearable( + 'lion_dance_feet', + 'Lion Dance Shoes', + 'Dragon City 2021 Spring Festival Souvenirs', + 'feet', + 'epic', + ['BaseMale', 'BaseFemale'] + ), + new Wearable( + 'lion_dance_hat', + 'Lion Dance Hat', + 'Dragon City 2021 Spring Festival Souvenirs', + 'hat', + 'epic', + ['BaseMale', 'BaseFemale'] + ), + new Wearable( + 'lion_dance_lower_body', + 'Lion Dance Pants', + 'Dragon City 2021 Spring Festival Souvenirs', + 'lower_body', + 'epic', + ['BaseMale', 'BaseFemale'] + ), + new Wearable( + 'lion_dance_upper_body', + 'Lion Dance Coat', + 'Dragon City 2021 Spring Festival Souvenirs', + 'upper_body', + 'epic', + ['BaseMale', 'BaseFemale'] + ) +] + diff --git a/indexer/src/handlers/parcel.ts b/indexer/src/handlers/parcel.ts index e9e37322c8..85bf3fd911 100644 --- a/indexer/src/handlers/parcel.ts +++ b/indexer/src/handlers/parcel.ts @@ -10,6 +10,7 @@ import { LANDRegistry, EstateRegistry, DCLRegistrar, + AtariLaunch, BinanceUsCollection, ChinaFlying, CommunityContestCollection, @@ -31,6 +32,7 @@ import { MCHCollection, MemeDontBuyThis, MFSammichgamer, + MLLiondance, MLPekingopera, Moonshot2020Collection, PMDreamverseEminence, @@ -58,6 +60,7 @@ export function handleInitialize(_: InitializeCall): void { ERC721.create(Address.fromString(EstateRegistry)) ERC721.create(Address.fromString(DCLRegistrar)) + ERC721.create(Address.fromString(AtariLaunch)) ERC721.create(Address.fromString(BinanceUsCollection)) ERC721.create(Address.fromString(CommunityContestCollection)) ERC721.create(Address.fromString(DappcraftMoonminerCollection)) @@ -83,6 +86,7 @@ export function handleInitialize(_: InitializeCall): void { ERC721.create(Address.fromString(DigitalAlchemy)) ERC721.create(Address.fromString(EtheremonWearables)) ERC721.create(Address.fromString(MFSammichgamer)) + ERC721.create(Address.fromString(MLLiondance)) ERC721.create(Address.fromString(MLPekingopera)) ERC721.create(Address.fromString(PMDreamverseEminence)) ERC721.create(Address.fromString(SugarclubYumi)) diff --git a/indexer/src/modules/category/index.ts b/indexer/src/modules/category/index.ts index b3dce42aef..35030b0b06 100644 --- a/indexer/src/modules/category/index.ts +++ b/indexer/src/modules/category/index.ts @@ -47,7 +47,9 @@ export function getCategory(contractAddress: string): string { contractAddress == addresses.XmashUp2020 || contractAddress == addresses.ReleaseTheKraken || contractAddress == addresses.MemeDontBuyThis || - contractAddress == addresses.ThreeLAUBasics + contractAddress == addresses.ThreeLAUBasics || + contractAddress == addresses.MLLiondance || + contractAddress == addresses.AtariLaunch ) { category = categories.WEARABLE } else { diff --git a/indexer/src/modules/wearable/index.ts b/indexer/src/modules/wearable/index.ts index b256840920..43bf771437 100644 --- a/indexer/src/modules/wearable/index.ts +++ b/indexer/src/modules/wearable/index.ts @@ -3,6 +3,7 @@ import { log } from '@graphprotocol/graph-ts' import { NFT, Wearable as WearableEntity } from '../../entities/schema' import { Wearable, + atari_launch, binance_us_collection, china_flying, community_contest, @@ -24,6 +25,7 @@ import { mch_collection, meme_dontbuythis, mf_sammichgamer, + ml_liondance, ml_pekingopera, moonshot_2020, pm_dreamverse_eminence, diff --git a/webapp/src/modules/vendor/decentraland/ContractService.ts b/webapp/src/modules/vendor/decentraland/ContractService.ts index 67fcf2bc50..6f47b05795 100644 --- a/webapp/src/modules/vendor/decentraland/ContractService.ts +++ b/webapp/src/modules/vendor/decentraland/ContractService.ts @@ -14,6 +14,7 @@ const contractAddresses = { Bids: '0x250fa138c0a994799c7a49df3097dc71e37b3d6f', DCLRegistrar: '0xeb6f5d94d79f0750781cc962908b161b95192f53', + AtariLaunch: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0', BinanceUsCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0', ChinaFlyingCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0', CommunityContestCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0', @@ -36,6 +37,7 @@ const contractAddresses = { MCHCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0', MemeDontBuyThis: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0', MFSammichgamerCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0', + MLLiondance: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0', MLPekingoperaCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0', Moonshot2020Collection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0', PMDreamverseEminenceCollection: @@ -63,6 +65,7 @@ const contractAddresses = { Bids: '0xe479dfd9664c693b2e2992300930b00bfde08233', DCLRegistrar: '0x2a187453064356c898cae034eaed119e1663acb8', + AtariLaunch: '0x4c290f486bae507719c562b6b524bdb71a2570c9', BinanceUsCollection: '0xa8ee490e4c4da48cc1653502c1a77479d4d818de', ChinaFlyingCollection: '0x90958d4531258ca11d18396d4174a007edbc2b42', CommunityContestCollection: '0x32b7495895264ac9d0b12d32afd435453458b1c6', @@ -85,6 +88,7 @@ const contractAddresses = { MCHCollection: '0xf64dc33a192e056bb5f0e5049356a0498b502d50', MemeDontBuyThis: '0x1a57f6afc902d25792c53b8f19b7e17ef84222d5', MFSammichgamerCollection: '0x30d3387ff3de2a21bef7032f82d00ff7739e403c', + MLLiondance: '0x0b1c6c75d511fae05e7dc696f4cf14129a9c43c9', MLPekingoperaCollection: '0x60d8271c501501c4b8cd9ed5343ac59d1b79d993', Moonshot2020Collection: '0x6a99abebb48819d2abe92c5e4dc4f48dc09a3ee8', PMDreamverseEminenceCollection: @@ -114,6 +118,7 @@ const { Bids, DCLRegistrar, + AtariLaunch, BinanceUsCollection, ChinaFlyingCollection, CommunityContestCollection, @@ -135,6 +140,7 @@ const { MCHCollection, MemeDontBuyThis, MFSammichgamerCollection, + MLLiondance, MLPekingoperaCollection, Moonshot2020Collection, PMDreamverseEminenceCollection, @@ -167,6 +173,7 @@ export class ContractService implements ContractServiceInterface { [Bids]: 'Bids', [DCLRegistrar]: 'Names', + [AtariLaunch]: 'Atari Launch', [BinanceUsCollection]: 'Binance Us', [ChinaFlyingCollection]: 'China Flying', [CommunityContestCollection]: 'Community Contest', @@ -188,6 +195,7 @@ export class ContractService implements ContractServiceInterface { [MCHCollection]: 'MCH', [MemeDontBuyThis]: "Meme don't buy this", [MFSammichgamerCollection]: 'MF Sammichgamer', + [MLLiondance]: 'ML Liondance', [MLPekingoperaCollection]: 'ML Pekingopera', [Moonshot2020Collection]: 'Moonshot', [PMDreamverseEminenceCollection]: 'PM Dreamverse Eminence', @@ -213,6 +221,7 @@ export class ContractService implements ContractServiceInterface { [Marketplace]: 'Marketplace', [Bids]: 'ERC721Bid', + [AtariLaunch]: 'AtariLaunch', [BinanceUsCollection]: 'BinanceUsCollection', [ChinaFlyingCollection]: 'ChinaFlyingCollection', [CommunityContestCollection]: 'CommunityContestCollection', @@ -234,6 +243,7 @@ export class ContractService implements ContractServiceInterface { [MCHCollection]: 'MCHCollection', [MemeDontBuyThis]: 'MemeDontBuyThis', [MFSammichgamerCollection]: 'MFSammichgamerCollection', + [MLLiondance]: 'MLLiondance', [MLPekingoperaCollection]: 'MLPekingoperaCollection', [Moonshot2020Collection]: 'Moonshot2020Collection', [PMDreamverseEminenceCollection]: 'PMDreamverseEminenceCollection', @@ -256,6 +266,7 @@ export class ContractService implements ContractServiceInterface { [EstateRegistry]: NFTCategory.ESTATE, [DCLRegistrar]: NFTCategory.ENS, + [AtariLaunch]: NFTCategory.WEARABLE, [BinanceUsCollection]: NFTCategory.WEARABLE, [ChinaFlyingCollection]: NFTCategory.WEARABLE, [CommunityContestCollection]: NFTCategory.WEARABLE, @@ -277,6 +288,7 @@ export class ContractService implements ContractServiceInterface { [MCHCollection]: NFTCategory.WEARABLE, [MemeDontBuyThis]: NFTCategory.WEARABLE, [MFSammichgamerCollection]: NFTCategory.WEARABLE, + [MLLiondance]: NFTCategory.WEARABLE, [MLPekingoperaCollection]: NFTCategory.WEARABLE, [Moonshot2020Collection]: NFTCategory.WEARABLE, [PMDreamverseEminenceCollection]: NFTCategory.WEARABLE,