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

Extend FeeCalculator interface to support CryptoAccountAutoRenew fee calculation #1350

Closed
tinker-michaelj opened this issue Apr 30, 2021 · 0 comments · Fixed by #1376
Closed
Assignees
Milestone

Comments

@tinker-michaelj
Copy link
Collaborator

tinker-michaelj commented Apr 30, 2021

Summary
There is no "parent transaction" for an autorenewal, so there isn't a natural way to reuse the existing FeeCalculator interface for calculating an autorenew charge.

Suggested resolution
Add a FeeCalculator.computeAutoRenewalFee(HederaFunctionality renewalOp, EntityId idToRenew, StateView view) method.

This method might estimate resource usage with the help of entity-specific implementations of,

interface AutoRenewalUsageEstimator {
  FeeData usageGiven(EntityId idToRenew, StateView view);  
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants