This tool automates the process of claiming airdrops on the ZkSync Era network, specifically designed for compromised wallets with no ETH. It uses a paymaster for gasless transactions, allowing claims even from wallets without funds.
This tool is for educational and recovery purposes only. Use at your own risk and ensure you have the right to claim the targeted airdrops.
-
Clone the repository:
git clone https://github.com/codeesura/zksync-airdrop-rescue.git cd zksync-airdrop-rescue
-
Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Create required JSON files:
airdrop_data.json
: Contains merkle proofs and airdrop data.wallets.json
: Contains private keys of wallets to claim for.
-
Format of
airdrop_data.json
:{ "0x1234...": [{ "userId": "0x1234...", "tokenAmount": "1000000000000000000", "merkleIndex": "123456", "merkleProof": [ "0xabcd...", "0xdef0...", ... ] }], ... }
-
Format of
wallets.json
:{ "private_keys": [ "0xabcd1234...", "0xefgh5678...", ... ] }
-
Adjust constants in
src/utils/constants.rs
if needed. -
Deploy a paymaster contract and fund it with ETH. Update the paymaster address in your configuration.
-
Ensure
airdrop_data.json
andwallets.json
are properly set up. -
Deploy and fund the paymaster contract:
- Deploy the paymaster contract to ZkSync Era.
- Send sufficient ETH to the paymaster contract to cover gas fees.
-
Update the paymaster contract address in
src/utils/constants.rs
. -
Run the tool:
cargo run --release
-
The tool will automatically:
- Load wallet configurations and airdrop data.
- Attempt to claim airdrops for each wallet using gasless transactions.
- Transfer claimed tokens to a secure address (if configured).
-
Monitor the console output for progress and any error messages.
- Never share or commit your
wallets.json
file. - Run this tool in a secure environment.
- After successful claims, move funds to a new, secure wallet.
- Ensure the paymaster contract is properly audited and secure.
- Built with Rust for high performance and memory safety.
- Uses
alloy_signer_wallet::LocalWallet
for wallet management. - Implements concurrent processing for faster execution.
- Utilizes a paymaster contract for gasless transactions.
- Employs Merkle proofs for secure airdrop claiming.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions, issues, and feature requests are welcome! Check the issues page.
ArmutBey - @codeesura - [email protected]