Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/scripts/bot-assignment-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ issue_has_gfi() {
}

assignments_count() {
# Count only issues (not PRs) assigned to the user, using structured isPullRequest field
gh issue list --repo "${REPO}" --assignee "${ASSIGNEE}" --state open --limit 100 --json number,isPullRequest --jq '[.[] | select(.isPullRequest | not)] | length'
gh issue list --repo "${REPO}" --assignee "${ASSIGNEE}" --state open --limit 100 --json number --jq 'length'
}

remove_assignee() {
Expand Down Expand Up @@ -76,7 +75,7 @@ Hi @$ASSIGNEE, this is the Assignment Bot.

:warning: **Assignment Limit Exceeded**

Your account currently has limited assignment privileges with a maximum of **1 open issue assignment** at a time.
Your account currently has limited assignment privileges with a maximum of **1 open assignment** at a time.

You currently have $count open issue(s) assigned. Please complete and merge your existing assignment before requesting a new one.

Expand All @@ -97,7 +96,7 @@ msg_normal_limit_exceeded() {
cat <<EOF
Hi @$ASSIGNEE, this is the Assignment Bot.

Assigning you to this issue would exceed the limit of 2 open issue assignments.
Assigning you to this issue would exceed the limit of 2 open assignments.

Please resolve and merge your existing assigned issues before requesting new ones.
EOF
Expand Down
6 changes: 0 additions & 6 deletions .github/scripts/bot-workflows.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,6 @@ const REPO = process.env.REPO || process.env.GITHUB_REPOSITORY || '';
let DRY_RUN = normaliseDryRun(process.env.DRY_RUN || '1');
let PR_NUMBER = process.env.PR_NUMBER || '';

// Validate workflow name contains only safe characters
if (FAILED_WORKFLOW_NAME && !/^[\w\s\-\.]+$/.test(FAILED_WORKFLOW_NAME)) {
console.error(`ERROR: FAILED_WORKFLOW_NAME contains invalid characters: ${FAILED_WORKFLOW_NAME}`);
process.exit(1);
}

// Set GH_TOKEN environment variable for gh CLI
if (GH_TOKEN) {
process.env.GH_TOKEN = GH_TOKEN;
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/bot-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ on:
- completed
permissions:
contents: read
pull-requests: read
issues: write
pull-requests: write
concurrency:
group: "workflow-failure-${{ github.event.workflow_run.head_branch || github.run_id }}"
cancel-in-progress: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deps-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit

Expand Down
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
### Examples

### Docs
- Improved Google-style docstring for `compress_point_unchecked` in `crypto_utils.py`. (#1625)
- chore: update office hours and community calls to use direct links (`#1804`)

### Tests
- Format `tests/unit/endpoint_test.py` using black. (`#1792`)

### .github


- Fixed bot workflow runtime failure caused by strict `FAILED_WORKFLOW_NAME` validation. (`#1690`)
- Reverted PR #1739 checking assignment counts
- chore: update step-security/harden-runner from 2.14.1 to 2.14.2 in a workflow

## [0.2.0] - 2026-11-02

Expand Down Expand Up @@ -177,6 +181,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
- Replaced the docstring in `entity_id_helper.py` with one that is correct. (#1623)

### Changed
- Reduced linting errors in `examples/` directory by 80% (952 → 185) by fixing docstring formatting, import ordering, and applying auto-fixes (#1768)
- Improved bot message formatting in LinkBot to display issue linking format as a code block for better clarity (#1762)
- Refactored `setup_client()` in all `examples/query/` files to use `Client.from_env()` for simplified client initialization (#1449)
- Improve the changelog check by posting informative PR comments when entries are missing or placed under a released version. (#1683)
Expand Down Expand Up @@ -283,7 +288,6 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
### Fixed
- Added a fork guard condition to prevent Codecov upload failures on fork PRs due to missing token. (`#1485`)
- Corrected broken documentation links in SDK developer training files.(#1707)
- Fixed assignment limit check to only count issues (not PRs) towards the maximum 2 concurrent assignments, allowing users to be assigned to PRs without affecting their issue assignment capacity. (#1717)
- Updated Good First Issue recommendations to supported Hiero repositories. (#1689)
- Fix the next-issue recommendation bot to post the correct issue recommendation comment. (#1593)
- Ensured that the GFI assignment bot skips posting `/assign` reminders for repository collaborators to avoid unnecessary notifications.(#1568).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ uv run pytest

- **Blog**: [Hiero Blog](https://hiero.org/blog/)
- **Videos**: [LFDT YouTube Channel](https://www.youtube.com/@lfdecentralizedtrust/videos)
- **Community Calls**: [Hiero Calendar](https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week) (Wednesdays, 2pm UTC)
- **Community Calls**: [Hiero Calendar](https://zoom-lfx.platform.linuxfoundation.org/meeting/92041330205?password=2f345bee-0c14-4dd5-9883-06fbc9c60581) (Wednesdays, 2pm UTC)

---

Expand Down
2 changes: 1 addition & 1 deletion docs/maintainers/good_first_issues_guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,4 @@ Such issues are better labeled as **Beginner Issues**.
- [DCO Signing Guide](../sdk_developers/signing.md)
- [Changelog Entry Guide](../sdk_developers/changelog_entry.md)
- [Discord Community](../discord.md)
- [Community Calls](https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week)
- [Community Calls](https://zoom-lfx.platform.linuxfoundation.org/meeting/92041330205?password=2f345bee-0c14-4dd5-9883-06fbc9c60581)
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ We have several workflows that check:

If they are failing and you require help, you can:
- Contact us on discord (docs/discord.md)
- Attend the Python SDK Office Hours using the [LFDT Calendar](https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week)
- Attend the Python SDK Office Hours using the [LFDT Calendar](https://zoom-lfx.platform.linuxfoundation.org/meeting/99912667426?password=5b584a0e-1ed7-49d3-b2fc-dc5ddc888338)
- Ask for help on the pull request

All checks should be green before requesting review.
Expand All @@ -61,4 +61,4 @@ Ensure you have GitHub Copilot set up as a reviewer to help maintainers on the i

Assign maintainers using the request review feature on the top right.

That's it! Wait for feedback and resolve.
That's it! Wait for feedback and resolve.
6 changes: 3 additions & 3 deletions docs/sdk_developers/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ Please review and check they all pass.

If they are failing and you require help, you can:
- Contact us on [discord](../discord.md)
- Attend [Python SDK Office Hours](https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week)
- Attend [Community Calls](https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week)
- Attend [Python SDK Office Hours](https://zoom-lfx.platform.linuxfoundation.org/meeting/99912667426?password=5b584a0e-1ed7-49d3-b2fc-dc5ddc888338)
- Attend [Community Calls](https://zoom-lfx.platform.linuxfoundation.org/meeting/92041330205?password=2f345bee-0c14-4dd5-9883-06fbc9c60581)
- Ask for help on the pull request

5. Request a Review
Expand All @@ -310,4 +310,4 @@ That's it! Wait for feedback.

6. Once approved
Once your pull request passes checks and is approved, it will shortly be merged to main.
Congratulations!
Congratulations!
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""


Example: Approving an HBAR allowance and transferring HBAR using it.

Why:
Expand Down Expand Up @@ -28,7 +30,6 @@
Hedera allowance documentation. This example focuses solely on HBAR
allowances and does not demonstrate revoking allowances or token/NFT usage.
"""

import os
import sys

Expand Down Expand Up @@ -144,10 +145,11 @@ def transfer_hbar_with_allowance(
def main():
"""
Demonstrates hbar allowance functionality by:

1. Setting up client with operator account
2. Creating spender and receiver accounts
3. Approving hbar allowance for spender
4. Transferring hbars using the allowance
4. Transferring hbars using the allowance.
"""
client = setup_client()

Expand Down
23 changes: 12 additions & 11 deletions examples/account/account_allowance_approve_transaction_nft.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""


Example: Approving an NFT allowance and transferring the NFT using it.

Why:
Expand Down Expand Up @@ -26,25 +28,25 @@
Usage:
uv run examples/account/account_allowance_approve_transaction_nft.py
"""

import os
import sys

from dotenv import load_dotenv

from hiero_sdk_python import (
Client,
AccountAllowanceApproveTransaction,
AccountId,
PrivateKey,
Network,
Client,
Hbar,
Network,
NftId,
PrivateKey,
ResponseCode,
TokenCreateTransaction,
TokenType,
SupplyType,
TokenMintTransaction,
NftId,
TokenAssociateTransaction,
AccountAllowanceApproveTransaction,
TokenCreateTransaction,
TokenMintTransaction,
TokenType,
TransferTransaction,
)
from hiero_sdk_python.account.account_create_transaction import AccountCreateTransaction
Expand All @@ -55,7 +57,7 @@


def setup_client():
"""Initialize and set up the client with operator account"""
"""Initialize and set up the client with operator account."""
if os.getenv("OPERATOR_ID") is None or os.getenv("OPERATOR_KEY") is None:
print("Environment variables OPERATOR_ID and OPERATOR_KEY must be set")
sys.exit(1)
Expand Down Expand Up @@ -100,7 +102,6 @@ def create_account(client, memo="Test Account"):

def create_nft_token(client, owner_id, owner_key):
"""Create a new non-fungible token (NFT) with the owner as treasury."""

tx = (
TokenCreateTransaction()
.set_token_name("ApproveTest NFT")
Expand Down
8 changes: 4 additions & 4 deletions examples/account/account_allowance_delete_transaction_hbar.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
Example demonstrating hbar allowance approval, deletion, and failure after deletion.
"""
"""Example demonstrating hbar allowance approval, deletion, and failure after deletion."""

import os
import sys
Expand Down Expand Up @@ -144,6 +142,7 @@ def transfer_hbar_without_allowance(
):
"""
Attempt to transfer hbars after allowance has been deleted.

This should fail with SPENDER_DOES_NOT_HAVE_ALLOWANCE.
"""
print("Trying to transfer hbars without allowance...")
Expand Down Expand Up @@ -175,12 +174,13 @@ def transfer_hbar_without_allowance(
def main():
"""
Demonstrates hbar allowance functionality by:

1. Setting up client with operator account
2. Creating spender and receiver accounts
3. Approving hbar allowance for spender
4. Transferring hbars using the allowance
5. Deleting allowance
6. Attempting to transfer again and seeing it fails
6. Attempting to transfer again and seeing it fails.
"""
client = setup_client()

Expand Down
32 changes: 16 additions & 16 deletions examples/account/account_allowance_delete_transaction_nft.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""


this example demonstrates deleting an NFT allowance.

- Creates an owner and spender account.
Expand All @@ -11,26 +13,26 @@
python examples/account/account_allowance_delete_transaction_nft.py
uv run examples/account/account_allowance_delete_transaction_nft.py
"""

import os
import sys

from dotenv import load_dotenv

from hiero_sdk_python import (
Client,
AccountAllowanceApproveTransaction,
AccountId,
PrivateKey,
Network,
Client,
Hbar,
Network,
NftId,
PrivateKey,
ResponseCode,
TokenCreateTransaction,
TokenType,
SupplyType,
TokenMintTransaction,
NftId,
TokenId,
TokenAssociateTransaction,
AccountAllowanceApproveTransaction,
TokenCreateTransaction,
TokenId,
TokenMintTransaction,
TokenType,
TransferTransaction,
)
from hiero_sdk_python.account.account_create_transaction import AccountCreateTransaction
Expand All @@ -40,7 +42,7 @@


def setup_client():
"""Initialize and set up the client with operator account"""
"""Initialize and set up the client with operator account."""
if os.getenv("OPERATOR_ID") is None or os.getenv("OPERATOR_KEY") is None:
print("Environment variables OPERATOR_ID and OPERATOR_KEY must be set")
sys.exit(1)
Expand Down Expand Up @@ -94,7 +96,6 @@ def create_account(client, memo="Test Account"):

def create_nft_token(client, owner_id, owner_key):
"""Create a new non-fungible token (NFT)."""

tx = (
TokenCreateTransaction()
.set_token_name("DeleteTest NFT")
Expand Down Expand Up @@ -211,9 +212,7 @@ def delete_nft_allowance_all_serials(
spender_id: AccountId,
owner_key: PrivateKey,
):
"""
Revokes an "approve for all serials" NFT allowance from a spender.
"""
"""Revokes an "approve for all serials" NFT allowance from a spender."""
print(
f"NFT Owner ({owner_id}) deleting 'approve for all' allowance for {token_id} from Spender ({spender_id})..."
)
Expand Down Expand Up @@ -243,6 +242,7 @@ def verify_allowance_removed(
):
"""
Try to transfer NFT after allowance removal (should fail).

This transaction is paid for and signed by the SPENDER.
"""
print(
Expand All @@ -261,7 +261,7 @@ def verify_allowance_removed(
"Verification SUCCEEDED: Transfer failed with SPENDER_DOES_NOT_HAVE_ALLOWANCE as expected."
)
elif receipt.status == ResponseCode.SUCCESS:
print(f"Verification FAILED: Transfer succeeded unexpectedly!")
print("Verification FAILED: Transfer succeeded unexpectedly!")
sys.exit(1)
else:
print(
Expand Down
Loading
Loading