Skip to main content

Module test_util

Module test_util 

Source
Available on crate features test-utils only.
Expand description

Test utilities for precompile dispatch testing

Structsยง

TIP20Setup
Helper for TIP20 token setup in tests.

Enumsยง

Action ๐Ÿ”’
Setup mode - determines how the token is obtained.

Functionsยง

assert_full_coverage
Asserts that multiple selector coverage checks all pass (no unsupported selectors).
check_selector_coverage
Checks that all selectors in an interface have dispatch handlers.
gen_word_from
Test helper function for constructing EVM words from hex string literals.
get_tip20_admin ๐Ÿ”’
Looks up the admin of a TIP-20 token by scanning TokenCreated events from the factory.
is_initialized ๐Ÿ”’
Checks if a contract at the given address has bytecode deployed.
setup_storage
Creates a test HashMapStorageProvider (chain ID 1) paired with a random address.