1. Dec 23, 2022
    • Jegor Sidorenko's avatar
      NFTs 2.0 (#12765) · 0edab317
      Jegor Sidorenko authored
      
      
      * Copy Uniques into Nfts
      
      * Connect new pallet
      
      * Update weights
      
      * Nfts: Multiple approvals (#12178)
      
      * multiple approvals
      
      * clear
      
      * tests & clean up
      
      * fix in logic & fmt
      
      * fix benchmarks
      
      * deadline
      
      * test deadline
      
      * current_block + deadline
      
      * update ApprovedTransfer event
      
      * benchmark
      
      * docs
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarJegor Sidorenko <[email protected]>
      
      * fmt fix
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarJegor Sidorenko <[email protected]>
      
      * update tests
      
      * anyone can cancel
      
      * Update frame/nfts/src/tests.rs
      
      Co-authored-by: default avatarJegor Sidorenko <[email protected]>
      
      * fmt
      
      * fix logic
      
      * unnecessary line
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_nfts
      
      * Update frame/nfts/src/lib.rs
      
      * Update lib.rs
      
      * fmt
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * fmt
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * suggestion
      
      * new line
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_nfts
      
      Co-authored-by: default avatarJegor Sidorenko <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Fixes
      
      * cargo fmt
      
      * Fixes
      
      * Fixes
      
      * Fix CI
      
      * Nfts: Fix Auto-Increment (#12223)
      
      * commit
      
      * passing benchmarks
      
      * clean up
      
      * sync
      
      * runtime implementation
      
      * fix
      
      * fmt
      
      * fix benchmark
      
      * cfg
      
      * remove try-increment-id
      
      * remove unused error
      
      * impl Incrementable for unsigned types
      
      * clean up
      
      * fix in tests
      
      * not needed anymore
      
      * Use OptionQuery
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Rename Origin to RuntimeOrigin
      
      * [Uniques V2] Tips (#12168)
      
      * Allow to add tips when buying an NFT
      
      * Chore
      
      * Rework tips feature
      
      * Add weights + benchmarks
      
      * Convert tuple to struct
      
      * Fix benchmark
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_nfts
      
      * Update frame/nfts/src/benchmarking.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Fix benchmarks
      
      * Revert the bounded_vec![] approach
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_nfts
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * [Uniques V2] Atomic NFTs swap (#12285)
      
      * Atomic NFTs swap
      
      * Fmt
      
      * Fix benchmark
      
      * Rename swap -> atomic_swap
      
      * Update target balance
      
      * Rollback
      
      * Fix
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_nfts
      
      * Make desired item optional
      
      * Apply suggestions
      
      * Update frame/nfts/src/features/atomic_swap.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Rename fields
      
      * Optimisation
      
      * Add a comment
      
      * deadline -> maybe_deadline
      
      * Add docs
      
      * Change comments
      
      * Add price direction field
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_nfts
      
      * Wrap price and direction
      
      * Fix benchmarks
      
      * Use ensure! instead of if {}
      
      * Make duration param mandatory and limit it to MaxDeadlineDuration
      
      * Make the code safer
      
      * Fix clippy
      
      * Chore
      
      * Remove unused vars
      
      * try
      
      * try 2
      
      * try 3
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * [Uniques V2] Feature flags (#12367)
      
      * Basics
      
      * WIP: change the data format
      
      * Refactor
      
      * Remove redundant new() method
      
      * Rename settings
      
      * Enable tests
      
      * Chore
      
      * Change params order
      
      * Delete the config on collection removal
      
      * Chore
      
      * Remove redundant system features
      
      * Rename force_item_status to force_collection_status
      
      * Update node runtime
      
      * Chore
      
      * Remove thaw_collection
      
      * Chore
      
      * Connect collection.is_frozen to config
      
      * Allow to lock the collection in a new way
      
      * Move free_holding into settings
      
      * Connect collection's metadata locker to feature flags
      
      * DRY
      
      * Chore
      
      * Connect pallet level feature flags
      
      * Prepare tests for the new changes
      
      * Implement Item settings
      
      * Allow to lock the metadata or attributes of an item
      
      * Common -> Settings
      
      * Extract settings related code to a separate file
      
      * Move feature flag checks inside the do_* methods
      
      * Split settings.rs into parts
      
      * Extract repeated code into macro
      
      * Extract macros into their own file
      
      * Chore
      
      * Fix traits
      
      * Fix traits
      
      * Test SystemFeatures
      
      * Fix benchmarks
      
      * Add missing benchmark
      
      * Fix node/runtime/lib.rs
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_nfts
      
      * Keep item's config on burn if it's not empty
      
      * Fix the merge artifacts
      
      * Fmt
      
      * Add SystemFeature::NoSwaps check
      
      * Rename SystemFeatures to PalletFeatures
      
      * Rename errors
      
      * Add docs
      
      * Change error message
      
      * Rework pallet features
      
      * Move macros
      
      * Change comments
      
      * Fmt
      
      * Refactor Incrementable
      
      * Use pub(crate) for do_* functions
      
      * Update comments
      
      * Refactor freeze and lock functions
      
      * Rework Collection config and Item confg api
      
      * Chore
      
      * Make clippy happy
      
      * Chore
      
      * Update comment
      
      * RequiredDeposit => DepositRequired
      
      * Address comments
      
      Co-authored-by: command-bot <>
      
      * [Uniques V2] Refactor roles (#12437)
      
      * Basics
      
      * WIP: change the data format
      
      * Refactor
      
      * Remove redundant new() method
      
      * Rename settings
      
      * Enable tests
      
      * Chore
      
      * Change params order
      
      * Delete the config on collection removal
      
      * Chore
      
      * Remove redundant system features
      
      * Rename force_item_status to force_collection_status
      
      * Update node runtime
      
      * Chore
      
      * Remove thaw_collection
      
      * Chore
      
      * Connect collection.is_frozen to config
      
      * Allow to lock the collection in a new way
      
      * Move free_holding into settings
      
      * Connect collection's metadata locker to feature flags
      
      * DRY
      
      * Chore
      
      * Connect pallet level feature flags
      
      * Prepare tests for the new changes
      
      * Implement Item settings
      
      * Allow to lock the metadata or attributes of an item
      
      * Common -> Settings
      
      * Extract settings related code to a separate file
      
      * Move feature flag checks inside the do_* methods
      
      * Split settings.rs into parts
      
      * Extract repeated code into macro
      
      * Extract macros into their own file
      
      * Chore
      
      * Fix traits
      
      * Fix traits
      
      * Test SystemFeatures
      
      * Fix benchmarks
      
      * Add missing benchmark
      
      * Fix node/runtime/lib.rs
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_nfts
      
      * Keep item's config on burn if it's not empty
      
      * Fix the merge artifacts
      
      * Fmt
      
      * Add SystemFeature::NoSwaps check
      
      * Refactor roles structure
      
      * Rename SystemFeatures to PalletFeatures
      
      * Rename errors
      
      * Add docs
      
      * Change error message
      
      * Rework pallet features
      
      * Move macros
      
      * Change comments
      
      * Fmt
      
      * Refactor Incrementable
      
      * Use pub(crate) for do_* functions
      
      * Update comments
      
      * Refactor freeze and lock functions
      
      * Rework Collection config and Item confg api
      
      * Chore
      
      * Make clippy happy
      
      * Chore
      
      * Fix artifacts
      
      * Address comments
      
      * Further refactoring
      
      * Add comments
      
      * Add tests for group_roles_by_account()
      
      * Update frame/nfts/src/impl_nonfungibles.rs
      
      * Add test
      
      * Replace Itertools group_by with a custom implementation
      
      * ItemsNotTransferable => ItemsNonTransferable
      
      * Update frame/nfts/src/features/roles.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Address PR comments
      
      * Add missed comment
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Fix copy
      
      * Remove storage_prefix
      
      * Remove transactional
      
      * Update comment
      
      * [Uniques V2] Minting options (#12483)
      
      * Basics
      
      * WIP: change the data format
      
      * Refactor
      
      * Remove redundant new() method
      
      * Rename settings
      
      * Enable tests
      
      * Chore
      
      * Change params order
      
      * Delete the config on collection removal
      
      * Chore
      
      * Remove redundant system features
      
      * Rename force_item_status to force_collection_status
      
      * Update node runtime
      
      * Chore
      
      * Remove thaw_collection
      
      * Chore
      
      * Connect collection.is_frozen to config
      
      * Allow to lock the collection in a new way
      
      * Move free_holding into settings
      
      * Connect collection's metadata locker to feature flags
      
      * DRY
      
      * Chore
      
      * Connect pallet level feature flags
      
      * Prepare tests for the new changes
      
      * Implement Item settings
      
      * Allow to lock the metadata or attributes of an item
      
      * Common -> Settings
      
      * Extract settings related code to a separate file
      
      * Move feature flag checks inside the do_* methods
      
      * Split settings.rs into parts
      
      * Extract repeated code into macro
      
      * Extract macros into their own file
      
      * Chore
      
      * Fix traits
      
      * Fix traits
      
      * Test SystemFeatures
      
      * Fix benchmarks
      
      * Add missing benchmark
      
      * Fix node/runtime/lib.rs
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_nfts
      
      * Keep item's config on burn if it's not empty
      
      * Fix the merge artifacts
      
      * Fmt
      
      * Add SystemFeature::NoSwaps check
      
      * Rename SystemFeatures to PalletFeatures
      
      * Rename errors
      
      * Add docs
      
      * Change error message
      
      * Change the format of CollectionConfig to store more data
      
      * Move max supply to the CollectionConfig and allow to change it
      
      * Remove ItemConfig from the mint() function and use the one set in mint settings
      
      * Add different mint options
      
      * Allow to change the mint settings
      
      * Add a force_mint() method
      
      * Check mint params
      
      * Some optimisations
      
      * Cover with tests
      
      * Remove merge artifacts
      
      * Chore
      
      * Use the new has_role() method
      
      * Rework item deposits
      
      * More tests
      
      * Refactoring
      
      * Address comments
      
      * Refactor lock_collection()
      
      * Update frame/nfts/src/types.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Update frame/nfts/src/types.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Private => Issuer
      
      * Add more tests
      
      * Fix benchmarks
      
      * Add benchmarks for new methods
      
      * [Uniques v2] Refactoring (#12570)
      
      * Move do_set_price() and do_buy_item() to buy_sell.rs
      
      * Move approvals to feature file
      
      * Move metadata to feature files
      
      * Move the rest of methods to feature files
      
      * Remove artifacts
      
      * Split force_collection_status into 2 methods
      
      * Fix benchmarks
      
      * Fix benchmarks
      
      * Update deps
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * [Uniques V2] Smart attributes (#12702)
      
      * Basics
      
      * WIP: change the data format
      
      * Refactor
      
      * Remove redundant new() method
      
      * Rename settings
      
      * Enable tests
      
      * Chore
      
      * Change params order
      
      * Delete the config on collection removal
      
      * Chore
      
      * Remove redundant system features
      
      * Rename force_item_status to force_collection_status
      
      * Update node runtime
      
      * Chore
      
      * Remove thaw_collection
      
      * Chore
      
      * Connect collection.is_frozen to config
      
      * Allow to lock the collection in a new way
      
      * Move free_holding into settings
      
      * Connect collection's metadata locker to feature flags
      
      * DRY
      
      * Chore
      
      * Connect pallet level feature flags
      
      * Prepare tests for the new changes
      
      * Implement Item settings
      
      * Allow to lock the metadata or attributes of an item
      
      * Common -> Settings
      
      * Extract settings related code to a separate file
      
      * Move feature flag checks inside the do_* methods
      
      * Split settings.rs into parts
      
      * Extract repeated code into macro
      
      * Extract macros into their own file
      
      * Chore
      
      * Fix traits
      
      * Fix traits
      
      * Test SystemFeatures
      
      * Fix benchmarks
      
      * Add missing benchmark
      
      * Fix node/runtime/lib.rs
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_nfts
      
      * Keep item's config on burn if it's not empty
      
      * Fix the merge artifacts
      
      * Fmt
      
      * Add SystemFeature::NoSwaps check
      
      * Rename SystemFeatures to PalletFeatures
      
      * Rename errors
      
      * Add docs
      
      * Change error message
      
      * Change the format of CollectionConfig to store more data
      
      * Move max supply to the CollectionConfig and allow to change it
      
      * Remove ItemConfig from the mint() function and use the one set in mint settings
      
      * Add different mint options
      
      * Allow to change the mint settings
      
      * Add a force_mint() method
      
      * Check mint params
      
      * Some optimisations
      
      * Cover with tests
      
      * Remove merge artifacts
      
      * Chore
      
      * Use the new has_role() method
      
      * Rework item deposits
      
      * More tests
      
      * Refactoring
      
      * Address comments
      
      * Refactor lock_collection()
      
      * Update frame/nfts/src/types.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Update frame/nfts/src/types.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Private => Issuer
      
      * Add more tests
      
      * Fix benchmarks
      
      * Add benchmarks for new methods
      
      * [Uniques v2] Refactoring (#12570)
      
      * Move do_set_price() and do_buy_item() to buy_sell.rs
      
      * Move approvals to feature file
      
      * Move metadata to feature files
      
      * Move the rest of methods to feature files
      
      * Remove artifacts
      
      * Smart attributes
      
      * Split force_collection_status into 2 methods
      
      * Fix benchmarks
      
      * Fix benchmarks
      
      * Update deps
      
      * Fix merge artifact
      
      * Weights + benchmarks + docs
      
      * Change params order
      
      * Chore
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Update docs
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Add PalletId
      
      * Chore
      
      * Add tests
      
      * More tests
      
      * Add doc
      
      * Update errors snapshots
      
      * Ensure we track the owner_deposit field correctly
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * [Uniques V2] Final improvements (#12736)
      
      * Use KeyPrefixIterator instead of Box
      
      * Change create_collection()
      
      * Restrict from claiming NFTs twice
      
      * Update Readme
      
      * Remove dead code
      
      * Refactoring
      
      * Update readme
      
      * Fix clippy
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_nfts
      
      * Update docs
      
      * Typo
      
      * Fix benchmarks
      
      * Add more docs
      
      * DepositRequired setting should affect only the attributes within the CollectionOwner namespace
      
      * [NFTs] Implement missed methods to set the attributes from other pallets (#12919)
      
      * Implement missed methods to set the attributes from other pallets
      
      * Revert snapshots
      
      * Update snapshot
      
      * Update snapshot
      
      * Revert snapshot changes
      
      * Update snapshots
      
      * Yet another snapshot update..
      
      * Update frame/support/src/traits/tokens/nonfungible_v2.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/support/src/traits/tokens/nonfungible_v2.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/support/src/traits/tokens/nonfungible_v2.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/support/src/traits/tokens/nonfungibles_v2.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/support/src/traits/tokens/nonfungible_v2.rs
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/support/src/traits/tokens/nonfungibles_v2.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/nfts/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Address comments
      
      * [NFTs] Add the new `owner` param to mint() method (#12997)
      
      * Add the new `owner` param to mint() method
      
      * Fmt
      
      * Address comments
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_nfts
      
      * Update frame/nfts/src/common_functions.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/nfts/src/types.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/nfts/src/types.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/nfts/src/types.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/nfts/src/types.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/nfts/src/types.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Add call indexes
      
      * Update snapshots
      
      Co-authored-by: default avatarSergej Sakac <[email protected]>
      Co-authored-by: default avatarSquirrel <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      0edab317
  2. Dec 21, 2022
  3. Dec 14, 2022
  4. Dec 13, 2022
  5. Dec 09, 2022
  6. Dec 08, 2022
    • Keith Yeung's avatar
      Introduce sensible weight constants (#12868) · 51db8c77
      Keith Yeung authored
      * Introduce sensible weight constants
      
      * cargo fmt
      
      * Remove unused import
      
      * Add missing import
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_lottery
      
      Co-authored-by: command-bot <>
      51db8c77
    • Anthony Alaribe's avatar
      Move LockableCurrency trait to fungibles::Lockable and deprecate LockableCurrency (#12798) · 9a014d1e
      Anthony Alaribe authored
      
      
      * WIP move LockableCurrency to fungibles
      
      * rename Lockable and LockIdentifier to funginbles::*
      
      * fix imports further
      
      * change Lockable from fungible to fungibles
      
      * reintroduce LockableCurrency but marked as deprecated
      
      * fix imports
      
      * fix imports
      
      * cargo fmt
      
      * add allow deprecated warnings
      
      * remove unused benchmark import
      
      * fix some of the docs
      
      * fix failing doctest check
      
      * reexport LockIdentifier and LockableCurrency from support/traits
      
      * reexport LockIdentifier and LockableCurrency from support/traits
      
      * allow using deprecated re-export
      
      * replace LockableCurrency and LockIdentifier with a module alias
      
      * Update frame/support/src/traits/tokens/fungibles/lockable.rs
      
      * Update frame/staking/src/pallet/mod.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Update frame/support/src/traits.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * REVERT removing fungibles::Lockable import
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarSquirrel <[email protected]>
      9a014d1e
  7. Dec 06, 2022
  8. Dec 05, 2022
  9. Nov 30, 2022
  10. Nov 29, 2022
  11. Nov 28, 2022
    • joe petrowski's avatar
      Remove Default, HasCompact, and TypeInfo trait bounds on AssetId (#12740) · d56214c2
      joe petrowski authored
      * Remove Default, HasCompact, and TypeInfo trait bounds on AssetId
      
      * don't use default in benchmarking
      
      * add helper trait
      
      * add helper to assets tx payment test
      
      * docs fixes
      
      * i'm confused
      
      * aha, cargo
      
      * move affected dispatchable calls into new indices
      
      * Helper -> BenchmarkHelper
      
      * benchmark use of helper
      
      * actually, don't break every call interface
      
      * use into on AssetIdParameter
      
      * Remove From from AssetIdParameter and use it in BenchmarkHelper
      
      * include from
      
      Co-authored-by: parity-processbot <>
      d56214c2
  12. Nov 25, 2022
  13. Nov 15, 2022
    • Anthony Alaribe's avatar
      Asset Pallet: Support repeated destroys to safely destroy large assets (#12310) · 679d2dcd
      Anthony Alaribe authored
      
      
      * Support repeated destroys to safely destroy large assets
      
      * require freezing accounts before destroying
      
      * support only deleting asset as final stage when there's no assets left
      
      * pre: introduce the RemoveKeyLimit config parameter
      
      * debug_ensure empty account in the right if block
      
      * update to having separate max values for accounts and approvals
      
      * add tests and use RemoveKeyLimit constant
      
      * add useful comments to the extrinsics, and calculate returned weight
      
      * add benchmarking for start_destroy and finish destroy
      
      * push failing benchmark logic
      
      * add benchmark tests for new functions
      
      * update weights via local benchmarks
      
      * remove extra weight file
      
      * Update frame/assets/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/assets/src/types.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/assets/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * effect some changes from codereview
      
      * use NotFrozen error
      
      * remove origin checks, as anyone can complete destruction after owner has begun the process; Add live check for other extrinsics
      
      * fix comments about Origin behaviour
      
      * add AssetStatus docs
      
      * modularize logic to allow calling logic in on_idle and on_initialize hooks
      
      * introduce simple migration for assets details
      
      * reintroduce logging in the migrations
      
      * move deposit_Event out of the mutate block
      
      * Update frame/assets/src/functions.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Update frame/assets/src/migration.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * move AssetNotLive checkout out of the mutate blocks
      
      * rename RemoveKeysLimit to RemoveItemsLimit
      
      * update docs
      
      * fix event name in benchmark
      
      * fix cargo fmt.
      
      * fix lint in benchmarking
      
      * Empty commit to trigger CI
      
      * Update frame/assets/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/assets/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/assets/src/functions.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/assets/src/functions.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/assets/src/functions.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/assets/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/assets/src/functions.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * effect change suggested during code review
      
      * move limit to a single location
      
      * Update frame/assets/src/functions.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * rename events
      
      * fix weight typo, using rocksdb instead of T::DbWeight. Pending generating weights
      
      * switch to using dead_account.len()
      
      * rename event in the benchmarks
      
      * empty to retrigger CI
      
      * trigger CI to check cumulus dependency
      
      * trigger CI for dependent cumulus
      
      * Update frame/assets/src/migration.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * move is-frozen to the assetStatus enum (#12547)
      
      * add pre and post migration hooks
      
      * update do_transfer logic to add new assert for more correct error messages
      
      * trigger CI
      
      * switch checking AssetStatus from checking Destroying state to checking live state
      
      * fix error type in tests from Frozen to AssetNotLive
      
      * trigger CI
      
      * change ensure check for fn reducible_balance()
      
      * change the error type to Error:<T,I>::IncorrectStatus to be clearer
      
      * Trigger CI
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      679d2dcd
  14. Nov 13, 2022
  15. Nov 09, 2022
    • joe petrowski's avatar
      Add `CreateOrigin` to Assets Pallet (#12586) · 11a01e89
      joe petrowski authored
      
      
      * add CreateOrigin to Assets pallet
      
      * fix asset-tx-payment test
      
      * use AccountId > u64 in test
      
      * Update frame/assets/src/benchmarking.rs
      
      Co-authored-by: default avatarJegor Sidorenko <[email protected]>
      
      Co-authored-by: default avatarJegor Sidorenko <[email protected]>
      11a01e89
    • Robert Hambrock's avatar
      Consolidate and deduplicate MMR API methods (#12530) · 53f97350
      Robert Hambrock authored
      
      
      * histor. batch proof: make best block arg optional
      
      * correct testing range
      
      * make generate_batch_proof stub for historical
      
      * merge generate_{historical_}batch_proof functions
      
      * merge generate_{batch_}proof functions
      
      * merge verify_{batch_}proof functions
      
      * merge verify_{batch_}proof_stateless functions
      
      * remove {Leaf}Proof
      
      Not utilized by API anymore, so superfluous.
      Removal consistent with prior changes to just use "batch" proof API.
      
      * rename BatchProof->Proof
      
      no need to qualify if only one universal proof type.
      
      * cleanup
      
      * expose verify_proof rpc api
      
      * document verify_proof
      
      * expose verify_proof_stateless rpc api
      
      * add optional BlockHash to mmr_root rpc api
      
      * fixup! expose verify_proof rpc api
      
      * fix documentation phrasing
      
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      
      * documentation grammar
      
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      
      * define mmr error msgs together with error enum
      
      Co-authored-by: default avatarSerban Iorga <[email protected]>
      
      * fixup! define mmr error msgs together with error enum
      
      * map decoding errors to CallError::InvalidParams
      
      Co-authored-by: default avatarSerban Iorga <[email protected]>
      
      * fixup! map decoding errors to CallError::InvalidParams
      
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarSerban Iorga <[email protected]>
      53f97350
    • Ankan's avatar
      Bound Election and Staking by MaxActiveValidators (#12436) · 657d9920
      Ankan authored
      
      
      * bounding election provider with kian
      
      * multi phase implement bounded election provider
      
      * election provider blanket implementation
      
      * staking compiles
      
      * fix test for election provider support
      
      * fmt
      
      * fixing epmp tests, does not compile yet
      
      * fix epmp tests
      
      * fix staking tests
      
      * fmt
      
      * fix runtime tests
      
      * fmt
      
      * remove outdated wip tags
      
      * add enum error
      
      * sort and truncate supports
      
      * comment
      
      * error when unsupported number of election winners
      
      * compiling wip after kian's suggestions
      
      * fix TODOs
      
      * remove,fix tags
      
      * ensure validator count does not exceed maxwinners
      
      * clean up
      
      * some more clean up and todos
      
      * handle too many winners
      
      * rename parameter for mock
      
      * todo
      
      * add sort and truncate rule if there are too many winners
      
      * fmt
      
      * fail, not swallow emergency result bound not met
      
      * remove too many winners resolution as it can be guaranteed to be bounded
      
      * fix benchmark
      
      * give MaxWinners more contextual name
      
      * make ready solution generic over T
      
      * kian feedback
      
      * fix stuff
      
      * Kian's way of solvign this
      
      * comment fix
      
      * fix compile
      
      * remove use of BoundedExecution
      
      * fmt
      
      * comment out failing integrity test
      
      * cap validator count increment to max winners
      
      * dont panic
      
      * add test for bad data provider
      
      * Update frame/staking/src/pallet/impls.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * fix namespace conflict and add test for onchain max winners less than desired targets
      
      * defensive unwrap
      
      * early convert to bounded vec
      
      * fix syntax
      
      * fmt
      
      * fix doc
      
      * fix rustdoc
      
      * fmt
      
      * fix maxwinner count for benchmarking
      
      * add instant election for noelection
      
      * fmt
      
      * fix compile
      
      * pr feedbacks
      
      * always error at validator count exceeding max winners
      
      * add useful error message
      
      * pr comments
      
      * import fix
      
      * add checked_desired_targets
      
      * fmt
      
      * fmt
      
      * fix rust doc
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarkianenigma <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      657d9920
  16. Nov 08, 2022
  17. Oct 29, 2022
  18. Oct 25, 2022
  19. Oct 24, 2022
  20. Oct 13, 2022
  21. Oct 09, 2022
  22. Oct 06, 2022
  23. Oct 05, 2022
  24. Oct 04, 2022
  25. Oct 02, 2022
    • Alexander Theißen's avatar
      Remove contracts RPCs (#12358) · bb9d2fa7
      Alexander Theißen authored
      * Remove contracts RPCs
      
      * Remove serde as RPC serialization is no longer needed
      
      * Rename folder to match crate name
      
      * Compile fix
      
      * Remove Byte wrapper
      bb9d2fa7
  26. Sep 30, 2022
  27. Sep 29, 2022
    • Keith Yeung's avatar
      Properly set the max proof size weight on defaults and tests (#12383) · a4fb1d70
      Keith Yeung authored
      * Properly set the max proof size weight on defaults and tests
      
      * cargo fmt
      
      * Set proper max proof size for contracts pallet tests
      
      * Properly set max proof size for node
      
      * Properly set max proof size for frame system mock
      
      * Update test expectations
      
      * Update test expectations
      
      * Properly set max proof size for balances mock
      
      * Update test expectations
      
      * Update test expectations
      
      * Properly set max proof size for democracy mock
      
      * Properly set max proof size for scheduler mock
      
      * Properly set max proof size for fast unstake mock
      
      * Properly set max proof size for tx payment mock
      
      * Properly set max proof size for elections phragmen mock
      
      * Properly set max proof size for node template
      a4fb1d70
  28. Sep 27, 2022
    • Roman Useinov's avatar
      [Feature] Add deposit to fast-unstake (#12366) · 1f687256
      Roman Useinov authored
      
      
      * [Feature] Add deposit to fast-unstake
      
      * disable on ErasToCheckPerBlock == 0
      
      * removed signed ext
      
      * remove obsolete import
      
      * remove some obsolete stuff
      
      * fix some comments
      
      * fixed all the comments
      
      * remove obsolete imports
      
      * fix some tests
      
      * CallNotAllowed tests
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * fix tests
      
      * fix deregister + tests
      
      * more fixes
      
      * make sure we go above existential deposit
      
      * fixed the last test
      
      * some nit fixes
      
      * fix node
      
      * fix bench
      
      * last bench fix
      
      * Update frame/fast-unstake/src/lib.rs
      
      * ".git/.scripts/fmt.sh" 1
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: command-bot <>
      1f687256
  29. Sep 23, 2022
    • Kian Paimani's avatar
      Fast Unstake Pallet (#12129) · b56c0e4c
      Kian Paimani authored
      * add failing test for itamar
      
      * an ugly example of fast unstake
      
      * Revert "add failing test for itamar"
      
      This reverts commit 16c4d8015698a0684c090c54fce8b470a2d2feb2.
      
      * fast unstake wip
      
      * clean it up a bit
      
      * some comments
      
      * on_idle logic
      
      * fix
      
      * comment
      
      * new working version, checks all pass, looking good
      
      * some notes
      
      * add mock boilerplate
      
      * more boilerplate
      
      * simplify the weight stuff
      
      * ExtBuilder for pools
      
      * fmt
      
      * rm bags-list, simplify setup_works
      
      * mock + tests boilerplate
      
      * make some benchmarks work
      
      * mock boilerplate
      
      * tests boilerplate
      
      * run_to_block works
      
      * add Error enums
      
      * add test
      
      * note
      
      * make UnstakeRequest fields pub
      
      * some tests
      
      * fix origin
      
      * fmt
      
      * add fast_unstake_events_since_last_call
      
      * text
      
      * rewrite some benchmes and fix them -- the outcome is still strange
      
      * Fix weights
      
      * cleanup
      
      * Update frame/election-provider-support/solution-type/src/single_page.rs
      
      * fix build
      
      * Fix pools tests
      
      * iterate teset + mock
      
      * test unfinished
      
      * cleanup and add some tests
      
      * add test successful_multi_queue
      
      * comment
      
      * rm Head check
      
      * add TODO
      
      * complete successful_multi_queue
      
      * + test early_exit
      
      * fix a lot of things above the beautiful atlantic ocean 🌊
      
      
      
      * seemingly it is finished now
      
      * Fix build
      
      * ".git/.scripts/fmt.sh" 1
      
      * Fix slashing amount as well
      
      * better docs
      
      * abstract types
      
      * rm use
      
      * import
      
      * Update frame/nomination-pools/benchmarking/src/lib.rs
      
      Co-authored-by: default avatarNitwit <[email protected]>
      
      * Update frame/fast-unstake/src/types.rs
      
      Co-authored-by: default avatarNitwit <[email protected]>
      
      * Fix build
      
      * fmt
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * make bounded
      
      * feedback from code review with Ankan
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/mock.rs
      
      * update to master
      
      * some final review comments
      
      * fmt
      
      * fix clippy
      
      * remove unused
      
      * ".git/.scripts/fmt.sh" 1
      
      * make it all build again
      
      * fmt
      
      * undo fishy change
      
      Co-authored-by: default avatarRoss Bulat <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarNitwit <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      b56c0e4c
  30. Sep 21, 2022
    • Alexander Theißen's avatar
      Make automatic storage deposits resistant against changing deposit prices (#12083) · 857c3bf3
      Alexander Theißen authored
      
      
      * Require `FixedPointOperand` for Balances
      
      * Delay deposit calculation
      
      * Make refunds pro rata of consumed storage
      
      * Add storage migration
      
      * Fix clippy
      
      * Add liquidity checks
      
      * Fixe delayed deposit limit enforcement
      
      * Defer charges
      
      * Import Vec
      
      * Add try-runtime hooks for migration
      
      * Fix warning
      
      * Adapt to new OnRuntimeUpgrade trait
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * fmt
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * More suggestions from code review
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      857c3bf3
    • Ankan's avatar
      Bound staking storage items (#12230) · c6a9abcc
      Ankan authored
      
      
      * replace pallet level unboundedness to individual storage items
      
      * bound structs
      
      * bounding history depth
      
      * defensive error
      
      * use the era history depth from config
      
      * clean up history depth from storage in v11
      
      * keep the name HistoryDepth for the new configuration value
      
      * use u32 for history depth in node runtime
      
      * improve doc comments
      
      * add HistoryDepth to mock runtimes with pallet-staking
      
      * rustfmt
      
      * refactor and doc improve
      
      * apply re-benchmarked weight for staking
      
      * pr feedback improvements
      
      * test for claimed rewards following the expected bounds
      
      * refactor test to calculate first and last reward era programmatically
      
      * verify previous eras cannot be claimed
      
      * add migration v12
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_staking
      
      * fix compiler error
      
      * corrupting history depth does not lead to catastrophic issue
      
      * fix new line
      
      * remove unused import
      
      * fmt
      
      * add test to document scenario where history depth is reduced without migration
      
      * fmt
      
      * Update frame/staking/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Update frame/staking/src/migrations.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * doc for all storage items bounded by HistoryDepth
      
      * Update frame/staking/src/pallet/mod.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Update frame/staking/src/tests.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * pr feedback fixes
      
      * Update frame/staking/src/tests.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * remove extra checks
      
      * fix merge
      
      * fmt
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarkianenigma <[email protected]>
      c6a9abcc
  31. Sep 20, 2022
    • Sergej Sakac's avatar
      BREAKING: Rename Origin (#12258) · e4b6f4a6
      Sergej Sakac authored
      * BREAKING: Rename Origin
      
      * more renaming
      
      * a bit more renaming
      
      * fix
      
      * more fixing
      
      * fix in frame_support
      
      * even more fixes
      
      * fix
      
      * small fix
      
      * ...
      
      * update .stderr
      
      * docs
      
      * update docs
      
      * update docs
      
      * docs
      e4b6f4a6
  32. Sep 19, 2022