I have a simple method where I count how many times certain address has called method of smart contract. Here is code:
mapping (address => uint) countTotal;
function countSends() public returns(uint retClicks) {
clicksTotal[msg.sender]++;
return countTotal[msg.sender];
}
Obviously I expect that on first send I'll get 1, then 2, then 3...
But for some reason what I get back through web3js is hexadecimal value like 0xea6166fd3f8249c3dd3ed1dcbb3af9989aebdcf9f5eb079fc6d570296e6f4509. How can I get regular unsigned integer?
EDIT: Duplicate nannies linked to theoretical discussion... this much better explains what you need to do: How to get values returned by non constant transaction functions?
callafter the transaction. – user19510 Mar 17 '18 at 02:04