https://github.com/offchainlabs/rescueth
https://github.com/offchainlabs/rescueth
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/offchainlabs/rescueth
- Owner: OffchainLabs
- Created: 2022-12-08T20:49:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-08T20:49:37.000Z (over 3 years ago)
- Last Synced: 2025-04-25T07:35:36.729Z (about 1 year ago)
- Language: TypeScript
- Size: 86.9 KB
- Stars: 4
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## RescuETH
To be used by the deployer of a contract at address A on chain X, to rescue the ETH of a user who accidentally sent ETH to address A on some other chain Y.
Checks that ETH is still recoverable (i.e., nonce for deployer address is still available) and recovers Eth by deploying a RecoverBags contract if so.
### Set up
See hardhat config; ensure relevant network RPC urls / pks are configed (i.e., see .env.sample).
### Run
`yarn hardhat recover --targetaddress <0x-targetAddress> --recoveryaddress <0x-recovery-adddress> --network `
**targetaddress**: address from which to recover ETH
**recoveryaddress**: address to which recovered eth will be sent
((noncestotry)) (optional): of nonces to try (defaults to 50")
.addOptionalParam("", "# of nonces to try (defaults to 50")