brownie icon indicating copy to clipboard operation
brownie copied to clipboard

0xm4ud add console support hardhat/ganache

Open 0xm4ud opened this issue 1 year ago • 0 comments

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

0xm4ud avatar Apr 13 '23 23:04 0xm4ud