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

Test internal/private variables in contracts #2

Open
Mokita-J opened this issue Jun 11, 2024 · 2 comments
Open

Test internal/private variables in contracts #2

Mokita-J opened this issue Jun 11, 2024 · 2 comments

Comments

@Mokita-J
Copy link
Member

When testing the attacks it is good to have access to values of internal or private variables of the vulnerable contracts because it allows us to access wether the vulnerability was exploited or not.

Currently hardhat does not allow that: NomicFoundation/hardhat#2645

@Mokita-J
Copy link
Member Author

hardhat-exposed automatically exposes internal functions.
However, it is not useful for internal/private variables and it supports solidity version >= 0.6.0.

@Mokita-J
Copy link
Member Author

Mokita-J commented Sep 4, 2024

use ethers.provider.getStorage(address, slot) for reading private variables from a contract

@Mokita-J Mokita-J assigned Mokita-J and unassigned Mokita-J Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant