Skip to content

Commit

Permalink
Feat: add more wearables (decentraland#252)
Browse files Browse the repository at this point in the history
* feat: add new collections

* feat: add collection to webapp
  • Loading branch information
nachomazzara authored Feb 8, 2021
1 parent 2a6bf9e commit f96f9f7
Show file tree
Hide file tree
Showing 8 changed files with 149 additions and 1 deletion.
4 changes: 4 additions & 0 deletions indexer/src/data/.addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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}}'
Expand All @@ -47,3 +49,5 @@ export const WZWonderbot = '{{address:WZWonderbot}}'
export const Xmas2019Collection = '{{address:Xmas2019Collection}}'
export const Xmas2020Collection = '{{address:Xmas2020Collection}}'
export const XmashUp2020 = '{{address:XmashUp2020}}'


85 changes: 85 additions & 0 deletions indexer/src/data/wearables/atari_launch.ts
Original file line number Diff line number Diff line change
@@ -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']
)
]

2 changes: 2 additions & 0 deletions indexer/src/data/wearables/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from './Wearable'

export * from './atari_launch'
export * from './binance_us_collection'
export * from './china_flying'
export * from './community_contest'
Expand All @@ -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'
Expand Down
37 changes: 37 additions & 0 deletions indexer/src/data/wearables/ml_liondance.ts
Original file line number Diff line number Diff line change
@@ -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']
)
]

4 changes: 4 additions & 0 deletions indexer/src/handlers/parcel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
LANDRegistry,
EstateRegistry,
DCLRegistrar,
AtariLaunch,
BinanceUsCollection,
ChinaFlying,
CommunityContestCollection,
Expand All @@ -31,6 +32,7 @@ import {
MCHCollection,
MemeDontBuyThis,
MFSammichgamer,
MLLiondance,
MLPekingopera,
Moonshot2020Collection,
PMDreamverseEminence,
Expand Down Expand Up @@ -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))
Expand All @@ -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))
Expand Down
4 changes: 3 additions & 1 deletion indexer/src/modules/category/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions indexer/src/modules/wearable/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -24,6 +25,7 @@ import {
mch_collection,
meme_dontbuythis,
mf_sammichgamer,
ml_liondance,
ml_pekingopera,
moonshot_2020,
pm_dreamverse_eminence,
Expand Down
12 changes: 12 additions & 0 deletions webapp/src/modules/vendor/decentraland/ContractService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const contractAddresses = {
Bids: '0x250fa138c0a994799c7a49df3097dc71e37b3d6f',
DCLRegistrar: '0xeb6f5d94d79f0750781cc962908b161b95192f53',

AtariLaunch: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
BinanceUsCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
ChinaFlyingCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
CommunityContestCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
Expand All @@ -36,6 +37,7 @@ const contractAddresses = {
MCHCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
MemeDontBuyThis: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
MFSammichgamerCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
MLLiondance: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
MLPekingoperaCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
Moonshot2020Collection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
PMDreamverseEminenceCollection:
Expand Down Expand Up @@ -63,6 +65,7 @@ const contractAddresses = {
Bids: '0xe479dfd9664c693b2e2992300930b00bfde08233',
DCLRegistrar: '0x2a187453064356c898cae034eaed119e1663acb8',

AtariLaunch: '0x4c290f486bae507719c562b6b524bdb71a2570c9',
BinanceUsCollection: '0xa8ee490e4c4da48cc1653502c1a77479d4d818de',
ChinaFlyingCollection: '0x90958d4531258ca11d18396d4174a007edbc2b42',
CommunityContestCollection: '0x32b7495895264ac9d0b12d32afd435453458b1c6',
Expand All @@ -85,6 +88,7 @@ const contractAddresses = {
MCHCollection: '0xf64dc33a192e056bb5f0e5049356a0498b502d50',
MemeDontBuyThis: '0x1a57f6afc902d25792c53b8f19b7e17ef84222d5',
MFSammichgamerCollection: '0x30d3387ff3de2a21bef7032f82d00ff7739e403c',
MLLiondance: '0x0b1c6c75d511fae05e7dc696f4cf14129a9c43c9',
MLPekingoperaCollection: '0x60d8271c501501c4b8cd9ed5343ac59d1b79d993',
Moonshot2020Collection: '0x6a99abebb48819d2abe92c5e4dc4f48dc09a3ee8',
PMDreamverseEminenceCollection:
Expand Down Expand Up @@ -114,6 +118,7 @@ const {
Bids,
DCLRegistrar,

AtariLaunch,
BinanceUsCollection,
ChinaFlyingCollection,
CommunityContestCollection,
Expand All @@ -135,6 +140,7 @@ const {
MCHCollection,
MemeDontBuyThis,
MFSammichgamerCollection,
MLLiondance,
MLPekingoperaCollection,
Moonshot2020Collection,
PMDreamverseEminenceCollection,
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -213,6 +221,7 @@ export class ContractService implements ContractServiceInterface {
[Marketplace]: 'Marketplace',
[Bids]: 'ERC721Bid',

[AtariLaunch]: 'AtariLaunch',
[BinanceUsCollection]: 'BinanceUsCollection',
[ChinaFlyingCollection]: 'ChinaFlyingCollection',
[CommunityContestCollection]: 'CommunityContestCollection',
Expand All @@ -234,6 +243,7 @@ export class ContractService implements ContractServiceInterface {
[MCHCollection]: 'MCHCollection',
[MemeDontBuyThis]: 'MemeDontBuyThis',
[MFSammichgamerCollection]: 'MFSammichgamerCollection',
[MLLiondance]: 'MLLiondance',
[MLPekingoperaCollection]: 'MLPekingoperaCollection',
[Moonshot2020Collection]: 'Moonshot2020Collection',
[PMDreamverseEminenceCollection]: 'PMDreamverseEminenceCollection',
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit f96f9f7

Please sign in to comment.