Skip to content

Implement estimateFee() function with Horizon fee_stats integration#133

Open
Ardecrownn wants to merge 1 commit intoamina69:mainfrom
Ardecrownn:feature/estimate-fee-implementation
Open

Implement estimateFee() function with Horizon fee_stats integration#133
Ardecrownn wants to merge 1 commit intoamina69:mainfrom
Ardecrownn:feature/estimate-fee-implementation

Conversation

@Ardecrownn
Copy link
Copy Markdown

  • Add estimateFee function that fetches recommended fee from Horizon fee_stats
  • Calculate total fee as p50_accepted_fee × operationCount in stroops
  • Implement 60s caching for fee_stats response
  • Add fallback to MAX_FEE constant when Horizon unavailable
  • Export estimateFee, FeeEstimator class, and MAX_FEE constant
  • Add comprehensive unit tests covering all scenarios
  • Tests include: calculation from mock fee_stats, fallback behavior, cache TTL validation

closes #123

- Add estimateFee function that fetches recommended fee from Horizon fee_stats
- Calculate total fee as p50_accepted_fee × operationCount in stroops
- Implement 60s caching for fee_stats response
- Add fallback to MAX_FEE constant when Horizon unavailable
- Export estimateFee, FeeEstimator class, and MAX_FEE constant
- Add comprehensive unit tests covering all scenarios
- Tests include: calculation from mock fee_stats, fallback behavior, cache TTL validation
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 28, 2026

@Ardecrownn Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@amina69
Copy link
Copy Markdown
Owner

amina69 commented Mar 30, 2026

@Ardecrownn you are making pr to the wrong branch, read the conributing.md

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.

[SDK · Transaction builders] Implement estimateFee()

2 participants