From 59800e7992411fbcc2e6fac0d54f4b8e60e54494 Mon Sep 17 00:00:00 2001 From: Alex Coseru Date: Thu, 25 Mar 2021 10:44:50 +0200 Subject: [PATCH] add block to dt orders (#62) --- schema.graphql | 1 + src/mappings/datatoken.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/schema.graphql b/schema.graphql index cb6678c..3708fd4 100644 --- a/schema.graphql +++ b/schema.graphql @@ -167,6 +167,7 @@ type TokenOrder @entity { timestamp: Int! tx: Bytes + block: Int! } type TokenBalance @entity { diff --git a/src/mappings/datatoken.ts b/src/mappings/datatoken.ts index cb008f9..317395a 100644 --- a/src/mappings/datatoken.ts +++ b/src/mappings/datatoken.ts @@ -121,6 +121,7 @@ export function handleOrderStarted(event: OrderStarted): void { } order.marketFee = tokenToDecimal(event.params.marketFee.toBigDecimal(), 18) order.tx = tx + order.block = event.block.number.toI32() order.save()