-
Notifications
You must be signed in to change notification settings - Fork 287
feat: Add Hip 1261 Implementation #2019
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
Closed
Closed
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
8b116de
feat: Add Hip 1261 Implementation
aceppaluni c9b197c
chore: Add Changelog Entry
aceppaluni 65427d9
fix: Add New Version Of Execute
aceppaluni 5e5f2ce
feat: Updating PR with commits
aceppaluni be43064
fix: Add Requested Changes
aceppaluni e5154b8
fix: Add New Fixes
aceppaluni 76e159d
fix: Add Additional Fixes
aceppaluni 0180eb9
feat: Make fixes
aceppaluni 1e47c74
fix: Fix Errors
aceppaluni e44fa1b
fix: Updated attempt
aceppaluni 0e79ad5
fix: apply codacy changes
aceppaluni e9c8061
fix: apply new codacy changes
aceppaluni 2ccf028
Merge branch 'main' into Hip1261
aceppaluni 4e65376
fix: Address Errors
aceppaluni d3ba4a1
fix: Address Test Erros and Codacy
aceppaluni 2037aae
feat: Add new test
aceppaluni 06b2d73
fix: Fix pre-commit-config file
aceppaluni bfaa7d4
fix: Update to fix errors
aceppaluni 05cb55b
fix: Address CodeRabbit Changes
aceppaluni 01d183a
fix: Fix Testing and Implementation
aceppaluni db1317a
fix: Fix Codacy Err
aceppaluni 41bdd1f
fix: Fix Testing
aceppaluni c5cf184
fix: Fix New Codacy Errors
aceppaluni ab3e645
fix: Fix Final Codacy Err
aceppaluni b6547b0
fix: Apply New Changes
aceppaluni 539c1aa
fix: Add New Requested Changes
aceppaluni 9382372
fix: Fix Errors After Updates
aceppaluni 55852d1
fix: Fix Test Errors
aceppaluni e30b8e8
fix: Fix New Test Errs
aceppaluni 4a596c0
fix: Fix Workflow Errs
aceppaluni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| """Fee estimation models for calculating base and extra fees. | ||
|
|
||
| This module defines the FeeEstimate dataclass, which aggregates | ||
| a base fee with optional extra fee components. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from dataclasses import dataclass, field | ||
|
|
||
| from hiero_sdk_python.fees.fee_extra import FeeExtra | ||
|
|
||
|
|
||
| @dataclass(frozen=True) | ||
| class FeeEstimate: | ||
| """Represents a fee estimate composed of a base amount and optional extras.""" | ||
|
|
||
| base: int | ||
| extras: list[FeeExtra] = field(default_factory=list) | ||
|
|
||
| def __post_init__(self) -> None: | ||
| object.__setattr__(self, "extras", tuple(self.extras)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| """Enumeration of fee estimation modes. | ||
|
|
||
| Defines the available strategies for calculating fee estimates. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from enum import Enum | ||
|
|
||
|
|
||
| class FeeEstimateMode(str, Enum): | ||
| """Supported modes for fee estimation.""" | ||
|
|
||
| STATE = "STATE" | ||
| INTRINSIC = "INTRINSIC" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| """Response model for fee estimation results. | ||
|
|
||
| Contains the calculated fees across different categories along with | ||
| the estimation mode and optional notes. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from dataclasses import dataclass | ||
|
|
||
| from hiero_sdk_python.fees.fee_estimate import FeeEstimate | ||
| from hiero_sdk_python.fees.fee_estimate_mode import FeeEstimateMode | ||
| from hiero_sdk_python.fees.network_fee import NetworkFee | ||
|
|
||
|
|
||
| @dataclass(frozen=True) | ||
| class FeeEstimateResponse: | ||
| """Represents the result of a fee estimation operation.""" | ||
|
|
||
| mode: FeeEstimateMode | ||
| network_fee: NetworkFee | None = None | ||
| node_fee: FeeEstimate | None = None | ||
| service_fee: FeeEstimate | None = None | ||
| total: int = 0 | ||
| high_volume_multiplier: int = 0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from dataclasses import dataclass | ||
|
|
||
|
|
||
| @dataclass(frozen=True) | ||
| class FeeExtra: | ||
| """ | ||
| Represents additional fee details associated with a transaction or operation. | ||
| """ | ||
|
|
||
| name: str | None = None | ||
| included: int | None = None | ||
| count: int | None = None | ||
| charged: int | None = None | ||
| fee_per_unit: int | None = None | ||
| subtotal: int | None = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from dataclasses import dataclass | ||
|
|
||
|
|
||
| @dataclass(frozen=True) | ||
| class NetworkFee: | ||
| multiplier: int | ||
| subtotal: int |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.