Skip to content

Deprecate message for thunked constants in stdlib

E. Rivas requested to merge er433/deprecation/constants-thunk into dev

type:deprecated

For LIGO developers

Constants such as Tezos.balance : tez are compiled with the help of a @thunk hack. Tezos.balance kind of performs an effect, and its type gives the wrong impression that's a constant.

This MR tries to remove these constants, and replace them by constants such as Tezos.get_balance : unit -> tez, that make explicit that sort of an effect is being performed.

Changelog details:

Soon to be deprecated: Tezos.amount, Tezos.balance, Tezos.now, Tezos.sender, Tezos.source, Tezos.level, Tezos.self_address, Tezos.chain_id, Tezos.total_voting_power.

These should be replaced by their "thunked" counterpart, which are prefixed with get_. E.g. Tezos.balance : unit -> tez.

Edited by E. Rivas

Merge request reports