JoinSEEDS / seeds-smart-contracts

Smart contracts for SEEDS - A Regenerative Civilization Building Game.
https://docs.google.com/document/d/1C4w9Ol8VGabCIcQDVPDrwcTRoJXBqhrb7VjslwQbUGU/edit#heading=h.6f4sxygso816
MIT License
20 stars 6 forks source link

Moon op improvements #355

Closed n13 closed 3 years ago

n13 commented 3 years ago

added some code to make it easier to schedule moon ops

added some safety check so it's impossible to add a past op (as that would trigger an immediate firing, which would be bad if we have "incprice" or "run proposals"... ;) whoops!!!

Added "addmoonop" so we don't have to figure out unix time stamps - just set the phase as string, and it figures it out.

I also added one to testnet let's see if it fires next time, then can move to mainnet ''' cleos -u "https://test.hypha.earth" push action cycle.seeds addmoonop '{ "id":"inc.lprice", "action":"incprice", "contract":"tlosto.seeds", "quarter_moon_cycles":"1", "start_phase_name":"First Quarter" }' -p cycle.seeds@active

cleost get table cycle.seeds cycle.seeds moonops { "rows": [{ "id": "inc.lprice", "action": "incprice", "contract": "tlosto.seeds", "quarter_moon_cycles": 1, "start_time": 1623988440, "last_moon_cycle_id": 0, "pause": 0 } ], "more": false, "next_key": "" }

'''