Manta icon indicating copy to clipboard operation
Manta copied to clipboard

Native asset barrier

Open ghzlatarev opened this issue 1 year ago • 2 comments

Description

  • Fork pallet-balances from substrate
  • Implement native asset barrier with daily limit that can accumulate for missed days.
  • Add to pallet-balances, orml-xtokens and pallet-manta-pay
  • orml PR https://github.com/Manta-Network/open-runtime-module-library/pull/9/

Before we can approve this PR for merge, please make sure that all the following items have been checked off:

  • [x] Connected to an issue with discussion and accepted design using zenhub "Connect issue" button below
  • [x] Added one label out of the L- group to this PR
  • [x] Added one or more labels from the A- and C- groups to this PR
  • [x] Explicitly labelled A-calamari and/or A-manta if your changes are meant for/impact either of these (CI depends on it)
  • [x] Re-reviewed Files changed in the Github PR explorer.

Situational Notes:

  • If adding functionality, write unit tests!
  • If importing a new pallet, choose a proper module index for it, and allow it in BaseFilter. Ensure every extrinsic works from front-end. If there's corresponding tool, ensure both work for each other.
  • If needed, update our Javascript/Typescript APIs. These APIs are officially used by exchanges or community developers.
  • If modifying existing runtime storage items, make sure to implement storage migrations for the runtime and test them with try-runtime. This includes migrations inherited from upstream changes, and you can search the diffs for modifications of #[pallet::storage] items to check for any.

ghzlatarev avatar Aug 16 '23 09:08 ghzlatarev

my first reaction is it possible to not fork pallet balances, perhaps not?

I need to add the barrier in each extrinsic. Was thinking of putting in the base call filter but there i can't get the origin.

ghzlatarev avatar Aug 22 '23 14:08 ghzlatarev

I need to add the barrier in each extrinsic. Was thinking of putting in the base call filter but there i can't get the origin.

I think we can use SignedExtra to check the barrier here https://github.com/Manta-Network/Manta/blob/af50afb597bf162dafdb3e8e38834006476ab27e/runtime/manta/src/lib.rs#L972 and not fork balances

ferrell-code avatar Aug 22 '23 16:08 ferrell-code