Skip to content

Commit

Permalink
Add hash_collision condition to specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Coda-Coda committed Dec 2, 2024
1 parent 015a295 commit a8140a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Generated/erc20shim/ERC20Shim/fun__transfer_user.lean
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def A_fun__transfer (var_from var_to var_value : Literal) (s₀ s₉ : State) :
-- Case: _transfer fails
(
IsERC20 erc20 s₉ ∧ preservesEvm s₀ s₉ ∧
IsERC20 erc20 s₉ ∧ preservesEvm s₀ s₉ ∧ s₉.evm.hash_collision = false
(from_addr = 0 ∨ to_addr = 0)
)
-- Case: Hash collision
Expand Down
2 changes: 1 addition & 1 deletion Generated/erc20shim/ERC20Shim/fun_spendAllowance_user.lean
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def A_fun_spendAllowance (var_owner var_spender var_value : Literal) (s₀ s₉
-- Case: spendAllowance fails
(
IsERC20 erc20 s₉ ∧ preservesEvm s₀ s₉ ∧
IsERC20 erc20 s₉ ∧ preservesEvm s₀ s₉ ∧ s₉.evm.hash_collision = false
currentAllowance < transfer_value
)
-- Case: Hash collision
Expand Down
2 changes: 1 addition & 1 deletion Generated/erc20shim/ERC20Shim/fun_transferFrom_user.lean
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def A_fun_transferFrom (var : Identifier) (var_from var_to var_value : Literal)
-- Case: transferFrom fails
(
IsERC20 erc20 s₉ ∧ preservesEvm s₀ s₉ ∧
IsERC20 erc20 s₉ ∧ preservesEvm s₀ s₉ ∧ s₉.evm.hash_collision = false
s₉[var]!! = 0
)
-- Case: Hash collision
Expand Down

0 comments on commit a8140a1

Please sign in to comment.