Skip to content

Commit

Permalink
feat: add binance us collection (decentraland#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicosantangelo authored Sep 24, 2020
1 parent a2e6153 commit 3d4002f
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 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 BinanceUsCollection = '{{address:BinanceUsCollection}}'
export const CommunityContestCollection =
'{{address:CommunityContestCollection}}'
export const DappcraftMoonminerCollection =
Expand Down
21 changes: 21 additions & 0 deletions indexer/src/data/wearables/binance_us_collection.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Wearable } from './Wearable'

export let binance_us_collection: Wearable[] = [
new Wearable(
'binance_us_hat',
'Binance US Hat',
'Binance US Hat',
'hat',
'uncommon',
['BaseMale', 'BaseFemale']
),
new Wearable(
'binance_us_upper_body',
'Binance US Hoodie',
'Binance US Hoodie',
'upper_body',
'uncommon',
['BaseMale', 'BaseFemale']
)
]

1 change: 1 addition & 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 './binance_us_collection'
export * from './community_contest'
export * from './dappcraft_moonminer'
export * from './dcg_collection'
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 @@ -10,6 +10,7 @@ import {
LANDRegistry,
EstateRegistry,
DCLRegistrar,
BinanceUsCollection,
CommunityContestCollection,
DappcraftMoonminerCollection,
DCGCollection,
Expand All @@ -35,6 +36,7 @@ export function handleInitialize(_: InitializeCall): void {
ERC721.create(Address.fromString(LANDRegistry))
ERC721.create(Address.fromString(EstateRegistry))
ERC721.create(Address.fromString(DCLRegistrar))
ERC721.create(Address.fromString(BinanceUsCollection))
ERC721.create(Address.fromString(CommunityContestCollection))
ERC721.create(Address.fromString(DappcraftMoonminerCollection))
ERC721.create(Address.fromString(DCGCollection))
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 @@ -12,6 +12,7 @@ export function getCategory(contractAddress: string): string {
} else if (contractAddress == addresses.DCLRegistrar) {
category = categories.ENS
} else if (
contractAddress == addresses.BinanceUsCollection ||
contractAddress == addresses.CommunityContestCollection ||
contractAddress == addresses.DappcraftMoonminerCollection ||
contractAddress == addresses.DCGCollection ||
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 @@ -3,6 +3,7 @@ import { log } from '@graphprotocol/graph-ts'
import { NFT, Wearable as WearableEntity } from '../../entities/schema'
import {
Wearable,
binance_us_collection,
community_contest,
dappcraft_moonminer,
dcg_collection,
Expand Down Expand Up @@ -32,6 +33,7 @@ export function buildWearableFromNFT(nft: NFT): WearableEntity {
}

let allCollections: Wearable[][] = [
binance_us_collection,
community_contest,
dappcraft_moonminer,
dcg_collection,
Expand All @@ -48,6 +50,7 @@ export function buildWearableFromNFT(nft: NFT): WearableEntity {
xmas_2019
]
let collectionNames: string[] = [
'binance_us_collection',
'community_contest',
'dappcraft_moonminer',
'dcg_collection',
Expand Down
6 changes: 6 additions & 0 deletions webapp/src/modules/vendor/decentraland/ContractService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const contractAddresses = {
Marketplace: '0x5424912699dabaa5f2998750c1c66e73d67ad219',
Bids: '0x250fa138c0a994799c7a49df3097dc71e37b3d6f',
DCLRegistrar: '0xeb6f5d94d79f0750781cc962908b161b95192f53',
BinanceUsCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
CommunityContestCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
DappcraftMoonminerCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
DCGCollection: '0x30ae57840b0e9b8ea55334083d53d80b2cfe80e0',
Expand All @@ -36,6 +37,7 @@ const contractAddresses = {
Marketplace: '0x8e5660b4ab70168b5a6feea0e0315cb49c8cd539',
Bids: '0xe479dfd9664c693b2e2992300930b00bfde08233',
DCLRegistrar: '0x2a187453064356c898cae034eaed119e1663acb8',
BinanceUsCollection: '0xa8ee490e4c4da48cc1653502c1a77479d4d818de',
CommunityContestCollection: '0x32b7495895264ac9d0b12d32afd435453458b1c6',
DappcraftMoonminerCollection: '0x1e1d4e6262787c8a8783a37fee698bd42aa42bec',
DCGCollection: '0x3163d2cfee3183f9874e2869942cc62649eeb004',
Expand All @@ -61,6 +63,7 @@ const {
Marketplace,
Bids,
DCLRegistrar,
BinanceUsCollection,
CommunityContestCollection,
DappcraftMoonminerCollection,
DCGCollection,
Expand Down Expand Up @@ -91,6 +94,7 @@ export class ContractService implements ContractServiceInterface {
[Marketplace]: 'Marketplace',
[Bids]: 'Bids',
[DCLRegistrar]: 'Names',
[BinanceUsCollection]: 'Binance Us',
[CommunityContestCollection]: 'Community Contest',
[DappcraftMoonminerCollection]: 'Dappcraft Moonminer',
[DCGCollection]: 'DCG',
Expand All @@ -114,6 +118,7 @@ export class ContractService implements ContractServiceInterface {
[DCLRegistrar]: 'DCLRegistrar',
[Marketplace]: 'Marketplace',
[Bids]: 'ERC721Bid',
[BinanceUsCollection]: 'BinanceUsCollection',
[CommunityContestCollection]: 'CommunityContestCollection',
[DappcraftMoonminerCollection]: 'DappcraftMoonminerCollection',
[DCGCollection]: 'DCGCollection',
Expand All @@ -134,6 +139,7 @@ export class ContractService implements ContractServiceInterface {
[LANDRegistry]: NFTCategory.PARCEL,
[EstateRegistry]: NFTCategory.ESTATE,
[DCLRegistrar]: NFTCategory.ENS,
[BinanceUsCollection]: NFTCategory.WEARABLE,
[CommunityContestCollection]: NFTCategory.WEARABLE,
[DappcraftMoonminerCollection]: NFTCategory.WEARABLE,
[DCGCollection]: NFTCategory.WEARABLE,
Expand Down

0 comments on commit 3d4002f

Please sign in to comment.