Closed human-77 closed 5 months ago
Hey, @human-77. This is expected.
Everything passed into buildModule
is run before execution. The module is constructed, which is when the console.log(output)
is run. The constructed module is then used for running the execution.
This separation of the describing of the deployment from its execution allows us to support features like restarting a deployment that was only partially completed.
But then, How can I get to print the output of the function?
Do I need to import the script from other script, export the result and then print the result? I have tried to that, but got the same result
What I'm trying to do is the same as the scripts that were executed with "hardhat runner", but with ignition, or is that a mistake?
But then, How can I get to print the output of the function?
Do I need to import the script from other script, export the result and then print the result? I have tried to that, but got the same result
What I'm trying to do is the same as the scripts that were executed with "hardhat runner", but with ignition, or is that a mistake?
You can use scripts
as before. Ignition is giving you a declarative deployment which means it is less procedural but allows us to understand the complete deployment before running it (so we can do static analysis and validation, visualize it, restart it from a midpoint due to a previous failed run).
But you can combine both approaches as well. Deploy an Ignition module from within a script:
What happened?
Everytime that I try to get the answer from the
getMessage
function with ignition I get the following result rather than the answer:Minimal reproduction steps
This is the contract:
I deployed it using this ignition script:
With this command:
I started the local node with the normal command:
I tried to print the message with this script:
I executed it with:
None of them worked
Search terms
staticCall, Module being constructed