From what I under stands when the condition in require() is not met solidity performs revert operation. Right?
What I want to know is how can we handle this in web3. That is if i have a function in my contract, say getbalance, and I am calling this function from web3, and that it checks whether the caller is the owner of that contract.
contract myContract{
.......
function getbalance() public constant returns(address){
require(msg.sender==owner);
.....
}
}
what I am asking is if the require() function false, i.e. caller of the function is not the owner, what should I do in my web3 to handle it?
status: 0x0
from Byzantium version you can catch that value in the return of the transaction