- May 24, 2023
-
-
Bastian Köcher authored
* HoldReason: Improve usage `HoldReason` was switched recently to use the `composite_enum` attribute that will merge the enums from all pallets in the runtime to `RuntimeHoldReason`. `pallet-nis` was still requiring that the variant was passed as constant to call `hold`. The proper implementation is to use the `HoldReason` from inside the pallet directly when calling `hold`. This is done by adding a `RuntimeHoldReason` as type to the `Config` trait and requiring that `Currency` is using the same reason. Besides that the pr changes the name `HoldIdentifier` in `pallet_balances::Config` to `RuntimeHoldReason`. * Update frame/nis/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Review comment * Fixes --------- Co-authored-by: Oliver Tale-Yazdi <[email protected]>
-
- May 17, 2023
-
-
yjh authored
* chore: move whitelist test to better palace and add missing `Inactive Issuance` * remove duplicated --------- Co-authored-by: parity-processbot <>
-
- May 04, 2023
-
-
Liam Aharon authored
* typo * - create test files for each fungile trait - begin implementing tests for the Inspect trait * wrap inspect tests in a macro * first run of mutate tests * move test implementation out of ballances * make tests more generic * transfer tests * combine inspect and mutate tests * set balance failing tests * can_deposit tests * can_withdraw tests * test reducible_balance * remove balanced stub * revert set_balance return val fix * typo * macro and dust trap tests * disable test when it doesn't make sense * remove debug comment * reduce macro boilerplate * improved var naming * improve variable naming * remove redundant comment * remove placeholder tests * remove placeholder tests * simplify macro * Update frame/balances/src/tests/fungible_conformance_tests.rs Co-authored-by: Kian Paimani <[email protected]> * use Balance from T * fix copyright * add test doc comments * improve test naming * clippy * fix rustdoc errors * fix rustdoc * improve macro * improve variable naming * remove redundant comment * use path --------- Co-authored-by: Kian Paimani <[email protected]>
-
- Apr 27, 2023
-
-
Oliver Tale-Yazdi authored
* First approach on pallet::call_weight Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Use attr on pallet::call instead Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Ui tests Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Rename to weight(prefix = ...)) Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Simplify to #[pallet::call(weight(T))] Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Add stray token error Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Cleanup Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Migrate remaining pallets Using script from https://github.com/ggwpez/substrate-scripts/blob/e1b5ea5b5b4018867f3e869fce6f448b4ba9d71f/frame-code-migration/src/call_weight.rs Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Try to add some docs Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Revert "Migrate remaining pallets" Lets do this as a follow-up, I dont want to bloat this small MR. This reverts commit 331d4b42d72de1dacaed714d69166fa1bc9c92dd. Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Renames Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Review fixes Co-authored-by: Sam Johnson <[email protected]> Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Test weights Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Update UI tests Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Update frame/support/procedural/src/pallet/parse/mod.rs Co-authored-by: Muharem Ismailov <[email protected]> * Remove old code Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Update docs Signed-off-by: Oliver Tale-Yazdi <[email protected]> --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: parity-processbot <> Co-authored-by: Muharem Ismailov <[email protected]>
-
- Apr 26, 2023
-
-
Gavin Wood authored
* Fix: Incorrect implementation of can_reserve check * Fix: Incorrect migration of consumer counting for existing accounts with frozen amounts * Fix: Inconsistent implementation between assets can_deposit and new_account * Fixes * Fixes * Another fix * Update tests.rs * Update fungible_tests.rs * Use `can_accrue_consumers` in the body of `can_inc_consumer` --------- Co-authored-by: Keith Yeung <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: parity-processbot <>
-
- Apr 21, 2023
-
-
Harald Heckmann authored
* Add Freeze/Thaw events and tests * Remove duplicate docstring * Correct spelling error * Cargo fmt * Use proper punctuation in docstring Co-authored-by: Jegor Sidorenko <[email protected]> --------- Co-authored-by: Jegor Sidorenko <[email protected]> Co-authored-by: parity-processbot <>
-
- Mar 24, 2023
-
-
Harald Heckmann authored
* Emit Locked/Unlocked events * Implement lock event tests * Adhere to style guide * Use saturating math Co-authored-by: Kian Paimani <[email protected]> * Fix typo * Emit event on change locks and add tests * Adjust event docstring --------- Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: parity-processbot <>
-
Gavin Wood authored
* Minimum of 1 for ED * Avoid need for ED to be minimum one * Docs * Ban ED of zero unless feature enabled * use integrity_test * Docs * Cleanup * Update frame/balances/Cargo.toml Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/balances/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/balances/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Ensure dodgy code is disabled by default * zero_ed -> insecure_zero_ed --------- Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: parity-processbot <>
-
- Mar 18, 2023
-
-
Gavin Wood authored
* First reworking of fungibles API * New API and docs * More fungible::* API improvements * New ref-counting logic for old API * Missing files * Fixes * Use the new transfer logic * Use fungibles for the dispatchables * Use shelve/restore names * Locking works with total balance. * repotting and removal * Separate Holds from Reserves * Introduce freezes * Missing files * Tests for freezing * Fix hold+freeze combo * More tests * Fee-free dispatchable for upgrading accounts * Benchmarks and a few fixes * Another test * Docs and refactor to avoid blanket impls * Repot * Fit out ItemOf fully * Add events to Balanced traits * Introduced events into Hold traits * Fix Assets pallet tests * Assets benchmarks pass * Missing files and fixes * Fixes * Fixes * Benchmarks fixes * Fix balance benchmarks * Formatting * Expose fungible sub modules * Move NIS to fungible API * Fix broken impl and add test * Fix tests * API for `transfer_and_hold` * Use composite APIs * Formatting * Upgraded event * Fixes * Fixes * Fixes * Fixes * Repot tests and some fixed * Fix some bits * Fix dust tests * Rename `set_balance` - `Balances::set_balance` becomes `Balances::force_set_balance` - `Unbalanced::set_balance` becomes `Unbalances::write_balance` * becomes * Move dust handling to fungibles API * Formatting * Fixes and more refactoring * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Use reducible_balance for better correctness on fees * Reducing hold to zero should remove entry. * Add test * Docs * Update frame/support/src/traits/tokens/fungibles/hold.rs Co-authored-by: Muharem Ismailov <[email protected]> * Update frame/support/src/traits/tokens/fungibles/regular.rs Co-authored-by: Muharem Ismailov <[email protected]> * Update frame/support/src/traits/tokens/fungible/hold.rs Co-authored-by: Muharem Ismailov <[email protected]> * Update frame/support/src/traits/tokens/fungible/regular.rs Co-authored-by: Muharem Ismailov <[email protected]> * Docs * Docs * Docs * Fix NIS benchmarks * Doc comment * Remove post_mutation * Fix some tests * Fix some grumbles * Enumify bool args to fungible(s) functions * Fix up assets and balances * Formatting * Fix contracts * Fix tests & benchmarks build * Typify minted boolean arg * Typify on_hold boolean arg; renames * Fix numerous tests * Fix dependency issue * Privatize dangerous API mutate_account * Fix contracts (@alext - please check this commit) * Remove println * Fix tests for contracts * Fix broken rename * Fix broken rename * Fix broken rename * Docs * Update frame/support/src/traits/tokens/fungible/hold.rs Co-authored-by: Anthony Alaribe <[email protected]> * remove from_ref_time * Update frame/executive/src/lib.rs Co-authored-by: Anthony Alaribe <[email protected]> * Update frame/executive/src/lib.rs Co-authored-by: Anthony Alaribe <[email protected]> * Reenable test * Update frame/support/src/traits/tokens/fungibles/hold.rs Co-authored-by: Anthony Alaribe <[email protected]> * Update frame/support/src/traits/tokens/fungible/hold.rs Co-authored-by: Anthony Alaribe <[email protected]> * Update frame/support/src/traits/tokens/fungible/hold.rs Co-authored-by: Anthony Alaribe <[email protected]> * Update frame/support/src/traits/tokens/fungible/hold.rs Co-authored-by: Anthony Alaribe <[email protected]> * Update frame/support/src/traits/tokens/currency.rs Co-authored-by: Anthony Alaribe <[email protected]> * Update frame/lottery/src/tests.rs Co-authored-by: Anthony Alaribe <[email protected]> * Update frame/support/src/traits/tokens/fungible/mod.rs Co-authored-by: Anthony Alaribe <[email protected]> * Update frame/support/src/traits/tokens/fungible/regular.rs Co-authored-by: Anthony Alaribe <[email protected]> * Update frame/support/src/traits/tokens/fungibles/freeze.rs Co-authored-by: Anthony Alaribe <[email protected]> * Update frame/support/src/traits/tokens/fungible/regular.rs Co-authored-by: Anthony Alaribe <[email protected]> * Update frame/support/src/traits/tokens/fungibles/hold.rs Co-authored-by: Anthony Alaribe <[email protected]> * Update frame/support/src/traits/tokens/fungibles/hold.rs Co-authored-by: Anthony Alaribe <[email protected]> * Update frame/support/src/traits/tokens/fungibles/hold.rs Co-authored-by: Anthony Alaribe <[email protected]> * Rename UnwantedRemoval to UnwantedAccountRemoval * Docs * Formatting * Update frame/balances/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update primitives/runtime/src/lib.rs Co-authored-by: Keith Yeung <[email protected]> * handle_raw_dust oes nothing * Formatting * Fixes * Grumble * Fixes * Add test * Add test * Tests for reducible_balance * Fixes * Fix Salary * Fixes * Disable broken test * Disable nicely * Fixes * Fixes * Fixes * Rename some events * Fix nomination pools breakage * Add compatibility stub for transfer tx * Reinstate a safely compatible version of Balances set_balance * Fixes * Grumble * Update frame/nis/src/lib.rs Co-authored-by: Kian Paimani <[email protected]> * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_balances * disable flakey tests * Update frame/balances/src/lib.rs Co-authored-by: Kian Paimani <[email protected]> * Grumbles * Grumble --------- Co-authored-by: Muharem Ismailov <[email protected]> Co-authored-by: Alexander Theißen <[email protected]> Co-authored-by: Anthony Alaribe <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Keith Yeung <[email protected]> Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: command-bot <>
-