Hey I have following event
event Submitted(bytes32 indexed docHash);
The event is called by a function
function submitHash(bytes32 docHash) public onlyOwner() {
Submitted(docHash);
}
It looks like docHash gets saved in the blockchain even though only the event is called. I have another code as
bytes32 docHash;
function submitHash(bytes32 docHash) public onlyOwner() {
docHash = docHash;
}
What I want is to store docHash in the blockchain so that there is a proof that docHash with the timestamp is present. Will storing with event cost more? And is it possible to search for docHash as it has indexed in it? Which would be better option?