package tezos-protocol-019-PtParisB
Tezos protocol 019-PtParisB package
Install
Dune Dependency
Authors
Maintainers
Sources
tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/src/tezos_raw_protocol_019_PtParisB/unstaked_frozen_staker_repr.ml.html
Source file unstaked_frozen_staker_repr.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
(*****************************************************************************) (* *) (* SPDX-License-Identifier: MIT *) (* Copyright (c) 2023 Nomadic Labs, <contact@nomadic-labs.com> *) (* *) (*****************************************************************************) type t = | Single of Contract_repr.t * Signature.public_key_hash let encoding = let open Data_encoding in let single_tag = 0 in let single_encoding = obj2 (req "contract" Contract_repr.encoding) (req "delegate" Signature.Public_key_hash.encoding) in let = 1 in let = obj1 (req "delegate" Signature.Public_key_hash.encoding) in def ~title:"unstaked_frozen_staker" ~description: "Abstract notion of staker used in operation receipts for unstaked \ frozen deposits, either a single staker or all the stakers delegating \ to some delegate." "staker" @@ matching (function | Single (contract, delegate) -> matched single_tag single_encoding (contract, delegate) | Shared delegate -> matched shared_tag shared_encoding delegate) [ case ~title:"Single" (Tag single_tag) single_encoding (function | Single (contract, delegate) -> Some (contract, delegate) | _ -> None) (fun (contract, delegate) -> Single (contract, delegate)); case ~title:"Shared" (Tag shared_tag) shared_encoding (function Shared delegate -> Some delegate | _ -> None) (fun delegate -> Shared delegate); ] let compare sa sb = match (sa, sb) with | Single (ca, da), Single (cb, db) -> Compare.or_else (Contract_repr.compare ca cb) (fun () -> Signature.Public_key_hash.compare da db) | Shared da, Shared db -> Signature.Public_key_hash.compare da db | Single _, Shared _ -> -1 | Shared _, Single _ -> 1 let delegate = function | Single (_contract, delegate) -> delegate | Shared delegate -> delegate
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>