Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to function deal (3 parameters) of StdCheats.sol #423

Open
acmLL opened this issue Nov 8, 2023 · 1 comment
Open

Support to function deal (3 parameters) of StdCheats.sol #423

acmLL opened this issue Nov 8, 2023 · 1 comment

Comments

@acmLL
Copy link

acmLL commented Nov 8, 2023

Configuration:
MacBook Pro, Apple M1 Pro, Sonoma 14.0, 32GB RAM

hevm: version 0.52.0
Z3: Z3 version 4.12.2 - 64 bit

When I call the below function in a symbolic test (prove):

function deal(address token, address to, uint256 give, bool adjust) internal virtual

I got

[FAIL] prove_harvest()

Failure: prove_harvest()

No reachable assertion violations, but all branches reverted
Prefix this testname with proveFail if this is expected

And I identified that the cause is in this statement:

// update balance
stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give);

Thanks!

@d-xo
Copy link
Collaborator

d-xo commented Nov 9, 2023

hm yeah, fleshing out cheatcode support to the point where the full forge-std test suite passes is very desirable but is also a bit of a larger project. I think in this case we would need to support at least vm.record and vm.access

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants