Skip to content

[#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

    • I checked whether I should update the docs and did so if necessary:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Heitor Toledo Lassarote de Paula

Merge request reports