Open cmjc opened 1 year ago
NTN has states too, and they correspond exactly to LNTN states b/c they share the same state transitions. How about displaying this logic visually with a pair of synchronised state machine diagrams:
dot code for reference:
digraph finite_state_machine { graph [nodesep=1]; fontname="Courier-Bold" { rank=same; node [shape = doublecircle, fixedsize=true, width=1.25, height=1.25, xlabel = "NTN"]; unbonded; node [shape = circle, fixedsize=true, width=1.25, height=1.25, xlabel=""]; unbonded -> bonded [label = "bond"]; bonded -> unbonding [label = "unbond"]; unbonding -> unbonded; } { style = filled; rank=same; node [shape = doublecircle, fixedsize=true, width=1.25, height=1.25, label="unminted/\nburned", xlabel = "LNTN"] unminted; node [shape = circle, fixedsize=true, width=1.25, height=1.25, label="locked", xlabel=""] locked; node [shape = circle, fixedsize=true, width=1.25, height=1.25, label="unlocked"] unlocked; unminted -> unlocked [label = "bond"]; unlocked -> locked [label = "unbond"]; locked -> unminted; } unbonded -> unminted [style="invis"]; bonded -> unlocked [style="invis"]; unbonding -> locked [style="invis"]; }
Visualisation will improve readability and clarity of the docs. Adding diagrams to the baseline docs is a known To Do not yet actioned.
Options seems to be:
GraphViz:
Mermaid:
PlantUML:
Description
NTN has states too, and they correspond exactly to LNTN states b/c they share the same state transitions. How about displaying this logic visually with a pair of synchronised state machine diagrams:
dot code for reference:
Rationale
Visualisation will improve readability and clarity of the docs. Adding diagrams to the baseline docs is a known To Do not yet actioned.
Tasks