Skip to content

Commit

Permalink
Update example diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
naddison36 committed Sep 25, 2023
1 parent 03635d5 commit eb47851
Show file tree
Hide file tree
Showing 23 changed files with 522 additions and 136 deletions.
76 changes: 55 additions & 21 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ tx2uml --nodeType anvil --configFile counter.config.json --chain none \
```
tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
--title "Uniswap v4 - Swap Tokens" -hf -hc -x -l -p -g -t -v \
0x623e6894fd8d64ae42534dfcc314aeff0695f5518f818aed295561b068b2af46 \
0x3ed0c0719da01688328b48231566ff10d27ddc07d937bffd84fa926de27ed765 \
-o dynamicFeeSwapSummary
```

Expand All @@ -74,16 +74,18 @@ See the full trace with parameters in [dynamicFeeSwapDetailed.svg](./dynamicFeeS
```
tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
--title "Uniswap v4 - Swap Tokens" -v \
0x623e6894fd8d64ae42534dfcc314aeff0695f5518f818aed295561b068b2af46 \
0x3ed0c0719da01688328b48231566ff10d27ddc07d937bffd84fa926de27ed765 \
-o dynamicFeeSwapDetailed
```

**Value Flows**

![Dynamic Fee Swap Value](./dynamicFeeSwapValue.svg)

```
tx2uml value --configFile dynamicFee.config.json --chain none --onlyToken \
--title "Uniswap v4 - Swap Tokens" -hf -hc -v \
0x623e6894fd8d64ae42534dfcc314aeff0695f5518f818aed295561b068b2af46 \
0x3ed0c0719da01688328b48231566ff10d27ddc07d937bffd84fa926de27ed765 \
-o dynamicFeeSwapValue
```

Expand All @@ -94,7 +96,7 @@ tx2uml value --configFile dynamicFee.config.json --chain none --onlyToken \
```
tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
--title "Uniswap v4 - Remove Liquidity to a Pool" -hf -hc -x -l -p -g -t -v \
0xc639b3116391ae4d9ade0ba25bc87d690950c63405fc4d1b37e911f4d4f0b83b \
0x8a288170cf4f7f37e478597208843dda7fa2fcfe852dc94b5f4d9a36b0bfd278 \
-o dynamicFeeAddSummary
```

Expand All @@ -103,18 +105,18 @@ See the full trace with parameters in [dynamicFeeAddDetailed](./dynamicFeeAddDet
```
tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none -v \
--title "Uniswap v4 - Add Liquidity to a Pool" -v \
0xc639b3116391ae4d9ade0ba25bc87d690950c63405fc4d1b37e911f4d4f0b83b \
0x8a288170cf4f7f37e478597208843dda7fa2fcfe852dc94b5f4d9a36b0bfd278 \
-o dynamicFeeAddDetailed
```

**Value Flow**
**Value Flows**

![Dynamic Fee Add Liquidity Value](./dynamicFeeAddValue.svg)

```
tx2uml value --configFile dynamicFee.config.json --chain none --onlyToken \
--title "Uniswap v4 - Add Liquidity to a Pool" -hf -hc -v \
0xc639b3116391ae4d9ade0ba25bc87d690950c63405fc4d1b37e911f4d4f0b83b \
0x8a288170cf4f7f37e478597208843dda7fa2fcfe852dc94b5f4d9a36b0bfd278 \
-o dynamicFeeAddValue
```

Expand All @@ -125,18 +127,29 @@ tx2uml value --configFile dynamicFee.config.json --chain none --onlyToken \
```
tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
--title "Uniswap v4 - Remove Liquidity from a Pool" -hf -hc -x -l -p -g -t -v \
0xb78d396ea5f8825cb4a895593f084a577407d6c907bf8b33a846e4c341fbf17f -o dynamicFeeRemoveSummary
0x8d14ff42b04de11964541401a5c13de22530e704e8a0661c7c00703ed3153c16 -o dynamicFeeRemoveSummary
```

See the full trace with parameters in [dynamicFeeRemoveDetailed.svg](./dynamicFeeRemoveDetailed.svg)

```
tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
--title "Uniswap v4 - Remove Liquidity from a Pool" -v \
0xb78d396ea5f8825cb4a895593f084a577407d6c907bf8b33a846e4c341fbf17f \
0x8d14ff42b04de11964541401a5c13de22530e704e8a0661c7c00703ed3153c16 \
-o dynamicFeeRemoveDetailed
```

**Value Flows**

![Dynamic Fee Remove Liquidity Value](./dynamicFeeRemoveValue.svg)

```
tx2uml value --configFile dynamicFee.config.json --chain none --onlyToken \
--title "Uniswap v4 - Remove Liquidity to a Pool" -hf -hc -v \
0x8d14ff42b04de11964541401a5c13de22530e704e8a0661c7c00703ed3153c16 \
-o dynamicFeeRemoveValue
```

## Pool Manager

## Deposit tokens into the Pool Manager
Expand All @@ -146,7 +159,7 @@ tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
```
tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
--title "Uniswap v4 - Deposit" -hf -hc -x -l -p -g -t -v \
0x3ab92865b020d566ce9bc52f42f4c96f196b9a0c4329cf74a27e32c1c9f5f352 \
0xbecdfe032eb2b73ff63d3406e9669e5270e85955a459a5f0d7f1cf1c61f85be2 \
-o depositSummary
```

Expand All @@ -155,18 +168,29 @@ See the full trace with parameters in [depositDetailed.svg](./depositDetailed.sv
```
tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
--title "Uniswap v4 - Deposit" -v \
0x3ab92865b020d566ce9bc52f42f4c96f196b9a0c4329cf74a27e32c1c9f5f352 \
0xbecdfe032eb2b73ff63d3406e9669e5270e85955a459a5f0d7f1cf1c61f85be2 \
-o depositDetailed
```

**Value Flows**

![Deposit Value Transfers](./depositValue.svg)

```
tx2uml value --configFile dynamicFee.config.json --chain none --onlyToken \
--title "Uniswap v4 - Deposit Value Transfers" -hf -hc -v \
0xbecdfe032eb2b73ff63d3406e9669e5270e85955a459a5f0d7f1cf1c61f85be2 \
-o depositValue
```

## Withdraw tokens from the Pool Manager

![Withdraw Summary](./withdrawSummary.svg)

```
tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
--title "Uniswap v4 - Withdraw" -hf -hc -x -l -p -g -t -v \
0x976339bbf4dfb4145af25029d34fd5a2d5919fa065ad4cb0e34d30907e91b940 \
0x96939ca613e425db4493a7b70a81056e1dadcf81023216b404a2adc7c4a3ff30 \
-o withdrawSummary
```

Expand All @@ -175,9 +199,19 @@ See the full trace with parameters in [withdrawDetailed.svg](./withdrawDetailed.
```
tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
--title "Uniswap v4 - Withdraw" -v \
0x81ef52fae7c0a4d2421c1caf2d018f45e6ef9c1c0c3a5a13b39a90b8445c8baa,0x976339bbf4dfb4145af25029d34fd5a2d5919fa065ad4cb0e34d30907e91b940 \
0x82da8e1120dcbc236d3b603db357923c8cc3691711a67fe259f3404c6ba23ad5,0x96939ca613e425db4493a7b70a81056e1dadcf81023216b404a2adc7c4a3ff30 \
-o withdrawDetailed
```
**Value Flows**

![Withdraw Value Transfers](./withdrawValue.svg)

```
tx2uml value --configFile dynamicFee.config.json --chain none --onlyToken \
--title "Uniswap v4 - Withdraw Value Transfers" -hf -hc -v \
0x96939ca613e425db4493a7b70a81056e1dadcf81023216b404a2adc7c4a3ff30 \
-o withdrawValue
```

## Flash loan from the Pool Manager

Expand All @@ -186,7 +220,7 @@ tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
```
tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
--title "Uniswap v4 - Flash Loan" -hf -hc -l -p -g -t -v \
0x26e858c200e5627685aee1bf16e9db98efb1a01ce8b7028218325a32e0d612a7 \
0x07f869c4a03292803b15b97cc812bb7cb05f6e587b84889c880da69671ec37d4 \
-o flashLoanSummary
```

Expand All @@ -195,7 +229,7 @@ See the full trace with parameters in [flashLoanDetailed.svg](./flashLoanDetaile
```
tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
--title "Uniswap v4 - Flash Loan" -v \
0x26e858c200e5627685aee1bf16e9db98efb1a01ce8b7028218325a32e0d612a7 \
0x07f869c4a03292803b15b97cc812bb7cb05f6e587b84889c880da69671ec37d4 \
-o flashLoanDetailed
```

Expand All @@ -206,7 +240,7 @@ tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
```
tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
--title "Uniswap v4 - Swap ERC1155 Tokens in the Pool Manager" -hf -hc -l -p -g -t -v \
0x7357f376a03cbdb2143bacdbdb3768e4c32e3432202921dc612a614eb574d691 \
0x0d9980ebc2c1a15ec8cd8100365829af3d5baa75fea4fef66315c1f9163f7abc \
-o swapPoolManagerTokensSummary
```

Expand All @@ -215,17 +249,17 @@ See the full trace with parameters in [swapPoolManagerTokensDetailed.svg](./swap
```
tx2uml --nodeType anvil --configFile dynamicFee.config.json --chain none \
--title "Uniswap v4 - Swap ERC1155 Tokens in the Pool Manager" -v \
0x7357f376a03cbdb2143bacdbdb3768e4c32e3432202921dc612a614eb574d691 \
0x0d9980ebc2c1a15ec8cd8100365829af3d5baa75fea4fef66315c1f9163f7abc \
-o swapPoolManagerTokensDetailed
```

<!--
tx2uml needs to support ERC1155 transfers
Value transfers

![Swap Pool Manager Tokens Value](./swapPoolManagerTokensValue.svg)

```
tx2uml value --configFile dynamicFee.config.json --chain none --onlyToken \
--title "Uniswap v4 - Swap ERC1155 Tokens in the Pool Manager" -hf -hc -v \
0xd9058df9bde86f5b7254d903ca45f93671f08c45c454ab914322bc577bb1de17 \
0x0d9980ebc2c1a15ec8cd8100365829af3d5baa75fea4fef66315c1f9163f7abc \
-o swapPoolManagerTokensValue
``` -->
```
2 changes: 1 addition & 1 deletion docs/depositDetailed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/depositSummary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/depositValue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit eb47851

Please sign in to comment.