package octez-protocol-019-PtParisB-libs
This is a simulation of the CPMM contract, as implemented in mligo in src/proto_alpha/lib_protocol/contracts/cpmm.mligo
. The interested reader should look for comments in this file to gain a better understanding of the contract logic.
val mutez_to_natural :
Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Tez.t ->
Z.t
val natural_to_mutez :
Z.t ->
Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Tez.t
val addLiquidity :
tokenPool:Z.t ->
xtzPool:Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Tez.t ->
lqtTotal:Z.t ->
amount:Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Tez.t ->
Z.t * Z.t
val removeLiquidity :
tokenPool:Z.t ->
xtzPool:Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Tez.t ->
lqtTotal:Z.t ->
lqtBurned:Z.t ->
Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Tez.t * Z.t
val tokenToXtz :
tokenPool:Z.t ->
xtzPool:Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Tez.t ->
tokensSold:Z.t ->
Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Tez.t * Z.t
val xtzToToken :
tokenPool:Z.t ->
xtzPool:Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Tez.t ->
amount:Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Tez.t ->
Z.t * Z.t
val tokenToToken :
tokenPool:Z.t ->
xtzPool:Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Tez.t ->
tokensSold:Z.t ->
Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Tez.t * Z.t
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>