Skip to content

Commit

Permalink
feat: halloween 2020 (decentraland#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicosantangelo authored Oct 27, 2020
1 parent c9cbb49 commit 646b3a0
Show file tree
Hide file tree
Showing 9 changed files with 172 additions and 15 deletions.
3 changes: 0 additions & 3 deletions indexer/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ type Count @entity {
estateTotal: Int!

wearableTotal: Int!
wearableHalloween2019: Int!
wearableExclusiveMasks: Int!
wearableXmas2019: Int!

ensTotal: Int!

Expand Down
1 change: 1 addition & 0 deletions indexer/src/data/.addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const DigitalAlchemy = '{{address:DigitalAlchemy}}'
export const EtheremonWearables = '{{address:EtheremonWearables}}'
export const ExclusiveMasksCollection = '{{address:ExclusiveMasksCollection}}'
export const Halloween2019Collection = '{{address:Halloween2019Collection}}'
export const Halloween2020Collection = '{{address:Halloween2020Collection}}'
export const MCHCollection = '{{address:MCHCollection}}'
export const MFSammichgamer = '{{address:MFSammichgamer}}'
export const MLPekingopera = '{{address:MLPekingopera}}'
Expand Down
157 changes: 157 additions & 0 deletions indexer/src/data/wearables/halloween_2020.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
import { Wearable } from './Wearable'

export let halloween_2020: Wearable[] = [
new Wearable(
'hwn_2020_cat_eyes',
'Cat Eyes - Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'eyes',
'uncommon',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_ddlm_01_eyes',
'Dia de los Muertos Eyes - Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'eyes',
'epic',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_ddlm_02_eyes',
'Dia de los Muertos Skull Eyes - Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'eyes',
'legendary',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_ddlm_03_eyes',
'Dia de los Muertos Flower Eyes - Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'eyes',
'legendary',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_cult_servant_feet',
'Evil Cult Servant Boots - Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'feet',
'epic',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_cult_supreme_feet',
'Evil Cult Supreme Boots - Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'feet',
'mythic',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_cult_servant_helmet',
'Helmet of Servant of Evil Cult',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'helmet',
'epic',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_cult_supreme_helmet',
'Helmet of Supreme of Evil Cult',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'helmet',
'mythic',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_cult_servant_lower_body',
'Pants of Servant of Evil Cult - Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'lower_body',
'epic',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_cult_supreme_lower_body',
'Pants of Supreme of Evil Cult - Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'lower_body',
'mythic',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_ghostblaster_lower_body',
'GhostBlaster Pants - Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'lower_body',
'epic',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_creepy_mouth',
'Creepy Mouth - Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'mouth',
'uncommon',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_ddlm_mouth',
'Dia de los Muertos Mouth - Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'mouth',
'legendary',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_dracula_mouth',
'Dracula Mouth - Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'mouth',
'legendary',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_pumpkin_mouth',
'Pumpkin Mouth - Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'mouth',
'epic',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_ghostblaster_tiara',
'GhostBlaster NightVision Device',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'tiara',
'epic',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_cult_servant_upper_body',
'Servent of Evil Cult Suit- Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'upper_body',
'epic',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_cult_supreme_upper_body',
'Supreme of Evil Cult Suit - Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'upper_body',
'mythic',
['BaseMale', 'BaseFemale']
),
new Wearable(
'hwn_2020_ghostblaster_upper_body',
'GhostBlaster Suit - Halloween 2020',
'Exclusive Halloween 2020 Collection. Awarded as Treasure Hunt prize.',
'upper_body',
'epic',
['BaseMale', 'BaseFemale']
)
]

1 change: 1 addition & 0 deletions indexer/src/data/wearables/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export * from './digital_alchemy'
export * from './ethermon_wearables'
export * from './exclusive_masks'
export * from './halloween_2019'
export * from './halloween_2020'
export * from './mch_collection'
export * from './mf_sammichgamer'
export * from './ml_pekingopera'
Expand Down
2 changes: 2 additions & 0 deletions indexer/src/handlers/parcel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
EtheremonWearables,
ExclusiveMasksCollection,
Halloween2019Collection,
Halloween2020Collection,
MCHCollection,
MFSammichgamer,
MLPekingopera,
Expand Down Expand Up @@ -61,6 +62,7 @@ export function handleInitialize(_: InitializeCall): void {
ERC721.create(Address.fromString(DgtbleHeadspaceCollection))
ERC721.create(Address.fromString(ExclusiveMasksCollection))
ERC721.create(Address.fromString(Halloween2019Collection))
ERC721.create(Address.fromString(Halloween2020Collection))
ERC721.create(Address.fromString(MCHCollection))
ERC721.create(Address.fromString(Moonshot2020Collection))
ERC721.create(Address.fromString(PMOuttathisworldCollection))
Expand Down
1 change: 1 addition & 0 deletions indexer/src/modules/category/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export function getCategory(contractAddress: string): string {
contractAddress == addresses.DgtbleHeadspaceCollection ||
contractAddress == addresses.ExclusiveMasksCollection ||
contractAddress == addresses.Halloween2019Collection ||
contractAddress == addresses.Halloween2020Collection ||
contractAddress == addresses.MCHCollection ||
contractAddress == addresses.Moonshot2020Collection ||
contractAddress == addresses.PMOuttathisworldCollection ||
Expand Down
11 changes: 0 additions & 11 deletions indexer/src/modules/count/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ export function buildCount(): Count {
count.estateTotal = 0

count.wearableTotal = 0
count.wearableHalloween2019 = 0
count.wearableExclusiveMasks = 0
count.wearableXmas2019 = 0

count.ensTotal = 0

Expand All @@ -43,14 +40,6 @@ export function buildCountFromNFT(nft: NFT): Count {
count.estateTotal += 1
} else if (category == categories.WEARABLE) {
count.wearableTotal += 1

if (contractAddress == addresses.Halloween2019Collection) {
count.wearableHalloween2019 += 1
} else if (contractAddress == addresses.ExclusiveMasksCollection) {
count.wearableExclusiveMasks += 1
} else if (contractAddress == addresses.Xmas2019Collection) {
count.wearableXmas2019 += 1
}
} else if (category == categories.ENS) {
count.ensTotal += 1
}
Expand Down
3 changes: 3 additions & 0 deletions indexer/src/modules/wearable/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
ethermon_wearables,
exclusive_masks,
halloween_2019,
halloween_2020,
mch_collection,
mf_sammichgamer,
ml_pekingopera,
Expand Down Expand Up @@ -65,6 +66,7 @@ export function buildWearableFromNFT(nft: NFT): WearableEntity {
ethermon_wearables,
exclusive_masks,
halloween_2019,
halloween_2020,
mch_collection,
mf_sammichgamer,
ml_pekingopera,
Expand Down Expand Up @@ -97,6 +99,7 @@ export function buildWearableFromNFT(nft: NFT): WearableEntity {
'ethermon_wearables',
'exclusive_masks',
'halloween_2019',
'halloween_2020',
'mch_collection',
'mf_sammichgamer',
'ml_pekingopera',
Expand Down
8 changes: 7 additions & 1 deletion webapp/src/modules/vendor/decentraland/ContractService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const contractAddresses = {
EtheremonWearablesCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
ExclusiveMasksCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
Halloween2019Collection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
Halloween2020Collection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
MCHCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
MFSammichgamerCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
MLPekingoperaCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
Expand Down Expand Up @@ -75,6 +76,7 @@ const contractAddresses = {
EtheremonWearablesCollection: '0x54266bcf2ffa841af934f003d144957d5934f3ab',
ExclusiveMasksCollection: '0xc04528c14c8ffd84c7c1fb6719b4a89853035cdd',
Halloween2019Collection: '0xc1f4b0eea2bd6690930e6c66efd3e197d620b9c2',
Halloween2020Collection: '0xfeb52cbf71b9adac957c6f948a6cf9980ac8c907',
MCHCollection: '0xf64dc33a192e056bb5f0e5049356a0498b502d50',
MFSammichgamerCollection: '0x30d3387ff3de2a21bef7032f82d00ff7739e403c',
MLPekingoperaCollection: '0x60d8271c501501c4b8cd9ed5343ac59d1b79d993',
Expand Down Expand Up @@ -119,6 +121,7 @@ const {
EtheremonWearablesCollection,
ExclusiveMasksCollection,
Halloween2019Collection,
Halloween2020Collection,
MCHCollection,
MFSammichgamerCollection,
MLPekingoperaCollection,
Expand Down Expand Up @@ -156,7 +159,8 @@ export class ContractService implements ContractServiceInterface {
[DGSummer2020Collection]: 'DG Summer',
[DgtbleHeadspaceCollection]: 'Dgtble Headspace',
[ExclusiveMasksCollection]: 'Exclusive Masks',
[Halloween2019Collection]: 'Halloween',
[Halloween2019Collection]: 'Halloween2019',
[Halloween2020Collection]: 'Halloween2020',
[MCHCollection]: 'MCH',
[Moonshot2020Collection]: 'Moonshot',
[PMOuttathisworldCollection]: 'PM Outtathisworld',
Expand Down Expand Up @@ -205,6 +209,7 @@ export class ContractService implements ContractServiceInterface {
[EtheremonWearablesCollection]: 'EtheremonWearablesCollection',
[ExclusiveMasksCollection]: 'ExclusiveMasksCollection',
[Halloween2019Collection]: 'Halloween2019Collection',
[Halloween2020Collection]: 'Halloween2020Collection',
[MCHCollection]: 'MCHCollection',
[MFSammichgamerCollection]: 'MFSammichgamerCollection',
[MLPekingoperaCollection]: 'MLPekingoperaCollection',
Expand Down Expand Up @@ -242,6 +247,7 @@ export class ContractService implements ContractServiceInterface {
[EtheremonWearablesCollection]: NFTCategory.WEARABLE,
[ExclusiveMasksCollection]: NFTCategory.WEARABLE,
[Halloween2019Collection]: NFTCategory.WEARABLE,
[Halloween2020Collection]: NFTCategory.WEARABLE,
[MCHCollection]: NFTCategory.WEARABLE,
[MFSammichgamerCollection]: NFTCategory.WEARABLE,
[MLPekingoperaCollection]: NFTCategory.WEARABLE,
Expand Down

0 comments on commit 646b3a0

Please sign in to comment.