Module Mavryk_001_PtAtLas_test_helpers.Op

Assemble 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.

Create an unpacked attestation that is expected for given Block.t.

Optional parameters allow to specify the attested values: level, round and/or block_payload_hash.

They also allow to specify the attester (delegate), and/or the slot. These default to the first slot and its delegate.

Finally, the operation branch can be specified. It defaults to the predecessor of the attested block.

Create an unpacked preattestation that is expected for a given Block.t.

Optional parameters are the same than raw_attestation.

Create a packed attestation that is expected for a given Block.t by packing the result of raw_attestation.

Create a packed preattestation that is expected for a given Block.t by packing the result of raw_preattestation.

type gas_limit =
  1. | Max
    (*

    Max corresponds to the max_gas_limit_per_operation constant.

    *)
  2. | High
    (*

    High corresponds to 50_000 gas unit which should cover a majority of use-cases. This is the default used when forging manager operations.

    *)
  3. | Low
    (*

    Low corresponds to the gas entry cost of a manager operation

    *)
  4. | Zero
  5. | Custom_gas of Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.Arith.integral
val pp_gas_limit : Stdlib.Format.formatter -> gas_limit -> unit

Pretty printer for gas_limit type.

Same as transaction, but with a more generic destination parameter. It is said unsafe because it can construct transactions that will always fail, such as

  • Transaction to the deposit entrypoint of a transaction rollup, as these transactions are necessarily internals.

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.

revelation ?fee ?gas_limit ?forge_pkh 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.mav: 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
  • ?storage_limit:Z.t: forces a storage limit, otherwise set to Z.zero

contract_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.

Batch 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).

Reveals a seed_nonce that was previously committed at a certain level

Reveals a VDF with a proof of correctness

Craft the contents_list for a Proposals operation.

Invocation: proposals_contents ctxt source ?period proposals.

  • parameter period

    defaults to the index of the current voting period in ctxt.

Craft a Proposals operation.

Invocation: proposals ctxt source ?period proposals.

  • parameter period

    defaults to the index of the current voting period in ctxt.

Craft the contents_list for a Ballot operation.

Invocation: ballot_contents ctxt source ?period proposal ballot.

  • parameter period

    defaults to the index of the current voting period in ctxt.

Craft a Ballot operation.

Invocation: ballot ctxt source ?period proposal ballot.

  • parameter period

    defaults to the index of the current voting period in ctxt.

transfer_ticket allows an implicit account to transfer tickets they owned.

The arguments are:

  • Context.t: the context on which to apply the operation
  • source:Contract.t: the source contract of the operation
  • Tx_rollup.t: the rollup to which the withdrawal pertains
  • Tx_rollup_level.t: the level on which the withdrawal was commited
  • contents:Script.lazy_expr: the contents of the ticket of the withdrawal
  • ty:Script.lazy_expr: the type of the ticket of the withdrawal
  • ticketer:Contract.t: the ticketer of the ticket of the withdrawal
  • Z.t: the quantity of the ticket of the withdrawal
  • destination:Contract.t: the destination contract that should receive the ticket of the withdrawal
  • Entrypoint_repr.t: the entrypoint of the destination contract to which the ticket should be sent

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.

sc_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.

sc_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.

sc_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.

sc_rollup_recover_bond ctxt source sc_rollup staker recovers the commitment bond of staker.

zk_rollup_origination ctxt source ~public_parameters ~circuits_info ~init_state ~nb_ops tries to originate a ZK Rollup.

zk_rollup_publish ctxt source ~zk_rollup ~op tries to add an operation to the pending list of a ZK Rollup.

zk_rollup_update ctxt source ~zk_rollup ~update tries to apply an update to a ZK Rollup.