{"id":31796197,"url":"https://github.com/codeesura/eigenlayer-recovery","last_synced_at":"2025-10-10T20:35:36.964Z","repository":{"id":246572908,"uuid":"821334360","full_name":"codeesura/eigenlayer-recovery","owner":"codeesura","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-28T10:59:52.000Z","size":17,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-17T02:11:31.125Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/codeesura.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":"2024-06-28T10:01:07.000Z","updated_at":"2024-07-08T12:34:45.000Z","dependencies_parsed_at":"2024-06-28T19:50:03.364Z","dependency_job_id":null,"html_url":"https://github.com/codeesura/eigenlayer-recovery","commit_stats":null,"previous_names":["codeesura/eigenlayer-recovery"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codeesura/eigenlayer-recovery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeesura%2Feigenlayer-recovery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeesura%2Feigenlayer-recovery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeesura%2Feigenlayer-recovery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeesura%2Feigenlayer-recovery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeesura","download_url":"https://codeload.github.com/codeesura/eigenlayer-recovery/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeesura%2Feigenlayer-recovery/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005272,"owners_count":26083863,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"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":[],"created_at":"2025-10-10T20:35:35.989Z","updated_at":"2025-10-10T20:35:36.957Z","avatar_url":"https://github.com/codeesura.png","language":"JavaScript","readme":"# EigenLayer Recovery\n\nThis library provides a simple and efficient way to recover unstaked tokens from the EigenLayer protocol using Flashbots bundles.\n\n## Overview\n\nWhen you unstake tokens from the EigenLayer protocol, they are not immediately available for withdrawal. Instead, they are queued for withdrawal and can only be claimed after a certain number of blocks have passed. This library automates the process of recovering these unstaked tokens by submitting a bundle of transactions to the Flashbots service, ensuring a high probability of inclusion in the next block.\n\n## Installation\n\nTo use this library in your project, you'll need to have Node.js and npm installed. Then, follow these steps:\n\n1. Clone the repository:\n   ```\n   git clone https://github.com/codeesura/eigenlayer-recovery.git\n   ```\n\n2. Install the dependencies:\n   ```\n   cd eigenlayer-recovery\n   npm install\n   ```\n\n## Configuration\n\nBefore you can use the library, you need to set up a configuration file with your specific details. Create a `.env` file in the root directory of the project and fill in the following variables:\n\n```\nSAFE_WALLET_PRIVATE_KEY=your_safe_wallet_private_key\nRECOVERY_WALLET_PRIVATE_KEY=your_recovery_wallet_private_key\nPROVIDER_URL=your_provider_url\n```\n\n- `SAFE_WALLET_PRIVATE_KEY`: The private key of the wallet that will receive the recovered tokens.\n- `RECOVERY_WALLET_PRIVATE_KEY`: The private key of the wallet that will submit the recovery transactions.\n- `PROVIDER_URL`: The URL of your Ethereum provider (e.g., Alchemy, Infura).\n\nNext, update the `config` object in `recoverUnstakedTokens.js` with your specific details:\n\n```javascript\nconst config = {\n  chainId: 1,\n  eigenLayerContractAddress: '0x...',\n  tokenAddress: '0x...',\n  strategyAddress: '0x...',\n  delegatedAddress: '0x...',\n  unstakedTokenAmount: '123...',\n  queuedWithdrawalBlockNumber: '456...',\n  nonce: '0',\n  eigenLayerABI: require('./eigenABI.json'),\n  tokenABI: require('./tokenABI.json'),\n  gasLimit: 300000\n};\n```\n\n- `chainId`: The ID of the Ethereum network you're using (1 for Mainnet, 4 for Rinkeby, etc.).\n- `eigenLayerContractAddress`: The address of the EigenLayer contract.\n- `tokenAddress`: The address of the token you unstaked (e.g., Swell token).\n- `strategyAddress`: The address of the strategy contract you used for staking.\n- `delegatedAddress`: The address to which you delegated your tokens (if applicable). If not, use `'0x0000000000000000000000000000000000000000'`.\n- `unstakedTokenAmount`: The amount of tokens you unstaked (in wei).\n- `queuedWithdrawalBlockNumber`: The block number when your withdrawal was queued.\n- `nonce`: The nonce of the recovery transaction (usually 0).\n- `eigenLayerABI`: The path to the EigenLayer contract ABI JSON file.\n- `tokenABI`: The path to the token contract ABI JSON file.\n- `gasLimit`: The gas limit for the recovery transactions.\n\n## Usage\n\nTo start the token recovery process, run the following command:\n\n```\nnode recoverUnstakedTokens.js\n```\n\nThe script will listen for new blocks and submit a recovery bundle to the Flashbots service whenever a new block is detected. If the bundle is included in a block, the script will log a success message and exit. If not, it will continue listening for new blocks and submitting bundles until the transaction is mined.\n\n## Disclaimer\n\nThis library is provided as-is and without any warranty. Use it at your own risk. Always double-check the configuration details before running the script, as incorrect settings may result in loss of funds.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeesura%2Feigenlayer-recovery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeesura%2Feigenlayer-recovery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeesura%2Feigenlayer-recovery/lists"}