Skip to content

Commit 7ebfad1

Browse files
authored
Merge branch 'hiero-ledger:main' into main
2 parents 6388210 + a3cfa1a commit 7ebfad1

File tree

169 files changed

+18412
-2652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+18412
-2652
lines changed

.github/dependabot.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "daily"
12+
open-pull-requests-limit: 10
13+
- package-ecosystem: "pip"
14+
directory: "/"
15+
schedule:
16+
interval: "daily"
17+
open-pull-requests-limit: 10
18+
- package-ecosystem: "pip-compile"
19+
directory: "/"
20+
schedule:
21+
interval: "daily"
22+
open-pull-requests-limit: 10
23+
- package-ecosystem: "pipenv"
24+
directory: "/"
25+
schedule:
26+
interval: "daily"
27+
open-pull-requests-limit: 10

.github/workflows/test.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,19 @@ on:
77
workflow_dispatch:
88
pull_request:
99

10+
permissions:
11+
contents: read
12+
actions: write
13+
1014
jobs:
1115
build-and-test:
1216
runs-on: ubuntu-latest
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
python-version: ["3.10", "3.11", "3.12"]
22+
1323
steps:
1424
- name: Harden the runner (Audit all outbound calls)
1525
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
@@ -19,15 +29,18 @@ jobs:
1929
- name: Checkout repository
2030
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2131

32+
- name: Set up Python ${{ matrix.python-version }}
33+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
cache: 'pip'
37+
2238
- name: Install uv
2339
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4.2.0
2440

2541
- name: Install setuptools wheel
2642
run: pip install --upgrade pip setuptools wheel
2743

28-
- name: Setup Python
29-
run: uv python install
30-
3144
- name: Install dependencies
3245
run: uv sync --all-extras --dev
3346

@@ -36,7 +49,7 @@ jobs:
3649

3750
- name: Prepare Hiero Solo
3851
id: solo
39-
uses: hiero-ledger/hiero-solo-action@97b1a5dfff3a18ae92ffb4c27f5ada95906f66bb # v0.12
52+
uses: hiero-ledger/hiero-solo-action@b76850c1ac44466900f8e7412b309c3aa0f539c1 # v0.14
4053
with:
4154
installMirrorNode: true
4255

CHANGELOG.md

Lines changed: 196 additions & 36 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 251 additions & 46 deletions
Large diffs are not rendered by default.

MAINTAINERS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Maintainers are assigned the following scopes in this repository:
1919
| Name | GitHub ID | Scope | LFID | Discord ID | Email | Company Affiliation |
2020
| -------------- | ------------- | ----- | ---- | -------------- | ----- | ------------------- |
2121
| Nadine Loepfe | nadineloepfe | | | nadine_90669 | | Hashgraph |
22-
| Hendrik Ebbers | hendrikebbers | | | hendrik.ebbers | | Hashgraph |
22+
| Sophie Bulloch | exploreriii | | | explorer3 | | |
2323
| Richard Bair | rbair23 | | | rbair | | Hashgraph |
2424

2525

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,26 @@ Topic deletion successful.
154154

155155
## Contributing
156156

