Skip to main content

Module common

Module common 

Source
Available on crate features testing and std only.

Re-exports§

pub use crate::keystore::FilesystemKeyStore;

Constants§

ACCOUNT_ID_REGULAR
MINT_AMOUNT
RECALL_HEIGHT_DELTA
Constant that represents the number of blocks until the p2id can be recalled. If this value is too low, some tests might fail due to expected recall failures not happening.
TRANSFER_AMOUNT

Functions§

assert_account_has_single_asset
Asserts that the account has a single asset with the expected amount.
assert_note_cannot_be_consumed_twice
Tries to consume the note and asserts that the expected error is returned.
consume_notes
Executes a transaction that consumes the provided notes and returns the transaction ID. This assumes the notes contain assets.
create_test_store_path
execute_failing_tx
Executes a transaction and asserts that it fails with the expected error.
execute_tx_and_consume_output_notes
Executes a transaction and consumes the resulting unauthenticated notes immediately without waiting for the first transaction to be committed.
execute_tx_and_sync
Executes a transaction and waits for it to be committed.
insert_account_with_custom_component
Creates and inserts an account with custom code as a component into the client.
insert_new_fungible_faucet
Inserts a new fungible faucet account into the client and into the keystore.
insert_new_wallet
Inserts a new wallet account into the client and into the keystore.
insert_new_wallet_with_seed
Inserts a new wallet account built with the provided seed into the client and into the keystore.
mint_and_consume
Mints assets for the target account and consumes them immediately without waiting for the first transaction to be committed.
mint_multiple_fungible_asset
Creates a transaction request that mints assets for each target_id account.
mint_note
Mints a note from faucet_account_id for basic_account_id and returns the executed transaction ID and the note with MINT_AMOUNT units of the corresponding fungible asset.
setup_two_wallets_and_faucet
Sets up a basic client and returns two basic accounts and a faucet account (in that order).
setup_wallet_and_faucet
Sets up a basic client and returns a basic account and a faucet account.
wait_for_blocks
Syncs until amount_of_blocks have been created onchain compared to client’s sync height
wait_for_blocks_no_sync
Idles until amount_of_blocks have been created onchain compared to client’s sync height without advancing the client’s sync height
wait_for_node
Waits for node to be running.
wait_for_tx
Syncs the client and waits for the transaction to be committed.

Type Aliases§

TestClient