ligo/src/test/contracts/balance_constant.mligo

19 lines
478 B
Plaintext
Raw Normal View History

2020-02-27 17:51:29 +01:00
(*
This test makes sure that the balance is accessible in CameLIGO.
2020-02-27 17:51:29 +01:00
It is there to detect a regression of:
https://gitlab.com/ligolang/ligo/issues/61
2020-02-27 17:51:29 +01:00
which results in this error when you attempt to compile this contract:
2020-02-27 17:51:29 +01:00
generated. unrecognized constant: {"constant":"BALANCE","location":"generated"}
*)
2020-03-02 18:01:56 +01:00
type parameter = unit
type storage = tez
2020-03-02 18:01:56 +01:00
type return = operation list * storage
2020-03-02 18:01:56 +01:00
let main (p, s : parameter * storage) : return =
([] : operation list), Tezos.balance