Skip to content
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

update comments #390

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions pallets/subtensor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,7 @@ pub mod pallet {
// * 'take' (u16):
// - The new stake proportion that this hotkey takes from delegations.
// The new value can be between 0 and 11_796 and should be strictly
// lower than the previous value. It T is the new value (rational number),
// lower than the previous value. If T is the new value (rational number),
// the the parameter is calculated as [65535 * T]. For example, 1% would be
// [0.01 * 65535] = [655.35] = 655
//
Expand All @@ -1391,7 +1391,7 @@ pub mod pallet {
// * 'NonAssociatedColdKey':
// - The hotkey we are delegating is not owned by the calling coldkey.
//
// * 'InvalidTransaction':
// * 'InvalidTake':
// - The delegate is setting a take which is not lower than the previous.
//
#[pallet::call_index(65)]
Expand All @@ -1416,13 +1416,13 @@ pub mod pallet {
// * 'take' (u16):
// - The new stake proportion that this hotkey takes from delegations.
// The new value can be between 0 and 11_796 and should be strictly
// greater than the previous value. It T is the new value (rational number),
// greater than the previous value. If T is the new value (rational number),
// the the parameter is calculated as [65535 * T]. For example, 1% would be
// [0.01 * 65535] = [655.35] = 655
//
// # Event:
// * TakeDecreased;
// - On successfully setting a decreased take for this hotkey.
// * TakeIncreased;
// - On successfully setting a increased take for this hotkey.
//
// # Raises:
// * 'NotRegistered':
Expand All @@ -1431,8 +1431,8 @@ pub mod pallet {
// * 'NonAssociatedColdKey':
// - The hotkey we are delegating is not owned by the calling coldkey.
//
// * 'InvalidTransaction':
// - The delegate is setting a take which is not lower than the previous.
// * 'InvalidTake':
// - The delegate is setting a take which is not greater than the previous.
//
#[pallet::call_index(66)]
#[pallet::weight((0, DispatchClass::Normal, Pays::No))]
Expand Down
10 changes: 8 additions & 2 deletions pallets/subtensor/src/staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ impl<T: Config> Pallet<T> {
// * 'NonAssociatedColdKey':
// - The hotkey we are delegating is not owned by the calling coldket.
//
// * 'InvalidTake':
// - The delegate is setting a take which is not lower than the previous.
//
pub fn do_decrease_take(
origin: T::RuntimeOrigin,
hotkey: T::AccountId,
Expand Down Expand Up @@ -173,8 +176,8 @@ impl<T: Config> Pallet<T> {
// - The stake proportion that this hotkey takes from delegations for subnet ID.
//
// # Event:
// * TakeDecreased;
// - On successfully setting a decreased take for this hotkey.
// * TakeIncreased;
// - On successfully setting a increased take for this hotkey.
//
// # Raises:
// * 'NotRegistered':
Expand All @@ -186,6 +189,9 @@ impl<T: Config> Pallet<T> {
// * 'TxRateLimitExceeded':
// - Thrown if key has hit transaction rate limit
//
// * 'InvalidTake':
// - The delegate is setting a take which is not greater than the previous.
//
pub fn do_increase_take(
origin: T::RuntimeOrigin,
hotkey: T::AccountId,
Expand Down
Loading