{"id":34199919,"url":"https://github.com/bbayazit16/mnemo","last_synced_at":"2026-04-27T05:32:42.533Z","repository":{"id":244708609,"uuid":"479822967","full_name":"bbayazit16/mnemo","owner":"bbayazit16","description":"A command line tool for compiling and running EVM opcodes.","archived":false,"fork":false,"pushed_at":"2022-04-09T22:11:47.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-18T20:16:17.700Z","etag":null,"topics":["cli","command-line-tool","ethereum","evm-bytecode","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbayazit16.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-04-09T19:21:34.000Z","updated_at":"2024-06-16T20:17:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"a52c214d-e443-422c-8672-76ca06cbcafc","html_url":"https://github.com/bbayazit16/mnemo","commit_stats":null,"previous_names":["bbayazit16/mnemo"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bbayazit16/mnemo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbayazit16%2Fmnemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbayazit16%2Fmnemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbayazit16%2Fmnemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbayazit16%2Fmnemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbayazit16","download_url":"https://codeload.github.com/bbayazit16/mnemo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbayazit16%2Fmnemo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32324544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cli","command-line-tool","ethereum","evm-bytecode","golang"],"created_at":"2025-12-15T18:05:24.897Z","updated_at":"2026-04-27T05:32:42.526Z","avatar_url":"https://github.com/bbayazit16.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mnemo\n\n[![Build and Test](https://github.com/bbayazit16/mnemo/actions/workflows/go.yml/badge.svg)](https://github.com/bbayazit16/mnemo/actions/workflows/go.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/bbayazit16/mnemo)](https://goreportcard.com/report/github.com/bbayazit16/mnemo)\n\nMnemo is a command line tool for:\n- Compiling opcode mnemonics into bytecode\n- Testing them against Ethereum Mainnet fork using Ganache\n- Deploying them\n\nwritten in Go.\n\n# Usage\n\nMnemo comes with three modes: compile, deploy and quick.\n\nCompile compiles opcode mnemonic in file to bytecode. Preferred extension of the file is .evm, though you can use any extension you want..\n\nDeploy deploys any bytecode to the chain using given rpc url and private key.\n\nQuick mode compiles opcode mnemonic in file, forks Ethereum Mainnet using Ganache in the background, then deploys and calls the contract and prints the returned value. Fork RPC URL, values and calldata can be specified using flags (See ~$ mnemo help). Requires Ganache to be installed (npm i -g ganache).\n\n# Examples\n\nhello.evm:\n```solidity\n// Opcode Mnemonic that retrieves\n// USDC total supply.\n\n\n// Supports comments\n// in both # and //\n// But # is discouraged\n\nPUSH32 0x18160ddd00000000000000000000000000000000000000000000000000000000\nRETURNDATASIZE\n\n// Opcodes or any value can be directly\n// written in bytecode if surrounded with\n// \"\" or ''\n\n// So this is equivalent to MSTORE\n\n\"52\"\n\nMSIZE // return size (32 bytes)\nRETURNDATASIZE // return offset\nPUSH1 4 // args size\nRETURNDATASIZE // args offset\nPUSH20 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 // USDC\n\n// Automatically converts int to hex\n// All hex must be prefixed with 0x\nPUSH2 12000 // gas for staticcall\n\n// Capitalization doesn't matter\n// but it is discouraged...\nstaticcall\n\nPOP\n\nRETURNDATASIZE\nCALLVALUE\nRETURN\n```\n\nRun locally by forking Ethereum Mainnet using:\n```console\n~$ mnemo quick hello.evm\n\u003e\u003e 00000000000000000000000000000000000000000000000000a07d59ac0b52ce # USDC total supply\n```\n\n\nCompile to bytecode using:\n```console\n~$ mnemo compile hello.evm\n\u003e\u003e 0x7f18160ddd000000000000000000000000000000000000000000000000000000003d52593d60043d73a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48612ee0fa503d34f3\n```\n\nDeploy to any rpc using:\n\n```console\n~$ mnemo deploy --bytecode 0x7f18160ddd000000000000000000000000000000000000000000000000000000003d52593d60043d73a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48612ee0fa503d34f3 --rpc $MUMBAI_RPC --private-key $PRIVATE_KEY\n\n\u003e\u003e Transaction sent: 0x523498bc1ac5f2882b88c8a22886cf749525a51c3007cdc5126276a096a3ac67\n\u003e\u003e Contract deployed to: 0xfb052b297757d880ea95Be02d7073f3DB5417cB1\n```\n\nor\n\n```console\n~$ mnemo deploy --file hello.evm --rpc $MUMBAI_RPC --private-key $PRIVATE_KEY\n```\n\nMnemo:\n- Accepts PUSH values in both integer or hex format with 0x prefix\n- Allows comments in # and // (# is discouraged)\n- Accepts mixed/lower/uppercase opcodes\n- Allows bytecode to be directly written if surrounded with \"\" or ''\n- Pads PUSH values. Eg PUSH4 0x20 == 0x0020\n\n\nMnemo warns if:\n- PUSH opcode doesn't have a value\n- Invalid hex or unknown opcode\n- PUSH opcode is incapable of pushing the given value\n- Integer/Hex bigger than 32 bytes\n- Odd-length opcode written in \"\", '' syntax\n\n\n# License\n\n[See license notice](test/)\n\n[GNU AGPL 3.0](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbayazit16%2Fmnemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbayazit16%2Fmnemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbayazit16%2Fmnemo/lists"}