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

feat(tendermint): unstaking/undelegation #2330

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open

Conversation

onur-ozkan
Copy link
Member

@onur-ozkan onur-ozkan commented Jan 29, 2025

Adds tendermint protocol support on remove_delegation RPC, and extends tendermint transaction history implementation to support undelegate transactions.

Next is to add staking listing RPCs for delegations, undelegations (with claiming period informations), rewards, etc.

@onur-ozkan onur-ozkan changed the title feat(cosmos): unstaking feat(tendermint): unstaking/undelegation Jan 30, 2025
Comment on lines +751 to +755
let tx_details = block_on(tendermint_remove_delegation(&mm, coin_ticker, VALIDATOR_ADDRESS, "0.5"));

assert_eq!(tx_details.from, vec![MY_ADDRESS.to_owned()]);
assert!(tx_details.to.is_empty());
assert_eq!(tx_details.transaction_type, TransactionType::RemoveDelegation);
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: add coverage for "undelegating more than the delegated amount".

Comment on lines +715 to +716
#[test]
fn test_tendermint_remove_delegation() {
Copy link
Member Author

Choose a reason for hiding this comment

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

Self note: may need to lock these tests to avoid account sequence number race conditions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant