edr icon indicating copy to clipboard operation
edr copied to clipboard

Bitwise string logging of words from console.sol (%b ?)

Open CryptoKiddies opened this issue 1 year ago • 2 comments

Describe the feature

I have this utility created to see the bitwise values in a word for testing and debugging contract logic, particularly when using bit masks. Wondering if you'd be interested in adding support directly in console.sol with this util? I'm suggesting a feature indicated with a %b flag perhaps.

This is great for low level developers (who are still commonplace for now) in the solidity ecosystem. Any bitwise operations or state packing optimization testing would benefit from being able to see the word printed out as 1s and 0s., like Here's my result 11101001.... Wonder if I can contribute, but definitely agree this is pre-processed as discussed here with discussed here with @fvictorio.

code: https://github.com/YOLOrekt/community-bug-bounty/blob/bounty-head/contracts/utils/LogBinary.sol

Search terms

console.sol console log debugging

CryptoKiddies avatar Dec 29 '23 00:12 CryptoKiddies