core, crypto, params: implement CREATE2 evm instrction (#17196)

* core, crypto, params: implement CREATE2 evm instrction

* core/vm: add opcode to string mapping

* core: remove past fork checking

* core, crypto: use option2 to generate new address
This commit is contained in:
gary rong
2018-07-24 22:22:03 +08:00
committed by Péter Szilágyi
parent 2909f6d7a2
commit cab1cff11c
8 changed files with 94 additions and 17 deletions

View File

@ -80,6 +80,15 @@ func newConstantinopleInstructionSet() [256]operation {
validateStack: makeStackFunc(2, 1),
valid: true,
}
instructionSet[CREATE2] = operation{
execute: opCreate2,
gasCost: gasCreate2,
validateStack: makeStackFunc(4, 1),
memorySize: memoryCreate2,
valid: true,
writes: true,
returns: true,
}
return instructionSet
}