Skip to content

feat(fortuna): Use v2 events, add new fields to History API for Explorer #2845

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

Merged
merged 11 commits into from
Aug 5, 2025

Conversation

tejasbadadare
Copy link
Contributor

@tejasbadadare tejasbadadare commented Jul 9, 2025

Summary

  • Use the RequestedV2 event instead of RequestedWithCallback (v1) when processing new requests. This lets us store the user provided gas_limit param so we can display it in the Explorer.
  • Capture the Revealed event when a reveal tx succeeds. This lets us store information around user callback status.
  • Add the following fields to the History API schema (sourced from the aforementioned events):
    • callback_failed - True when the user callback fails. The status will still be success. This lets us display the state in Explorer where the reveal succeeded, but the user callback failed.
    • callback_return_value - Contains the revert bytes returned by the user callback
    • callback_gas_used
    • gas_limit - User provided, defaults to provider default if not customized by user.
  • Bump version to 9.0.0 since this is backwards incompatible with Entropy v1

Rationale

  • With Entropy v2, all reveals are now considered successful even if the user callback reverts. We want to show user callback failure details in the Explorer, which requires capturing and storing additional information from the v2 events.

How has this been tested?

  • Current tests cover my changes
    • Updated unit tests to validate new schema
  • Added new tests
  • Manually tested the code

Copy link

vercel bot commented Jul 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2025 9:39pm
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2025 9:39pm
developer-hub ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2025 9:39pm
entropy-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2025 9:39pm
entropy-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2025 9:39pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2025 9:39pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2025 9:39pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2025 9:39pm

…, add gas and callback fields to history API
@tejasbadadare tejasbadadare merged commit 5a1c980 into main Aug 5, 2025
11 checks passed
@tejasbadadare tejasbadadare deleted the tb/fortuna/use-requested-v2-event branch August 5, 2025 22:18
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 this pull request may close these issues.

3 participants