Skip to main content

Usage

dokrypt accounts <subcommand> [flags]

Persistent Flags

FlagTypeDefaultDescription
--chainstringTarget chain (for multi-chain setups)

Subcommands

SubcommandDescription
listList all accounts with balances
fundFund an account with ETH
impersonateImpersonate an address
generateGenerate and fund new accounts

list

List all accounts with their ETH balances.
dokrypt accounts list
Queries eth_accounts and eth_getBalance for each account. Displays balances in ETH.

Example Output

#   Address                                    Balance (ETH)
1   0x70997970C51812dc3A010C7d01b50e0d17dc79C8  10000.00
2   0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC  10000.00
3   0x90F79bf6EB2c4f870365E785982E1f101E93b906  10000.00
...

Multi-chain

dokrypt accounts list --chain polygon

fund

Fund an account with a specific amount of ETH.
dokrypt accounts fund <address> <amount-eth>
ArgumentRequiredDescription
addressYesAccount address (0x-prefixed)
amount-ethYesAmount in ETH (e.g., 1000, 50.5)
Converts the ETH amount to wei and calls anvil_setBalance or hardhat_setBalance.

Examples

dokrypt accounts fund 0x1234...abcd 1000
dokrypt accounts fund 0xabcd...1234 50.5 --chain polygon

impersonate

Impersonate an address, allowing transactions without the private key.
dokrypt accounts impersonate <address>
ArgumentRequiredDescription
addressYesAddress to impersonate
Calls anvil_impersonateAccount or hardhat_impersonateAccount.

Examples

dokrypt accounts impersonate 0xdead...beef
Impersonation is useful for testing interactions with whale accounts or governance addresses on forked networks.

generate

Generate and fund new deterministic test accounts.
dokrypt accounts generate <count>
ArgumentRequiredDescription
countYesNumber of accounts to generate
Generates deterministic addresses and funds each with 10,000 ETH.

Examples

dokrypt accounts generate 5
dokrypt accounts generate 20 --chain ethereum