Skip to content

Conversation

@GheisMohammadi
Copy link
Collaborator

TODO

@GheisMohammadi GheisMohammadi self-assigned this Dec 29, 2025
@GheisMohammadi GheisMohammadi marked this pull request as draft December 29, 2025 11:09
- Add BatchDelegate, BatchUndelegate, and UndelegateAll message types
- Implement batch operations using DelegationIndex pattern (same as CollectRewards)
- Add verification functions: VerifyAndBatchDelegateFromMsg, VerifyAndBatchUndelegateFromMsg, VerifyAndUndelegateAllFromMsg
- Integrate batch operations into EVM context and transaction processing
- Add StakingV2 epoch checks to gate new features
- Update RLP encoding/decoding and transaction validation
- UndelegateAll automatically finds and undelegates all active delegations
- Add TestVerifyAndBatchDelegateFromMsg with comprehensive test cases
- Add TestVerifyAndBatchUndelegateFromMsg with error cases
- Add TestVerifyAndUndelegateAllFromMsg for undelegate all functionality
- Tests follow same pattern as existing delegate/undelegate tests
- Include StakingV2 epoch validation tests
- Update VerifyAndUndelegateAllFromMsg to scan all validators in current state
- Ensures delegations created in same block are included when calling UndelegateAll
- Add ChainContext parameter to enable validator list scanning
- Update all call sites (evm.go, tx_pool.go, tests) to pass chainContext
- Prevents missing delegations when user delegates then immediately calls UndelegateAll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants