hiero-ledger / hiero-ledger/hiero-consensus-node

Distinguish ACCOUNT_FROZEN_FOR_TOKEN for treasury and recipient

Open
#2,978 1 comment 0 reactions 0 assignees View on GitHub
Good First Issue Candidate
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

### Description

If a token's treasury account is frozen (see issue #2977) and a transfer is attempted, the resulting error message `ACCOUNT_FROZEN_FOR_TOKEN` is identical to that returned if the recipient is frozen.

This leads to lack of clarity for developers/users who may not understand why an unfrozen recipient cannot receive a token due to the treasury being frozen.

Proposing a separate error message/code for these two conditions

### Steps to reproduce

Create a token with a freeze key
Associate an account with the token
Freeze the account
Transfer tokens from treasury to the account -> witness error

Unfreeze the above account
Freeze the token's treasury
Transfer tokens from treasury to the account -> witness same error

### Additional context

_No response_

### Hedera network

mainnet, testnet, previewnet

### Version

v0.23.2

### Operating system

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the two transfer scenarios described in the issue and trace where ACCOUNT_FROZEN_FOR_TOKEN is produced for the recipient and treasury conditions. Done means the two conditions return distinct error messages or codes, with behavior verified for the listed Hedera networks.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
blockchain
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.