Skip to content

Add clear_custom_fee_limits() to TopicMessageSubmitTransactionΒ #2449

Description

@manishdait

πŸ§‘β€πŸŽ“ Beginner Issue

Welcome! This is a Beginner Issue designed to help you learn the codebase.

🏁 When this issue is complete, you will have:

βœ… Researched a file or method in detail
βœ… Followed SDK patterns to implement a solution
βœ… Researched and identified appropriate programming constructs to solve the problem
βœ… Created basic tests
βœ… Delivered a clean, review-ready pull request

🐞 Problem Description

TopicMessageSubmitTransaction currently allows custom fee limits to be configured and appended through set_custom_fee_limits() and add_custom_fee_limit(). However, there is no method to remove previously configured fee limits.

Other SDKs exposes a clearCustomFeeLimits() method that clears all configured fee limits before the transaction is executed For Reference. Adding the same capability to the Python SDK would improve API consistency and make it easier for developers to update a transaction without recreating it.

πŸ’‘ Expected Solution

Introduce a clear_custom_fee_limits() method on TopicMessageSubmitTransaction that removes all configured custom fee limits.

πŸ” Research Pointers

  • Inspect hiero_sdk_python/topic/topic_message_submit_transaction.py to understand how custom fee limits are currently managed.
  • Review the other SDKs implementation of clearCustomFeeLimits() to understand the expected behavior.
  • Update the existing topic message submit transaction tests to cover the new API.

πŸ› οΈ Implementation Notes

  • Add a clear_custom_fee_limits() method to TopicMessageSubmitTransaction.
  • Ensure the transaction cannot be modified after it has been frozen.
  • Sould return self to preserve method chaining.
  • Add tests covering the changes.

🧠 Beginner Contributors β€” Prerequisites & Expectations

Caution

Beginner issues are low-risk but we expect a working solution.

Important

We recommend completing at least 3 Good First Issues before attempting a beginner issue.

Difficulty:

  • Requires building knowledge of the specific file(s)
  • Beginner to intermediate Coding skills

Tip

You should be comfortable with:

  • Forking, branching, committing (with DCO + GPG signing), and opening a pull request without a tutorial
  • Reading beginner to intermediate code you did not write and following its patterns
  • Handling simple merge conflicts
  • Keeping your fork up to date with main by rebasing
  • Looking things up on your own before asking for help

If any of that feels unfamiliar, Good First Issues might still be the most rewarding path for you right now β€” find one here.
You can always come back when you are ready.

⚠️ AI Usage Policy

  • AI can help you understand the codebase and the problem
  • Using AI to generate code for beginner issues is strictly discouraged
  • Using AI as the main source of research is strictly discouraged, refer to language and library documentation, protobuf definitions and other SDKs.

⏱️ Timeline & Workflow

  • Typical time: ~1 Week / ~8 hours.
    🧩 Difficulty: Manageable but requires investigation and testing
    πŸŽ“ Best for: Beginner contributors

  • πŸ”΄ Completing a beginner issue in 1–3 hours is a red flag.

Tip

Suggested: share your proposed implementation approach as a comment before writing code to get early feedback and avoid wasted effort.

πŸ§ͺ Testing Requirements

Important

At the beginner level, testing will be necessary but a small component.
The methods you implement should be verified (happy path at least)

How you test depends on the type of change.

Source code changes (e.g. in src/):

  • Write basic unit tests
  • Run tests locally: uv run pytest tests/unit/<specific_file>_test.py -v
  • Integration tests will run automatically when you push

GitHub Actions / workflow changes (e.g. in .github/): Guide

  • Test by merging to your fork's main and simulating the scenario

Example script changes (e.g. in examples/):

  • Run the example script and confirm output matches expected behavior
  • You will need a Hedera Portal account for testnet credentials

πŸ›‘οΈ Quality & Review Standards

Beginner PRs must be working and follow best practices.

  1. Working: The implementation must solve the problem and meet the acceptance criteria.
  2. SDK Best Practices: The solution should fit well with existing SDK patterns and abstractions.
  3. Testing: basic unit and possibly integration tests to demonstrate the implementation works as expected.

⚠️ Breaking changes

  • Watch for any changes that could impact existing users, even if they seem small.

πŸ€– AI notes

  • AI has gaps or incorrect understanding of repo-specific patterns, logic, and protobuf schemes.

βœ… PR Quality Checklist

Before opening your PR, confirm:

  • I have spent the majority of my time researching the problem and building my understanding of the codebase and methods.
  • My implementation works and is tested (if applicable).
  • Every line of code is personally understood and explainable.
  • My changes address what the issue asked for β€” nothing more, nothing less
  • I have applied appropriate linting, code quality, and formatting tools used in this repo.

Before requesting a review, confirm:

  • I did not modify files unrelated to this issue
  • Clean git history β€” no rebase artifacts, merge commits, or unrelated files
  • My commits are signed: git commit -S -s -m "chore: description" β€” Signing guide
  • I have included appropriate tests and all CI checks pass.

πŸ“‹ Workflow quick reference

You have done this before β€” here are the links if you need them:

Step Guide
Claim this issue Comment /assign below
Sync with main Rebasing guide
Open a PR and link this issue PR guide
Resolve merge conflicts Merge conflicts guide

πŸ“š Resources & Support

πŸ†˜ Stuck?

Tip

Comment on this issue: and describe what you have tried. A maintainer will respond.

Python SDK References:

References:

Metadata

Metadata

Assignees

No one assigned

    Labels

    approvedIssue has been approved by team memberlang: pythonUses Python programming languageskill: beginnerAchievable by a fairly new comer that has already completed a couple of good first issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions