pub trait BenchmarkHelperTrait<AccountId, FunAssetIdParameter, AssetIdParameter> {
// Required methods
fn create_asset_id_parameter(
id: u32,
) -> (FunAssetIdParameter, AssetIdParameter);
fn setup_balances_and_pool(
asset_id: FunAssetIdParameter,
account: AccountId,
);
}
Expand description
Helper trait to benchmark the ChargeAssetTxPayment
transaction extension.
Required Methods§
Sourcefn create_asset_id_parameter(id: u32) -> (FunAssetIdParameter, AssetIdParameter)
fn create_asset_id_parameter(id: u32) -> (FunAssetIdParameter, AssetIdParameter)
Returns the AssetId
to be used in the liquidity pool by the benchmarking code.
Sourcefn setup_balances_and_pool(asset_id: FunAssetIdParameter, account: AccountId)
fn setup_balances_and_pool(asset_id: FunAssetIdParameter, account: AccountId)
Create a liquidity pool for a given asset and sufficiently endow accounts to benchmark the extension.
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.