-
-
Notifications
You must be signed in to change notification settings - Fork 132
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 detecting print
/console.log
#685
Comments
note there are currently two formats floating around: NomicFoundation/hardhat#2666 (comment) nomic folks seem open to the idea of switching to the generic version of console.log, but they might be a bit backlogged |
We're thinking that this will support live networks? My initial thought was that this would be leveraged via eth-tester or anvil or some kind of local testnet. Generally speaking, I'd never want console.log calls in a live contract. Though I suppose that would be fairly limiting on which nodes/backends you could use. So to fill out the spec, we're looking to basically just use the ape logger to output this calldata if it's seen on any transaction? |
Yes, although I have seen people accidentally deploy to a public network. But maybe turn it off by default in that scenario.
Yes, it should basically opt in if it is essentially "cheap/free" to get the data via trace for display from that provider. May be also a good idea to disable it by default in
And decode it, yes |
Don't know if there's any "official" docs anywhere (other than the brief API docs for Vyper's default Will figure out Hardhat's Solidity contract (and the Vyper compat) next. |
Hardhat proof of concept: https://gist.github.com/mikeshultz/7c2847c2d0b4f48940ba809e61513daf A much more rigid ABI. We could probably auto-generate the selectors/abi by just mixing and matching the base types but this was pretty straight forward to generate by just compiling the contact. And as @antazoey pointed out, we may have use for the ContractType for enriched traces. |
Overview
Hardhat supports the
console.log
feature, which works the same as theprint
feature that Vyper added in v0.3.3It would be great to support this keyword (perhaps as an INFO log?)
Specification
According to Vyper's docs: https://vyper.readthedocs.io/en/latest/built-in-functions.html#print
If a static call is detected to a specialized address, interpret that call as a printout statement. This requires transactions traces. It might be better off partially implemented in
evm-trace
Dependencies
#347
The text was updated successfully, but these errors were encountered: