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

console.log support #3201

Open
miohtama opened this issue Jan 24, 2024 · 0 comments
Open

console.log support #3201

miohtama opened this issue Jan 24, 2024 · 0 comments

Comments

@miohtama
Copy link
Contributor

What was wrong?

Currently some EVM backends, namely Foundry and Hardhat offer console.log integration.

  • console.log is what the name says, written in Solidity - it outputs specific emits that can be interpreted as a debug log
  • as a special rule, console.log events regardless if the transaction reverts or not
  • AFAIK console.log on Hardhat and Foundry are compatible, not sure if Ape/Vyper have equivalents

Currently web3.py does not support console.log, but this is extremely useful feature for developers who work with smart contract development.

How can it be fixed?

  • Figure out how console.log does it magic trick of emitting events despite the transaction fails
  • Add a web3.py module to deal with console emitted output
  • Add a middleware that can transform console.log output to Python logging
  • Write a docs mini tutorial explaining how the feature is supposed to used by developers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants