You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We truly appreciate your time and effort. If this is your first open-source contribution, welcome!
14
-
This template is designed to help you create a Beginner-friendly issue: an easy, well-scoped task that helps new contributors learn the codebase and build their skills.
14
+
This template is designed to help you create a Beginner-friendly issue: an easy, well-scoped task that helps fairly new contributors learn the codebase and build their skills.
15
15
---
16
16
- type: textarea
17
17
id: intro
@@ -22,8 +22,8 @@ body:
22
22
This issue is intended for contributors who have previously completed a Good First Issue in [Hiero](https://hiero.org) and are at a beginner level.
23
23
We recognize that gaining confidence and building skills are equally important steps in the open-source contributor journey.
24
24
The purpose of this issue—and others listed under [**Find a beginner issue**](https://github.com/hiero-ledger/hiero-sdk-python/issues?q=is%3Aissue%20state%3Aopen%20label%3Abeginner%20no%3Aassignee)—is to provide a supportive, low-pressure environment where you can learn, practice, and grow your contribution skills with confidence.
25
-
validations:
26
-
required: false
25
+
validations:
26
+
required: false
27
27
28
28
- type: markdown
29
29
attributes:
@@ -60,9 +60,10 @@ body:
60
60
attributes:
61
61
label: 👾 Description of the issue
62
62
description: |
63
-
DESCRIBE THE ISSUE IN A WAY THAT IS UNDERSTANDABLE TO NEW CONTRIBUTORS.
64
-
YOU MUST NOT ASSUME THAT SUCH CONTRIBUTORS HAVE ANY KNOWLEDGE ABOUT THE CODEBASE OR HIERO.
63
+
DESCRIBE THE ISSUE IN A WAY THAT IS UNDERSTANDABLE AND APPROACHABLE TO BEGINNER CONTRIBUTORS.
64
+
ASSUME SUCH CONTRIBUTORS HAVE AT MOST BEGINNER-LEVEL KNOWLEDGE ABOUT PROGRAMMING, THE CODEBASE AND HIERO.
65
65
IT IS HELPFUL TO ADD LINKS TO THE RELEVANT DOCUMENTATION AND/OR CODE SECTIONS.
66
+
SLIGHTLY CHALLENGE THEM TO ENCOURAGE LEARNING AND RESEARCH BUT MAKE SURE THE ISSUE IS STILL SIMPLE.
66
67
BELOW IS AN EXAMPLE.
67
68
value: |
68
69
Edit here. Example provided below.
@@ -76,70 +77,17 @@ body:
76
77
<!-- Example for problem (hidden in submission) -->
77
78
## 👾 Description of the issue - Example
78
79
79
-
The example for Token Associate Transaction located at examples/tokens/token_associate_transaction.py can be improved. It correctly illustrates how to associate a token, however, it does so all from one function main()
80
+
The `AccountId` class at src/hiero_sdk_python/account/account_id.py implements a `__repr__()` method which currently falls back to the default object representation, which is less helpful
81
+
when debugging.
80
82
81
-
As everything is grouped together in main(), it is difficult for a user to understand all the individual steps required to associate a token.
83
+
For example, printing an `AccountId` instance in a REPL currently produces output similar to:
82
84
83
-
For example:
84
85
```python
85
-
86
-
def run_demo():
87
-
"""Monolithic token association demo."""
88
-
print(f"🚀 Connecting to Hedera {network_name} network!")
print(f"✅ Token {tokens[0]} associated with account {account_id}")
138
-
except Exception as e:
139
-
print(f"❌ Token association failed: {e}")
140
-
sys.exit(1)
86
+
<hiero.account_id.AccountId object at 0x7f9c2a3b8d60>
141
87
```
142
88
89
+
This makes it difficult to quickly identify the actual account ID value during debugging sessions.
90
+
143
91
- type: textarea
144
92
id: solution
145
93
attributes:
@@ -159,14 +107,14 @@ body:
159
107
attributes:
160
108
value: |
161
109
<!-- Example for the solution (hidden in submission) -->
162
-
## 💡 Solution - Example
110
+
To improve this, we want to implement a more informative `__repr__()` method for the `AccountId` class that clearly displays the account ID in a recognizable format.
111
+
112
+
After this improvement, `repr(account_id)` should return a clear and descriptive value that reflects
113
+
the account’s shard, realm, and number. For example:
163
114
164
-
For the TokenAssociateTransaction example, the solution is to split the monolithic main() function for illustrating TokenAssociateTransaction into separate smaller functions which are called from main().
165
-
Such as:
166
-
- Setting up the client
167
-
- Creating an account
168
-
- Creating a token
169
-
- Associating the account to the token
115
+
```python
116
+
AccountId(shard=0, realm=0, num=1234)
117
+
```
170
118
171
119
- type: textarea
172
120
id: implementation
@@ -188,35 +136,17 @@ body:
188
136
<!-- Example implementation (hidden in submission) -->
189
137
### 👩💻 Implementation - Example
190
138
191
-
To break down the monolithic main function, you need to:
192
-
- [ ] Extract the Key Steps (set up a client, create a test account, create a token, associate the token)
193
-
- [ ] Copy and paste the functionality for each key step into its own function
194
-
- [ ] Pass to each function the variables you need to run it
195
-
- [ ] Call each function in main()
196
-
- [ ] Ensure you return the values you'll need to pass on to the next step in main
197
-
- [ ] Ensure the example still runs and has the same output!
139
+
To implement this change, beginner contributors should:
198
140
199
-
For example:
200
-
```python
201
-
202
-
def setup_client():
203
-
"""Initialize and set up the client with operator account."""
204
-
205
-
def create_test_account(client, operator_key):
206
-
"""Create a new test account for demonstration."""
- [ ] Locate the `AccountId` class in the `src/` directory
142
+
- [ ] Review the existing `__str__()` method to understand how account IDs are currently formatted
143
+
- [ ] Review the `__init__()` method to see which fields (`shard`, `realm`, `num`, `alias_key`) define an account
144
+
- [ ] Check whether other ID classes in the SDK implement `__repr__()` and follow a similar pattern
145
+
- [ ] Implement or refine the `__repr__()` method so it:
146
+
- Clearly displays `shard`, `realm`, and `num` values
147
+
- Includes `alias_key` when the account is created using an alias
148
+
- Uses keyword-style formatting for readability
149
+
- [ ] Test the new `__repr__()` method expanding the unit test for AccountId
220
150
221
151
- type: textarea
222
152
id: acceptance-criteria
@@ -241,8 +171,6 @@ body:
241
171
label: 📋 Step-by-Step Contribution Guide
242
172
description: Provide a contribution workflow suitable for new contributors
243
173
value: |
244
-
If you have never contributed to an open source project at GitHub, the following step-by-step guide will introduce you to the workflow.
245
-
246
174
- [ ] **Assignment:** You must be assigned to the issue, comment: `/assign` in the issue to get assigned [see guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/training/workflow/04_assigning_issues.md)
247
175
- [ ] **Fork, Branch and Work on the issue:** Create a copy of the repository, create a branch for the issue and solve the problem. For instructions, please read our [Contributing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/CONTRIBUTING.md) file. Further help can be found at [Set-up Training](https://github.com/hiero-ledger/hiero-sdk-python/tree/main/docs/sdk_developers/training/setup) and [Workflow Training](https://github.com/hiero-ledger/hiero-sdk-python/tree/main/docs/sdk_developers/training/workflow).
248
176
- [ ] **DCO and GPG key sign each commit :** each commit must be -s and -S signed. An explanation on how to do this is at [Signing Guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md)
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
35
35
- Refactored `account_create_transaction_create_with_alias.py` example by splitting monolithic function into modular functions: `generate_main_and_alias_keys()`, `create_account_with_ecdsa_alias()`, `fetch_account_info()`, `print_account_summary()` (#1016)
36
36
- Added `.github/workflows/bot-pr-auto-draft-on-changes.yml` to automatically convert PRs to draft and notify authors when reviewers request changes.
37
37
- Add beginner issue template
38
+
- Add relevant examples to the beginner issue template
38
39
- Modularized `transfer_transaction_fungible` example by introducing `account_balance_query()` & `transfer_transaction()`.Renamed `transfer_tokens()` → `main()`
39
40
- Phase 2 of the inactivity-unassign bot: Automatically detects stale open pull requests (no commit activity for 21+ days), comments with a helpful InactivityBot message, closes the stale PR, and unassigns the contributor from the linked issue.
40
41
- Added `__str__()` to CustomFixedFee and updated examples and tests accordingly.
0 commit comments