Commit ab7f4c72 authored by ben-chain's avatar ben-chain Committed by GitHub

fix logic for happy case (#315)

parent c0ba7548
......@@ -1837,9 +1837,23 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
_initContext(_transaction);
messageRecord.nuisanceGasLeft = uint(-1);
messageContext.ovmADDRESS = _transaction.entrypoint;
messageContext.ovmCALLER = _from;
return _transaction.entrypoint.call{gas: _transaction.gasLimit}(_transaction.data);
messageContext.ovmADDRESS = _from;
bool isCreate = _transaction.entrypoint == address(0);
if (isCreate) {
address created = ovmCREATE(_transaction.data);
if (created == address(0)) {
return (false, hex"");
} else {
return (true, Lib_EthUtils.getCode(created));
}
} else {
return ovmCALL(
_transaction.gasLimit,
_transaction.entrypoint,
_transaction.data
);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment