I have code that's used both in my program and off-chain. In the code, I use msg!
. If that msg!
line is run off-chain, I get this error:
Invoke context not set!
What do I need to do to make msg!
print to stdout instead of throwing this error?
I want to re-use my code. Duplicating it and modifying the new copy is unacceptable.