Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Use test token faucet #2957

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

test: Use test token faucet #2957

wants to merge 4 commits into from

Conversation

teogeb
Copy link
Contributor

@teogeb teogeb commented Dec 20, 2024

Removed KeyServer, using generateWalletWithGasAndTokens() instead of fetchPrivateKeyWithGas()

TODO:

  • add e.g. { tokens: boolean } to control whether to mint tokens
  • maybe also { gas: boolean } to control the gas transfer (if both booleans are false, this is just an alias to fastPrivateKey())
  • then remove fetchPrivateKeyWithGas()

Benchmark

Seems that this decreases test runtime. But run tests multiple times to ensure that. Current results:

  • total runtime: 2903s -> 2825s
  • slowest, i.e. node-e2e: 367s -> 346s

Other changes

Commit 8ee7a8a could be a separate PR

Moved generateWalletWithGasAndTokens() to test-utils. That commit could be a separate PR 5d68316

Note

setupOperatorContract() needs generateWalletWithGasAndTokens() because that method is in theory "production code" and generateWalletWithGasAndTokens() is test code. In practice setupOperatorContract() is test code -> we don't need this hack if we refactor setupOperatorContract() to be a test utility (i.e. not in operatorContractUtils)

Future improvements

Maybe retry() logic is not needed in generateWalletWithGasAndTokens()?

@github-actions github-actions bot added sdk test-utils Related to Test Utils Package node labels Dec 20, 2024
@teogeb teogeb force-pushed the use-test-token-faucet branch from 5d68316 to f4e0473 Compare December 20, 2024 21:16
@github-actions github-actions bot added the cli-tools Related to CLI Tools Package label Dec 20, 2024
@teogeb teogeb force-pushed the use-test-token-faucet branch from f651306 to 91c9092 Compare December 20, 2024 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli-tools Related to CLI Tools Package node sdk test-utils Related to Test Utils Package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant