Skip to content

[#417] Extract sender updater from Nettest operations

Konstantin Ivanov requested to merge martoon/#417-extract-sender into master

Description

Here we add withSender as a primary method for specifying sender for origination and transfer operations, and respectively we remove *From versions of some methods.

Note: Actually, I'd like to go further and do the same for amount, my motivation:

  1. All the same methods as above (origination and transfer) accept mutez amount to be transferred to target.
  2. In most cases we don't actually care and want to pass 0.
  3. We already pretty suffer from the exponential number of methods (w/ and w/o from, w/ and w/o amount, transfer vs call and so on). In particular, specifying amount with the dedicated withAmount will eliminate the need in originateSimple method, and call will become more configurable (AFAIR someone faced such need recently).

Related issue(s)

Resolves #417 (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 Konstantin Ivanov

Merge request reports