Skip to content

0xm4ud add console support hardhat/ganache#1682

Open
0xm4ud wants to merge 6 commits intoeth-brownie:masterfrom
0xm4ud:0xm4ud-add-console-support
Open

0xm4ud add console support hardhat/ganache#1682
0xm4ud wants to merge 6 commits intoeth-brownie:masterfrom
0xm4ud:0xm4ud-add-console-support

Conversation

@0xm4ud
Copy link
Copy Markdown

@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

0xm4ud added 4 commits April 13, 2023 16:56
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.

1 participant