Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Add unit tests for Fortuna's gas oracle functions

This PR adds unit tests for two gas oracle functions in Fortuna:

  • estimate_priority_fee function that calculates priority fees from reward data
  • eip1559_default_estimator function that calculates max fee and priority fee

Tests added:

  • Empty rewards case
  • Single reward case
  • Multiple rewards with different patterns
  • Cases with percentage changes
  • Different base fee tiers for surge multipliers
  • Various scenarios for the EIP1559 estimator function

Link to Devin run: https://app.devin.ai/sessions/83a15de209384e5db56d9851213ba148
Requested by: Jayant Krishnamurthy ([email protected])

@vercel
Copy link

vercel bot commented May 16, 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 May 16, 2025 5:22pm
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2025 5:22pm
entropy-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2025 5:22pm
entropy-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2025 5:22pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2025 5:22pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2025 5:22pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2025 5:22pm

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

assert_eq!(
max_priority_fee,
U256::from(EIP1559_FEE_ESTIMATION_DEFAULT_PRIORITY_FEE)
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a test for the case where max_priority_fee is computed using estimate_priority_fee

Co-Authored-By: Jayant Krishnamurthy <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

Closing due to inactivity for more than 7 days.

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.

2 participants