Skip to content

hevm equivalence does not check log equivalence #586

Open
@charles-cooper

Description

@charles-cooper

per title. an example

diff --git a/examples/tokens/ERC20.vy b/examples/tokens/ERC20.vy
index 2d70fd670..73065bcb4 100644
--- a/examples/tokens/ERC20.vy
+++ b/examples/tokens/ERC20.vy
@@ -120,7 +120,7 @@ def _burn(_to: address, _value: uint256):
     assert _to != empty(address)
     self.totalSupply -= _value
     self.balanceOf[_to] -= _value
-    log IERC20.Transfer(_to, empty(address), _value)
+    log IERC20.Transfer(empty(address), _to, _value)

(pulled from https://github.com/vyperlang/vyper/blob/c02d2d8c5ed8c904c31b7f3f937ab01781fc9891/examples/tokens/ERC20.vy)

results in hevm equivalence reporting

Found 3969 total pairs of endstates
Asking the SMT solver for 1120 pairs
Reuse of previous queries was Useful in 0 cases
No discrepancies found

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions