{"id":15651575,"url":"https://github.com/tintinweb/evm-shell","last_synced_at":"2025-04-30T19:48:05.068Z","repository":{"id":143878480,"uuid":"402457400","full_name":"tintinweb/evm-shell","owner":"tintinweb","description":"An interactive EVM repl/shell.","archived":false,"fork":false,"pushed_at":"2021-09-30T11:50:25.000Z","size":68,"stargazers_count":32,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T11:56:07.099Z","etag":null,"topics":["ethereum","evm","repl","shell"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/evm-shell","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tintinweb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-09-02T14:46:32.000Z","updated_at":"2024-09-03T12:17:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f43a2e4-3db2-47c5-8864-bf46ee8866be","html_url":"https://github.com/tintinweb/evm-shell","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/tintinweb%2Fevm-shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tintinweb%2Fevm-shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tintinweb%2Fevm-shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tintinweb%2Fevm-shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tintinweb","download_url":"https://codeload.github.com/tintinweb/evm-shell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251774006,"owners_count":21641719,"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":["ethereum","evm","repl","shell"],"created_at":"2024-10-03T12:39:10.542Z","updated_at":"2025-04-30T19:48:05.045Z","avatar_url":"https://github.com/tintinweb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[\u003cimg width=\"200\" alt=\"get in touch with Consensys Diligence\" src=\"https://user-images.githubusercontent.com/2865694/56826101-91dcf380-685b-11e9-937c-af49c2510aa0.png\"\u003e](https://diligence.consensys.net)\u003cbr/\u003e\n\u003csup\u003e\n[[  🌐  ](https://diligence.consensys.net)  [  📩  ](https://github.com/ConsenSys/vscode-solidity-doppelganger/blob/master/mailto:diligence@consensys.net)  [  🔥  ](https://consensys.github.io/diligence/)]\n\u003c/sup\u003e\u003cbr/\u003e\u003cbr/\u003e\n\n\n## EVM Shell\n\nA hands-on interactive EVM repl/shell. Low-level ethereum virtual machine inspection.\n\n[💾](https://www.npmjs.com/package/solidity-shell) `npm install -g evm-shell` \n\nIn order to understand smart contracts you have to become a smart contract. `evm-shell` is your entrance to this rabbithole 🐰🕳️. \n\nImagine, you wake up as a smart contract deployed at address `0xc0de00000000000000000000000000000000c0de`. Your friend at account `0xbabe00000000000000000000000000000000babe` is calling your contract code. You decide what to do, step-by-step, one [instruction](https://ethervm.io/) at a time. Perform arithmetic operations, manipulate the stack, memory, storage, emit events, and much more. Your code, your rules 👑.\n\n\n![evm-shell](https://user-images.githubusercontent.com/2865694/135447272-12dd096f-8883-4c2d-871b-ed8102687033.gif)\n\n```javascript\n⇒  evm-shell\n🚀 Entering interactive EVM shell. 'help' is your friend. '[Tab]' for autocomplete.\n   → chainId:      1\n   → hardfork:     london\n   → address:      0xc0de00000000000000000000000000000000c0de\n   → value:        100\n   → gasLimit:     68719476735\n   → gasPrice:     0\n   → caller/origin:0xbabe00000000000000000000000000000000babe/0xbabe00000000000000000000000000000000babe\n\n🙌 Bugs/Feedback → github/@tintinweb \n    → https://github.com/tintinweb/evm-shell/ | ConsenSys Diligence @ https://consensys.net/diligence/\n\n»  push 1\n»  \n────────────────────────────────────────────────────────────────────────────\n[pc      ]: 2\n[code    ]: 0x6001\n[gasUsed ]: 3\n[stack   ]: [\"01\"] ↗\n[memory  ]:  ↗\n[storage ]: []\n[logs    ]: []\n\n»  push 0xfe\n»  \n────────────────────────────────────────────────────────────────────────────\n[pc      ]: 4\n[code    ]: 0x600160fe\n[gasUsed ]: 6\n[stack   ]: [\"01\",\"fe\"] ↗\n[memory  ]:  ↗\n[storage ]: []\n[logs    ]: []\n\n»  mul\n»  \n────────────────────────────────────────────────────────────────────────────\n[pc      ]: 5\n[code    ]: 0x600160fe02\n[gasUsed ]: 11\n[stack   ]: [\"fe\"] ↗\n[memory  ]:  ↗\n[storage ]: []\n[logs    ]: []\n\n```\n\n### Hints\n\n* **Note**: This is **not a simulator**, we actually run your code in the amazing [ethereumjs](https://github.com/ethereumjs) vm.\n* **Note**: `.reset` completely removes all statements. `.undo` removes the last statement.\n* **Note**: Automatically restores the state if you mess up because your instruction reverts 😉\n\n### Usage\n\nBasically lists all supported evm instructions. Meta-commands are `dot`-prefixed.\n\n```shell\n »  help\n\n  Commands:\n\n    help [command...]         Provides help for a given command.\n    exit                      Exits application.\n    .show                     \n    .reset                    \n    .undo                     \n    .config                   \n    .opcodes                  \n    .step [step]              \n    .stack                    \n    .memory                   \n    .state                    \n    .storage                  \n    .logs                     \n    .disasm                   \n    .load \u003chexstr\u003e            \n    stop [args...]            \n    add [args...]             \n    mul [args...]             \n    sub [args...]             \n    div [args...]             \n    sdiv [args...]            \n    mod [args...]             \n    smod [args...]            \n    addmod [args...]          \n    mulmod [args...]          \n    exp [args...]             \n    signextend [args...]      \n    lt [args...]              \n    gt [args...]              \n    slt [args...]             \n    sgt [args...]             \n    eq [args...]              \n    iszero [args...]          \n    and [args...]             \n    or [args...]              \n    xor [args...]             \n    not [args...]             \n    byte [args...]            \n    shl [args...]             \n    shr [args...]             \n    sar [args...]             \n    sha3 [args...]            \n    address [args...]         \n    balance [args...]         \n    origin [args...]          \n    caller [args...]          \n    callvalue [args...]       \n    calldataload [args...]    \n    calldatasize [args...]    \n    calldatacopy [args...]    \n    codesize [args...]        \n    codecopy [args...]        \n    gasprice [args...]        \n    extcodesize [args...]     \n    extcodecopy [args...]     \n    returndatasize [args...]  \n    returndatacopy [args...]  \n    extcodehash [args...]     \n    blockhash [args...]       \n    coinbase [args...]        \n    timestamp [args...]       \n    number [args...]          \n    difficulty [args...]      \n    gaslimit [args...]        \n    chainid [args...]         \n    selfbalance [args...]     \n    basefee [args...]         \n    pop [args...]             \n    mload [args...]           \n    mstore [args...]          \n    mstore8 [args...]         \n    sload [args...]           \n    sstore [args...]          \n    jump [args...]            \n    jumpi [args...]           \n    pc [args...]              \n    msize [args...]           \n    gas [args...]             \n    jumpdest [args...]        \n    push1 [args...]           \n    push2 [args...]           \n    push3 [args...]           \n    push4 [args...]           \n    push5 [args...]           \n    push6 [args...]           \n    push7 [args...]           \n    push8 [args...]           \n    push9 [args...]           \n    push10 [args...]          \n    push11 [args...]          \n    push12 [args...]          \n    push13 [args...]          \n    push14 [args...]          \n    push15 [args...]          \n    push16 [args...]          \n    push17 [args...]          \n    push18 [args...]          \n    push19 [args...]          \n    push20 [args...]          \n    push21 [args...]          \n    push22 [args...]          \n    push23 [args...]          \n    push24 [args...]          \n    push25 [args...]          \n    push26 [args...]          \n    push27 [args...]          \n    push28 [args...]          \n    push29 [args...]          \n    push30 [args...]          \n    push31 [args...]          \n    push32 [args...]          \n    dup1 [args...]            \n    dup2 [args...]            \n    dup3 [args...]            \n    dup4 [args...]            \n    dup5 [args...]            \n    dup6 [args...]            \n    dup7 [args...]            \n    dup8 [args...]            \n    dup9 [args...]            \n    dup10 [args...]           \n    dup11 [args...]           \n    dup12 [args...]           \n    dup13 [args...]           \n    dup14 [args...]           \n    dup15 [args...]           \n    dup16 [args...]           \n    swap1 [args...]           \n    swap2 [args...]           \n    swap3 [args...]           \n    swap4 [args...]           \n    swap5 [args...]           \n    swap6 [args...]           \n    swap7 [args...]           \n    swap8 [args...]           \n    swap9 [args...]           \n    swap10 [args...]          \n    swap11 [args...]          \n    swap12 [args...]          \n    swap13 [args...]          \n    swap14 [args...]          \n    swap15 [args...]          \n    swap16 [args...]          \n    log0 [args...]            \n    log1 [args...]            \n    log2 [args...]            \n    log3 [args...]            \n    log4 [args...]            \n    create [args...]          \n    call [args...]            \n    callcode [args...]        \n    return [args...]          \n    delegatecall [args...]    \n    create2 [args...]         \n    staticcall [args...]      \n    revert [args...]          \n    invalid [args...]         \n    selfdestruct [args...]    \n    push \u003cargs\u003e   \n```\n\n## Examples \n\n### Transaction vars: `msg.sender`, `tx.origin`, `this` etc.\n\n```javascript\n»  caller\n»  \n────────────────────────────────────────────────────────────────────────────\n[pc      ]: 1\n[code    ]: 0x33\n[gasUsed ]: 2\n[stack   ]: [\"babe00000000000000000000000000000000babe\"] ↗\n[memory  ]:  ↗\n[storage ]: []\n[logs    ]: []\n\n»  address\n»  \n────────────────────────────────────────────────────────────────────────────\n[pc      ]: 1\n[code    ]: 0x30\n[gasUsed ]: 2\n[stack   ]: [\"c0de00000000000000000000000000000000c0de\"] ↗\n[memory  ]:  ↗\n[storage ]: []\n[logs    ]: []\n```\n\n### Memory manipulation\n\n```javascript\n»  push 0x1337\n»  \n────────────────────────────────────────────────────────────────────────────\n[pc      ]: 3\n[code    ]: 0x611337\n[gasUsed ]: 3\n[stack   ]: [\"1337\"] ↗\n[memory  ]:  ↗\n[storage ]: []\n[logs    ]: []\n\n»  push 64\n»  \n────────────────────────────────────────────────────────────────────────────\n[pc      ]: 5\n[code    ]: 0x6113376040\n[gasUsed ]: 6\n[stack   ]: [\"1337\",\"40\"] ↗\n[memory  ]:  ↗\n[storage ]: []\n[logs    ]: []\n\n»  mstore\n»  \n────────────────────────────────────────────────────────────────────────────\n[pc      ]: 6\n[code    ]: 0x611337604052\n[gasUsed ]: 18\n[stack   ]: [] ↗\n[memory  ]: 0000000000000000000000000000000000000000000000000000000000000000\n            0000000000000000000000000000000000000000000000000000000000000000\n            0000000000000000000000000000000000000000000000000000000000001337 ↗\n[storage ]: []\n[logs    ]: []\n\n»  push 64\n»  \n────────────────────────────────────────────────────────────────────────────\n[pc      ]: 8\n[code    ]: 0x6113376040526040\n[gasUsed ]: 21\n[stack   ]: [\"40\"] ↗\n[memory  ]: 0000000000000000000000000000000000000000000000000000000000000000\n            0000000000000000000000000000000000000000000000000000000000000000\n            0000000000000000000000000000000000000000000000000000000000001337 ↗\n[storage ]: []\n[logs    ]: []\n\n»  mload\n»  \n────────────────────────────────────────────────────────────────────────────\n[pc      ]: 9\n[code    ]: 0x611337604052604051\n[gasUsed ]: 24\n[stack   ]: [\"1337\"] ↗\n[memory  ]: 0000000000000000000000000000000000000000000000000000000000000000\n            0000000000000000000000000000000000000000000000000000000000000000\n            0000000000000000000000000000000000000000000000000000000000001337 ↗\n[storage ]: []\n[logs    ]: []\n```\n\n____\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftintinweb%2Fevm-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftintinweb%2Fevm-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftintinweb%2Fevm-shell/lists"}