add diagrams

This commit is contained in:
Emily Martins 2022-01-18 18:55:50 +01:00
parent e201b5e6d7
commit 1b52a2a179
6 changed files with 591 additions and 2 deletions

View file

@ -1,4 +1,4 @@
# agora specification & documentation
# Agora specification & documentation
This folder contains all of the specification and architecture documentation of agora.
@ -15,4 +15,4 @@ Agora makes extensive use of plutarch. So it's prerequisite for understanding th
The following is a list of words/shorthands that are frequently used:
- **Governance Token (GT)**: The token that holds value within the protocol and is used for voting, rewards, etc. _Examples: Liqwid's LQ_.
- **Authority Token (GAT)**: A token that delegates authority of a particular script / token. See [tech-design/authority-token.md](..)
- **Authority Token (GAT)**: A token that delegates authority of a particular script / token. See [tech-design/authority-token.md](./tech-design/authority-token.md)

View file

@ -0,0 +1,238 @@
digraph GovernanceAuthorityToken {
rankdir = LR;
// Inputs:
//////////////////////////////////////////////////////////////////////////////
// governance in
governance_datum
[ shape = record
, label =
"{{ GovernanceState
}}"
];
governance_addr
[ shape = record
, label = "{{ Script | Governance }}"
, style = "bold"
];
//////////////////////////////////////////////////////////////////////////////
// proposal in
proposal_datum
[ shape = record
, label = "{{ ProposalState }}"
];
proposal_addr
-> proposal_redeemer
[style = "dashed", dir="none"];
proposal_addr
[ shape = record
, label = "{{ Script | Proposal }}"
, style = "bold"
];
governance_datum
-> governance_addr [style = "dashed"];
governance_redeemer
[ shape = record
, label = "{{ GovernanceAction | MintAuthorityTokens }}"
];
governance_addr
-> governance_redeemer
[style = "dashed", dir="none"];
proposal_datum -> proposal_addr [style = "dashed"];
//////////////////////////////////////////////////////////////////////////////
// user wallet in
user_wallet_min_ada_in
[ shape = ellipse
, label = <ADA: <I>min utxo</I>>
];
user_wallet_in
[ shape = box
, label = "User Inputs"
, style = "bold"
, peripheries = 2
];
user_wallet_min_ada_in
-> user_wallet_in
[ style = "dashed"
];
tx1
[ shape = diamond
, label = "Tx1"
, style = "bold"
];
user_wallet_in -> tx1;
governance_addr -> tx1;
proposal_addr -> tx1;
//////////////////////////////////////////////////////////////////////////////
// governance out
governance_datum_out
[ shape = record
, label =
"{{ GovernanceState
}}"
];
governance_addr_out
[ shape = record
, label = "{{ Script | Governance }}"
, style = "bold"
];
governance_datum_out
-> governance_addr_out
[ style = "dashed"
];
//////////////////////////////////////////////////////////////////////////////
// proposal out
proposal_datum_out
-> proposal_addr_out
[ style = "dashed"
];
proposal_redeemer
[ shape = record
, label =
"{{ ProposalAction | FinishVoting }}"
];
proposal_datum_out
[ shape = record
, label =
"{{ ProposalState }}"
];
proposal_addr_out
[ shape = record
, label = "{{ Script | Proposal }}"
, style = "bold"
];
//////////////////////////////////////////////////////////////////////////////
// effect out
effect_governance_token_out
[ shape = ellipse
, label = <GovernanceAuthorityToken: 1>
];
effect_addr_out
[ shape = record
, label = "{{ Script | Effect }}"
, style = "bold"
];
effect_governance_token_out
-> effect_addr_out
[ style = "dashed"
];
effect_min_ada_out
-> effect_addr_out
[ style = "dashed"
];
effect_min_ada_out
[ shape = ellipse
, label = <ADA: <I>min utxo</I>>
];
tx1 -> governance_addr_out;
tx1 -> proposal_addr_out;
tx1 -> effect_addr_out;
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// effect in
effect_addr_out2
[ shape = record
, label = "{{ Script | Effect }}"
, style = "bold"
];
//////////////////////////////////////////////////////////////////////////////
// market in
market_addr_in
[ shape = record
, label = "{{ Script | Market }}"
, style = "bold"
];
market_datum_in
[ shape = record
, label = "{{ MarketState | params: A }}"
];
market_datum_in
-> market_addr_in
[ style = "dashed"
];
//////////////////////////////////////////////////////////////////////////////
// market out
market_addr_out
[ shape = record
, label = "{{ Script | Market }}"
, style = "bold"
];
market_datum_out
[ shape = record
, label = "{{ MarketState | params: f(A) }}"
];
market_datum_out
-> market_addr_out
[ style = "dashed"
];
tx2
[ shape = diamond
, label = "Tx2"
, style = "bold"
];
user_wallet_min_ada_out
[ shape = ellipse
, label = <ADA: <I>min utxo</I>>
];
user_wallet_out
[ shape = box
, label = "User Outputs"
, style = "bold"
, peripheries = 2
];
user_wallet_min_ada_out
-> user_wallet_out
[ style = "dashed"
];
effect_addr_out -> tx2;
market_addr_in -> tx2;
tx2 -> user_wallet_out;
tx2 -> effect_addr_out2;
tx2 -> market_addr_out;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

