package octez-protocol-017-PtNairob-libs
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
    
    
  sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13
    
    
  doc/octez-protocol-017-PtNairob-libs.test-helpers/Tezos_017_PtNairob_test_helpers/Liquidity_baking_machine/ConcreteMachine/index.html
Module Liquidity_baking_machine.ConcreteMachineSource
A machine that can execute scenarios onchain.
The state of the ConcreteMachine.
val get_xtz_balance : 
  Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Contract.t ->
  t ->
  xtz Tezos_base.TzPervasives.tzresult Lwt.tget_xtz_balance c state returns the amount of mutez owned by c in state.
val get_tzbtc_balance : 
  Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Contract.t ->
  Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Contract.t env ->
  t ->
  tzbtc Tezos_base.TzPervasives.tzresult Lwt.tget_tzbtc_balance c env state returns the amount of TzBTC owned by c in state, according to the TzBTC contract.
val get_liquidity_balance : 
  Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Contract.t ->
  Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Contract.t env ->
  t ->
  liquidity Tezos_base.TzPervasives.tzresult Lwt.tget_liquidity_balance c env state returns the amount of liquidity token owned by c in state, according to the Liquidity contract.
val get_cpmm_total_liquidity : 
  Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Contract.t env ->
  t ->
  liquidity Tezos_base.TzPervasives.tzresult Lwt.tget_cpmm_total_liquidity env state fetches the current amount of liquidity tokens distributed by the CPMM contract from the state state.
val build : 
  ?invariant:
    (Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Contract.t env ->
      t ->
      bool Tezos_base.TzPervasives.tzresult Lwt.t) ->
  ?subsidy:xtz ->
  specs ->
  (t * Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Contract.t env)
    Tezos_base.TzPervasives.tzresult
    Lwt.tbuild specs asynchronously computes (1) an initial block for the ConcreteMachine, and (2) the environment associated to this block.
The machine enforces the resulting state is consistent with the specs given as inputs, and raises an Assert_failure exception if it does not. It also enforces that the machines used underneath remain in sync.
One can use the optional argument subsidy to set the subsidy amount to a given value (by default, we use the same as the main chain). Additionally, the invariant optional argument can be used to verify that a given invariant holds at the end of the initialization.
val step : 
  ?invariant:
    (Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Contract.t env ->
      t ->
      bool Tezos_base.TzPervasives.tzresult Lwt.t) ->
  Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Contract.t step ->
  Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Contract.t env ->
  t ->
  t Tezos_base.TzPervasives.tzresult Lwt.tstep s env state asynchronously executes a single step s from state.
The invariant optional argument can be used to verify that a given invariant holds after each baked block.
val run : 
  ?invariant:
    (Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Contract.t env ->
      t ->
      bool Tezos_base.TzPervasives.tzresult Lwt.t) ->
  contract_id step list ->
  Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Contract.t env ->
  t ->
  t Tezos_base.TzPervasives.tzresult Lwt.trun lss env state asynchronously executes a list of steps from state.
The invariant optional argument can be used to verify that a given invariant holds after each baked block.