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

Update Console.Log to show up in-line with hardhat node #205

Open
MexicanAce opened this issue Oct 27, 2023 · 0 comments
Open

Update Console.Log to show up in-line with hardhat node #205

MexicanAce opened this issue Oct 27, 2023 · 0 comments
Labels
feature ➕ Feature item medium 🚩 Indicates moderately difficult item p3 🔵 Indicates low priority item

Comments

@MexicanAce
Copy link
Collaborator

🌟 Feature Request

📝 Description

Currently, the smart contract console.log(...) statements only get printed to the console output/logs of the era_test_node binary when it's running. If you run yarn hardhat test --network hardhat, it will start the era_test_node run command in the background and you cannot see the console logs from the node in-line with your tests.

Hardhat Node repo: https://github.com/matter-labs/hardhat-zksync/tree/main/packages/hardhat-zksync-node

🤔 Rationale

It would be helpful to see the console.log lines from the Smart Contracts in-line with the console.log lines of the JavaScript tests of Hardhat

🖼️ Potential Solutions

  1. Add a new console output mode for yarn hardhat test that will ONLY print out console.log lines from Smart Contracts. Then update the hardhat-zksync-node package to enable this flag by default AND tee the console output of the process running in the background.
  2. Add a WSS endpoint where we push console.log lines. Update the hardhat-zksync-node to add a connection to the WebSocket endpoint and listen/print out any console.log lines that get emitted from era_test_node
@MexicanAce MexicanAce added p3 🔵 Indicates low priority item medium 🚩 Indicates moderately difficult item feature ➕ Feature item labels Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ➕ Feature item medium 🚩 Indicates moderately difficult item p3 🔵 Indicates low priority item
Projects
None yet
Development

No branches or pull requests

1 participant