{"id":15679414,"url":"https://github.com/zemse/ethers-repl","last_synced_at":"2025-05-07T09:41:47.729Z","repository":{"id":119196395,"uuid":"458633426","full_name":"zemse/ethers-repl","owner":"zemse","description":"🔪 Ethers.js in Node.js REPL","archived":false,"fork":false,"pushed_at":"2023-12-08T13:34:27.000Z","size":83,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"ethers-v6","last_synced_at":"2025-03-31T08:43:46.336Z","etag":null,"topics":["cli","ethers","ethersjs","wallet"],"latest_commit_sha":null,"homepage":"","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/zemse.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2022-02-12T20:36:17.000Z","updated_at":"2024-11-26T17:02:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"a1152b12-79f6-42a0-a12a-fef8b7a1edf8","html_url":"https://github.com/zemse/ethers-repl","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/zemse%2Fethers-repl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fethers-repl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fethers-repl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fethers-repl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zemse","download_url":"https://codeload.github.com/zemse/ethers-repl/tar.gz/refs/heads/ethers-v6","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252852477,"owners_count":21814365,"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":["cli","ethers","ethersjs","wallet"],"created_at":"2024-10-03T16:30:35.965Z","updated_at":"2025-05-07T09:41:47.711Z","avatar_url":"https://github.com/zemse.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ethers-repl\n\nOpens ethers.js in Node.js repl with Ethers.js and some providers / contracts preloaded in global.\n\n## Installation\n\n```sh\nnpm i -g ethers ethers-repl\n```\n\n## Usage\n\nUse the command `ethers` or `ethers-repl` in your terminal. This should open a REPL.\n\n```ts\n$ ethers\n\nethers-repl\u003e\n```\n\n### You can access `ethers` here along with usual nodejs repl things.\n\n```\nethers-repl\u003e ethers.version\n'6.3.0'\n```\n\n### You can directly access utils.\n\n```\nethers-repl\u003e ethers.getAddress('c21f0a4a6eb27762a218acbb05922fa5703dcf3f')\n'0xC21F0a4a6EB27762A218aCbB05922fa5703dCF3f'\nethers-repl\u003e getAddress('c21f0a4a6eb27762a218acbb05922fa5703dcf3f')\n'0xC21F0a4a6EB27762A218aCbB05922fa5703dCF3f'\n```\n\n### Inspection is better\n\n```\nethers-repl\u003e FixedNumber.fromValue(1, 18)\nFixedNumber { format: undefined, value: \"0.000000000000000001\" }\n```\n\n### Also there are `dai` and `weth` contracts\n\n```\nethers-repl\u003e await dai.balanceOf(\"vitalik.eth\")\n555508493698012633714742n\n```\n\n### You can also use cli directly instead of REPL\n\n```\n$ ethers dai balanceOf \"vitalik.eth\"\n27183125886000881460504n\n```\n\n### Get a vanity wallet real quick!\n\n```ts\nethers-repl\u003e wallet = vanity(startsWith('dad'), 10000)\nWallet {\n  _isSigner: true,\n  address: '0xdAd5589FA9A17f13B69a3A3a2Fff24190e22f18c',\n  provider: null\n}\n```\n\n### Save and load wallets\n\n```ts\n// you can list wallets which are stored at keystores.path(), can be set with env var: ETHERS_REPL_KEYSTORES_PATH\nethers-repl\u003e keystores.list()\n[\n  {\n    address: '0xff2b2f4d55cc37661dbd88d92b1fff8b29cda06c',\n    jsonFile: '/Users/sohamzemse/ethers-repl-wallets/0xFf2B2f4d55cC37661DbD88d92b1FFf8b29CDa06C.json'\n  }\n]\n// just pass some part of address, password and provider object\nethers-repl\u003e wallet = keystores.load('0xff', 'mypassword', mainnet)\nUnlocking 0xFf2B2f4d55cC37661DbD88d92b1FFf8b29CDa06C\nWallet {\n  _isSigner: true,\n  _signingKey: [Function (anonymous)],\n  address: '0xFf2B2f4d55cC37661DbD88d92b1FFf8b29CDa06C',\n  _mnemonic: [Function (anonymous)],\n  provider: null\n}\n// it returns an ethers.Wallet which you can use as usual\nethers-repl\u003e await wallet.getBalance()\nBigNumber { value: \"0\", hex: \"0x00\" }\n```\n\n### You can generate SQRL-ed wallet\n\nLearn more about SQRL-ing from an [article by ricmoo](https://blog.ricmoo.com/sqrl-ing-mnemonic-phrases-b68b2dc1f75b).\n\n```ts\nethers-repl\u003e wallet = await sqrlMnemonic('some mnemonic here' , \"some password\")\nWallet {\n  provider: null,\n  address: '0x9F432F2D6b24A95aDAf9242f79B573fd93F9804D'\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzemse%2Fethers-repl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzemse%2Fethers-repl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzemse%2Fethers-repl/lists"}