Skip to content

Commit

Permalink
Remove Default, HasCompact, and TypeInfo trait bounds on AssetId (par…
Browse files Browse the repository at this point in the history
…itytech#12740)

* 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 <>
  • Loading branch information
joepetrowski authored and ark0f committed Feb 27, 2023
1 parent 0f10294 commit 5139b31
Show file tree
Hide file tree
Showing 7 changed files with 254 additions and 200 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,7 @@ impl pallet_assets::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = u128;
type AssetId = u32;
type AssetIdParameter = codec::Compact<u32>;
type Currency = Balances;
type CreateOrigin = AsEnsureOriginWithArg<EnsureSigned<AccountId>>;
type ForceOrigin = EnsureRoot<AccountId>;
Expand All @@ -1453,6 +1454,8 @@ impl pallet_assets::Config for Runtime {
type Extra = ();
type WeightInfo = pallet_assets::weights::SubstrateWeight<Runtime>;
type RemoveItemsLimit = ConstU32<1000>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = ();
}

parameter_types! {
Expand Down
Loading

0 comments on commit 5139b31

Please sign in to comment.