Skip to content

Commit

Permalink
Merge branch 'main' into bind-rule
Browse files Browse the repository at this point in the history
  • Loading branch information
mariaKt authored Oct 7, 2024
2 parents 1f407bb + e8ade4c commit 28bb853
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/uniswap-summaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -3408,6 +3408,37 @@ module SOLIDITY-MATHSQRT-SUMMARY
endmodule
```

```k
module SOLIDITY-UNISWAP-MINT-SUMMARY
imports SOLIDITY-CONFIGURATION
imports SOLIDITY-EXPRESSION
imports SOLIDITY-UNISWAP-TOKENS
rule <k> bind ( _STORE,
ListItem ( usr ) ListItem ( wad ),
ListItem ( address ) ListItem ( uint256 ),
v ( V1:MInt{160} , address ),
v ( V2:MInt{256} , uint256 ),
.TypedVals , .List , .List ) ~> balanceOf [ usr ] = balanceOf [ usr ] + wad ; totalSupply = totalSupply + wad ; emit transferEvent ( address ( 0 , .TypedVals ) , usr , wad , .TypedVals ) ; .Statements ~> return void ; ~> .K => return void ; ~> .K </k>
<summarize> true </summarize>
<this> THIS </this>
<contract-address> THIS </contract-address>
<this-type> TYPE </this-type>
<contract-id> TYPE </contract-id>
<current-function> mint </current-function>
<store> S => S ListItem(V1) // usr
ListItem(V2) // wad
</store>
<env>
ENV => ENV [ usr <- var(size(S) , address) ]
[ wad <- var(size(S) +Int 1, uint256) ]
</env>
<contract-storage> Storage => Storage [ totalSupply <- {Storage[totalSupply] orDefault 0p256}:>MInt{256} +MInt V2:MInt{256} ]
[ balanceOf <- write({Storage [ balanceOf ] orDefault .Map}:>Value, ListItem(V1), ({read({Storage [ balanceOf ] orDefault .Map}:>Value, ListItem(V1), (mapping ( address account => uint256 )))}:>MInt{256} +MInt V2:MInt{256}), (mapping ( address account => uint256))) ]
</contract-storage> [priority(40)]
endmodule
```

```k
module SOLIDITY-UNISWAP-SUMMARIES
imports SOLIDITY-UNISWAP-INIT-SUMMARY
Expand All @@ -3423,6 +3454,7 @@ module SOLIDITY-UNISWAP-SUMMARIES
imports SOLIDITY-UNISWAP-GETRESERVES-SUMMARY
imports SOLIDITY-UNISWAP-SETUP-SUMMARY
imports SOLIDITY-MATHSQRT-SUMMARY
imports SOLIDITY-UNISWAP-MINT-SUMMARY
endmodule
```

0 comments on commit 28bb853

Please sign in to comment.