diff --git a/schema.graphql b/schema.graphql index dfd3c93..b0f78f8 100644 --- a/schema.graphql +++ b/schema.graphql @@ -404,7 +404,9 @@ type VeAllocateUser @entity{ type VeAllocateId @entity{ "id = {DataNFT Address}-{chain id}" id: ID! - + nftAddress: String! + chainId: BigInt! + veAllocation: [VeAllocation!] @derivedFrom(field: "allocationId") allocatedTotal: BigDecimal! diff --git a/src/mappings/utils/veUtils.ts b/src/mappings/utils/veUtils.ts index 7e84c13..8acf192 100644 --- a/src/mappings/utils/veUtils.ts +++ b/src/mappings/utils/veUtils.ts @@ -62,6 +62,8 @@ export function getveAllocateId( allocateId.tx = event.transaction.hash.toHex() allocateId.block = event.block.number.toI32() allocateId.lastContact = 0 + allocateId.chainId = BigInt.zero() + allocateId.nftAddress = '' allocateId.save() } @@ -196,6 +198,9 @@ export function handleOneAllocation( allocationAmount ) + allocateId.chainId = chainId + allocateId.nftAddress = nftAddress + // save entities allocateUser.save() allocateId.save()