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

Support hardhat/console logging during deployment and m.call txns #787

Open
mdcoon opened this issue Jun 26, 2024 · 1 comment
Open

Support hardhat/console logging during deployment and m.call txns #787

mdcoon opened this issue Jun 26, 2024 · 1 comment

Comments

@mdcoon
Copy link

mdcoon commented Jun 26, 2024

Describe the feature

First, you guys are doing a fantastic job with ignition. It's far superior to deploy scripts of the past. So thank you for that!

It would be very useful in debugging deployment issues if I can view hardhat's solidity console.log output. An example is trying to do an m.call to set a proxy implementation and not being able to debug why it fails. For example, I can disable parts of the code to make the deployment succeed but I can not see any of the logs I put in place to debug the values of certain fields during m.call. Having console.logging would help a lot in this situation. Thanks!

Search terms

console hardhat logging

@fvictorio
Copy link
Member

fvictorio commented Jul 19, 2024

Can confirm, although I don't know what would be the best way to handle this in Ignition's UI. Perhaps a list of "console.log"s at the end of a batch, similar to what the Hardhat node output does at the end of a block.

@mdcoon a sort of workaround is to run the deployment from a script instead of using the ignition deploy task. So for example, instead of doing:

npx hardhat ignition deploy ignition/modules/DeployAll.module.ts

you can write and run a script like this:

import { ignition } from "hardhat"
import DeployAllModule from "../ignition/modules/DeployAll.module.ts"

async function main() {
  await ignition.deploy(DeployAllModule)
}

main()
  .catch((error) => {
    console.error(error);
    process.exit(1);
  });

and you'll get the console.log outputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants