I have a Logic contract(caller), which calls a another contract named StorageContract (calle). I’m call a function of Storage contract through the LogicContract and I have put a require inside that function, which doesnt satistfy. But im unable to get thet require message in my Logic Contract
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import "hardhat/console.sol";
error InsufficientBalance(string data);
contract Storagecontract{
address public owner;
function set(string memory _name)public view {
console.log(owner,msg.sender);
revert InsufficientBalance({data: "Nothing"});
}
}
contract Logiccontract{
string public stat;
function changename(address add, string memory name)public {
(bool send, bytes memory data)=add.call(abi.encodeWithSignature("set(string)", name));
console.log("status",send);
}
}