Polkassembly Logo

Create Pencil IconCreate
Chat with KlaraComing Soon
OpenGov
View All Treasurer

Proof of Concept - Using the Scheduler on the Treasurer Track

inTreasurer
2 years ago
Executed

Dear community,

This referendum seeks to test use of the scheduler on the Treasurer track by scheduling actions through the lifecycle of a bounty i.e. approving, funding, assigning a curator and closing.

It is important to note that after a bounty is approved, it does not become funded until an independent spend period is completed. On Kusama this spend period cycles every 6 days. Only after the bounty is funded then a curator can be assigned, this required delay is the reason why approving a bounty and assigning a curator can not be successfully executed in one batch.

When the bounty is funded and if there is no major objection, I would like to disburse funds to Gch4VxQ79WhjgQqHomvJbqF3Woza5g5cYgM8SVQdDb9szz1 which is used by a public validator payout bot as well as my clean up referendum deposits script for OpenGov and the Fellowship.

Walk through:

Call data - 0x18020c2301681d048051010000ff23026800e8b2603f6baee5bc32a9b9e4eee9168499fa553d35edb56aef0035ff7e1f165e001d0440db020000ff230768

The referendum batches three (3) extrinsics using batchAll, meaning that all three must execute successfully or the overall call would fail and all actions, successful or not would be rolled back. The calls are:

  1. bounty.approve(26) - This action approves bounty 26 which is the bounty in question with 25 KSM
  2. schedule.ScheduleAfter - This schedules an action of assigning a curator (myself) after 86,400 blocks. I took the inefficient but risk-free approach of delaying the call to the exact time frame of the spend period i.e. (6 days x 24 hrs x 60 mins x 60 sec)/ blocktime 6s
  3. schedule.SchedulerAfter - This schedules closing the bounty after 14 days, this gives a 7 day window after assignment of a curator in which the bounty can be claimed (a 4 day wait in itself).

I hope this brief write-up helps others who may wish to avoid using two extrinsics to make use of their bounty. Timings can also be adjusted to reduce the lag after the bounty is funded and curator assigned. If you are using a tighter timeframe, I suggest you use schedule.schedule and target a block_height.

The floor is opened to questions or comments

Regards,
Will | Paradox | Builder of extrinsics

Comments (5)

2 years ago

Requester address: HqRcfhH8VXMhuCk5JXe28WMgDDuW9MVDVNofe1nnTcefVZn

Verified identity: Yes

When registered/verified: 26 Feb 2021 / 26 Feb 2021

EMAIL: paradoxxx@gmail.com
WEBSITE: https://ParaNodes.io
TWITTER: @ParaNodes
RIOT: @paradoxxx:matrix.org

Previous OpenGov TPs from this account:

* https://kusama.polkassembly.io/referenda/108 (Bounty - passed)

* https://kusama.polkassembly.io/referenda/174 (tip for Polkachu - passed)

* Note: there were several other Treasury-related proposals, such as tests, from this account. I did not include these all here.

W3F Grants: None

2 years ago

Fascinating! I didn't think anything other than root could utilize the scheduler. If this works it'll do wonders for establishing bounties with utmost efficiency! Thank you for pioneering this. I will be closely watching to see if this will work.

Load more comments
PleaseLogin to comment

Proposal Passed

Summary

0%

Aye

AyeNay

0%

Nay

Aye (367)0.0 DOT

Support0.0 DOT

Nay (3)0.0 DOT

Help Center

Report an Issue
Feedback
Terms and Conditions
Github

Our Services

Docs
Terms of Website
Privacy Policy

A House of Commons Initiative.

Polka Labs Private Limited 2025

All rights reserved.

Terms and ConditionsTerms of Website
Privacy Policy