Hi,
I want to consider a scenario, lets suppose that a contract performs a transfer using send. At this point out of gas occurs and send returns -1. Now the contract has no gas, and send does not revert, what would happen to the EVM, will it block because of no gas? How will EVM come out of this blocking situation?
contract TestOutofGas{
:
:
function transaction(address otherContract, uint x) public returns () {
:
retVal = otherContract.send(1000);//out of gas
bool success = findPrime(x)
:
:
}//func ends
}//contract ends
Now suppose that the other case,
contract TestOutofGas{
uint trnNo=0;
:
function transaction(address otherContract) public returns (uint) {
:
retVal = otherContract.send(1000);//out of gas
require(retVal);
trnNo++;
:
:
:
}//function ends
}//contract ends
Will the contract be able to execute the require(…) instruction if does not have any gas?
Zulfi.