Solidity : Pure-functions should not read or change state