Skip to content

Commit 06dcd82

Browse files
committed
feat: uniq FastUsdcTransaction id
1 parent 1ebc8fb commit 06dcd82

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

schema.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ enum FastUsdcTransactionStatus {
2525
}
2626

2727
type FastUsdcTransaction @entity {
28-
id: ID!
28+
id: ID! @index(unique: true)
2929
"""
3030
EVM address from which the USCD funds originated
3131
"""

src/mappings/events/fastUsdc.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export const transactionEventKit = (block: CosmosBlock, data: StreamCell, module
2121
const { height } = block.header;
2222
const time = block.header.time as Date;
2323

24+
// XXX this assumes that records will be processed in order,
25+
// so multiple indexer workers is not supported.
2426
const t = await FastUsdcTransaction.get(id);
2527
if (!t) {
2628
if (payload.status !== FastUsdcTransactionStatus.OBSERVED) {

0 commit comments

Comments
 (0)