Skip to content
19 changes: 19 additions & 0 deletions src/hiero_sdk_python/fees/fee_estimate.py
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)
Comment thread
manishdait marked this conversation as resolved.
15 changes: 15 additions & 0 deletions src/hiero_sdk_python/fees/fee_estimate_mode.py
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"
25 changes: 25 additions & 0 deletions src/hiero_sdk_python/fees/fee_estimate_response.py
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
17 changes: 17 additions & 0 deletions src/hiero_sdk_python/fees/fee_extra.py
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
9 changes: 9 additions & 0 deletions src/hiero_sdk_python/fees/network_fee.py
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
Loading
Loading