157-
We appreciate your interest in improving the Hiero Python SDK! Please see CONTRIBUTING.md for details about our contribution process, including bug reports, feature requests, and code contributions.
157+
We appreciate your interest in improving the Hiero Python SDK!
158+
Interested in helping out? We'd love for you to contribute!
159+
160+
Before you start, it's **essential** that you carefully read our main contribution guide: **[CONTRIBUTING.md](./CONTRIBUTING.md)**. This document is your roadmap to making a successful contribution.
161+
162+
Following the steps in this guide is the best way to ensure your pull request (PR) can be merged smoothly. It covers crucial requirements, including:
163+
164+
* How to get your commits **verified** (which is mandatory for merging).
165+
* The correct way to update the **changelog** with your changes.
166+
* The full step-by-step workflow for submitting code.
167+
168+
Our guide also explains how you can contribute in other ways, like submitting **bug reports** and proposing new **feature requests**.
169+
170+
### Links
171+
- [Hiero Python SDK Discord](https://discord.com/channels/905194001349627914/1336494517544681563)
172+
- [Hedera Developer Support Discord](https://discord.com/channels/373889138199494658/1106578684573388900).
173+
- [Hiero Blog](https://hiero.org/blog/)
174+
- [LFDT Youtube Channel](https://www.youtube.com/@lfdecentralizedtrust/videos)
175+
- [Hiero LFTD Calendar](https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week)
176+
158177

159178
## License
160179

docs/common_issues.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
## Resolving Changelog Conflicts
2+
3+
A common issue you may face when submitting a pull request (PR) is a "changelog conflict." This happens when your PR modifies the `CHANGELOG.md` file, but another PR that also modified it was merged before yours.
4+
5+
### Common Causes
6+
7+
There are two main reasons this happens:
8+
9+
1. **SDK Version Bump (Scenario A):** The SDK launched a new version (e.g., `0.1.5` became `0.1.6`) while your PR was open. Your changelog entry was under the `[Unreleased]` section, but that section is now part of the `[0.1.6]` release. Your entry needs to be moved to the *new* `[Unreleased]` section.
10+
2. **Same Section Conflict (Scenario B):** Another PR was merged that added its own changelog entry to the *exact same* `[Unreleased]` section as yours (e.g., you both added a line under `Changed`). The file now has a conflict because Git doesn't know which line should come first.
11+
12+
### How to Resolve the Conflict
13+
14+
To fix this, you need to sync your branch with the main project (known as `upstream`) and then fix the conflict. This is done using a `rebase`.
15+
16+
**1. Sync Your Local `main` Branch**
17+
18+
First, ensure your local `main` branch has the latest changes from the `hiero-ledger` project.
19+
20+
```bash
21+
# Switch to your main branch
22+
git checkout main
23+
24+
# Fetch all the latest changes from the upstream (original) repository
25+
git fetch upstream
26+
27+
# Pull those changes into your local main branch
28+
git pull upstream main
29+
```
30+
31+
## 2. Changelog Conflict Examples
32+
### Example 1: The SDK Version has upgraded
33+
If the SDK version has upgraded, you'll need to move your changelog entry to the new unreleased section.
34+
35+
For example:
36+
before
37+
38+
`UNRELEASED (version 0.1.6)`
39+
` Changed`
40+
41+
- TransferTransaction refactored to use TokenTransfer and HbarTransfer classes instead of dictionaries
42+
- Added checksum validation for TokenId
43+
- Refactor examples/token_cancel_airdrop <-- your entry
44+
45+
Version 0.1.6 is now released but your PR is not yet merged so we need to move your changelog entry to the new UNRELEASED SECTION.
46+
47+
after:
48+
49+
`[Unreleased]`
50+
51+
`Changed`
52+
- Refactor examples/token_cancel_airdrop <-- CORRECT
53+
54+
`[0.1.6] - 2025-10-21`
55+
` Changed`
56+
57+
- TransferTransaction refactored to use TokenTransfer and HbarTransfer classes instead of dictionaries
58+
- Added checksum validation for TokenId
59+
60+
### Example 2: The SDK has had a minor update
61+
In this case, a new PR is merged in the same release that has a changelog entry written in the same section as you.
62+
63+
For example:
64+
65+
Alice's Pull Request:
66+
` UNRELEASED`
67+
` Changed`
68+
69+
- TransferTransaction refactored to use TokenTransfer and HbarTransfer classes instead of dictionaries
70+
- Added checksum validation for TokenId <-- ALICE'S Change
71+
72+
Bob's Pull Request:
73+
` UNRELEASED`
74+
` Changed`
75+
76+
- TransferTransaction refactored to use TokenTransfer and HbarTransfer classes instead of dictionaries
77+
- Refactor examples/token_cancel_airdrop <-- BOB's change
78+
79+
They are in conflict.
80+
81+
Alice's change was merged before Bob, so Bob needs update his changelog to be:
82+
Bob's Pull Request:
83+
` UNRELEASED`
84+
` Changed`
85+
86+
- TransferTransaction refactored to use TokenTransfer and HbarTransfer classes instead of dictionaries
87+
- Added checksum validation for TokenId <-- ALICE'S Change
88+
- Refactor examples/token_cancel_airdrop <-- BOB's change
89+
Which has no conflict as they are no longer clashing.
90+
91+
Congratulations!

docs/sdk_developers/changelog.md

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
# Changelog Entry Guide
2+
3+
This document explains how to create proper changelog entries for the Hiero Python SDK.
4+
5+
## Table of Contents
6+
7+
- [Why Changelog Entries Matter](#why-changelog-entries-matter)
8+
- [Required Format](#required-format)
9+
- [Changelog Sections](#changelog-sections)
10+
- [Step-by-Step Guide](#step-by-step-guide)
11+
- [Examples](#examples)
12+
13+
## Why Changelog Entries Matter
14+
15+
**Every pull request MUST include a changelog entry.**
16+
17+
The changelog is the first place users look to understand what's new, what's fixed, and what's changed in each release. A well-written changelog entry helps users quickly understand the impact of your contribution.
18+
19+
## Required Format
20+
21+
Your changelog entry must:
22+
23+
1. **Link to the issue** - Include a reference to the issue your PR solves
24+
2. **Use clear, descriptive language** - Be concise but informative
25+
3. **Be 1-2 sentences** - Keep it brief and focused
26+
4. **Go under [Unreleased]** - Add your entry at the top of the file, in the appropriate section under `[Unreleased]`
27+
5. **Use proper markdown** - Follow the bullet point format
28+
29+
## Changelog Sections
30+
31+
The `[Unreleased]` section is divided into three categories. Choose the one that best fits your change:
32+
33+
### Added
34+
For new features, functionality, or capabilities added to the SDK.
35+
36+
**Examples:**
37+
- New API methods
38+
- New query types
39+
- New transaction types
40+
- New utility functions
41+
42+
### Changed
43+
For modifications to existing functionality that change behavior but aren't bug fixes.
44+
45+
**Examples:**
46+
- Refactored code structure
47+
- Updated dependencies
48+
- Modified function signatures
49+
- Performance improvements
50+
- Updated documentation
51+
52+
### Fixed
53+
For bug fixes that resolve incorrect behavior.
54+
55+
**Examples:**
56+
- Resolved errors or exceptions
57+
- Corrected incorrect return values
58+
- Fixed edge cases
59+
- Patched security vulnerabilities
60+
61+
## Step-by-Step Guide
62+
63+
1. **Open `CHANGELOG.md`** in the repository root
64+
65+
2. **Find the `[Unreleased]` section** at the top of the file
66+
67+
3. **Choose the appropriate subsection** (Added, Changed, or Fixed)
68+
69+
4. **Add your entry as a new bullet point** at the top of that subsection
70+
71+
5. **Format your entry** as:
72+
```markdown
73+
- Brief description of your change (#IssueNumber)
74+
```
75+
76+
6. **Ensure it's descriptive** - Readers should understand what changed and why it matters
77+
78+
## Examples
79+
80+
### ✅ Good Examples
81+
82+
#### Good: Clear and Descriptive
83+
```markdown
84+
## [Unreleased]
85+
86+
### Changed
87+
- Refactor `query_balance.py` into modular, reusable functions with `setup_client()`, `create_account()`, `get_balance()`, `transfer_hbars()`, and `main()` for improved readability, maintainability, and error handling (#123)
88+
```
89+
90+
**Why this is good:**
91+
- Links to the issue (#123)
92+
- Describes what was refactored
93+
- Lists the specific functions created
94+
- Explains the benefits (readability, maintainability, error handling)
95+
- Placed correctly under [Unreleased] → Changed
96+
97+
#### Good: Bug Fix
98+
```markdown
99+
## [Unreleased]
100+
101+
### Fixed
102+
- Resolve `TypeError` in `transfer_transaction.py` when passing `None` as memo parameter (#456)
103+
```
104+
105+
**Why this is good:**
106+
- Links to the issue
107+
- Specifies the error type
108+
- Identifies the affected file
109+
- Describes the problematic scenario
110+
111+
#### Good: New Feature
112+
```markdown
113+
## [Unreleased]
114+
115+
### Added
116+
- Add support for HIP-### token association transactions with automatic fee calculation (#789)
117+
```
118+
119+
**Why this is good:**
120+
- Links to the issue
121+
- Clearly states what was added
122+
- Mentions a key feature (automatic fee calculation)
123+
124+
### ❌ Bad Examples
125+
126+
#### Bad: Not Informative
127+
```markdown
128+
## [Unreleased]
129+
130+
### Changed
131+
- Refactor `query_balance.py`
132+
```
133+
134+
**Why this is bad:**
135+
- No issue link
136+
- Doesn't explain what was refactored or why
137+
- Too vague - users can't understand the impact
138+
139+
#### Bad: Wrong Placement (Version Number Instead of Unreleased)
140+
```markdown
141+
## [0.1.6] - 2025-10-21
142+
143+
### Changed
144+
- Refactor `query_balance.py` into modular, reusable functions (#123)
145+
```
146+
147+
**Why this is bad:**
148+
- Added under a released version instead of [Unreleased]
149+
- Version numbers and dates are added by maintainers during release
150+
- Your entry should always go under [Unreleased]
151+
152+
#### Bad: No Issue Reference
153+
```markdown
154+
## [Unreleased]
155+
156+
### Fixed
157+
- Fix bug in transaction signing
158+
```
159+
160+
**Why this is bad:**
161+
- No issue link
162+
- Too vague about what bug was fixed
163+
- Doesn't help users understand if it affects them
164+
165+
## Common Mistakes to Avoid
166+
167+
1. **Don't add entries to released versions** - Always use `[Unreleased]`
168+
2. **Don't forget the issue number** - Every entry needs a link like `(#123)`
169+
3. **Don't write paragraphs** - Keep it to 1-2 sentences
170+
4. **Don't be too technical** - Write for SDK users, not just developers
171+
5. **Don't skip the changelog** - It's required for all PRs
172+
173+
## Need Help?
174+
175+
If you're unsure about your changelog entry:
176+
177+
1. Look at recent entries in `CHANGELOG.md` for inspiration
178+
2. Ask in your pull request for feedback
179+
3. Review this guide again
180+
4. Check other documentation files in `docs/sdk_developers/`
181+
182+
Remember: A good changelog entry helps thousands of developers understand your contribution!

0 commit comments

Comments
 (0)