Is there any way to console log bytes memory type in solidity?

Sep 5, 2022, 12:29 AM
guys what is wrong, i am trying to store this value at slot 0, but keep getting 0x
Sep 5, 2022, 1:17 AM
function bytes32ToBytes(bytes32 b_) private pure returns (bytes memory){
return abi.encodePacked(b_);
}

console.logBytes(bytes32ToBytes(b)
import "hardhat/console.sol";
You can delete the function and use .logBytes(bytes memory)
Sep 5, 2022, 5:21 AM
Oh thanks
Sep 5, 2022, 5:21 AM

© 2024 Draquery.com All rights reserved.