zeitgeist
zeitgeist copied to clipboard
[market-commons] Remove `now()` method from `MarketCommonsPalletApi`
The now()
method of MarketCommonsPalletApi
is used by prediction-markets
to check for ending times of markets. Is there a reason why we refer to the market-commons
pallet for the time, instead of just using the Timestamp
of prediction-markets
?
I think the idea Caio had when he created this was to avoid having another type in the Config
trait of the prediction-market
pallet, but rather using something we already have, the market-commons
pallet, which is used almost everywhere and also needs timestamping functionality. Consequently it can expose the functionality and other pallets can use it. I have no strong opinion on that, however I see no real benefit of doing it this way and it might even be confusing. I think for the sake of clarity it would be better to remove it eventually, let's revisit this issue sometime in the future.
I think we should remove this from the market-commons pallet.