{"id":13744484,"url":"https://github.com/eveem-org/panoramix","last_synced_at":"2025-05-09T03:32:01.820Z","repository":{"id":38206450,"uuid":"212972069","full_name":"eveem-org/panoramix","owner":"eveem-org","description":"Decompiler at the heart of Eveem.org","archived":false,"fork":false,"pushed_at":"2024-08-04T01:26:49.000Z","size":361,"stargazers_count":806,"open_issues_count":75,"forks_count":464,"subscribers_count":60,"default_branch":"master","last_synced_at":"2024-08-04T05:04:22.025Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.eveem.org/","language":"Python","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/eveem-org.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}},"created_at":"2019-10-05T09:08:56.000Z","updated_at":"2024-08-04T05:04:22.025Z","dependencies_parsed_at":"2023-02-09T16:00:28.189Z","dependency_job_id":"c3697171-9b06-4006-8789-e0f904a60e6f","html_url":"https://github.com/eveem-org/panoramix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eveem-org%2Fpanoramix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eveem-org%2Fpanoramix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eveem-org%2Fpanoramix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eveem-org%2Fpanoramix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eveem-org","download_url":"https://codeload.github.com/eveem-org/panoramix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224811013,"owners_count":17373901,"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":[],"created_at":"2024-08-03T05:01:10.378Z","updated_at":"2024-11-15T16:31:00.865Z","avatar_url":"https://github.com/eveem-org.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## Important\n\nPalkeo is maintaining a more up to date for of Panoramix. Be sure to check it out:\n\nhttps://github.com/palkeo/panoramix\n\n\n## Installation:\n\n```\ngit clone https://github.com/eveem-org/panoramix.git\npip3 install -r requirements.txt\n```\n\n## Running:\n\nYou *need* **python3.8** to run Panoramix. Yes, there was no way around it.\n\n```\npython3.8 panoramix.py address [func_name] [--verbose|--silent|--explain]\n```\n\ne.g.\n\n```\npython3.8 panoramix.py 0x06012c8cf97bead5deae237070f9587f8e7a266d\n```\nor\n```\npython3.8 panoramix.py kitties\n```\n\nOutput goes to two places:\n- `console`\n- ***`cache_pan/`*** directory - .pan, .json, .asm files\n\nIf you want to see how Panoramix works under the hood, try the `--explain` mode:\n\n```\npython3.8 panoramix.py kitties paused --explain\npython3.8 panoramix.py kitties pause --explain\npython3.8 panoramix.py kitties tokenMetadata --explain\n```\n\n### Optional parameters:\n\nfunc_name -- name of the function to decompile (note: storage names won't be discovered in this mode)\n--verbose -- prints out the assembly and stack as well as regular functions, a good way to try it out is\nby running 'python panoramix.py kitties pause --verbose' - it's a simple function\n\nThere are more parameters as well. You can find what they do in panoramix.py.\n\n### Address shortcuts\nSome contract addresses, which are good for testing, have shortcuts, e.g. you can run\n'python panoramix.py kitties' instead of 'python3 panoramix.py 0x06012c8cf97bead5deae237070f9587f8e7a266d'.\n\nSee panoramix.py for the list of shortcuts, feel free to add your own.\n\n## Directories \u0026 Files\n\n### Code:\n- core - modules for doing abstract/symbolic operations\n- pano - the proper decompiler\n- utils - various helper modules\n- tilde - the library for handling pattern matching in python3.8\n\n### Data:\n- cache_code - cached bytecodes\n- cache_pan - cached decompilation outputs\n- cache_pabi - cached auto-generated p-abi files\n- supplement.db - sqlite3 database of function definitions\n- supp2.db - a lightweight variant o the above\n\nCache directories are split into subdirectories, so the filesystem doesn't break down with large amounts\nof cached contracts (important when running bulk_decompile on all 2.2M contracts on the chain)\n\nAll of the above generated after the first run.\n\n## Utilities\nbulk_decompile.py - batch-decompiles contracts, with multi-processing support\nbulk_compare.py - decompiles a set of test contracts, fetches the current decompiled from Eveem, and prepares two files, so you can diff them and see what changes were made\n\n## Why **python3.8** and **Tilde**\nPanoramix uses a ton of pattern matching operations, and python doesn't support those as a language.\n\nThere are some pattern-matching libraries for older python versions, but none of them seemed good enough.\nBecause of that, I built Tilde, which is a language extension adding a new operator.\n\nTilde replaces '~' pattern matching operator with a series of ':=' operators underneath.\nBecause of that, python3.8 is a must.\n\nBelieve me, I spent a lot of time looking for some other way to make pattern matching readable.\nNothing was close to this good.\n\nBut if you manage to figure out a way to do it without Tilde (and maintain readability), I'll gladly accept a PR :)\n\n# How Panoramix works\n\nSee the source code comments, starting with panoramix.py. Also, those slides[tbd].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feveem-org%2Fpanoramix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feveem-org%2Fpanoramix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feveem-org%2Fpanoramix/lists"}