Crate fuels_test_helpers

Source
Expand description

Testing helpers/utilities for Fuel SDK.

Structs§

AssetConfig
ChainConfig
FuelService
NodeConfig
StateConfig
WalletsConfig

Enums§

DbType
Trigger

Constants§

DEFAULT_COIN_AMOUNT
DEFAULT_NUM_COINS
DEFAULT_NUM_WALLETS

Functions§

generate_random_salt
launch_custom_provider_and_get_wallets
Launches a custom node and provider, along with a configurable number of wallets.
launch_provider_and_get_wallet
Launches a local Fuel node, instantiates a provider, and returns a wallet. The provider and the wallets are instantiated with the default configs. For more configurable options, see the launch_custom_provider_and_get_wallets function.
setup_custom_assets_coins
Create a vector of UTXOs with the provided AssetIds, num_coins, and amount_per_coin
setup_multiple_assets_coins
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.
setup_single_asset_coins
Create a vector of num_coins UTXOs containing amount_per_coin amount of asset asset_id. The output of this function can be used with setup_test_provider to get a client with some pre-existing coins, but with only one asset ID.
setup_single_message
setup_test_provider