package tezt-tezos

  1. Overview
  2. Docs

Voting operations (validation pass 1): proposals and ballot.

Only the proposals operation is currently supported. Feel free to add support for ballot as needed.

type t

A representation of a voting operation.

val proposals : Account.key -> int -> string list -> t

proposals source period protocol_hashes crafts a proposals operation, that is, an operation that submits candidate protocol hashes for voting.

  • parameter source

    The account that submits the proposals.

  • parameter period

    An index that identifies the targeted voting period.

  • parameter protocol_hashes

    A list of candidate protocol hashes.

val operation : ?branch:string -> ?client:Client.t -> ?signer:Account.key -> t -> operation Lwt.t

Contruct a voting operation from its representation.

  • parameter branch

    Allows to manually provide the branch. If omitted, the branch it retrieved via RPC using the given client.

  • parameter client

    Used to retrieve the branch when it is not provided.

  • parameter signer

    Allows to manually set the signer of the operation, e.g. to craft an operation with a wrong signature. If omitted, the signer is the operation's source.

  • raises Invalid_argument

    if neither the branch argument nor the client one is provided.

val inject : ?request:[ `Inject | `Notify ] -> ?force:bool -> ?signature:Tezos_crypto.Signature.t -> ?error:Tezt.Base.rex -> ?branch:string -> ?signer:Account.key -> t -> Client.t -> [ `OpHash of string ] Lwt.t

A wrapper for injecting a voting operation.

See inject for a description of arguments request, force, signature, and error.

See Voting.operation right above for a description of arguments branch and signer.

OCaml

Innovation. Community. Security.