Alpha/Migration: invoicing example

This patch is part of the migration code from `alpha_003` to `athens_004`.

It credits the account of the authors of this protocol with a symbolic
values of a hundred tokens.

The authors hereby declare that these tokens will be used exclusively
to pay for a round of drinks for the team.
parent 8618b475
Pipeline #48431226 passed with stages
in 6 minutes and 46 seconds
......@@ -23,7 +23,14 @@
(* *)
(* This is the genesis protocol: initialise the state *)
let invoice ctxt pkh amount =
let amount = Tez_repr.of_mutez_exn (Int64.(mul 1_000_000L (of_int amount))) in
let recipient =
(Signature.Public_key_hash.of_b58check_exn pkh) in ctxt recipient amount >>=? fun ctxt ->
return ctxt
let prepare_first_block ctxt ~typecheck ~level ~timestamp ~fitness =
~level ~timestamp ~fitness ctxt >>=? fun (previous_protocol, ctxt) ->
......@@ -55,6 +62,10 @@ let prepare_first_block ctxt ~typecheck ~level ~timestamp ~fitness =
hard_gas_limit_per_operation = Constants_repr.default.hard_gas_limit_per_operation ;
hard_gas_limit_per_block = Constants_repr.default.hard_gas_limit_per_block }
end >>= fun ctxt ->
(* Invoice example: credit the author(s) of this protocol with 100 tez.*)
invoice ctxt
100 >>=? fun ctxt ->
return ctxt
let prepare ctxt ~level ~timestamp ~fitness =
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment