4

Would it be possible, to make a "time-based-delegation"?

I.E.; I want to delegate for 5 Cycles to Bakery A and after that for 10 Cycles to Bakery B and so on.

Could something like this be realized through a Smart-Contract? How would such a smart-contract look like?

This would open Baking/Delegating for some nice time based campaigns/promotions/charity.

  • Can you clarify what you mean by time-based? Are you asking for a smart-contract to change delegations after time, or a way to detect how long someone has been delegating for? – Stephen Andrews Feb 22 '19 at 0:53
  • The first one. I will change the description. – Blindripper Feb 22 '19 at 12:16
2

The SET_DELEGATE instruction can be used to change the contract's delegate.

Contracts cannot currently observe the passage of time in blocks or cycles -- there is no BLOCK_LEVEL instruction. If you are willing to use human time, you can use the NOW instruction to measure time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.