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

Implement call filter to exclude vested transfers in runtime configuration #870

Merged
merged 4 commits into from
Nov 13, 2024

Conversation

asiniscalchi
Copy link
Member

@asiniscalchi asiniscalchi commented Nov 13, 2024

PR Type

enhancement, tests


Description

  • Introduced a custom BaseCallFilter to exclude vested_transfer calls from being dispatched.
  • Updated the system configuration to use the new BaseCallFilter.
  • Modified tests to verify that vested_transfer calls are correctly filtered out.
  • Ensured that the test for vested_transfer now expects an error, confirming the filter's functionality.

Changes walkthrough 📝

Relevant files
Enhancement
system.rs
Implement custom call filter to exclude vested transfers 

runtime/laos/src/configs/system.rs

  • Changed the BaseCallFilter type to filter out vested_transfer calls.
  • Implemented a custom BaseCallFilter struct to exclude vested_transfer.
  • Updated test to ensure vested_transfer is not allowed.
  • Replaced assert_ok! with assert_err! in the test for vested_transfer.
  • +20/-4   

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    @asiniscalchi
    Copy link
    Member Author

    /describe

    @github-actions github-actions bot changed the title filter vested_transfer Implement call filter to exclude vested transfers in runtime configuration Nov 13, 2024
    Copy link

    PR Description updated to latest commit (ee769ad)

    @asiniscalchi asiniscalchi merged commit edd23aa into release/v0.22 Nov 13, 2024
    8 checks passed
    @asiniscalchi asiniscalchi deleted the feature/filter_vesting_transfer branch November 13, 2024 10:21
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants