Skip to content

Draft: [#729] Handle contract aliases properly

Description

Problem: Smart contract and implicit account alias namespaces intersect in a few places, and those places need special care.

Solution: In morley-client:

  • resolveAddress and resolveAddressMaybe only look up implicit accounts. We don't really look up contracts by alias AFAIK
  • aliases in revealKey and calcRevealFee are now prefixed with key: to disambiguate from contracts (this is tezos-client syntax)
  • getAlias looks up either contracts or implicit accounts depending on the key type.

In Cleveland.Internal.Pure:

  • Keep contract and key aliases in separate maps to avoid mixing them up

Related issue(s)

Resolves #729 (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