zeitgeistpm / zeitgeist

An evolving blockchain for prediction markets and futarchy.
https://zeitgeist.pm
GNU General Public License v3.0
172 stars 41 forks source link

[market-commons] Remove `now()` method from `MarketCommonsPalletApi` #635

Open maltekliemann opened 2 years ago

maltekliemann commented 2 years ago

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?

sea212 commented 2 years ago

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.

maltekliemann commented 10 months ago

I think we should remove this from the market-commons pallet.