-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: restake example contract #9821
base: master
Are you sure you want to change the base?
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
12d8122
to
548878b
Compare
* }} RestakeParams | ||
*/ | ||
|
||
export const restakeInvitaitonGuardShape = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spelling
const { delay, interval } = opts; | ||
delay >= minimumDelay || | ||
Fail`delay must be at least ${minimumDelay}`; | ||
interval >= minimumInterval || | ||
Fail`interval must be at least ${minimumInterval}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason not to use TimeMath here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No - thanks for bringing it to attention. The latest plan for #9796 doesn't seem to depend on this PR, but will make sure to use TimeMath
when this PR is picked up again.
548878b
to
d56616a
Compare
mustMatch( | ||
validator, | ||
ChainAddressShape, | ||
'invalid validator address', | ||
); | ||
mustMatch(opts, RepeaterOptsShape, 'invalid repeater options'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mustMatch( | |
validator, | |
ChainAddressShape, | |
'invalid validator address', | |
); | |
mustMatch(opts, RepeaterOptsShape, 'invalid repeater options'); |
covered by interface guard
closes: #9796 ## Description Demonstrates a pattern for creating continuing invitations that have handlers written as orchestration flows. Builds upon the combine-invitation-makers from #9821 ### Security Considerations None ### Scaling Considerations Augmenting an existing exo's invitationMaker requires two new ones: the exo holding the other makers and an exo to wrap them both. ### Documentation Considerations Once this lands it should have an explicit tutorial for developers needing this functionality. ### Testing Considerations new tests ### Upgrade Considerations not yet deployed
- A contract that allows calls to make an OrchestrationAccount, and subsequently schedule a restake (claim and stake rewards) on an interval. - Leverages existing invitation makers like Delegate and combines them with Restake and CancelRestake.
d56616a
to
9e7e377
Compare
- interact with timerService and repeater in `contract` context (using E, promises) - invoke flow in wake handler
9e7e377
to
582993c
Compare
closes: #XXXX
refs: #9796
Description
Currently: a working restake contract that we'd like to refactor to use async-flow for continuing invitations (versus the current
restake.kit.js
methods which use vowTools)Security Considerations
Scaling Considerations
Documentation Considerations
Testing Considerations
Upgrade Considerations