From 40d977e047bc15bf9ea89533f8dc415495ce40c1 Mon Sep 17 00:00:00 2001 From: ethosdev <79124435+ethosdev@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:35:32 -0700 Subject: [PATCH] Supplant DIFFICULTY opcode with PREVRANDAO Reference: https://eips.ethereum.org/EIPS/eip-4399 Since the Merge, opcode 0x44 returns the output of the randomness beacon provided by the beacon chain --- packages/evm/src/opcodes/codes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/evm/src/opcodes/codes.ts b/packages/evm/src/opcodes/codes.ts index ec1c318f83..00f64ebc4d 100644 --- a/packages/evm/src/opcodes/codes.ts +++ b/packages/evm/src/opcodes/codes.ts @@ -101,7 +101,7 @@ const opcodes: OpcodeEntry = { 0x41: { name: 'COINBASE', isAsync: true, dynamicGas: false }, 0x42: { name: 'TIMESTAMP', isAsync: true, dynamicGas: false }, 0x43: { name: 'NUMBER', isAsync: true, dynamicGas: false }, - 0x44: { name: 'DIFFICULTY', isAsync: true, dynamicGas: false }, + 0x44: { name: 'PREVRANDAO', isAsync: true, dynamicGas: false }, 0x45: { name: 'GASLIMIT', isAsync: true, dynamicGas: false }, // 0x50 range - 'storage' and execution