IMO still needs some discussion, but basically, while off-chain calculation of the various types of IDs is encouraged to take load off of Ethereum nodes, some public pure functions on the contract itself may be worth the externalization cost for prototyping convenience and for verifying implementations are correct.
Originally reported by @xavierlepretre
Also this reduces code duplication a bit even if the methods are private. I wrote it this way because I thought I was more clever than solc and so I inlined their implementations, but really I don't know that I'm more clever now do I.
IMO still needs some discussion, but basically, while off-chain calculation of the various types of IDs is encouraged to take load off of Ethereum nodes, some
public pure
functions on the contract itself may be worth the externalization cost for prototyping convenience and for verifying implementations are correct.Originally reported by @xavierlepretre
Also this reduces code duplication a bit even if the methods are
private
. I wrote it this way because I thought I was more clever thansolc
and so I inlined their implementations, but really I don't know that I'm more clever now do I.