Implement `eth_getStorageAt`
antazoey opened this issue · 2 comments
antazoey commented
- Version: 0.9.0b1
- Python: 3.10
- OS: macos
What was wrong?
I get a value error for RPC Endpoint has not been implemented: eth_getStorageAt
.
How can it be fixed?
here is some Hardhat code but otherwise not sure:
const key = setLengthLeft(bigIntToBuffer(positionIndex), 32);
const data = await this._runInBlockContext(blockNumberOrPending, () =>
this._stateManager.getContractStorage(address, key)
);
const EXPECTED_DATA_SIZE = 32;
if (data.length < EXPECTED_DATA_SIZE) {
return Buffer.concat(
[Buffer.alloc(EXPECTED_DATA_SIZE - data.length, 0), data],
EXPECTED_DATA_SIZE
);
}
return data;
fselmo commented
Hey @antazoey. This is via web3.py
+ EthereumTesterProvider
right? It's not implemented in eth-tester
but that message is coming from the web3.py library through that provider. I will work on getting this change in for both libraries 👍🏼
antazoey commented
Yes Im interacting through using web3.py