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
Each opcode should include all information shown by evm codes. Specifically:
Opcode number
Opcode name
Description
Minimum gas
Gas computation
Stack input AND descriptions for each stack input item
Stack output AND description for each stack output item
Error cases
Notes
References (i.e. links to the data sources)
The data for each chain should live in src/chains/[chainName]/vm/opcodes.ts. Alternatively, if that file gets too big, the path can be src/chains/[chainName]/vm/opcodes/[group].ts, where group matches the Ethereum execution-specs file names here. In the case where it's split up across multiple files in an opcodes folder, include an index.ts file that exports the final opcodes list.
The component to render the diff of opcodes should live in src/components/diff/DiffOpcodes.tsx. Two opcodes should be considered equal if every item in the above bulleted list matches, i.e. JSON.stringify(a) === JSON.stringify(b). If there any any differences, they should not be considered equal
To keep PRs small and easy to review, let's split this up into two PRs:
First PR adds the data for each chain. I'd suggest adding a few mainnet opcodes then opening a draft PR so we can align on the type definitions and make sure things look directionally correct before adding all opcodes.
Second one adds the DiffOpcodes.tsx component.
Suggested type to define in src/chains/types.ts:
typeOpcodeParam={name: string;description: string;};exporttypeOpcode={number: number;name: string;minGas: number;description: string;input: OpcodeParam[];output: OpcodeParam[];// Gas computation can get complex, so I'm not sure of the best way to// represent this. If it's hard, this can be left out for now and we can// create a separate issue to track.gasComputation: TODO;errorCases: string[];notes: string[];references: string[];};// This type already exists and we're adding the `opcodes` field.exporttypeChain={metadata: Metadata;precompiles: (Precompile|Predeploy)[];opcodes: Opcode[];};
The text was updated successfully, but these errors were encountered:
This issue is eligible for a 300 OP bounty. Read CONTRIBUTING.md to learn how to qualify.
This is basically a version of https://www.evm.codes/ for each chain.
Each opcode should include all information shown by evm codes. Specifically:
The data for each chain should live in
src/chains/[chainName]/vm/opcodes.ts
. Alternatively, if that file gets too big, the path can besrc/chains/[chainName]/vm/opcodes/[group].ts
, wheregroup
matches the Ethereum execution-specs file names here. In the case where it's split up across multiple files in anopcodes
folder, include anindex.ts
file that exports the final opcodes list.The component to render the diff of opcodes should live in
src/components/diff/DiffOpcodes.tsx
. Two opcodes should be considered equal if every item in the above bulleted list matches, i.e.JSON.stringify(a) === JSON.stringify(b)
. If there any any differences, they should not be considered equalTo keep PRs small and easy to review, let's split this up into two PRs:
DiffOpcodes.tsx
component.Suggested type to define in
src/chains/types.ts
:The text was updated successfully, but these errors were encountered: