chore(systemd): remove obsolete systemd service files and update infrastructure documentation
- Remove 8 unused systemd service files from coordinator-api/systemd/ - aitbc-adaptive-learning.service (port 8005) - aitbc-advanced-ai.service - aitbc-enterprise-api.service - aitbc-gpu-multimodal.service (port 8003) - aitbc-marketplace-enhanced.service (port 8006) - aitbc-modality-optimization.service (port 8004) - aitbc-multimodal.service (port 8002) - aitbc-openclaw-enhanced.service (port 8007
This commit is contained in:
73
contracts/scripts/compile_contracts.sh
Executable file
73
contracts/scripts/compile_contracts.sh
Executable file
@@ -0,0 +1,73 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "=== AITBC Smart Contract Compilation ==="
|
||||
|
||||
# Check if solc is installed
|
||||
if ! command -v solc &> /dev/null; then
|
||||
echo "Error: solc (Solidity compiler) not found"
|
||||
echo "Please install solc: npm install -g solc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create artifacts directory
|
||||
mkdir -p artifacts
|
||||
mkdir -p cache
|
||||
|
||||
# Contract files to compile
|
||||
contracts=(
|
||||
"contracts/AIPowerRental.sol"
|
||||
"contracts/AITBCPaymentProcessor.sol"
|
||||
"contracts/PerformanceVerifier.sol"
|
||||
"contracts/DisputeResolution.sol"
|
||||
"contracts/EscrowService.sol"
|
||||
"contracts/DynamicPricing.sol"
|
||||
"test/contracts/MockERC20.sol"
|
||||
"test/contracts/MockZKVerifier.sol"
|
||||
"test/contracts/MockGroth16Verifier.sol"
|
||||
)
|
||||
|
||||
echo "Compiling contracts..."
|
||||
|
||||
# Compile each contract
|
||||
for contract in "${contracts[@]}"; do
|
||||
if [ -f "$contract" ]; then
|
||||
echo "Compiling $contract..."
|
||||
|
||||
# Extract contract name from file path
|
||||
contract_name=$(basename "$contract" .sol)
|
||||
|
||||
# Compile with solc
|
||||
solc --bin --abi --optimize --output-dir artifacts \
|
||||
--base-path . \
|
||||
--include-path node_modules/@openzeppelin/contracts/node_modules/@openzeppelin/contracts \
|
||||
"$contract"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✅ $contract_name compiled successfully"
|
||||
else
|
||||
echo "❌ $contract_name compilation failed"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "⚠️ Contract file not found: $contract"
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== Compilation Summary ==="
|
||||
echo "✅ All contracts compiled successfully"
|
||||
echo "📁 Artifacts saved to: artifacts/"
|
||||
echo "📋 ABI files available for integration"
|
||||
|
||||
# List compiled artifacts
|
||||
echo ""
|
||||
echo "Compiled artifacts:"
|
||||
ls -la artifacts/*.bin 2>/dev/null | wc -l | xargs echo "Binary files:"
|
||||
ls -la artifacts/*.abi 2>/dev/null | wc -l | xargs echo "ABI files:"
|
||||
|
||||
echo ""
|
||||
echo "=== Next Steps ==="
|
||||
echo "1. Review compilation artifacts"
|
||||
echo "2. Run integration tests"
|
||||
echo "3. Deploy to testnet"
|
||||
echo "4. Perform security audit"
|
||||
Reference in New Issue
Block a user