2016-09-08 21:13:10 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* Copyright (c) 2014 - 2016. *)
|
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
|
|
|
(**
|
|
|
|
|
|
|
|
Basic roll manipulation.
|
|
|
|
|
|
|
|
If storage related to roll (a.k.a. `Storage.Roll`) are not used
|
|
|
|
outside this module, this interface enforce the invariant that a
|
|
|
|
roll is always either in the limbo list or in a contract list.
|
|
|
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
type error +=
|
|
|
|
| Consume_roll_change
|
|
|
|
| No_roll_in_contract
|
|
|
|
|
|
|
|
val init : Storage.t -> Storage.t tzresult Lwt.t
|
|
|
|
|
|
|
|
val fold :
|
|
|
|
Storage.t ->
|
|
|
|
f:(Roll_repr.roll -> Contract_repr.t -> 'a -> 'a tzresult Lwt.t) ->
|
|
|
|
'a -> 'a tzresult Lwt.t
|
|
|
|
|
2016-10-26 19:02:10 +04:00
|
|
|
val freeze_rolls_for_cycle :
|
2016-09-08 21:13:10 +04:00
|
|
|
Storage.t -> Cycle_repr.t -> Storage.t tzresult Lwt.t
|
|
|
|
|
|
|
|
val clear_cycle :
|
|
|
|
Storage.t -> Cycle_repr.t -> Storage.t tzresult Lwt.t
|
|
|
|
|
2017-11-01 15:07:33 +04:00
|
|
|
val baking_rights_owner :
|
2017-04-10 14:50:15 +04:00
|
|
|
Storage.t -> Level_repr.t -> priority:int ->
|
2016-11-14 18:54:21 +04:00
|
|
|
Ed25519.Public_key_hash.t tzresult Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
|
|
|
|
val endorsement_rights_owner :
|
|
|
|
Storage.t -> Level_repr.t -> slot:int ->
|
2016-11-14 18:54:21 +04:00
|
|
|
Ed25519.Public_key_hash.t tzresult Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
|
|
|
|
module Contract : sig
|
|
|
|
|
|
|
|
val init :
|
|
|
|
Storage.t -> Contract_repr.t -> Storage.t tzresult Lwt.t
|
|
|
|
|
|
|
|
val add_amount :
|
|
|
|
Storage.t -> Contract_repr.t -> Tez_repr.t -> Storage.t tzresult Lwt.t
|
|
|
|
|
|
|
|
val remove_amount :
|
|
|
|
Storage.t -> Contract_repr.t -> Tez_repr.t -> Storage.t tzresult Lwt.t
|
|
|
|
|
|
|
|
val assert_empty : Storage.t -> Contract_repr.t -> unit tzresult Lwt.t
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
(**/**)
|
|
|
|
|
|
|
|
val get_contract_delegate:
|
2016-11-14 18:54:21 +04:00
|
|
|
Storage.t -> Contract_repr.t -> Ed25519.Public_key_hash.t option tzresult Lwt.t
|