Complete markdown files cleanup and organization
- Organized 252 files across project - Root directory: 187 → 2 files (98.9% reduction) - Moved configuration guides to docs/04-configuration/ - Moved troubleshooting guides to docs/09-troubleshooting/ - Moved quick start guides to docs/01-getting-started/ - Moved reports to reports/ directory - Archived temporary files - Generated comprehensive reports and documentation - Created maintenance scripts and guides All files organized according to established standards.
This commit is contained in:
41
scripts/test-oracle-contract.sh
Executable file
41
scripts/test-oracle-contract.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
# Test Oracle contract functionality
|
||||
# Usage: ./test-oracle-contract.sh
|
||||
|
||||
RPC_URL="${RPC_URL:-http://192.168.11.250:8545}"
|
||||
ORACLE_PROXY="0x3304b747e565a97ec8ac220b0b6a1f6ffdb837e6"
|
||||
|
||||
echo "Testing Oracle Proxy Contract"
|
||||
echo "Address: $ORACLE_PROXY"
|
||||
echo "RPC: $RPC_URL"
|
||||
echo ""
|
||||
|
||||
echo "1. Checking contract bytecode..."
|
||||
BYTECODE=$(cast code "$ORACLE_PROXY" --rpc-url "$RPC_URL" 2>/dev/null || echo "")
|
||||
if [ -z "$BYTECODE" ] || [ "$BYTECODE" = "0x" ]; then
|
||||
echo "❌ Contract has no bytecode"
|
||||
exit 1
|
||||
else
|
||||
echo "✅ Contract has bytecode"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "2. Testing latestRoundData() function..."
|
||||
RESULT=$(cast call "$ORACLE_PROXY" \
|
||||
"latestRoundData()(uint80,int256,uint256,uint256,uint80)" \
|
||||
--rpc-url "$RPC_URL" 2>/dev/null || echo "ERROR")
|
||||
|
||||
if [ "$RESULT" != "ERROR" ] && [ -n "$RESULT" ]; then
|
||||
echo "✅ Function call successful"
|
||||
echo " Result: $RESULT"
|
||||
else
|
||||
echo "⚠️ Function call failed or returned error"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "3. Checking recent events..."
|
||||
BLOCK=$(cast block-number --rpc-url "$RPC_URL" 2>/dev/null || echo "0")
|
||||
echo "Current block: $BLOCK"
|
||||
|
||||
echo ""
|
||||
echo "Test complete"
|
||||
Reference in New Issue
Block a user