Skip to content

Commit

Permalink
feat: add addresses (decentraland#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
nachomazzara authored Nov 22, 2021
1 parent 1656881 commit 54c4469
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions indexer/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type Count @entity {
# we need from each NFT type to the Order, in order to search for them, prefixing them with search_[nft]_[prop]
type Order @entity {
id: ID!
marketplaceAddress: Bytes!
category: Category!
nft: NFT
nftAddress: Bytes!
Expand All @@ -50,6 +51,7 @@ type Order @entity {

type Bid @entity {
id: ID!
bidAddress: Bytes!
category: Category!
nft: NFT
nftAddress: Bytes!
Expand Down
1 change: 1 addition & 0 deletions indexer/src/handlers/bid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export function handleBidCreated(event: BidCreated): void {
let bid = new Bid(id)

if (nft != null) {
bid.bidAddress = event.address
bid.status = status.OPEN
bid.category = category
bid.nftAddress = event.params._tokenAddress
Expand Down
1 change: 1 addition & 0 deletions indexer/src/handlers/marketplace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export function handleOrderCreated(event: OrderCreated): void {
let orderId = event.params.id.toHex()

let order = new Order(orderId)
order.marketplaceAddress = event.address
order.status = status.OPEN
order.category = category
order.nft = nftId
Expand Down

0 comments on commit 54c4469

Please sign in to comment.