refactor: rename simple_wallet.py to aitbc_cli.py and update CLI launcher script
🔧 CLI Restructuring:
• Rename cli/simple_wallet.py to cli/aitbc_cli.py for better naming consistency
• Update aitbc-cli launcher to call aitbc_cli.py instead of simple_wallet.py
• Maintain all existing wallet functionality and command structure
• Preserve compatibility with /opt/aitbc/cli installation path
This commit is contained in:
@@ -14,14 +14,14 @@ fi
|
||||
|
||||
echo "1. Pre-transaction verification..."
|
||||
echo "=== Genesis wallet balance (before) ==="
|
||||
python /opt/aitbc/cli/simple_wallet.py balance --name aitbc1genesis
|
||||
python /opt/aitbc/cli/aitbc_cli.py balance --name aitbc1genesis
|
||||
|
||||
echo "=== Target wallet address ==="
|
||||
echo $WALLET_ADDR
|
||||
|
||||
echo "2. Sending 1000 AIT from genesis to aitbc wallet..."
|
||||
# Send transaction using CLI
|
||||
python /opt/aitbc/cli/simple_wallet.py send \
|
||||
python /opt/aitbc/cli/aitbc_cli.py send \
|
||||
--from aitbc1genesis \
|
||||
--to $WALLET_ADDR \
|
||||
--amount 1000 \
|
||||
@@ -31,7 +31,7 @@ python /opt/aitbc/cli/simple_wallet.py send \
|
||||
|
||||
# Get transaction hash from CLI
|
||||
echo "3. Transaction details..."
|
||||
TX_HASH=$(python /opt/aitbc/cli/simple_wallet.py transactions --from aitbc1genesis --limit 1 --format json 2>/dev/null | jq -r '.[0].hash' || echo "Transaction hash retrieval failed")
|
||||
TX_HASH=$(python /opt/aitbc/cli/aitbc_cli.py transactions --from aitbc1genesis --limit 1 --format json 2>/dev/null | jq -r '.[0].hash' || echo "Transaction hash retrieval failed")
|
||||
echo "Transaction hash: $TX_HASH"
|
||||
|
||||
# Wait for transaction to be mined with enhanced monitoring
|
||||
@@ -40,7 +40,7 @@ for i in {1..10}; do
|
||||
sleep 2
|
||||
|
||||
# Check balance using CLI
|
||||
BALANCE=$(ssh aitbc "python /opt/aitbc/cli/simple_wallet.py balance --name aitbc-user --format json | jq -r '.balance'")
|
||||
BALANCE=$(ssh aitbc "python /opt/aitbc/cli/aitbc_cli.py balance --name aitbc-user --format json | jq -r '.balance'")
|
||||
|
||||
if [ "$BALANCE" -gt "0" ]; then
|
||||
echo "✅ Transaction mined! Balance: $BALANCE AIT"
|
||||
@@ -52,13 +52,13 @@ done
|
||||
# Final verification using CLI
|
||||
echo "5. Post-transaction verification..."
|
||||
echo "=== Genesis wallet balance (after) ==="
|
||||
python /opt/aitbc/cli/simple_wallet.py balance --name aitbc1genesis
|
||||
python /opt/aitbc/cli/aitbc_cli.py balance --name aitbc1genesis
|
||||
|
||||
echo "=== Target wallet balance (final) ==="
|
||||
ssh aitbc "python /opt/aitbc/cli/simple_wallet.py balance --name aitbc-user"
|
||||
ssh aitbc "python /opt/aitbc/cli/aitbc_cli.py balance --name aitbc-user"
|
||||
|
||||
echo "=== Recent transactions ==="
|
||||
python /opt/aitbc/cli/simple_wallet.py transactions --from aitbc1genesis --limit 3
|
||||
python /opt/aitbc/cli/aitbc_cli.py transactions --from aitbc1genesis --limit 3
|
||||
|
||||
echo "✅ Transaction sent successfully using enhanced CLI!"
|
||||
echo "From: aitbc1genesis"
|
||||
|
||||
@@ -44,10 +44,10 @@ echo "/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py ai submit --wa
|
||||
# 5. Cross-Node Operations
|
||||
echo -e "\n5. Cross-Node Operations"
|
||||
echo "Checking network status on aitbc1..."
|
||||
/opt/aitbc/venv/bin/python /opt/aitbc/cli/simple_wallet.py network
|
||||
/opt/aitbc/venv/bin/python /opt/aitbc/cli/aitbc_cli.py network
|
||||
|
||||
echo "Checking network status on aitbc..."
|
||||
ssh aitbc '/opt/aitbc/venv/bin/python /opt/aitbc/cli/simple_wallet.py network'
|
||||
ssh aitbc '/opt/aitbc/venv/bin/python /opt/aitbc/cli/aitbc_cli.py network'
|
||||
|
||||
echo "Running batch operations on aitbc..."
|
||||
ssh aitbc '/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py sample'
|
||||
|
||||
Reference in New Issue
Block a user