Skip to content

Create _repr method in src/hiero_sdk_python/tokens/custom_fee.py #583

@exploreriii

Description

@exploreriii

This issue is reserved for people who have never or only recently contributed to Hiero or any open source project in general.
We know that creating a pull request (PR) is a major barrier for new contributors.
The goal of this issue and all other issues labeled by 'good first issue' is to help you make your first contribution to Hiero.

👾 Description of the issue

Debugging CustomFixedFee is difficult because there is no repr or str method so it will be a python object
There is no way to tell about specific fields

💡 Solution

Add a def repr(self) -> str:
method

it should state basic attributes such as
class name
fee_collector_account_id
all_collectors_are_exempt

We then need to unit and integration test this (see README.md)

👩‍💻 Implementation

  • add repr method in custom fee
  • expand unit tests for custom_fee: tests/unit/test_custom_fee.py, tests/unit/test_custom_fee_limit.py
  • expand examples/custom_fee.py

Best Practices:

  • Keep your main an updated copy of the upstream main
  • Create a branch to solve your issue
  • Regularly fetch changes from the upstream main
  • NEVER EVER GIT MERGE FROM MAIN, please use: git rebase main -S (see our docs/sdk_developers/rebasing.md) if you need to apply upstream changes. If you face conflicts, read docs/sdk_developers/merge_conflicts.md
  • -s and -S sign each and every commit, you must use the terminal/CLI

Acceptance Criteria:

  • as above
  • All tests pass
  • Nothing else changes
  • /CHANGELOG.md has an entry under 'UNRELEASED' under a relevant section. (Read docs/sdk_developers/changelog_entry.md for guidance).
  • ALL commits are DCO signed and marked as verified (see docs/sdk_developers/signing.md)

IMPORTANT Your pull request CANNOT BE MERGED until you add a changelog entry AND sign your commits each with "git commit -S -s -m "chore: your commit message"" which is tied to a GPG key on github (read signing.md)***

Next steps

  • Comment below that you’d like to work on this issue.
  • Wait to be assigned by a maintainer.
  • Read CONTRIBUTING.md
    to start forking and developing.

If you have never contributed to an open source project at GitHub, the following step-by-step guide will introduce you to the workflow.

CONTRIBUTING.md

README.md

We also have a helpful docs archives at: /docs/sdk_developers
https://github.com/hiero-ledger/hiero-sdk-python/tree/main/docs/sdk_developers

and further information on signing here
https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md

Metadata

Metadata

Labels

Good First IssueIssues which are ideal for a first time or new project contributor.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions