DEV Community

Cynthia Fotso
Cynthia Fotso

Posted on

Continuous Contribution for Hiero SDK Python - Release 0.3

For this release 0.3, I continued to work on the https://github.com/hiero-ledger/hiero-sdk-python repository. My initial goal was not just to solve an issue and open a pull request for Hacktoberfest, but also to continue working on real projects, thereby understanding professional workflows such as proper Git rebasing, writing clean commits, detailed pull requests, ensuring I follow contribution rules, and documenting changes.

What I worked on

I worked on issue #829, which required adding a real example of how to use fee_schedule_key in token creation within the Hiero SDK. While this Software Development Kit supported the functionality, there was no documented usage example, and users reading the documentation could not see how to apply it in practice.

My task involved:

  • Creating a runnable example in token_create_transaction_token_fee_schedule_key.py in the examples folder
  • Ensuring the example demonstrated token creation using this key
  • Updating the documentation and changelog so users could easily find it

Understanding the codebase

Before writing this example, I took time to understand how other token-related examples were structured, which modules handled token creation, and how keys were defined in other examples already implemented in the code. This gave me a solid understanding of the repository and reduced the risk of writing code that would not be consistent with the existing style.

Implementing the example

I created a new file in the examples folder and created two tokens: one with fee_schedule_key and one without as requested. Updates were done on both showing success or failure. I used the TokenFeeScheduleUpdateTransaction class from the token folder to enable the client to sign in only when the key was present.

Once I was done with this, I decided to challenge myself by creating a test file, test_token_fee_schedule_key.py in the tests/unit folder and running it to be sure everything worked well before committing my work. However, I ran into several issues. I first ran: uv run pytest tests/unit/test_token_fee_schedule_key.py -v and encountered errors, most of which were related to missing environment variables or missing keys such as generate_transaction_id.

First failed test

Account ID missing

feeScheduleKey missing

These were resolved by rechecking existing tests and searching online. I learned I could download a Protocol Buffers Package which helped me automatically generate some missing files in my codebase and run the tests appropriately. After implementing these fixes, the unit tests finally passed, which was very satisfying.

Passed unit test

Updating the Changelog and Committing my enhancement

Hiero SDK enforces enforces strict documentation standards, including updating CHANGELOG.md for every enhancement. I added a description of the new example I implemented as this ensured that other users would see what was added in the next release. Also, I ensured each of my commits was signed with both GPG and DCO sign-off as required. I finally submitted a Pull Request which was reviewed and successfully merged by the repository owner!

If I were to measure my progress from Release 0.2, I would say I put in a lot of work in this one, did a lot of research, and pushed myself to accomplish more. My goal was to satisfy the maintainer with the quality of work done, the clear documentation, and to close the issue properly, ensuring smooth understanding of the solution.

Top comments (0)