feat: add marketplace API endpoints and CLI handlers for offers and orders
Some checks failed
CLI Tests / test-cli (push) Failing after 6s
Deploy to Testnet / deploy-testnet (push) Successful in 1m16s
API Endpoint Tests / test-api-endpoints (push) Failing after 3h2m28s
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Integration Tests / test-service-integration (push) Successful in 1h59m22s
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled

Added comprehensive marketplace functionality to Exchange API and CLI:
- Created marketplace_offers and marketplace_orders database tables
- Implemented REST endpoints: GET/POST/DELETE for offers and orders
- Added marketplace CLI handlers with proper URL resolution and auth
- Support for creating offers, booking offers, listing orders, and cancellations
- Fixed order status values from 'OPEN'/'FILLED' to 'open'/'filled'
This commit is contained in:
aitbc
2026-05-04 13:21:54 +02:00
parent 7709afa3ba
commit cb509f62fc
10 changed files with 505 additions and 99 deletions

View File

@@ -11,9 +11,11 @@ set -e
# Training configuration
TRAINING_PROGRAM="OpenClaw AITBC Mastery Training"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
LOG_DIR="/var/log/aitbc"
WALLET_NAME="openclaw-trainee"
# Initialize logging for master launcher
CURRENT_LOG=$(init_logging "training_master")
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
@@ -30,7 +32,7 @@ START_TIME=$(date +%s)
# Logging function
log() {
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOG_DIR/training_master.log"
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee "$CURRENT_LOG"
}
# Print colored output

View File

@@ -10,23 +10,17 @@ set -e
# Training configuration
TRAINING_STAGE="Stage 3: AI Operations Mastery"
LOG_FILE="/var/log/aitbc/training_stage3.log"
SCRIPT_NAME="stage3_ai_operations"
CURRENT_LOG=$(init_logging "$SCRIPT_NAME")
WALLET_NAME="openclaw-trainee"
WALLET_PASSWORD="trainee123"
TEST_PROMPT="Analyze the performance of AITBC blockchain system"
TEST_PAYMENT=100
AGENT_COORDINATOR_URL="${AGENT_COORDINATOR_URL:-http://localhost:9001}"
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Logging function
log() {
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOG_FILE"
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee "$CURRENT_LOG"
}
# Print colored output

View File

@@ -10,20 +10,14 @@ set -e
# Training configuration
TRAINING_STAGE="Stage 4: Marketplace & Economic Intelligence"
LOG_FILE="/var/log/aitbc/training_stage4.log"
SCRIPT_NAME="stage4_marketplace_economics"
CURRENT_LOG=$(init_logging "$SCRIPT_NAME")
WALLET_NAME="openclaw-trainee"
WALLET_PASSWORD="trainee123"
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Logging function
log() {
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOG_FILE"
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee "$CURRENT_LOG"
}
# Print colored output

View File

@@ -10,20 +10,14 @@ set -e
# Training configuration
TRAINING_STAGE="Stage 5: Expert Operations & Automation"
LOG_FILE="/var/log/aitbc/training_stage5.log"
SCRIPT_NAME="stage5_expert_automation"
CURRENT_LOG=$(init_logging "$SCRIPT_NAME")
WALLET_NAME="openclaw-trainee"
WALLET_PASSWORD="trainee123"
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Logging function
log() {
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOG_FILE"
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee "$CURRENT_LOG"
}
# Print colored output

View File

@@ -77,7 +77,7 @@ log() {
local message=$2
local log_file="${CURRENT_LOG:-$LOG_DIR/training.log}"
echo "$(date '+%Y-%m-%d %H:%M:%S') [$level] $message" | tee -a "$log_file"
echo "$(date '+%Y-%m-%d %H:%M:%S') [$level] $message" | tee "$log_file"
}
# Convenience logging functions