Open gitpusha opened 3 years ago
This is a good idea. How do you imagine this would look? How/When would this info be shown?
I believe what you want is the entire execution trace of a contract, like what Tenderly and Brownie show.
This is a good idea. How do you imagine this would look? How/When would this info be shown?
I believe what you want is the entire execution trace of a contract, like what Tenderly and Brownie show.
Is there anything similar like remix's trace debug function in hardhat?
Sorry for the late reply @alcuadrado - I still slack with my github notifications:
This is a good idea. How do you imagine this would look? How/When would this info be shown?
I think any caught reverts could be logged to the console as the tests run with a stack trace, without exiting the process of course.
I believe what you want is the entire execution trace of a contract, like what Tenderly and Brownie show.
Yeah, that would be great. I used Tenderly before and liked it. I didnt try Brownie yet.
Any update on this? Just ran into one such instance, using tenderly.dev as a quick fix for now. Would be great to have functionality similar to truffle debug.
Hi
Joining the request here I also think being able to log the stack trace is a good idea Especially when integrating smart contracts with other projects when you don't have a full understanding of the other project codebase
and smart contract composability is really important so it's a great feature to a dev environment
I imagine it looking something like this
console.trace()
or similar to the JS API MDN
Thanks
great idea, I don't know why isn't this implemented
Hi,
Heads up: I am not sure if hardhat already generates stack traces for caught reverts because I virtually never saw hardhat stack traces yet due to #1077
It would be great if
hardhat
would also generate stack traces for any evmreverts
orerrors
that happen during a transaction, even if they are caught in a soliditytry catch
or similar statement. Maybe in a--verbose
mode where such information is logged.Many protocols need to catch reverts for their safety, but when testing this makes debugging caught reverts much harder as the transaction returns without error, even though you might wanna see some reason.
We usually bubble up revert messages and emit them in events to aid our debugging. This is quite helpful already.
But it would be nice to also have stack traces for such caught reverts.
Unfortunately I do not know the hardhat network evm implementation code (shamefully) and I am not sure how this would be implemented. It seems like it might be quite complex. I am not sure how a
revert
that iscaught
in solidity looks on evm-level.