gnosis / conditional-tokens-contracts

Smart contracts for conditional tokens.
GNU Lesser General Public License v3.0
163 stars 64 forks source link

Create and expose `getCondition/Collection/PositionId` methods #31

Closed cag closed 5 years ago

cag commented 5 years ago

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.