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 public init for StarknetFeeEstimate #198

Merged

Conversation

franciszekjob
Copy link
Collaborator

@franciszekjob franciszekjob commented May 23, 2024

Describe your changes

  • Add public init for StarknetFeeEstimate
  • Add public init for StarknetFeeEstimate with automatic overallFee calculation

Linked issues

Closes #197

Breaking changes

  • This issue contains breaking changes

Comment on lines +28 to +35
public init(gasConsumed: Felt, gasPrice: Felt, dataGasConsumed: Felt, dataGasPrice: Felt, overallFee: Felt, feeUnit: StarknetPriceUnit) {
self.gasConsumed = gasConsumed
self.gasPrice = gasPrice
self.dataGasConsumed = dataGasConsumed
self.dataGasPrice = dataGasPrice
self.overallFee = overallFee
self.feeUnit = feeUnit
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit:

Not sure this is absolutely necessary, but maybe it would be reasonable to give option for overallFee to be automatically calculated based on other arguments?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, good idea.

@franciszekjob franciszekjob merged commit f3ed7cd into main May 24, 2024
1 check passed
@franciszekjob franciszekjob deleted the feat/197-add-public-init-for-starknet-fee-estimate branch May 24, 2024 11:09
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.

Add public initializer in StarknetFeeEstimate
2 participants