Skip to content

Remove stake full limit precompile#1780

Merged
open-junius merged 9 commits intodevnet-readyfrom
remove_stake_full_limit-precompile
Jun 26, 2025
Merged

Remove stake full limit precompile#1780
open-junius merged 9 commits intodevnet-readyfrom
remove_stake_full_limit-precompile

Conversation

@open-junius
Copy link
Contributor

Description

Add precompile and test in evm.

Related Issue(s)

  • Closes #[issue number]

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Breaking Change

If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have run cargo fmt and cargo clippy to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

Please include any relevant screenshots or GIFs that demonstrate the changes made.

Additional Notes

Please provide any additional information or context that may be helpful for reviewers.

@open-junius open-junius self-assigned this Jun 24, 2025
@open-junius open-junius added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Jun 24, 2025
let call = pallet_subtensor::Call::<R>::remove_stake_full_limit {
hotkey,
netuid: netuid.into(),
limit_price: Some(limit_price),
Copy link
Collaborator

@shamil-gadelshin shamil-gadelshin Jun 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about introducing a convention for Solidity code here? If limit_price == 0 then None. If you agree it makes sense to update the Solidity method doc section as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see there is already a method removeStake can do the same as set limit_price as 0. Maybe I mixed up the function. It is fine to convert as you mentioned. But the solidity developer need to know this rule, could cause some loss if they wrongly set it as 0.

@open-junius open-junius changed the base branch from remove_stake_full_limit to devnet-ready June 25, 2025 23:24
Copy link
Collaborator

@basfroman basfroman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for SDK

@open-junius open-junius merged commit 8828c41 into devnet-ready Jun 26, 2025
52 of 54 checks passed
@sam0x17 sam0x17 mentioned this pull request Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-cargo-audit This PR fails cargo audit but needs to be merged anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants