7
fallback() external { console.log(msg.data); (bool result, ) = address(delegate).delegatecall(msg.data); if (result) { console.log("SUCESS"); this; } } 

returns

TypeError: Member "log" not found or not visible after argument-dependent lookup in type(library console). console.log(msg.data); ^---------^ 

is there a restriction on what kind of data that can be console.logged? what does argument-dependent lookup even mean?

1 Answer 1

13

the hardhat console library has other functions for different data types. msg.data is calldata so it will be bytes. try console.logBytes(msg.data);

here is the code for console.sol: https://github.com/nomiclabs/hardhat/blob/master/packages/hardhat-core/console.sol

Sign up to request clarification or add additional context in comments.

Comments