I want to check a private state variable with ethers.js. What is the equivalent for web3.eth.getStorageAt ?

2 Answers 2


It's also getStorageAt you can find the doc here. It's exposed as a provider method in ethers.js so something in the line of :

await provider.getStorageAt(address, slot);

In Ethers V6 it's now getStorage

await provider.getStorage(address, slot);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.