|
|
|
@ -53,6 +53,8 @@ type operation struct { |
|
|
|
|
valid bool |
|
|
|
|
// reverts determined whether the operation reverts state
|
|
|
|
|
reverts bool |
|
|
|
|
// clearsReturndata determines whether the opertions clears the return data
|
|
|
|
|
clearsReturndata bool |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var ( |
|
|
|
@ -73,6 +75,19 @@ func NewMetropolisInstructionSet() [256]operation { |
|
|
|
|
memorySize: memoryStaticCall, |
|
|
|
|
valid: true, |
|
|
|
|
} |
|
|
|
|
instructionSet[RETURNDATASIZE] = operation{ |
|
|
|
|
execute: opReturnDataSize, |
|
|
|
|
gasCost: constGasFunc(GasQuickStep), |
|
|
|
|
validateStack: makeStackFunc(0, 1), |
|
|
|
|
valid: true, |
|
|
|
|
} |
|
|
|
|
instructionSet[RETURNDATACOPY] = operation{ |
|
|
|
|
execute: opReturnDataCopy, |
|
|
|
|
gasCost: gasReturnDataCopy, |
|
|
|
|
validateStack: makeStackFunc(3, 0), |
|
|
|
|
memorySize: memoryReturnDataCopy, |
|
|
|
|
valid: true, |
|
|
|
|
} |
|
|
|
|
return instructionSet |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -867,6 +882,7 @@ func NewFrontierInstructionSet() [256]operation { |
|
|
|
|
memorySize: memoryCreate, |
|
|
|
|
valid: true, |
|
|
|
|
writes: true, |
|
|
|
|
clearsReturndata: true, |
|
|
|
|
}, |
|
|
|
|
CALL: { |
|
|
|
|
execute: opCall, |
|
|
|
@ -874,6 +890,7 @@ func NewFrontierInstructionSet() [256]operation { |
|
|
|
|
validateStack: makeStackFunc(7, 1), |
|
|
|
|
memorySize: memoryCall, |
|
|
|
|
valid: true, |
|
|
|
|
clearsReturndata: true, |
|
|
|
|
}, |
|
|
|
|
CALLCODE: { |
|
|
|
|
execute: opCallCode, |
|
|
|
@ -881,6 +898,7 @@ func NewFrontierInstructionSet() [256]operation { |
|
|
|
|
validateStack: makeStackFunc(7, 1), |
|
|
|
|
memorySize: memoryCall, |
|
|
|
|
valid: true, |
|
|
|
|
clearsReturndata: true, |
|
|
|
|
}, |
|
|
|
|
RETURN: { |
|
|
|
|
execute: opReturn, |
|
|
|
|