use of co.rsk.core.bc.AccountInformationProvider in project rskj by rsksmart.
the class Web3Impl method eth_getStorageAt.
@Override
public String eth_getStorageAt(String address, String storageIdx, String blockId) {
String s = null;
try {
RskAddress addr = new RskAddress(address);
AccountInformationProvider accountInformationProvider = web3InformationRetriever.getInformationProvider(blockId);
DataWord sv = accountInformationProvider.getStorageValue(addr, DataWord.valueOf(TypeConverter.strHexOrStrNumberToByteArray(storageIdx)));
if (sv == null) {
s = "0x0";
} else {
s = toUnformattedJsonHex(sv.getData());
}
return s;
} finally {
if (logger.isDebugEnabled()) {
logger.debug("eth_getStorageAt({}, {}, {}): {}", address, storageIdx, blockId, s);
}
}
}
Aggregations