Skip to content

DepositFailed in benchmarks #921

Open
@cuteolaf

Description

@cuteolaf

deposit method of orml-currencies is not working in benchmarks

pub fn create_funded_user<T: Config>(
    seed: &'static str,
    n: u32,
    balance_factor: u32,
) -> T::AccountId {
    let user = account(seed, n, 0);
    let balance: BalanceOf<T> = balance_factor.into();
    assert_ok!(<T::MultiCurrency as MultiCurrency<
        <T as frame_system::Config>::AccountId,
    >>::deposit(CurrencyId::Native, &user, balance,));
    user
}

Reference: https://github.com/ImbueNetwork/imbue/blob/0744ca52a89b2d2a17ba379c43663c3882df2592/pallets/proposals/src/test_utils.rs#L117-L128

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions