hiero-ledger / hiero-ledger/hiero-consensus-node
Distinguish ACCOUNT_FROZEN_FOR_TOKEN for treasury and recipient
- 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
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