View file

@ -0,0 +1,322 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.47.3 (0)
-->
<!-- Title: GovernanceAuthorityToken Pages: 1 -->
<svg width="1129pt" height="459pt"
viewBox="0.00 0.00 1128.65 459.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 455)">
<title>GovernanceAuthorityToken</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-455 1124.65,-455 1124.65,4 -4,4"/>
<!-- governance_datum -->
<g id="node1" class="node">
<title>governance_datum</title>
<polygon fill="none" stroke="black" points="7.99,-383.5 7.99,-419.5 147.99,-419.5 147.99,-383.5 7.99,-383.5"/>
<text text-anchor="middle" x="77.99" y="-397.8" font-family="Times,serif" font-size="14.00">GovernanceState</text>
</g>
<!-- governance_addr -->
<g id="node2" class="node">
<title>governance_addr</title>
<polygon fill="none" stroke="black" stroke-width="2" points="195.99,-378.5 195.99,-424.5 296.99,-424.5 296.99,-378.5 195.99,-378.5"/>
<text text-anchor="middle" x="246.49" y="-409.3" font-family="Times,serif" font-size="14.00">Script</text>
<polyline fill="none" stroke="black" stroke-width="2" points="195.99,-401.5 296.99,-401.5 "/>
<text text-anchor="middle" x="246.49" y="-386.3" font-family="Times,serif" font-size="14.00">Governance</text>
</g>
<!-- governance_datum&#45;&gt;governance_addr -->
<g id="edge2" class="edge">
<title>governance_datum&#45;&gt;governance_addr</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M148.15,-401.5C160.65,-401.5 173.58,-401.5 185.77,-401.5"/>
<polygon fill="black" stroke="black" points="185.82,-405 195.82,-401.5 185.82,-398 185.82,-405"/>
</g>
<!-- governance_redeemer -->
<g id="node6" class="node">
<title>governance_redeemer</title>
<polygon fill="none" stroke="black" points="402.32,-404.5 402.32,-450.5 569.32,-450.5 569.32,-404.5 402.32,-404.5"/>
<text text-anchor="middle" x="485.82" y="-435.3" font-family="Times,serif" font-size="14.00">GovernanceAction</text>
<polyline fill="none" stroke="black" points="402.32,-427.5 569.32,-427.5 "/>
<text text-anchor="middle" x="485.82" y="-412.3" font-family="Times,serif" font-size="14.00">MintAuthorityTokens</text>
</g>
<!-- governance_addr&#45;&gt;governance_redeemer -->
<g id="edge3" class="edge">
<title>governance_addr&#45;&gt;governance_redeemer</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M297.24,-406.95C327.55,-410.27 367.04,-414.6 401.97,-418.42"/>
</g>
<!-- tx1 -->
<g id="node9" class="node">
<title>tx1</title>
<polygon fill="none" stroke="black" stroke-width="2" points="485.82,-330.5 446.28,-312.5 485.82,-294.5 525.37,-312.5 485.82,-330.5"/>
<text text-anchor="middle" x="485.82" y="-308.8" font-family="Times,serif" font-size="14.00">Tx1</text>
</g>
<!-- governance_addr&#45;&gt;tx1 -->
<g id="edge7" class="edge">
<title>governance_addr&#45;&gt;tx1</title>
<path fill="none" stroke="black" d="M275.17,-378.21C292.02,-365.2 314.58,-349.78 336.99,-340.5 370.45,-326.64 411.03,-319.58 441.2,-316.02"/>
<polygon fill="black" stroke="black" points="441.85,-319.47 451.41,-314.9 441.09,-312.51 441.85,-319.47"/>
</g>
<!-- proposal_datum -->
<g id="node3" class="node">
<title>proposal_datum</title>
<polygon fill="none" stroke="black" points="19.49,-118.5 19.49,-154.5 136.49,-154.5 136.49,-118.5 19.49,-118.5"/>
<text text-anchor="middle" x="77.99" y="-132.8" font-family="Times,serif" font-size="14.00">ProposalState</text>
</g>
<!-- proposal_addr -->
<g id="node4" class="node">
<title>proposal_addr</title>
<polygon fill="none" stroke="black" stroke-width="2" points="206.99,-113.5 206.99,-159.5 285.99,-159.5 285.99,-113.5 206.99,-113.5"/>
<text text-anchor="middle" x="246.49" y="-144.3" font-family="Times,serif" font-size="14.00">Script</text>
<polyline fill="none" stroke="black" stroke-width="2" points="206.99,-136.5 285.99,-136.5 "/>
<text text-anchor="middle" x="246.49" y="-121.3" font-family="Times,serif" font-size="14.00">Proposal</text>
</g>
<!-- proposal_datum&#45;&gt;proposal_addr -->
<g id="edge4" class="edge">
<title>proposal_datum&#45;&gt;proposal_addr</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M136.76,-136.5C156.33,-136.5 177.98,-136.5 196.78,-136.5"/>
<polygon fill="black" stroke="black" points="196.9,-140 206.9,-136.5 196.9,-133 196.9,-140"/>
</g>
<!-- proposal_redeemer -->
<g id="node5" class="node">
<title>proposal_redeemer</title>
<polygon fill="none" stroke="black" points="423.82,-0.5 423.82,-46.5 547.82,-46.5 547.82,-0.5 423.82,-0.5"/>
<text text-anchor="middle" x="485.82" y="-31.3" font-family="Times,serif" font-size="14.00">ProposalAction</text>
<polyline fill="none" stroke="black" points="423.82,-23.5 547.82,-23.5 "/>
<text text-anchor="middle" x="485.82" y="-8.3" font-family="Times,serif" font-size="14.00">FinishVoting</text>
</g>
<!-- proposal_addr&#45;&gt;proposal_redeemer -->
<g id="edge1" class="edge">
<title>proposal_addr&#45;&gt;proposal_redeemer</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M266.76,-113.35C283.45,-94.86 309.21,-69.76 336.99,-55.5 363.73,-41.77 396.13,-33.92 423.77,-29.43"/>
</g>
<!-- proposal_addr&#45;&gt;tx1 -->
<g id="edge8" class="edge">
<title>proposal_addr&#45;&gt;tx1</title>
<path fill="none" stroke="black" d="M254.73,-159.73C266.38,-193.02 292.59,-253.67 336.99,-284.5 366.58,-305.05 407.19,-311.59 438.36,-313.24"/>
<polygon fill="black" stroke="black" points="438.41,-316.75 448.54,-313.63 438.68,-309.75 438.41,-316.75"/>
</g>
<!-- user_wallet_min_ada_in -->
<g id="node7" class="node">
<title>user_wallet_min_ada_in</title>
<ellipse fill="none" stroke="black" cx="77.99" cy="-312.5" rx="77.99" ry="18"/>
<text text-anchor="start" x="25.99" y="-309.8" font-family="Times,serif" font-size="14.00">ADA: </text>
<text text-anchor="start" x="65.99" y="-309.8" font-family="Times,serif" font-style="italic" font-size="14.00">min utxo</text>
</g>
<!-- user_wallet_in -->
<g id="node8" class="node">
<title>user_wallet_in</title>
<polygon fill="none" stroke="black" stroke-width="2" points="296.99,-330.5 195.99,-330.5 195.99,-294.5 296.99,-294.5 296.99,-330.5"/>
<polygon fill="none" stroke="black" stroke-width="2" points="300.99,-334.5 191.99,-334.5 191.99,-290.5 300.99,-290.5 300.99,-334.5"/>
<text text-anchor="middle" x="246.49" y="-308.8" font-family="Times,serif" font-size="14.00">User Inputs</text>
</g>
<!-- user_wallet_min_ada_in&#45;&gt;user_wallet_in -->
<g id="edge5" class="edge">
<title>user_wallet_min_ada_in&#45;&gt;user_wallet_in</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M156.39,-312.5C164.75,-312.5 173.19,-312.5 181.37,-312.5"/>
<polygon fill="black" stroke="black" points="181.56,-316 191.56,-312.5 181.56,-309 181.56,-316"/>
</g>
<!-- user_wallet_in&#45;&gt;tx1 -->
<g id="edge6" class="edge">
<title>user_wallet_in&#45;&gt;tx1</title>
<path fill="none" stroke="black" d="M301.05,-312.5C341.58,-312.5 396.8,-312.5 436.1,-312.5"/>
<polygon fill="black" stroke="black" points="436.24,-316 446.24,-312.5 436.24,-309 436.24,-316"/>
</g>
<!-- governance_addr_out -->
<g id="node11" class="node">
<title>governance_addr_out</title>
<polygon fill="none" stroke="black" stroke-width="2" points="670.66,-331.5 670.66,-377.5 771.66,-377.5 771.66,-331.5 670.66,-331.5"/>
<text text-anchor="middle" x="721.16" y="-362.3" font-family="Times,serif" font-size="14.00">Script</text>
<polyline fill="none" stroke="black" stroke-width="2" points="670.66,-354.5 771.66,-354.5 "/>
<text text-anchor="middle" x="721.16" y="-339.3" font-family="Times,serif" font-size="14.00">Governance</text>
</g>
<!-- tx1&#45;&gt;governance_addr_out -->
<g id="edge13" class="edge">
<title>tx1&#45;&gt;governance_addr_out</title>
<path fill="none" stroke="black" d="M514.51,-317.48C550.27,-323.92 613.5,-335.3 660.44,-343.75"/>
<polygon fill="black" stroke="black" points="660.03,-347.23 670.49,-345.56 661.27,-340.34 660.03,-347.23"/>
</g>
<!-- proposal_addr_out -->
<g id="node13" class="node">
<title>proposal_addr_out</title>
<polygon fill="none" stroke="black" stroke-width="2" points="681.66,-244.5 681.66,-290.5 760.66,-290.5 760.66,-244.5 681.66,-244.5"/>
<text text-anchor="middle" x="721.16" y="-275.3" font-family="Times,serif" font-size="14.00">Script</text>
<polyline fill="none" stroke="black" stroke-width="2" points="681.66,-267.5 760.66,-267.5 "/>
<text text-anchor="middle" x="721.16" y="-252.3" font-family="Times,serif" font-size="14.00">Proposal</text>
</g>
<!-- tx1&#45;&gt;proposal_addr_out -->
<g id="edge14" class="edge">
<title>tx1&#45;&gt;proposal_addr_out</title>
<path fill="none" stroke="black" d="M514.36,-307.36C544.06,-301.8 592.73,-292.64 634.66,-284.5 646.61,-282.18 659.5,-279.64 671.55,-277.24"/>
<polygon fill="black" stroke="black" points="672.32,-280.66 681.44,-275.28 670.95,-273.8 672.32,-280.66"/>
</g>
<!-- effect_addr_out -->
<g id="node15" class="node">
<title>effect_addr_out</title>
<polygon fill="none" stroke="black" stroke-width="2" points="691.16,-169.5 691.16,-215.5 751.16,-215.5 751.16,-169.5 691.16,-169.5"/>
<text text-anchor="middle" x="721.16" y="-200.3" font-family="Times,serif" font-size="14.00">Script</text>
<polyline fill="none" stroke="black" stroke-width="2" points="691.16,-192.5 751.16,-192.5 "/>
<text text-anchor="middle" x="721.16" y="-177.3" font-family="Times,serif" font-size="14.00">Effect</text>
</g>
<!-- tx1&#45;&gt;effect_addr_out -->
<g id="edge15" class="edge">
<title>tx1&#45;&gt;effect_addr_out</title>
<path fill="none" stroke="black" d="M524.56,-312.91C556.23,-311.58 601.5,-305.62 634.66,-284.5 657.76,-269.79 652.08,-254.62 670.66,-234.5 674.63,-230.2 679.02,-225.92 683.5,-221.83"/>
<polygon fill="black" stroke="black" points="685.89,-224.39 691.07,-215.14 681.26,-219.14 685.89,-224.39"/>
</g>
<!-- governance_datum_out -->
<g id="node10" class="node">
<title>governance_datum_out</title>
<polygon fill="none" stroke="black" points="415.82,-349.5 415.82,-385.5 555.82,-385.5 555.82,-349.5 415.82,-349.5"/>
<text text-anchor="middle" x="485.82" y="-363.8" font-family="Times,serif" font-size="14.00">GovernanceState</text>
</g>
<!-- governance_datum_out&#45;&gt;governance_addr_out -->
<g id="edge9" class="edge">
<title>governance_datum_out&#45;&gt;governance_addr_out</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M555.88,-363.65C589.11,-361.8 628.55,-359.6 660.46,-357.83"/>
<polygon fill="black" stroke="black" points="660.75,-361.32 670.54,-357.26 660.36,-354.33 660.75,-361.32"/>
</g>
<!-- proposal_datum_out -->
<g id="node12" class="node">
<title>proposal_datum_out</title>
<polygon fill="none" stroke="black" points="427.32,-239.5 427.32,-275.5 544.32,-275.5 544.32,-239.5 427.32,-239.5"/>
<text text-anchor="middle" x="485.82" y="-253.8" font-family="Times,serif" font-size="14.00">ProposalState</text>
</g>
<!-- proposal_datum_out&#45;&gt;proposal_addr_out -->
<g id="edge10" class="edge">
<title>proposal_datum_out&#45;&gt;proposal_addr_out</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M544.5,-259.97C583.48,-261.64 634.39,-263.82 671.36,-265.41"/>
<polygon fill="black" stroke="black" points="671.25,-268.91 681.39,-265.84 671.55,-261.91 671.25,-268.91"/>
</g>
<!-- effect_governance_token_out -->
<g id="node14" class="node">
<title>effect_governance_token_out</title>
<ellipse fill="none" stroke="black" cx="485.82" cy="-202.5" rx="148.67" ry="18"/>
<text text-anchor="start" x="379.32" y="-198.8" font-family="Times,serif" font-size="14.00">GovernanceAuthorityToken: 1</text>
</g>
<!-- effect_governance_token_out&#45;&gt;effect_addr_out -->
<g id="edge11" class="edge">
<title>effect_governance_token_out&#45;&gt;effect_addr_out</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M626.26,-196.52C646.19,-195.67 665.2,-194.86 680.83,-194.19"/>
<polygon fill="black" stroke="black" points="681.24,-197.67 691.08,-193.75 680.94,-190.68 681.24,-197.67"/>
</g>
<!-- tx2 -->
<g id="node22" class="node">
<title>tx2</title>
<polygon fill="none" stroke="black" stroke-width="2" points="885.65,-168.5 846.11,-150.5 885.65,-132.5 925.2,-150.5 885.65,-168.5"/>
<text text-anchor="middle" x="885.65" y="-146.8" font-family="Times,serif" font-size="14.00">Tx2</text>
</g>
<!-- effect_addr_out&#45;&gt;tx2 -->
<g id="edge19" class="edge">
<title>effect_addr_out&#45;&gt;tx2</title>
<path fill="none" stroke="black" d="M751.21,-184.99C778.89,-177.84 820.59,-167.06 850,-159.46"/>
<polygon fill="black" stroke="black" points="851.04,-162.8 859.84,-156.91 849.28,-156.03 851.04,-162.8"/>
</g>
<!-- effect_min_ada_out -->
<g id="node16" class="node">
<title>effect_min_ada_out</title>
<ellipse fill="none" stroke="black" cx="485.82" cy="-148.5" rx="77.99" ry="18"/>
<text text-anchor="start" x="433.82" y="-145.8" font-family="Times,serif" font-size="14.00">ADA: </text>
<text text-anchor="start" x="473.82" y="-145.8" font-family="Times,serif" font-style="italic" font-size="14.00">min utxo</text>
</g>
<!-- effect_min_ada_out&#45;&gt;effect_addr_out -->
<g id="edge12" class="edge">
<title>effect_min_ada_out&#45;&gt;effect_addr_out</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M548,-159.45C574.64,-164.28 606.21,-170.07 634.66,-175.5 649.73,-178.37 666.28,-181.64 680.76,-184.53"/>
<polygon fill="black" stroke="black" points="680.41,-188.03 690.9,-186.56 681.78,-181.17 680.41,-188.03"/>
</g>
<!-- effect_addr_out2 -->
<g id="node17" class="node">
<title>effect_addr_out2</title>
<polygon fill="none" stroke="black" stroke-width="2" points="1030.15,-127.5 1030.15,-173.5 1090.15,-173.5 1090.15,-127.5 1030.15,-127.5"/>
<text text-anchor="middle" x="1060.15" y="-158.3" font-family="Times,serif" font-size="14.00">Script</text>
<polyline fill="none" stroke="black" stroke-width="2" points="1030.15,-150.5 1090.15,-150.5 "/>
<text text-anchor="middle" x="1060.15" y="-135.3" font-family="Times,serif" font-size="14.00">Effect</text>
</g>
<!-- market_addr_in -->
<g id="node18" class="node">
<title>market_addr_in</title>
<polygon fill="none" stroke="black" stroke-width="2" points="687.16,-85.5 687.16,-131.5 755.16,-131.5 755.16,-85.5 687.16,-85.5"/>
<text text-anchor="middle" x="721.16" y="-116.3" font-family="Times,serif" font-size="14.00">Script</text>
<polyline fill="none" stroke="black" stroke-width="2" points="687.16,-108.5 755.16,-108.5 "/>
<text text-anchor="middle" x="721.16" y="-93.3" font-family="Times,serif" font-size="14.00">Market</text>
</g>
<!-- market_addr_in&#45;&gt;tx2 -->
<g id="edge20" class="edge">
<title>market_addr_in&#45;&gt;tx2</title>
<path fill="none" stroke="black" d="M755.43,-117.1C783.05,-124.24 822.2,-134.36 850.15,-141.58"/>
<polygon fill="black" stroke="black" points="849.35,-144.99 859.9,-144.1 851.1,-138.21 849.35,-144.99"/>
</g>
<!-- market_datum_in -->
<g id="node19" class="node">
<title>market_datum_in</title>
<polygon fill="none" stroke="black" points="432.32,-65.5 432.32,-111.5 539.32,-111.5 539.32,-65.5 432.32,-65.5"/>
<text text-anchor="middle" x="485.82" y="-96.3" font-family="Times,serif" font-size="14.00">MarketState</text>
<polyline fill="none" stroke="black" points="432.32,-88.5 539.32,-88.5 "/>
<text text-anchor="middle" x="485.82" y="-73.3" font-family="Times,serif" font-size="14.00">params: A</text>
</g>
<!-- market_datum_in&#45;&gt;market_addr_in -->
<g id="edge16" class="edge">
<title>market_datum_in&#45;&gt;market_addr_in</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M539.48,-93.01C580.88,-96.56 637.87,-101.45 676.7,-104.77"/>
<polygon fill="black" stroke="black" points="676.88,-108.3 687.14,-105.67 677.48,-101.33 676.88,-108.3"/>
</g>
<!-- market_addr_out -->
<g id="node20" class="node">
<title>market_addr_out</title>
<polygon fill="none" stroke="black" stroke-width="2" points="1026.15,-192.5 1026.15,-238.5 1094.15,-238.5 1094.15,-192.5 1026.15,-192.5"/>
<text text-anchor="middle" x="1060.15" y="-223.3" font-family="Times,serif" font-size="14.00">Script</text>
<polyline fill="none" stroke="black" stroke-width="2" points="1026.15,-215.5 1094.15,-215.5 "/>
<text text-anchor="middle" x="1060.15" y="-200.3" font-family="Times,serif" font-size="14.00">Market</text>
</g>
<!-- market_datum_out -->
<g id="node21" class="node">
<title>market_datum_out</title>
<polygon fill="none" stroke="black" points="832.15,-192.5 832.15,-238.5 939.15,-238.5 939.15,-192.5 832.15,-192.5"/>
<text text-anchor="middle" x="885.65" y="-223.3" font-family="Times,serif" font-size="14.00">MarketState</text>
<polyline fill="none" stroke="black" points="832.15,-215.5 939.15,-215.5 "/>
<text text-anchor="middle" x="885.65" y="-200.3" font-family="Times,serif" font-size="14.00">params: f(A)</text>
</g>
<!-- market_datum_out&#45;&gt;market_addr_out -->
<g id="edge17" class="edge">
<title>market_datum_out&#45;&gt;market_addr_out</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M939.34,-215.5C963.83,-215.5 992.59,-215.5 1015.8,-215.5"/>
<polygon fill="black" stroke="black" points="1016.03,-219 1026.03,-215.5 1016.03,-212 1016.03,-219"/>
</g>
<!-- tx2&#45;&gt;effect_addr_out2 -->
<g id="edge22" class="edge">
<title>tx2&#45;&gt;effect_addr_out2</title>
<path fill="none" stroke="black" d="M925.36,-150.5C953.46,-150.5 991.35,-150.5 1019.63,-150.5"/>
<polygon fill="black" stroke="black" points="1019.96,-154 1029.96,-150.5 1019.96,-147 1019.96,-154"/>
</g>
<!-- tx2&#45;&gt;market_addr_out -->
<g id="edge23" class="edge">
<title>tx2&#45;&gt;market_addr_out</title>
<path fill="none" stroke="black" d="M907.8,-158.47C934.78,-168.63 982.05,-186.45 1016.61,-199.47"/>
<polygon fill="black" stroke="black" points="1015.4,-202.75 1025.99,-203.01 1017.87,-196.2 1015.4,-202.75"/>
</g>
<!-- user_wallet_out -->
<g id="node24" class="node">
<title>user_wallet_out</title>
<polygon fill="none" stroke="black" stroke-width="2" points="1116.65,-104.5 1003.65,-104.5 1003.65,-68.5 1116.65,-68.5 1116.65,-104.5"/>
<polygon fill="none" stroke="black" stroke-width="2" points="1120.65,-108.5 999.65,-108.5 999.65,-64.5 1120.65,-64.5 1120.65,-108.5"/>
<text text-anchor="middle" x="1060.15" y="-82.8" font-family="Times,serif" font-size="14.00">User Outputs</text>
</g>
<!-- tx2&#45;&gt;user_wallet_out -->
<g id="edge21" class="edge">
<title>tx2&#45;&gt;user_wallet_out</title>
<path fill="none" stroke="black" d="M908.15,-142.52C928.69,-134.9 960.76,-123 990.08,-112.12"/>
<polygon fill="black" stroke="black" points="991.33,-115.4 999.49,-108.64 988.89,-108.83 991.33,-115.4"/>
</g>
<!-- user_wallet_min_ada_out -->
<g id="node23" class="node">
<title>user_wallet_min_ada_out</title>
<ellipse fill="none" stroke="black" cx="885.65" cy="-86.5" rx="77.99" ry="18"/>
<text text-anchor="start" x="833.65" y="-83.8" font-family="Times,serif" font-size="14.00">ADA: </text>
<text text-anchor="start" x="873.65" y="-83.8" font-family="Times,serif" font-style="italic" font-size="14.00">min utxo</text>
</g>
<!-- user_wallet_min_ada_out&#45;&gt;user_wallet_out -->
<g id="edge18" class="edge">
<title>user_wallet_min_ada_out&#45;&gt;user_wallet_out</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M963.82,-86.5C972.36,-86.5 981.03,-86.5 989.47,-86.5"/>
<polygon fill="black" stroke="black" points="989.64,-90 999.64,-86.5 989.64,-83 989.64,-90"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 19 KiB

27
docs/diagrams/Makefile Normal file
View file

@ -0,0 +1,27 @@
SHELL := /usr/bin/env bash
.PHONY: diagrams clean_diagrams
usage:
@echo "usage: make <command> [OPTIONS]"
@echo
@echo "Available commands:"
@echo " diagrams -- Create the diagrams from .dot files"
@echo " clean_diagrams -- Delete the diagram images"
DOT_INPUTS := $(wildcard ./*.dot)
DOT_SVGS := $(patsubst %.dot,%.svg,$(DOT_INPUTS))
DOT_PNGS := $(patsubst %.dot,%.png,$(DOT_INPUTS))
diagrams: $(DOT_SVGS) $(DOT_PNGS)
@echo $(DOT_SVGS)
clean_diagrams:
rm $(DOT_SVGS)
rm $(DOT_PNGS)
%.png: %.svg
convert $< $@
%.svg: %.dot
dot -Tsvg $< -o $@

View file

@ -292,6 +292,8 @@
haskellPackages.record-dot-preprocessor
entr
gnumake
graphviz
];
additional = ps: [ ps.plutarch ps.plutus-ledger ];