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

Task to check if localnet is still running for CI #51

Merged
merged 1 commit into from
Oct 24, 2024
Merged

Conversation

fadeev
Copy link
Member

@fadeev fadeev commented Oct 21, 2024

A task to check if localnet is still running. Useful for CI for testing example contracts:

#!/bin/bash

set -e

npx hardhat localnet --exit-on-error &

sleep 5

yarn deploy

npx hardhat echo-call \
  --contract 0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690 \
  --receiver 0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E \
  --network localhost \
  --types '["string"]' alice

npx hardhat localnet-check

npx hardhat echo-call \
  --contract 0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690 \
  --receiver 0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E \
  --network localhost \
  --types '["uint256"]' 42

npx hardhat localnet-check

By default runs with a delay of 3 seconds to let a call finish.

@fadeev fadeev changed the title localnet-check task Task to check if localnet is still running for CI Oct 21, 2024
@fadeev fadeev merged commit aa4a53a into main Oct 24, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants