Skip to content
Snippets Groups Projects
Unverified Commit 4f7a9388 authored by Utkarsh Bhardwaj's avatar Utkarsh Bhardwaj Committed by GitHub
Browse files

add poke_deposit extrinsic to pallet-proxy (#7801)


# Description

* This PR adds a new extrinsic `poke_deposit` to `pallet-proxy`. This
extrinsic will be used to re-adjust the deposits made in the pallet to
create a proxy or to create an announcement.
* Part of #5591 

## Review Notes

* Added a new extrinsic `poke_deposit` in `pallet-proxy`.
* This extrinsic checks and adjusts the deposits made for either
creating a proxy or creating an announcement or both.
* Added a new event `DepositPoked` to be emitted upon a successful call
of the extrinsic.
* Although the immediate use of the extrinsic will be to give back some
of the deposit after the AH-migration, the extrinsic is written such
that it can work if the deposit decreases or increases (both).
* The call to the extrinsic would be `free` if an actual adjustment is
made to the deposit for creating a proxy or to the deposit for creating
an announcement or both and `paid` otherwise (when no deposit is
changed).
* Added a new enum `DepositKind` to differentiate between proxy deposit
adjusted and announcement deposit adjusted when emitting events.
* Added tests to test all scenarios.

## TO-DOs
* [ ] Run CI cmd bot to benchmark

---------

Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
parent 312b5b40
Branches
No related merge requests found
Pipeline #518176 waiting for manual action with stages
in 1 hour, 8 minutes, and 23 seconds
Showing
with 1260 additions and 575 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment