I am trying to understand how to get the old values stored in blockchain. I need to prove the immutability and transparent feature to non-technical people. Here is my code.
pragma solidity ^0.4.17;
contract Inbox{
string public message;
function Inbox (string initialMessage) public {
message = initialMessage;
}
function setMessage(string newMessage) public{
message = newMessage;
}
}
In above contract, whenever i call setMessage i set a new message for the message variable. For example, first time i had set it for "Test1". Second time i set it for "Test2" and so on. now i added a get function to read the value of message variable. The function always returns me the latest value set for message variable. Now my query is, is it possible to check all the values i set in past without using arrays. Just with the above example can i get all old logs or am I expecting something wrong.