BlogDocs

chore(tests): update tests to use sendAndConfirmTransaction method(#3548)

Merged
Merging
chore/tests/update-zero-address-and-transaction-methods
(
80b9cd9
) into
main
(
cddd0ca
)
+14%
IMPROVEMENTS
1
REGRESSIONS
0
UNTOUCHED
8
NEW
0
DROPPED
0
IGNORED
0

Benchmarks

Improved

keccakId
packages/thirdweb/src/utils/any-evm/keccak-id.bench.ts::keccakId
+14%
1.5 ms
1.3 ms

Passed

units:toTokens(12345678901234567890n, 18)
packages/thirdweb/src/utils/units.bench.ts::units:toTokens(12345678901234567890n, 18)
+1%
25.2 µs
25.1 µs
units:toUnits("40.0", 18)
packages/thirdweb/src/utils/units.bench.ts::units:toUnits("40.0", 18)
0%
34.3 µs
34.1 µs
encode tx (json abi)
packages/thirdweb/src/transaction/actions/encode.bench.ts::encode tx (json abi)
0%
191.9 µs
191.5 µs
encode tx (prepared method)
packages/thirdweb/src/transaction/actions/encode.bench.ts::encode tx (prepared method)
0%
346.1 µs
345.6 µs
units:toTokens(40000000000000000000n, 18)
packages/thirdweb/src/utils/units.bench.ts::units:toTokens(40000000000000000000n, 18)
0%
184.4 µs
184.7 µs
encode tx (human readable)
packages/thirdweb/src/transaction/actions/encode.bench.ts::encode tx (human readable)
0%
401 µs
402 µs
units:toUnits("40", 18)
packages/thirdweb/src/utils/units.bench.ts::units:toUnits("40", 18)
0%
33.6 µs
33.7 µs
encode tx (contract abi)
packages/thirdweb/src/transaction/actions/encode.bench.ts::encode tx (contract abi)
-1%
403.3 µs
408.6 µs

Commits

Click on a commit to change the comparison range
base
main
cddd0ca
+14%
chore(tests): update tests to use sendAndConfirmTransaction method (#3548) This pull request updates the function names and constants used in the deploy-modular-core.test.ts file. Specific changes include: - Replacing `ADDRESS_ZERO` with `ZERO_ADDRESS` to align with existing codebase conventions. - Changing `sendTransaction` to `sendAndConfirmTransaction` to include transaction confirmation within the test cases. ### TL;DR Updated function names and constants in the deploy-modular-core.test.ts for better alignment with the codebase. ### What changed? - Replaced `ADDRESS_ZERO` with `ZERO_ADDRESS`. - Replaced `sendTransaction` with `sendAndConfirmTransaction`. ### How to test? Run the updated tests in deploy-modular-core.test.ts to ensure all changes work as expected. ### Why make this change? These changes improve the code readability and follow naming conventions already established in the codebase. By including transaction confirmation, the tests are more robust and reliable. ---
80b9cd9
3 months ago
by gregfromstl
ResourcesHomePricingDocsBlogGitHubChangelog