Skip to content

Draft: [#602] Refactor Cleveland's transfer/call actions

NB: Based off !1137 (merged) because very similar.

Description

Problem: We have transfer, which is general enough, and transferMoney, which is occasionally convenient but awkward. We could just overload transfer with the "printf trick".

Solution: Overload transfer with the "printf trick", implement call in terms of this new transfer. Use Named to disambiguate fields (transfer amount and parameter do need disambiguation).

call still mostly has the old signature, i.e. requires address, entrypoint reference and the argument. Making it more polymorphic is simply not worth it. It does accept optional transfer amount after the mandatory arguments.

Related issue(s)

Resolves #602 (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 Nikolay Yakimov

Merge request reports