{"id":29107568,"url":"https://github.com/g4titanx/eot","last_synced_at":"2025-06-29T05:04:44.018Z","repository":{"id":301800792,"uuid":"1009114267","full_name":"g4titanx/eot","owner":"g4titanx","description":"A Rust implementation of the EVM Opcodes Table for all forks","archived":false,"fork":false,"pushed_at":"2025-06-26T15:44:23.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-28T23:14:01.360Z","etag":null,"topics":["bytecodes","ethereum","evm","opcodes"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/g4titanx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-26T15:44:22.000Z","updated_at":"2025-06-28T05:03:45.000Z","dependencies_parsed_at":"2025-06-28T23:14:03.063Z","dependency_job_id":"2a317a69-c220-4a68-bc94-1ef5576edf3a","html_url":"https://github.com/g4titanx/eot","commit_stats":null,"previous_names":["g4titanx/eot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/g4titanx/eot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4titanx%2Feot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4titanx%2Feot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4titanx%2Feot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4titanx%2Feot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/g4titanx","download_url":"https://codeload.github.com/g4titanx/eot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4titanx%2Feot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262530953,"owners_count":23325099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bytecodes","ethereum","evm","opcodes"],"created_at":"2025-06-29T05:04:32.201Z","updated_at":"2025-06-29T05:04:44.013Z","avatar_url":"https://github.com/g4titanx.png","language":null,"readme":"# EOT - EVM Opcode Table\n\nA Rust implementation of EVM opcodes for all Ethereum forks, with complete fork inheritance, validation, and metadata.\n\n[![Crates.io](https://img.shields.io/crates/v/eot.svg)](https://crates.io/crates/eot)\n[![Documentation](https://docs.rs/eot/badge.svg)](https://docs.rs/eot)\n[![Build Status](https://github.com/g4titanx/eot/workflows/CI/badge.svg)](https://github.com/g4titanx/eot/actions)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Quick start\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\neot = \"0.1\"\n```\n\nBasic usage:\n\n```rust\nuse eot::{Cancun, OpCode, Fork};\n\n// Use the latest fork (Cancun)\nlet tload = Cancun::TLOAD;\nprintln!(\"Gas cost: {}\", tload.gas_cost());           // 100\nprintln!(\"Introduced in: {:?}\", tload.introduced_in()); // Fork::Cancun\nprintln!(\"EIP: {:?}\", tload.eip());                    // Some(1153)\n\n// Check if an opcode exists in a fork\nif Cancun::has_opcode(0x5c) {\n    println!(\"TLOAD exists in Cancun!\");\n}\n\n// Get all opcodes for a fork\nlet all_opcodes = Cancun::all_opcodes();\nprintln!(\"Cancun has {} opcodes\", all_opcodes.len());\n\n// Convert between opcode and byte value\nlet byte_val: u8 = tload.into();        // 0x5c\nlet back_to_opcode = Cancun::from(byte_val);\nassert_eq!(tload, back_to_opcode);\n```\n\n## Architecture\n\n### Smart Fork System\n\nInstead of manually copying opcodes between forks, we use automatic inheritance:\n\n```\nFrontier (Base) → Homestead → Byzantium → Constantinople → Istanbul → Berlin → London → Shanghai → Cancun\n```\n\nEach fork automatically includes all opcodes from previous forks plus its own additions.\n\n### Rich Metadata\n\nEvery opcode includes complete information:\n\n```rust\nuse eot::{Cancun, OpCode};\n\nlet tload = Cancun::TLOAD;\nlet metadata = tload.metadata();\n\nassert_eq!(metadata.opcode, 0x5c);\nassert_eq!(metadata.name, \"TLOAD\");\nassert_eq!(metadata.gas_cost, 100);\nassert_eq!(metadata.stack_inputs, 1);\nassert_eq!(metadata.stack_outputs, 1);\nassert_eq!(metadata.introduced_in, Fork::Cancun);\nassert_eq!(metadata.group, Group::StackMemoryStorageFlow);\nassert_eq!(metadata.eip, Some(1153));\n```\n\n### Other Features\n\n```rust\nuse eot::{Cancun, traits::OpcodeExt};\n\n// State modification analysis\nlet sstore = Cancun::SSTORE;\nprintln!(\"Modifies state: {}\", sstore.modifies_state()); // true\nprintln!(\"Can revert: {}\", sstore.can_revert());         // false\n\n// Push opcode analysis\nlet push1 = Cancun::PUSH1;\nprintln!(\"Is push opcode: {}\", push1.is_push());         // true\nprintln!(\"Push size: {:?}\", push1.push_size());          // Some(1)\n\n// Stack depth requirements\nlet dup5 = Cancun::DUP5;\nprintln!(\"Min stack depth: {}\", dup5.min_stack_depth()); // 5\n\n// Opcode groups\nlet add = Cancun::ADD;\nprintln!(\"Group: {:?}\", add.group()); // Group::StopArithmetic\n```\n\n## Supported Forks\n\n| Fork | Block | Date | New Opcodes | Status |\n|------|-------|------|-------------|---------|\n| Frontier | 0 | Jul 2015 | Base set (140+ opcodes) | ✅ |\n| Homestead | 1,150,000 | Mar 2016 | `DELEGATECALL` | ✅ |\n| Byzantium | 4,370,000 | Oct 2017 | `REVERT`, `RETURNDATASIZE`, `RETURNDATACOPY`, `STATICCALL` | ✅ |\n| Constantinople | 7,280,000 | Feb 2019 | `SHL`, `SHR`, `SAR`, `CREATE2`, `EXTCODEHASH` | ✅ |\n| Istanbul | 9,069,000 | Dec 2019 | `CHAINID`, `SELFBALANCE` | ✅ |\n| Berlin | 12,244,000 | Apr 2021 | Gas cost changes | ✅ |\n| London | 12,965,000 | Aug 2021 | `BASEFEE` | ✅ |\n| Shanghai | 17,034,870 | Apr 2023 | `PUSH0` | ✅ |\n| Cancun | 19,426,587 | Mar 2024 | `TLOAD`, `TSTORE`, `MCOPY`, `BLOBHASH`, `BLOBBASEFEE` | ✅ |\n\n## Building the Project\n\n### Prerequisites\n- Rust 1.70+ (for proper trait support)\n- Python 3.8+ (for code generation, optional)\n\n### Building\n\n```bash\ngit clone https://github.com/g4titanx/eot\ncd eot\ncargo bb \u0026\u0026 cargo tt\n```\n\n### Regenerating Fork Files (Optional)\n\nIf you need to modify opcode data:\n\n```bash\n# Run the Python generator\npython3 generate_forks.py\n\n# Then rebuild\ncargo build\n```\n\n## Contributing\n\n1. **Adding a new fork**: \n   - Update the CSV data in the generator script\n   - Add the fork to the `Fork` enum in `lib.rs`\n   - Regenerate files with `python3 generate_forks.py`\n\n2. **Fixing opcode data**: \n   - Update the relevant data in `generate_forks.py`\n   - Regenerate and test\n\n3. **Adding features**: \n   - Extend the trait system in `traits.rs`\n   - Add comprehensive tests\n\n### Example: Adding a New Fork\n\n```python\n# In generate_forks.py, add to get_historical_additions():\n'prague': \"\"\"0x61,NEWOP,5,1,1,New operation,StackMemoryStorageFlow,Prague,9999\"\"\"\n```\n\nThen:\n```bash\npython3 generate_forks.py\ncargo test\n```\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- clearloop for [evm-opcodes](https://crates.io/crates/evm-opcodes)\n- Ethereum Foundation for EVM specification\n- EIP authors for comprehensive opcode documentation\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg4titanx%2Feot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg4titanx%2Feot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg4titanx%2Feot/lists"}