You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected result: the "44" opcode is recognized as "PREVRANDAO" in the "Mnemonic" setting, and the value "PREVRANDAO" is converted to "44" when switched back to bytecode.
Actual result: the "44" opcode is recognized as "DIFFICULTY" in the "Mnemonic" setting, and the value "DIFFICULTY" is converted to "undefined" when switched back to bytecode.
I see there was the prior issue #172 and PR #180 to address this, additionally in ethereumContext.tsx there's already this logic in extractDocFromOpcode to account for this change:
// TODO: need to implement proper selection of doc according to selected fork (maybe similar to dynamic gas fee)// Hack for "difficulty" -> "prevrandao" replacement for "merge" HFif(selectedFork?.name===mergeHardforkName&&toHex(op.code)=='44'){return{
...meta[prevrandaoDocName],
...{opcodeOrAddress: toHex(op.code),staticFee: op.fee,minimumFee: 0,name: 'PREVRANDAO',},}}
So I think this issue was a small oversight in the larger PR. I believe the specific issue I described can be fixed by adding a check in the loadInstructions function in ethereumContext.tsx, similar to the check in extractDocFromOpcode.
The text was updated successfully, but these errors were encountered:
Steps to reproduce the issue:
Expected result: the "44" opcode is recognized as "PREVRANDAO" in the "Mnemonic" setting, and the value "PREVRANDAO" is converted to "44" when switched back to bytecode.
Actual result: the "44" opcode is recognized as "DIFFICULTY" in the "Mnemonic" setting, and the value "DIFFICULTY" is converted to "undefined" when switched back to bytecode.
I see there was the prior issue #172 and PR #180 to address this, additionally in
ethereumContext.tsx
there's already this logic inextractDocFromOpcode
to account for this change:So I think this issue was a small oversight in the larger PR. I believe the specific issue I described can be fixed by adding a check in the
loadInstructions
function inethereumContext.tsx
, similar to the check inextractDocFromOpcode
.The text was updated successfully, but these errors were encountered: