From 1abfe32bffcb10989025ecf22df50f5fec9a8115 Mon Sep 17 00:00:00 2001 From: orionstardust Date: Wed, 3 Apr 2024 10:26:52 -0400 Subject: [PATCH] feat: add auction created block --- schema.graphql | 1 + src/mapping.ts | 1 + subgraph.yaml | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/schema.graphql b/schema.graphql index b4d6733..6fdf337 100644 --- a/schema.graphql +++ b/schema.graphql @@ -26,6 +26,7 @@ type Auction @entity { endsAt: BigInt endsAtOriginal: BigInt claimAt: BigInt + createdBlock: BigInt! quantity: BigInt presetId: Int diff --git a/src/mapping.ts b/src/mapping.ts index 5ecd4e0..3b6724d 100644 --- a/src/mapping.ts +++ b/src/mapping.ts @@ -336,6 +336,7 @@ export function handleAuction_Initialized( auction.stepMin = presets.stepMin; auction.seller = auctionInfo.owner; auction.createdAt = event.block.timestamp; + auction.createdBlock = event.block.number; auction.quantity = event.params._tokenAmount; auction.startsAt = event.block.timestamp; auction.dueIncentives = auctionInfo.dueIncentives; diff --git a/subgraph.yaml b/subgraph.yaml index 774a35f..1d66b28 100644 --- a/subgraph.yaml +++ b/subgraph.yaml @@ -11,7 +11,7 @@ dataSources: startBlock: 36176058 mapping: kind: ethereum/events - apiVersion: 0.0.5 + apiVersion: 0.0.6 language: wasm/assemblyscript entities: - AuctionCancelled