referrerpolicy=no-referrer-when-downgrade

BenchmarkHelper

Trait BenchmarkHelper 

Source
pub trait BenchmarkHelper<AssetId, AccountId> {
    // Required methods
    fn get_asset_id(asset_index: u32) -> AssetId;
    fn create_asset(asset_id: AssetId, owner: &AccountId, decimals: u8);
}
Expand description

Helper trait for benchmark setup.

Provides a way to create an external asset with the correct metadata (decimals) for benchmarks, abstracting over the deposit requirements of the underlying asset pallet.

Required Methods§

Source

fn get_asset_id(asset_index: u32) -> AssetId

Get the asset ID for a given asset index.

Source

fn create_asset(asset_id: AssetId, owner: &AccountId, decimals: u8)

Create an asset with metadata matching the internal asset’s decimals.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§