[#440] Disallow transferring ꜩ from a contract
Description
Problem: tezos-client
prohibits transferring ꜩ from an originated
contract (except using TRANSFER_TOKENS
) while morley unconditionally
allows such transactions.
Solution: Catch the previously uncaught tezos errors in morley-client
and check in executeTransfer
whether we're attempting to transfer tokens
from an originated contract and it's not from TRANSFER_TOKENS
(i.e. it's
a global operation). Throw a newly created EETransactionFromContract
error if that's the case.
Related issue(s)
Resolves #440 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Heitor Toledo Lassarote de Paula