Skip to content

Commit

Permalink
Introducing transferFrom function summary on dAIMock
Browse files Browse the repository at this point in the history
  • Loading branch information
Robertorosmaninho committed Oct 7, 2024
1 parent 315faf1 commit 295cbac
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/uniswap-summaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -3501,6 +3501,25 @@ module SOLIDITY-UNISWAP-MINT-SUMMARY
endmodule
```

```k
module SOLIDITY-UNISWAP-TRANSFERFROM-SUMMARY
imports SOLIDITY-CONFIGURATION
imports SOLIDITY-EXPRESSION
imports SOLIDITY-UNISWAP-TOKENS
rule <k> transferFrom:Id ( v(V1:MInt{160}, address #as T), v(V2:MInt{160}, T), v(V3:MInt{256}, uint256), .TypedVals ) ~> Ss => v ( true , bool ) ~> Ss </k>
<summarize> true </summarize>
<this> THIS </this>
<contract-address> THIS </contract-address>
<store> S => S ListItem(V1) // src
ListItem(V2) // dst
ListItem(V3) // wad
</store>
<contract-storage> Storage => Storage [ balanceOf <- write({write({Storage [ balanceOf ] orDefault .Map}:>Value, ListItem(V1), ({read({Storage [ balanceOf ] orDefault .Map}:>Value, ListItem(V1), (mapping ( address account => uint256 )))}:>MInt{256} -MInt V3:MInt{256}), (mapping ( address account => uint256))) }:>Value, ListItem(V2), ({read({Storage [ balanceOf ] orDefault .Map}:>Value, ListItem(V2), (mapping ( address account => uint256 )))}:>MInt{256} +MInt V3:MInt{256}), (mapping ( address account => uint256))) ]
</contract-storage> [priority(40)]
endmodule
```

```k
module SOLIDITY-UNISWAP-SUMMARIES
imports SOLIDITY-UNISWAP-INIT-SUMMARY
Expand All @@ -3518,6 +3537,7 @@ module SOLIDITY-UNISWAP-SUMMARIES
imports SOLIDITY-UNISWAP-SETUP-SUMMARY
imports SOLIDITY-MATHSQRT-SUMMARY
imports SOLIDITY-UNISWAP-MINT-SUMMARY
imports SOLIDITY-UNISWAP-TRANSFERFROM-SUMMARY
endmodule
```

0 comments on commit 295cbac

Please sign in to comment.