-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat(dart/catalyst_cardano_serialization)!: Implement tiered fee calculation for reference scripts #871
Conversation
…DL alignment and change referenceInputs for reference script fee calculation
…'s classes for reference script fee calculation
…n for reference scripts * Replace LinearFee with TieredFee to support tiered fee calculation for transactions that consider reference scripts. * Rename the minNoScriptFee() method to minFee() for clarity. * Make the script constructors private and add a fromHex(String cborHex) factory constructor for PlutusScripts. * Add tests for the length property of scripts, which also validates the fromHex factory constructor. * Add tests for fee calculation with reference scripts. * Add a ReferenceScriptSizeLimitExceededException class for handling errors when the reference script size limit is exceeded.
@ilap Thanks for the PR. Make sure to denote in the PR's title that it contains breaking changes. I updated this PR title. |
...yst_voices_packages/catalyst_cardano_serialization/lib/src/builders/transaction_builder.dart
Show resolved
Hide resolved
catalyst_voices_packages/catalyst_cardano_serialization/lib/src/fees.dart
Outdated
Show resolved
Hide resolved
@ilap The changes in Would it be possible to adjust these compilation issues as well? |
…sizeIncrement, maxRefScriptSize) to props for equality
…es caused by catalyst_cardano_serialization changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@stevenj Please support on merging the PR, I validated it successfully.
@ilap Thank you again for the great contribution. |
Hi guys, It seems the frb is not fully configured for the published Compiling catalyst_key_derivation v0.1.0 (......./catalyst-voices/catalyst_voices/packages/libs/catalyst_key_derivation/rust)
error[E0583]: file not found for module `frb_generated`
--> src/lib.rs:20:1
|
20 | mod frb_generated;
| ^^^^^^^^^^^^^^^^^^
|
= help: to create the module `frb_generated`, create file "src/frb_generated.rs" or "src/frb_generated/mod.rs"
= note: if there is a `mod frb_generated` elsewhere in the crate already, import it with `use crate::...` instead
error[E0432]: unresolved import `crate::frb_generated::FLUTTER_RUST_BRIDGE_HANDLER`
--> src/api/key_derivation/mod.rs:14:5
|
14 | use crate::frb_generated::FLUTTER_RUST_BRIDGE_HANDLER;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `FLUTTER_RUST_BRIDGE_HANDLER` in `frb_generated`
Some errors have detailed explanations: E0432, E0583.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `catalyst_key_derivation` (lib) due to 2 previous errors |
@ilap can you share your sample? Was it a web project or android/ios? |
Description
This pull request implements the tiered fee calculation model introduced in the Cardano Conway era (Chang Hardfork).
Related Issue(s)
Closes #870
Description of Changes
minNoScriptFee()
tominFee()
for better clarity.ReferenceScriptSizeLimitExceededException
class to handle cases where the reference script size exceeds defined limits.length
calculations and fee calculations involving reference scripts.Breaking Changes
minNoScriptFee()
tominFee()
may require adjustments in dependent modules that reference this method.inputs
field has been updated fromList<TransactionUnspentOutput>
toSet<TransactionUnspentOutput>
. This may require adjustments in dependent code that expects a List instead of a Set.Other than that, there are no significant breaking changes.
Please confirm the following checks