|
|
@ -16,6 +16,7 @@ package org.hyperledger.besu.evm.operation; |
|
|
|
|
|
|
|
|
|
|
|
import static org.hyperledger.besu.evm.internal.Words.clampedToInt; |
|
|
|
import static org.hyperledger.besu.evm.internal.Words.clampedToInt; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.hyperledger.besu.evm.Code; |
|
|
|
import org.hyperledger.besu.evm.EVM; |
|
|
|
import org.hyperledger.besu.evm.EVM; |
|
|
|
import org.hyperledger.besu.evm.frame.MessageFrame; |
|
|
|
import org.hyperledger.besu.evm.frame.MessageFrame; |
|
|
|
import org.hyperledger.besu.evm.gascalculator.GasCalculator; |
|
|
|
import org.hyperledger.besu.evm.gascalculator.GasCalculator; |
|
|
@ -37,6 +38,11 @@ public class ReturnDataLoadOperation extends AbstractOperation { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public OperationResult execute(final MessageFrame frame, final EVM evm) { |
|
|
|
public OperationResult execute(final MessageFrame frame, final EVM evm) { |
|
|
|
|
|
|
|
Code code = frame.getCode(); |
|
|
|
|
|
|
|
if (code.getEofVersion() == 0) { |
|
|
|
|
|
|
|
return InvalidOperation.INVALID_RESULT; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
final int offset = clampedToInt(frame.popStackItem()); |
|
|
|
final int offset = clampedToInt(frame.popStackItem()); |
|
|
|
Bytes returnData = frame.getReturnData(); |
|
|
|
Bytes returnData = frame.getReturnData(); |
|
|
|
int retunDataSize = returnData.size(); |
|
|
|
int retunDataSize = returnData.size(); |
|
|
|