Skip to content

Commit

Permalink
feat: optimism now supports push0
Browse files Browse the repository at this point in the history
  • Loading branch information
mds1 committed Jan 11, 2024
1 parent f02c9a9 commit 9af73ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
6 changes: 4 additions & 2 deletions src/chains/arbitrum/vm/opcodes/stack/push0.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { push0 as baseOpcode } from '@/chains/optimism/vm/opcodes/stack/push0';
import { push0 as baseOpcode } from '@/chains/mainnet/vm/opcodes/stack/push';
import { Opcode } from '@/types';

const { references: _references, ...opcode } = baseOpcode;
const { supportedHardforks: _supportedHardforks, ...opcode } = baseOpcode;
export const push0: Omit<Opcode, 'supportedHardforks'> = {
...opcode,
description:
'The opcode is not supported yet, but will be added in a future hardfork. This means you cannot yet use Solidity 0.8.20 or later with an `evm_version` of Shanghai.',
references: [
'[Arbitrum Differences from Solidity on Ethereum](https://developer.arbitrum.io/solidity-support)',
],
Expand Down
11 changes: 3 additions & 8 deletions src/chains/optimism/vm/opcodes/stack/push0.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { push0 as baseOpcode } from '@/chains/mainnet/vm/opcodes/stack/push';
import { Opcode } from '@/types';

const { supportedHardforks: _supportedHardforks, ...opcode } = baseOpcode;
export const push0: Omit<Opcode, 'supportedHardforks'> = {
...opcode,
description:
'The opcode is not supported yet, but will be added in a future hardfork. This means you cannot yet use Solidity 0.8.20 or later with an `evm_version` of Shanghai.',
references: [
'[Differences between Ethereum and OP Mainnet: Opcode Differences](https://community.optimism.io/docs/developers/build/differences/#opcode-differences)',
],
export const push0: Opcode = {
...baseOpcode,
supportedHardforks: ['Canyon'],
};

1 comment on commit 9af73ed

@vercel
Copy link

@vercel vercel bot commented on 9af73ed Jan 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.