Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a standalone field to event models for sorting #28

Closed
wuminzhe opened this issue Apr 10, 2024 · 0 comments · May be fixed by #30
Closed

add a standalone field to event models for sorting #28

wuminzhe opened this issue Apr 10, 2024 · 0 comments · May be fixed by #30

Comments

@wuminzhe
Copy link

wuminzhe commented Apr 10, 2024

blockNumberlogIndex: ${blockNumber}-${logIndex}

or change the id field directly:

...
ponder.on("ORMPPort:Xxx", async ({ event, context }) => {
  await Xxx.create({
    id: `${context.network.chainId}-${event.block.number}-${event.log.transactionIndex}-${event.log.logIndex}`,    
    data: {
      chainId: context.network.chainId,
      ...

});
@wuminzhe wuminzhe linked a pull request Apr 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants