Skip to content

Commit

Permalink
Merge pull request #28 from kodadot/main
Browse files Browse the repository at this point in the history
🐛 Basick v7
  • Loading branch information
vikiival authored Jun 14, 2024
2 parents 4aacced + 333fa6b commit 23dd07e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/mappings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,14 @@ export async function mainFrame(ctx: Context): Promise<void> {

const { contracts, tokens } = uniqueEntitySets(items)
const collections = await finalizeCollections(contracts, ctx)
const finish = await whatToDoWithTokens({ tokens, collections, items }, ctx)
// const complete = await enrichTokenMapWithMetadata(ctx, finish)


if (collections.size > 0) {
const finish = await whatToDoWithTokens({ tokens, collections, items }, ctx)
logger.info(`Batch completed, ${finish.size} tokens saved`)
} else {
logger.info(`Batch empty`)
}

logger.info(`Batch completed, ${finish.size} tokens saved`)
}

function unwrapLog(log: Log, block: BlockData): ItemStateUpdate | null {
Expand All @@ -81,6 +84,7 @@ export async function whatToDoWithTokens(
ctx: Context
) {
// ctx.store.findBy(CE, {id: In([...collectionMap.keys()])})
console.log('whatToDoWithTokens', tokens.size)
const knownTokens = await findByIdListAsMap(ctx.store, NE, tokens)
const events: EventEntity[] = []
const metadataEntities: MetadataEntity[] = []
Expand Down

0 comments on commit 23dd07e

Please sign in to comment.