Error code ambiguity in token transfer
wbnns opened this issue · 0 comments
After receiving an error on a token transfer transaction, the caller will not be able to tell what went wrong. This may introduce unintended behavior in higher-level applications of the contract. In addition, the transfer function implementation diverges from what is described by SIP 10, which may introduce incompatibilities with competing implementations.
A potential solution, in SIP-10, a notion of post-condition is introduced. Eventual existence of post-conditions impacts the list of possible error codes returned by the transfer function. Consider modifying SIP 10 to allocate error codes for post-condition handling, including black listing related error codes. Consider modifying the implementation to conform to the new spec.