I wanted to pull the historical data stored by the reference data contracts by chainlink oracles. Since all the data is on-chain, I should be able to view it all? But currently, my contract can only see the latest answer. Any thoughts?
pragma solidity ^0.6.0;
import "@chainlink/contracts/src/v0.6/dev/AggregatorInterface.sol";
contract ReferenceConsumer {
AggregatorInterface internal ref;
constructor(address _aggregator) public {
ref = AggregatorInterface(_aggregator);
}
function getLatestAnswer() public returns (int256) {
return ref.latestAnswer();
}
}