I have this contract:
pragma solidity ^0.4.0;
contract Proof {
function register(bytes32 hash) {
if (hashToDate[hash] != 0) return;
hashToDate[hash] = now;
}
function dateOf(bytes32 hash) constant returns (uint date) {
return hashToDate[hash];
}
mapping (bytes32 => uint) hashToDate;
}
I deployed this contract successfully. I can call dateOf successfully as well, since it is a constant function (return value 0 is intended, since the hash has not been registered, yet):
> proof.dateOf("0x492...fee7d")
0
Now I want to call register(bytes32).
This is what I have from the documentation, but I don't know where to include the argument.
var tx = proof.register.sendTransaction(proof.address, 0, {from:eth.accounts[0]})