Files
aitbc/dev/scripts/patches/patch_cli_blockchain_node_endpoints.py
oib 15427c96c0 chore: update file permissions to executable across repository
- Change file mode from 644 to 755 for all project files
- Add chain_id parameter to get_balance RPC endpoint with default "ait-devnet"
- Rename Miner.extra_meta_data to extra_metadata for consistency
2026-03-06 22:17:54 +01:00

20 lines
862 B
Python
Executable File

import re
with open("/home/oib/windsurf/aitbc/cli/aitbc_cli/commands/blockchain.py", "r") as f:
content = f.read()
# Instead of hardcoding 127.0.0.1, we should pull the actual node endpoint.
# But blockchain commands are top-level and don't natively take a node.
# Let's fix this so it pulls from config.nodes if possible, or falls back to standard node configuration mapping.
def replace_local_node(match):
return match.group(0).replace("http://127.0.0.1:8082", "http://10.1.223.93:8082")
# We will temporarily just patch them to use the known aitbc node ip so testing works natively without manual port forwards
# since we are running this on localhost
new_content = content.replace("http://127.0.0.1:8082", "http://10.1.223.93:8082")
with open("/home/oib/windsurf/aitbc/cli/aitbc_cli/commands/blockchain.py", "w") as f:
f.write(new_content)