-
Notifications
You must be signed in to change notification settings - Fork 287
feat: Add Hip1261 Implementation #2231
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
Merged
aceppaluni
merged 12 commits into
hiero-ledger:main
from
aceppaluni:Hip1261Implementation
May 8, 2026
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6416a55
feat: Add Hip1261 Implementation
aceppaluni 135eb4d
fix: Make Coderabbit Changes
aceppaluni 78891de
fix: Add Corrections
aceppaluni 9fbd9c8
fix: Add CodeRabbit Suggestions
aceppaluni 3b64019
fix: Add New Suggestions
aceppaluni 377bee1
fix: Remove Client
aceppaluni e32346b
fix: Add Estimate Fee Method Back In Transaction
aceppaluni 03a6250
fix: Add Latest Change
aceppaluni f2d1e1f
fix: Fix Changes
aceppaluni a22c42f
fix: Fix Init
aceppaluni 1b7e655
fix: Fix Init Second
aceppaluni b60c60d
Merge branch 'main' into Hip1261Implementation
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
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,19 @@ | ||
| """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) | ||
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.