Thanks @tinom9 for your thoughts and suggestions on this.
Forceevent instead ofFrozenChange.
I agree with this ![]()
ERC7943InsufficientUnfrozenBalanceevent instead ofERC7943NotAvailableAmount, with more specificity overERC20InsufficientBalance.
I agree with the specificity and probably we should add it as a SHOULD (in case the token doesnât have specific errors as the ERC20 template by OZ has) not replace the specific errors for insufficient balances (outside the frozen one). However Iâm still having some issues with the naming. ânot availableâ (âunavailableâ) suggests a temporary condition like a frozen amount not allowing you to transfer a determined amount while âinsufficientâ suggest more of a general lack of funds. Indeed if you try to transfer more tokens than the unfrozen one, you technically have a âsufficientâ balance, but not an âavailableâ one to be used. What do you think about this argument ? What about changing to âunavailableâ instead ?
- Pausability implemented through
isTransferAllowedchecks. Although I imagine it being a much used feature, so it wouldnât bother me adding asetPausedmethod to the standard.
I agree in using isTransferAllowed, we might end up doing the error of forcing a setPaused and have integrators being forced to integrate this to be compliant with this EIP even if they donât need it.
Regarding instead the fact of unfreezing when doing forceTransfer / burn
For forceTransfer:
I think the standard should still say that the function SHOULD skip freezing validations ( I believe you proposed a âMUSTâ but Iâm curious to know why. If the function actually skips that, then I agree with your suggestion of unfreezing first (and emit an event) before doing the transfer, so that the transfer event doesnât emit an amount of unavailable tokens. However, the integrators might decide to NOT skip freezing validations in a forceTransfer. I am thinking of use cases where thereâs an automated penalty system that forcefully transfer tokens out without skipping the freezing status (that might have a higher priority over the penalty system).
For burn:
I actually think is dangerous to allow a burn to unfreeze. The burn function is meant to be either public (anyone can burn) or restricted. In the former case, burning would actually circumvent the freezing status imposed by an authorized party. This would easily translate into frozen assets being on purpose burnt down to avoid any reusage of those by the freezing authority.
Can you clarify why the need of a MUST in burn and forceTransfer to unfreeze ?