ligo/src/proto/alpha/vote_storage.mli
2017-02-25 18:14:05 +01:00

53 lines
1.9 KiB
OCaml

(**************************************************************************)
(* *)
(* Copyright (c) 2014 - 2016. *)
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* All rights reserved. No warranty, explicit or implicit, provided. *)
(* *)
(**************************************************************************)
val record_proposal:
Storage.t -> Protocol_hash.t -> Ed25519.Public_key_hash.t ->
Storage.t tzresult Lwt.t
val get_proposals:
Storage.t -> int32 Protocol_hash.Map.t tzresult Lwt.t
val clear_proposals: Storage.t -> Storage.t tzresult Lwt.t
type ballots = {
yay: int32 ;
nay: int32 ;
pass: int32 ;
}
val record_ballot:
Storage.t -> Ed25519.Public_key_hash.t -> Vote_repr.ballot ->
Storage.t tzresult Lwt.t
val get_ballots: Storage.t -> ballots tzresult Lwt.t
val clear_ballots: Storage.t -> Storage.t Lwt.t
val freeze_listings: Storage.t -> Storage.t tzresult Lwt.t
val clear_listings: Storage.t -> Storage.t tzresult Lwt.t
val listing_size: Storage.t -> int32 tzresult Lwt.t
val in_listings:
Storage.t -> Ed25519.Public_key_hash.t -> bool Lwt.t
val get_current_quorum: Storage.t -> int32 tzresult Lwt.t
val set_current_quorum: Storage.t -> int32 -> Storage.t tzresult Lwt.t
val get_current_period_kind:
Storage.t -> Voting_period_repr.kind tzresult Lwt.t
val set_current_period_kind:
Storage.t -> Voting_period_repr.kind -> Storage.t tzresult Lwt.t
val get_current_proposal:
Storage.t -> Protocol_hash.t tzresult Lwt.t
val set_current_proposal:
Storage.t -> Protocol_hash.t -> Storage.t tzresult Lwt.t
val clear_current_proposal: Storage.t -> Storage.t tzresult Lwt.t
val init: Storage.t -> Storage.t tzresult Lwt.t