fix predictor detection
This commit is contained in:
parent
6a78790bd4
commit
bb790aa9cd
|
@ -30,7 +30,7 @@ type Token @entity {
|
|||
publishMarketFeeAmount: BigDecimal
|
||||
|
||||
"template ID of the datatoken"
|
||||
templateId: BigInt
|
||||
templateId: BigInt!
|
||||
|
||||
"number of addresses holding a balance of datatoken , TODO: can we actually calculate this? what happens when users trade the dts"
|
||||
holderCount: BigInt!
|
||||
|
|
|
@ -18,7 +18,6 @@ import {
|
|||
getErc20TemplateId,
|
||||
getPredictContract
|
||||
} from './utils/tokenUtils'
|
||||
import { BigInt } from '@graphprotocol/graph-ts'
|
||||
import { addDatatoken } from './utils/globalUtils'
|
||||
|
||||
export function handleNftCreated(event: NFTCreated): void {
|
||||
|
@ -62,7 +61,7 @@ export function handleNewToken(event: TokenCreated): void {
|
|||
token.templateId = getErc20TemplateId(event.params.templateAddress)
|
||||
token.save()
|
||||
addDatatoken()
|
||||
if (token.templateId === BigInt.fromString('3')) {
|
||||
if (token.templateId.toString() == '3') {
|
||||
factoryERC20Template3.create(event.params.newTokenAddress)
|
||||
const predictContract = getPredictContract(event.params.newTokenAddress)
|
||||
predictContract.timestamp = event.block.timestamp.toI32()
|
||||
|
|
Loading…
Reference in New Issue