Skip to content

Conversation

tejasbadadare
Copy link
Contributor

@tejasbadadare tejasbadadare commented Jun 30, 2025

Summary

Now that we have multiple keeper wallets, it's tedious and error prone to transfer balances on all the chains when spinning up a new Fortuna instance. This script automates that. Here's sample output:

npx ts-node transfer_balance_entropy_chains.ts --source-private-key ... --destination-address ... --amount 0.0001 --chain etherlink_testnet --chain optimism_sepolia

Some useful options:

  • can specify --testnets or --mainnets instead of individual chains.
  • can specify --ratio 0.5 to transfer half the balance instead of a discrete --amount.
  • can specify --dry-run to validate balances before committing.
Configuration:
   Network: Specific chains
   Destination: a5A68ed167431Afe739846A22597786ba2da85df
   Transfer method: 0.0001 ETH (fixed amount)
   Minimum balance: 0.001 ETH
   Gas multiplier: 2x
   Dry run: No
   Chains: etherlink_testnet, optimism_sepolia

etherlink_testnet: Checking balance for 0xa5A68ed167431Afe739846A22597786ba2da85df
   Balance: 109.825567 ETH
   Transfer amount: 0.000100 ETH
   Estimated gas cost: 0.001248 ETH
   Destination: a5A68ed167431Afe739846A22597786ba2da85df
   Executing transfer...
   Transfer successful!
   Transaction hash: 0xe1b946b83abe118a5f64ec6c52e629d279d273eff556a4dd8416dfc0d4463171
   New balance: 109.824946 ETH

optimism_sepolia: Checking balance for 0xa5A68ed167431Afe739846A22597786ba2da85df
   Balance: 0.600000 ETH
   Transfer amount: 0.000100 ETH
   Estimated gas cost: 0.000000 ETH
   Destination: a5A68ed167431Afe739846A22597786ba2da85df
   Executing transfer...
   Transfer successful!
   Transaction hash: 0x2bc5d805e8e0527fdf8ae9bbed049e1ede47f70a8af1fe4673a546876946c8ae
   New balance: 0.600000 ETH

TRANSFER SUMMARY
==================
Successful transfers: 2
Failed transfers: 0
Total transferred: 0.000200 ETH

Successful Transfers:
┌─────────┬─────────────────────┬───────────────────────┬──────────────────────────────────────────────────────────────────────┬─────────────────────────┐
│ (index) │ Chain               │ Transfer Amount (ETH) │ TX Hash                                                              │ Remaining Balance (ETH) │
├─────────┼─────────────────────┼───────────────────────┼──────────────────────────────────────────────────────────────────────┼─────────────────────────┤
│ 0       │ 'etherlink_testnet' │ '0.000100'            │ '0xe1b946b83abe118a5f64ec6c52e629d279d273eff556a4dd8416dfc0d4463171' │ '109.824946'            │
│ 1       │ 'optimism_sepolia'  │ '0.000100'            │ '0x2bc5d805e8e0527fdf8ae9bbed049e1ede47f70a8af1fe4673a546876946c8ae' │ '0.600000'              │
└─────────┴─────────────────────┴───────────────────────┴──────────────────────────────────────────────────────────────────────┴─────────────────────────┘

Rationale

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

Copy link

vercel bot commented Jun 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 30, 2025 11:42pm
7 Skipped Deployments
Name Status Preview Comments Updated (UTC)
component-library ⬜️ Skipped (Inspect) Jun 30, 2025 11:42pm
developer-hub ⬜️ Skipped (Inspect) Jun 30, 2025 11:42pm
entropy-debugger ⬜️ Skipped (Inspect) Jun 30, 2025 11:42pm
entropy-explorer ⬜️ Skipped (Inspect) Jun 30, 2025 11:42pm
insights ⬜️ Skipped (Inspect) Jun 30, 2025 11:42pm
proposals ⬜️ Skipped (Inspect) Jun 30, 2025 11:42pm
staking ⬜️ Skipped (Inspect) Jun 30, 2025 11:42pm

@aditya520
Copy link
Member

Wow. I love the script.

@aditya520
Copy link
Member

Looks much better than our other scripts. Thank you. 🙇

@tejasbadadare
Copy link
Contributor Author

Looks much better than our other scripts. Thank you. 🙇

Glad to hear it 😄

@tejasbadadare tejasbadadare merged commit 8c2cea9 into main Jul 1, 2025
11 checks passed
@tejasbadadare tejasbadadare deleted the tb/entropy/wallet-transfer-script branch July 1, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants