-
Notifications
You must be signed in to change notification settings - Fork 168
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
transfer stake (untested) #1170
base: devnet-ready
Are you sure you want to change the base?
Conversation
|
||
let origin_tao: u64 = Self::swap_alpha_for_tao(netuid, alpha_amount); |
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.
let origin_tao: u64 = Self::swap_alpha_for_tao(netuid, alpha_amount); |
If we swap here, we also have to swap back, otherwise we mess up the accounting.
Also might be fine to not swap at all.
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.
I prefer this, think I was just copying another event's arguments
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.
I removed the swap entirely
Co-authored-by: Cameron Fairchild <[email protected]>
Co-authored-by: Cameron Fairchild <[email protected]>
Co-authored-by: Cameron Fairchild <[email protected]>
Co-authored-by: Cameron Fairchild <[email protected]>
I have a suggestion here. I think the function can modified to be something like this for more flexibility when transferring stake.
The
So this would support the following use cases:
|
We already have a function for this
I think we want to avoid this because we want to be able to enforce rate limits, etc. It's possible that we replace It's not a bad idea though as it makes things simpler from a user-perspective. |
Transfer stake
Adds a new
transfer_stake
extrinsic. Needs testing.