Skip to content

Commit

Permalink
feat: Handle Campaign Created Event
Browse files Browse the repository at this point in the history
  • Loading branch information
manoahLinks committed Dec 3, 2024
1 parent ca6b9a1 commit a1c0b41
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/token-giver-indexer/token-giver-indexer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,22 @@ export class TokenGiverIndexerService {
event.data;

const owner = validateAndParseAddress(
`0x${FieldElement.toBigInt(ownerFelt).toString(16)}`
`0x${FieldElement.toBigInt(ownerFelt).toString(16)}`,
);

const campaignAddress = validateAndParseAddress(
`0x${FieldElement.toBigInt(campaignAddressFelt).toString(16)}`
`0x${FieldElement.toBigInt(campaignAddressFelt).toString(16)}`,
);

const tokenId = Number(
uint256.uint256ToBN({
low: FieldElement.toBigInt(tokenIdLow),
high: FieldElement.toBigInt(tokenIdHigh),
})
}),
);

const tokenGiverNftContractAddress = validateAndParseAddress(
`0x${FieldElement.toBigInt(tokenGiverNftContractAddressFelt).toString(16)}`
`0x${FieldElement.toBigInt(tokenGiverNftContractAddressFelt).toString(16)}`,
);

await this.prismaService.campaign.create({
Expand Down

0 comments on commit a1c0b41

Please sign in to comment.