Tezos_alpha_test_helpers.OpThe operation representation handled most often in test helpers.
val pack_operation :
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.signature option ->
'a Tezos_protocol_alpha.Protocol.Alpha_context.contents_list ->
Tezos_protocol_alpha.Protocol.Alpha_context.packed_operationAssemble the given signature and contents_list into a packed_operation.
The context argument is used to retrieve the branch.
If the signature option argument is None, then the resulting operation is unsigned.
This function is mainly useful to craft an operation with a missing or invalid signatue. Otherwise, it is often better to use one of the helpers below: they handle the signature internally to directly return well-signed operations.
val sign :
?watermark:Signature.watermark ->
Context.t ->
Signature.secret_key ->
Tezos_base.TzPervasives.Block_hash.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.packed_contents_list ->
(Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation,
Tezos_base.TzPervasives.tztrace)
Stdlib.result
Tezos_protocol_alpha.Environment.Lwt.tval create_proof :
Signature.secret_key ->
Tezos_alpha_test_helpers.Signature.Bls.t optiontype attesting_slot = {slot : Tezos_protocol_alpha.Protocol.Alpha_context.Slot.t;consensus_pkh : Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash;}Information needed on the author of a (pre)attestation: slot (written into the (pre)attestation) and consensus key (required for signing).
val attesting_slot_of_attester : Context.attester -> attesting_slotBuilds an attesting_slot with the attester's consensus key and canonical slot, that is, its first slot.
val get_attesting_slot :
attested_block:Block.t ->
attesting_slot Tezos_base.TzPervasives.tzresult Lwt.tReturns the canonical attesting_slot of the first attester returned by Plugin.RPC.Validators.S.validators.
val get_attesting_slot_of_delegate :
manager_pkh:Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash ->
attested_block:Block.t ->
attesting_slot Tezos_base.TzPervasives.tzresult Lwt.tReturns the canonical attesting_slot of delegate manager_pkh for attested_block. Fails if it doesn't have any attesting rights for this block.
val get_different_attesting_slot :
consensus_pkh_to_avoid:
Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash ->
attested_block:Block.t ->
attesting_slot Tezos_base.TzPervasives.tzresult Lwt.tReturns the canonical attesting_slot of the first attester returned by Plugin.RPC.Validators.S.validators whose consensus key is different from consensus_pkh_to_avoid.
val non_canonical_attesting_slot_of_attester :
Context.attester ->
attesting_slot Tezos_base.TzPervasives.tzresult Lwt.tBuilds an attesting_slot with the attester's consensus key and its second-smallest slot (that is, a non-canonical slot that still belongs to the attester).
val get_non_canonical_attesting_slot :
attested_block:Block.t ->
attesting_slot Tezos_base.TzPervasives.tzresult Lwt.tRetrieves the first attester returned by Plugin.RPC.Validators.S.validators and builds a non-canonical attesting_slot for it, where slot is its second-smallest slot.
val default_committee :
attested_block:Block.t ->
attesting_slot list Tezos_base.TzPervasives.tzresult Lwt.tDefault committee for a (pre)attestations aggregate, that is, the canonical attesting slots of all delegates with attesting rights on attested_block whose consensus keys are BLS keys.
val get_attesting_slot_with_bls_key :
attested_block:Block.t ->
attesting_slot Tezos_base.TzPervasives.tzresult Lwt.tReturns the canonical attesting_slot of the first attester returned by Plugin.RPC.Validators.S.validators whose consensus key is a BLS key.
val get_attesting_slot_with_non_bls_key :
attested_block:Block.t ->
attesting_slot Tezos_base.TzPervasives.tzresult Lwt.tReturns the canonical attesting_slot of the first attester returned by Plugin.RPC.Validators.S.validators whose consensus key is a non-BLS key.
val attesting_slot_of_delegate_rights :
Tezos_protocol_plugin_alpha.RPC.Attestation_rights.delegate_rights ->
attesting_slotReturns the canonical attesting_slot corresponding to a RPC.Attestation_rights.delegate_rights.
val raw_attestation :
?attesting_slot:attesting_slot ->
?manager_pkh:Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash ->
?level:Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t ->
?round:Tezos_protocol_alpha.Protocol.Alpha_context.Round.t ->
?block_payload_hash:Tezos_protocol_alpha.Protocol.Block_payload_hash.t ->
?dal_content:Tezos_protocol_alpha.Protocol.Alpha_context.dal_content ->
?branch:Tezos_base.TzPervasives.Block_hash.t ->
Block.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Kind.attestation
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.t
Tezos_base.TzPervasives.tzresult
Lwt.tCreate an unpacked attestation that is expected for given Block.t.
Optional parameters allow to specify the attested values: level, round, block_payload_hash, and/or dal_content.
The consensus slot and signer are the ones from attesting_slot if provided, otherwise the canonical ones for the delegate with manager_pkh if provided (and the function fails if manager_pkh is not the manager key of a delegate with attesting rights at the given Block.t's level); otherwise, they default to the attesting slot returned by get_attesting_slot. The function fails if both attesting_slot and manager_pkh are provided.
Finally, the operation branch can be specified. It defaults to the predecessor of the attested block.
val raw_preattestation :
?attesting_slot:attesting_slot ->
?manager_pkh:Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash ->
?level:Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t ->
?round:Tezos_protocol_alpha.Protocol.Alpha_context.Round.t ->
?block_payload_hash:Tezos_protocol_alpha.Protocol.Block_payload_hash.t ->
?branch:Tezos_base.TzPervasives.Block_hash.t ->
Block.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Kind.preattestation
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.t
Tezos_base.TzPervasives.tzresult
Lwt.tCreate an unpacked preattestation that is expected for a given Block.t.
Optional parameters are the same than raw_attestation.
val attestation :
?attesting_slot:attesting_slot ->
?manager_pkh:Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash ->
?level:Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t ->
?round:Tezos_protocol_alpha.Protocol.Alpha_context.Round.t ->
?block_payload_hash:Tezos_protocol_alpha.Protocol.Block_payload_hash.t ->
?dal_content:Tezos_protocol_alpha.Protocol.Alpha_context.dal_content ->
?branch:Tezos_base.TzPervasives.Block_hash.t ->
Block.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tCreate a packed attestation that is expected for a given Block.t by packing the result of raw_attestation.
val raw_attestations_aggregate :
?committee:attesting_slot list ->
?committee_with_dal:
(attesting_slot
* Tezos_protocol_alpha.Protocol.Alpha_context.dal_content option)
list ->
?level:Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t ->
?round:Tezos_protocol_alpha.Protocol.Alpha_context.Round.t ->
?block_payload_hash:Tezos_protocol_alpha.Protocol.Block_payload_hash.t ->
?branch:Tezos_base.TzPervasives.Block_hash.t ->
Block.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Kind.attestations_aggregate
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.t
Tezos_base.TzPervasives.tzresult
Lwt.tCrafts an Attestations_aggregate operation pointing to the given Block.t. Block context is expected to include at least one delegate with a BLS consensus key, otherwise this function will return an error.
The committee consists of the concatenation of committee with dal_content = None for each member, and of committee_with_dal. If neither is provided, it defaults to default_committee with no DAL contents.
Other parameters are the same as in raw_attestation.
val attestations_aggregate :
?committee:attesting_slot list ->
?committee_with_dal:
(attesting_slot
* Tezos_protocol_alpha.Protocol.Alpha_context.dal_content option)
list ->
?level:Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t ->
?round:Tezos_protocol_alpha.Protocol.Alpha_context.Round.t ->
?block_payload_hash:Tezos_protocol_alpha.Protocol.Block_payload_hash.t ->
?branch:Tezos_base.TzPervasives.Block_hash.t ->
Block.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tSame as raw_preattestations_aggregate but returns the packed operation.
val preattestation :
?attesting_slot:attesting_slot ->
?manager_pkh:Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash ->
?level:Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t ->
?round:Tezos_protocol_alpha.Protocol.Alpha_context.Round.t ->
?block_payload_hash:Tezos_protocol_alpha.Protocol.Block_payload_hash.t ->
?branch:Tezos_base.TzPervasives.Block_hash.t ->
Block.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tCreate a packed preattestation that is expected for a given Block.t by packing the result of raw_preattestation.
val raw_preattestations_aggregate :
?committee:attesting_slot list ->
?level:Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t ->
?round:Tezos_protocol_alpha.Protocol.Alpha_context.Round.t ->
?block_payload_hash:Tezos_protocol_alpha.Protocol.Block_payload_hash.t ->
?branch:Tezos_base.TzPervasives.Block_hash.t ->
Block.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Kind.preattestations_aggregate
Tezos_protocol_alpha.Protocol.Alpha_context.operation
Tezos_base.TzPervasives.tzresult
Lwt.tCrafts a Preattestations_aggregate operation pointing to the given Block.t. Block context is expected to include at least one delegate with a BLS consensus key, otherwise this function will return an error.
committee defaults to default_committee.
Other parameters are the same as in raw_attestation.
val preattestations_aggregate :
?committee:attesting_slot list ->
?level:Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t ->
?round:Tezos_protocol_alpha.Protocol.Alpha_context.Round.t ->
?block_payload_hash:Tezos_protocol_alpha.Protocol.Block_payload_hash.t ->
?branch:Tezos_base.TzPervasives.Block_hash.t ->
Block.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tSame as raw_preattestations_aggregate but returns the packed operation.
type gas_limit = | MaxMax corresponds to the max_gas_limit_per_operation constant.
| HighHigh corresponds to 50_000 gas unit which should cover a majority of use-cases. This is the default used when forging manager operations.
| LowLow corresponds to the gas entry cost of a manager operation
*)| Zero| Custom_gas of Tezos_protocol_alpha.Protocol.Alpha_context.Gas.Arith.integralval pp_gas_limit : Stdlib.Format.formatter -> gas_limit -> unitPretty printer for gas_limit type.
val manager_operation :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
?public_key:Tezos_protocol_alpha.Protocol.Alpha_context.public_key ->
source:Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Context.t ->
'a Tezos_protocol_alpha.Protocol.Alpha_context.manager_operation ->
Tezos_protocol_alpha.Protocol.Alpha_context.packed_contents_list
Tezos_base.TzPervasives.tzresult
Lwt.tPacks a manager operation into a contents list.
val transaction :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
?parameters:Tezos_protocol_alpha.Protocol.Alpha_context.Script.lazy_expr ->
?entrypoint:Tezos_protocol_alpha.Protocol.Alpha_context.Entrypoint.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tval unsafe_transaction :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
?parameters:
Tezos_protocol_alpha.Protocol.Michelson_v1_primitives.prim
Tezos_micheline.Micheline.canonical
Tezos_base.TzPervasives.Data_encoding.lazy_t ->
?entrypoint:Tezos_protocol_alpha.Protocol.Entrypoint_repr.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation
Tezos_base.TzPervasives.tzresult
Lwt.tSame as transaction, but with a more generic destination parameter. It is said unsafe because it can construct transactions that will always fail, such as
Optional arguments allow to override defaults:
?force_reveal:bool: prepend the operation to reveal source's public key if the latter has not been revealed yet. Disabled (set to false) by default.val delegation :
?force_reveal:bool ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?storage_limit:Z.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash option ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tval set_deposits_limit :
?force_reveal:bool ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t option ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tval increase_paid_storage :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
Context.t ->
source:Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
destination:Tezos_protocol_alpha.Protocol.Contract_hash.t ->
Z.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tval revelation :
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?forge_pkh:Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash option ->
?forge_proof:Tezos_alpha_test_helpers.Signature.Bls.t option ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.public_key ->
(Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation,
Tezos_base.TzPervasives.tztrace)
Stdlib.result
Lwt.trevelation ?fee ?gas_limit ?forge_pkh ?forge_proof ctxt pkh Creates a new Reveal manager_operation to reveal a public key pkh applying to current context ctxt.
Optional arguments allow to override defaults:
?fee:Tez.t: specify a fee, otherwise set to Tez.zero.?gas_limit:Gas.Arith.integral: force a gas limit, otherwise set to 10000 gas units.?forge_pkh: use a provided pkh as source, instead of hashing pkh. Useful for forging non-honest reveal operations?forge_proof: use a provided proof instead of creating a correct proof for pkh. Useful for forging non-honest reveal operations?storage_limit:Z.t: forces a storage limit, otherwise set to Z.zeroval failing_noop :
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash ->
string ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tval contract_origination :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?delegate:Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash ->
script:Tezos_protocol_alpha.Protocol.Alpha_context.Script.t ->
?public_key:Tezos_protocol_alpha.Protocol.Alpha_context.public_key ->
?credit:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
(Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
* Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t)
Tezos_base.TzPervasives.tzresult
Lwt.tcontract_origination ctxt source Create a new contract origination operation, sign it with source and returns it alongside the contract address. The contract address is using the initial origination nonce with the hash of the operation. If this operation is combined with combine_operations then the contract address is false as the nonce is not based on the correct operation hash.
Optional arguments allow to override defaults:
?force_reveal:bool: prepend the operation to reveal source's public key if the latter has not been revealed yet. Disabled (set to false) by default.val contract_origination_hash :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?delegate:Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash ->
script:Tezos_protocol_alpha.Protocol.Alpha_context.Script.t ->
?public_key:Tezos_protocol_alpha.Protocol.Alpha_context.public_key ->
?credit:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
(Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
* Tezos_protocol_alpha.Protocol.Contract_hash.t)
Tezos_base.TzPervasives.tzresult
Lwt.tval originated_contract :
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.tval register_global_constant :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?public_key:Signature.public_key ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
Context.t ->
source:Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
value:Tezos_protocol_alpha.Protocol.Alpha_context.Script.lazy_expr ->
(Tezos_protocol_alpha.Protocol.operation, Tezos_base.TzPervasives.tztrace)
Stdlib.result
Lwt.tval double_attestation :
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Kind.attestation
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Kind.attestation
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packedval double_preattestation :
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Kind.preattestation
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Kind.preattestation
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packedval dal_entrapment :
Context.t ->
'a Tezos_protocol_alpha.Protocol.Alpha_context.Kind.consensus
Tezos_protocol_alpha.Protocol.Alpha_context.operation ->
consensus_slot:Tezos_protocol_alpha.Protocol.Alpha_context.Slot.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Dal.Slot_index.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Dal.Shard_with_proof.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packedval combine_operations :
?public_key:Tezos_protocol_alpha.Protocol.Alpha_context.public_key ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?spurious_operation:
Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation ->
source:Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation list ->
Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation
Tezos_base.TzPervasives.tzresult
Lwt.tval batch_operations :
?recompute_counters:bool ->
source:Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation list ->
Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation
Tezos_base.TzPervasives.tzresult
Lwt.tBatch a list of (already signed) operations and (re-)sign with the source. No revelation is inserted and the counters are kept as they are unless recompute_counters is set to true (defaults false).
val seed_nonce_revelation :
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Nonce.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packedReveals a seed_nonce that was previously committed at a certain level
val vdf_revelation :
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Seed.vdf_solution ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packedReveals a VDF with a proof of correctness
val proposals_contents :
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
?period:int32 ->
Tezos_base.TzPervasives.Protocol_hash.t list ->
Tezos_protocol_alpha.Protocol.Alpha_context.Kind.proposals
Tezos_protocol_alpha.Protocol.Alpha_context.contents_list
Tezos_base.TzPervasives.tzresult
Lwt.tCraft the contents_list for a Proposals operation.
Invocation: proposals_contents ctxt source ?period proposals.
val proposals :
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
?period:int32 ->
Tezos_base.TzPervasives.Protocol_hash.t list ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tCraft a Proposals operation.
Invocation: proposals ctxt source ?period proposals.
val ballot_contents :
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
?period:int32 ->
Tezos_base.TzPervasives.Protocol_hash.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Vote.ballot ->
Tezos_protocol_alpha.Protocol.Alpha_context.Kind.ballot
Tezos_protocol_alpha.Protocol.Alpha_context.contents_list
Tezos_base.TzPervasives.tzresult
Lwt.tCraft the contents_list for a Ballot operation.
Invocation: ballot_contents ctxt source ?period proposal ballot.
val ballot :
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
?period:int32 ->
Tezos_base.TzPervasives.Protocol_hash.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Vote.ballot ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tCraft a Ballot operation.
Invocation: ballot ctxt source ?period proposal ballot.
val dummy_script : Tezos_protocol_alpha.Protocol.Alpha_context.Script.tval dummy_script_cost : Tezos_protocol_alpha.Protocol.Alpha_context.Tez.tval transfer_ticket :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
Context.t ->
source:Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
contents:Tezos_protocol_alpha.Protocol.Alpha_context.Script.lazy_expr ->
ty:Tezos_protocol_alpha.Protocol.Alpha_context.Script.lazy_expr ->
ticketer:Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
amount:Tezos_protocol_alpha.Protocol.Ticket_amount.t ->
destination:Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
entrypoint:Tezos_protocol_alpha.Protocol.Entrypoint_repr.t ->
(Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation,
Tezos_base.TzPervasives.tztrace)
Stdlib.result
Lwt.ttransfer_ticket allows an implicit account to transfer tickets they owned.
The arguments are:
Context.t: the context on which to apply the operationsource:Contract.t: the source contract of the operationTx_rollup.t: the rollup to which the withdrawal pertainsTx_rollup_level.t: the level on which the withdrawal was commitedcontents:Script.lazy_expr: the contents of the ticket of the withdrawalty:Script.lazy_expr: the type of the ticket of the withdrawalticketer:Contract.t: the ticketer of the ticket of the withdrawalZ.t: the quantity of the ticket of the withdrawaldestination:Contract.t: the destination contract that should receive the ticket of the withdrawalEntrypoint_repr.t: the entrypoint of the destination contract to which the ticket should be sentOptional arguments allow to override defaults:
?force_reveal:bool: prepend the operation to reveal source's public key if the latter has not been revealed yet. Disabled (set to false) by default.val sc_rollup_origination :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
?whitelist:Tezos_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Whitelist.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Kind.t ->
boot_sector:string ->
parameters_ty:Tezos_protocol_alpha.Protocol.Alpha_context.Script.lazy_expr ->
(Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation
* Tezos_protocol_alpha.Protocol.Alpha_context.Sc_rollup.t)
Tezos_base.TzPervasives.tzresult
Lwt.tsc_rollup_origination ctxt source kind boot_sector originates a new smart contract rollup of some given kind booting using boot_sector.
Optional arguments allow to override defaults:
?force_reveal:bool: prepend the operation to reveal source's public key if the latter has not been revealed yet. Disabled (set to false) by default.val sc_rollup_publish :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Sc_rollup.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Commitment.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tsc_rollup_publish ctxt source rollup commitment tries to publish a commitment to the SCORU. Optional arguments allow to override defaults:
Optional arguments allow to override defaults:
?force_reveal:bool: prepend the operation to reveal source's public key if the latter has not been revealed yet. Disabled (set to false) by default.val sc_rollup_cement :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Sc_rollup.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tsc_rollup_cement ctxt source rollup tries to cement a commitment.
Optional arguments allow to override defaults:
?force_reveal:bool: prepend the operation to reveal source's public key if the latter has not been revealed yet. Disabled (set to false) by default.val sc_rollup_execute_outbox_message :
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
?force_reveal:bool ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Sc_rollup.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Commitment.Hash.t ->
output_proof:string ->
(Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation,
Tezos_base.TzPervasives.tztrace)
Stdlib.result
Lwt.tval sc_rollup_recover_bond :
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
?force_reveal:bool ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Sc_rollup.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tsc_rollup_recover_bond ctxt source sc_rollup staker recovers the commitment bond of staker.
val sc_rollup_add_messages :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
string list ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tval sc_rollup_refute :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Sc_rollup.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash ->
Tezos_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Game.refutation ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tval sc_rollup_timeout :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Sc_rollup.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Game.Index.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tval dal_publish_commitment :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Dal.Operations.Publish_commitment.t ->
(Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation,
Tezos_base.TzPervasives.tztrace)
Stdlib.result
Lwt.tval zk_rollup_origination :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
public_parameters:Plonk.Main_protocol.verifier_public_parameters ->
circuits_info:
[ `Public | `Private | `Fee ]
Tezos_protocol_alpha.Protocol.Alpha_context.Zk_rollup.Account.SMap.t ->
init_state:Tezos_protocol_alpha.Protocol.Alpha_context.Zk_rollup.State.t ->
nb_ops:int ->
(Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
* Tezos_protocol_alpha.Protocol.Alpha_context.Zk_rollup.t)
Tezos_base.TzPervasives.tzresult
Lwt.tzk_rollup_origination ctxt source ~public_parameters ~circuits_info ~init_state ~nb_ops tries to originate a ZK Rollup.
val update_consensus_key :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
?proof_signer:Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
?forge_proof:Tezos_alpha_test_helpers.Signature.Bls.t option ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.public_key ->
(Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation,
Tezos_base.TzPervasives.tztrace)
Stdlib.result
Lwt.tval update_companion_key :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
?proof_signer:Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
?forge_proof:Tezos_alpha_test_helpers.Signature.Bls.t option ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.public_key ->
(Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation,
Tezos_base.TzPervasives.tztrace)
Stdlib.result
Lwt.tval drain_delegate :
Context.t ->
consensus_key:Tezos_alpha_test_helpers.Signature.Public_key_hash.t ->
delegate:Tezos_alpha_test_helpers.Signature.Public_key_hash.t ->
destination:Tezos_alpha_test_helpers.Signature.Public_key_hash.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation
Tezos_base.TzPervasives.tzresult
Lwt.tval zk_rollup_publish :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
zk_rollup:Tezos_protocol_alpha.Protocol.Alpha_context.Zk_rollup.t ->
ops:
(Tezos_protocol_alpha.Protocol.Alpha_context.Zk_rollup.Operation.t
* Tezos_protocol_alpha.Protocol.Alpha_context.Zk_rollup.Ticket.t option)
list ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tzk_rollup_publish ctxt source ~zk_rollup ~op tries to add an operation to the pending list of a ZK Rollup.
val zk_rollup_update :
?force_reveal:bool ->
?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:gas_limit ->
?storage_limit:Z.t ->
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
zk_rollup:Tezos_protocol_alpha.Protocol.Alpha_context.Zk_rollup.t ->
update:Tezos_protocol_alpha.Protocol.Alpha_context.Zk_rollup.Update.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tzk_rollup_update ctxt source ~zk_rollup ~update tries to apply an update to a ZK Rollup.
module Micheline = Tezos_micheline.MichelineProtocol.mode-related helpers
val check_validation_and_application :
loc:string ->
?check_after:
(Block.block_with_metadata -> unit Tezos_base.TzPervasives.tzresult Lwt.t) ->
?error:(Tezos_protocol_alpha.Environment.Error_monad.error -> bool) ->
predecessor:Block.t ->
tested_mode ->
t ->
unit Tezos_base.TzPervasives.tzresult Lwt.tcheck_validation_and_application ~loc ?error ~predecessor tested_mode operation tests the validation and application of operation in tested_mode.
tested_mode is Application or Construction, a block containing operation is baked on top of predecessor in the specified mode.tested_mode is Mempool, a mempool is initialized using predecessor as head, then Incremental.add_operation is called on operation, then Incremental.finalize_block_with_metadata.When check_after is provided, it is called on the resulting block. When error is provided, we check that an error identified by error is returned. When neither is provided, we return unit if there the validation and application returned Ok, or the unchanged error. When both are provided, the function fails.
val check_validation_and_application_all_modes_different_outcomes :
loc:string ->
?check_after_application:
(Block.block_with_metadata -> unit Tezos_base.TzPervasives.tzresult Lwt.t) ->
?check_after_construction:
(Block.block_with_metadata -> unit Tezos_base.TzPervasives.tzresult Lwt.t) ->
?check_after_mempool:
(Block.block_with_metadata -> unit Tezos_base.TzPervasives.tzresult Lwt.t) ->
?application_error:
(Tezos_protocol_alpha.Environment.Error_monad.error -> bool) ->
?construction_error:
(Tezos_protocol_alpha.Environment.Error_monad.error -> bool) ->
?mempool_error:(Tezos_protocol_alpha.Environment.Error_monad.error -> bool) ->
predecessor:Block.t ->
t ->
unit Tezos_base.TzPervasives.tzresult Lwt.tCalls check_validation_and_application on all tested_modes successively, with respective checks or errors.
val check_validation_and_application_all_modes :
loc:string ->
?check_after:
(Block.block_with_metadata -> unit Tezos_base.TzPervasives.tzresult Lwt.t) ->
?error:(Tezos_protocol_alpha.Environment.Error_monad.error -> bool) ->
predecessor:Block.t ->
t ->
unit Tezos_base.TzPervasives.tzresult Lwt.tCalls check_validation_and_application on all tested_modes successively, with the same check_after or error provided for each mode.
val get_op_signature :
t ->
Tezos_protocol_alpha.Protocol.Alpha_context.signature optionval set_op_signature :
t ->
Tezos_protocol_alpha.Protocol.Alpha_context.signature option ->
t