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

0xm4ud add console support hardhat/ganache #1682

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

0xm4ud
Copy link

@0xm4ud 0xm4ud commented Apr 13, 2023

What I did

Add support to get console.log while on DEV/mainnet-fork,hardhat-fork (mainly for ganache/hardhat)
Related issue: #480

How I did it

Created a class to filter through the hardhat/ganache stdout and redirect console.log only to terminal

How to verify it

USAGE: # accepts 2 args or none(defaults to value) args: 1-nlines, 2-duration

from brownie.utils import console

console.log()

Checklist

  • [x ] I have confirmed that my PR passes all linting checks
  • [x ] I have included test cases
  • [x ] I have updated the documentation
  • [v ] I have added an entry to the changelog

preview

Screenshot 2023-04-13 at 18 06 18

Add console.log 'getter' feature, to be imported during tests/runs/console interactions.
supports: DEV/Mainnet-fork/hardhat-fork for (hardhat/ganache)
eg.:
from brownie.utils import console
console.log()
Added initial support for console.log
@0xm4ud 0xm4ud changed the title add console support hardhat/ganache 0xm4ud add console support hardhat/ganache Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant