Comprehensive cryptocurrency wallet management for Clawdbot agents. Securely create, manage, and transact across multiple blockchain networks with encrypted local key storage.
Full network details in references/networks.json.
Create new wallets or import existing ones:
# Create new EVM wallet
python3 scripts/wallet_manager.py create my-eth-wallet --chain evm --password "secure-password"
# Create new Solana wallet
python3 scripts/wallet_manager.py create my-sol-wallet --chain solana --password "secure-password"
# Import existing wallet
python3 scripts/wallet_manager.py import imported-wallet --chain evm --key "0x..." --password "secure-password"
# List all wallets
python3 scripts/wallet_manager.py list
Query native and token balances:
# Native ETH balance on Ethereum
python3 scripts/balance_checker.py 0xYourAddress --network ethereum
# ERC20 token balance
python3 scripts/balance_checker.py 0xYourAddress --network polygon --token 0xTokenAddress
# Check all EVM networks at once
python3 scripts/balance_checker.py 0xYourAddress --all-evm
# Solana balance
python3 scripts/balance_checker.py YourSolanaAddress --network solana
# SPL token balance
python3 scripts/balance_checker.py YourSolanaAddress --network solana --token MintAddress
Send native tokens or ERC20/SPL tokens:
# Send ETH
python3 scripts/token_sender.py my-wallet 0xRecipient 0.1 --network ethereum --password "password"
# Send ERC20 token
python3 scripts/token_sender.py my-wallet 0xRecipient 100 --network polygon --token 0xTokenAddress --password "password"
# Send SOL
python3 scripts/token_sender.py my-wallet RecipientAddress 1.5 --network solana --password "password"
Security: Password required for every transaction. Private keys never leave encrypted storage unprotected.
Call contract functions (read and write):
# Read call (view function)
python3 scripts/contract_interactor.py 0xContract functionName --abi contract.json --network ethereum --args '[123, "param2"]'
# Write call (transaction)
python3 scripts/contract_interactor.py 0xContract mint --abi nft.json --network polygon --args '[1]' --write --wallet my-wallet --password "password"
# Payable function (send ETH with call)
python3 scripts/contract_interactor.py 0xContract purchase --abi contract.json --network ethereum --args '[]' --write --wallet my-wallet --password "password" --value 0.05
~/.clawdbot/cryptowallet/ with 0600 permissionsSee references/security.md for complete security documentation.
Check balances across all networks:
python3 scripts/balance_checker.py 0xYourAddress --all-evm
Send the same token across different chains:
# Polygon USDC
python3 scripts/token_sender.py wallet recipient 100 --network polygon --token 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 --password "pwd"
# Arbitrum USDC
python3 scripts/token_sender.py wallet recipient 100 --network arbitrum --token 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8 --password "pwd"
Example: Approve and stake tokens
# 1. Approve token spending
python3 scripts/contract_interactor.py 0xTokenAddress approve --abi erc20.json --network ethereum --args '["0xProtocolAddress", "1000000000000000000000"]' --write --wallet my-wallet --password "pwd"
# 2. Stake tokens
python3 scripts/contract_interactor.py 0xStakingContract stake --abi staking.json --network ethereum --args '["1000000000000000000000"]' --write --wallet my-wallet --password "pwd"
Modify references/networks.json to:
Default RPCs are public and may have rate limits. For production, use dedicated RPC providers.
Install required packages:
pip install web3 solana solders eth-account cryptography base58
references/networks.json to configure your own RPC endpointAdd to references/networks.json:
{
"evm": {
"your-network": {
"name": "Your Chain",
"chain_id": 12345,
"rpc": "https://rpc.yourchain.com",
"explorer": "https://explorer.yourchain.com",
"native_token": "TOKEN"
}
}
}
Use shell loops for batch transactions:
for addr in $(cat recipients.txt); do
python3 scripts/token_sender.py wallet $addr 1 --network polygon --password "pwd"
done
Generate ABIs from verified contracts on block explorers, or from your Solidity project's artifacts/ folder.
See references/security.md for comprehensive security guidelines.
共 1 个版本