diff --git a/packages/subgraph/schema.graphql b/packages/subgraph/schema.graphql index 1627c06aa4..ce68e57559 100644 --- a/packages/subgraph/schema.graphql +++ b/packages/subgraph/schema.graphql @@ -2237,6 +2237,8 @@ type AccountTokenSnapshot @entity { ID composed of: accountID-tokenID """ id: ID! + createdAtTimestamp: BigInt! + createdAtBlockNumber: BigInt! updatedAtTimestamp: BigInt! updatedAtBlockNumber: BigInt! # ---------------------------------- state ---------------------------------- diff --git a/packages/subgraph/src/mappingHelpers.ts b/packages/subgraph/src/mappingHelpers.ts index a272e5d05b..e8a9713c5d 100644 --- a/packages/subgraph/src/mappingHelpers.ts +++ b/packages/subgraph/src/mappingHelpers.ts @@ -636,6 +636,8 @@ export function getOrInitAccountTokenSnapshot( if (accountTokenSnapshot == null) { accountTokenSnapshot = new AccountTokenSnapshot(atsId); + accountTokenSnapshot.createdAtTimestamp = block.timestamp; + accountTokenSnapshot.createdAtBlockNumber = block.number; accountTokenSnapshot.updatedAtTimestamp = block.timestamp; accountTokenSnapshot.updatedAtBlockNumber = block.number; accountTokenSnapshot.totalNumberOfActiveStreams = 0;