fuels_test_helpers

Function setup_multiple_assets_coins

Source
pub fn setup_multiple_assets_coins(
    owner: &Bech32Address,
    num_asset: u64,
    coins_per_asset: u64,
    amount_per_coin: u64,
) -> (Vec<Coin>, Vec<AssetId>)
Expand description

Create a vector of num_asset*coins_per_asset UTXOs and a vector of the unique corresponding asset IDs. AssetId. Each UTXO (=coin) contains amount_per_coin amount of a random asset. The output of this function can be used with setup_test_provider to get a client with some pre-existing coins, with num_asset different asset ids. Note that one of the assets is the base asset to pay for gas.