I have code which transfer the ether to another address. And below that, I have require() condition will be failing. so will that execute the ether transfer or it will not transfer?
function ethTransfer(){
someAddress.transfer(amount);
require((1==5), 'error'); // ever reverting!!!
}
Any idea will be helpful. Thanks
1=5
is an assignment, not a boolean expression. Also,address
is a key word, soaddress.transfer
doesn't look like something which can compile. Please post a working example. Side note: instead of asking the question, you could simply run your code and check the balance of the account.