feat: Implement payment processing with contract auditing, event loops, and web observability endpoints.

This commit is contained in:
2569718930@qq.com
2026-03-20 23:33:50 +08:00
parent 7225b8bcc7
commit a0b8a3595c
15 changed files with 786 additions and 15 deletions
+18
View File
@@ -0,0 +1,18 @@
import os
from src.payments.contract_audit import analyze_checkout_contract
def test_payment_contract_audit_detects_current_controls():
report = analyze_checkout_contract(
os.path.join("contracts", "PolyWeatherCheckout.sol")
)
assert report["checks"]["has_only_owner_modifier"] is True
assert report["checks"]["allowed_token_check"] is True
assert report["checks"]["duplicate_order_check"] is True
assert report["checks"]["paid_order_written_before_transfer"] is True
assert report["checks"]["has_pause_switch"] is False
assert report["checks"]["binds_plan_amount_onchain"] is False
assert any(risk["id"] == "single_owner_admin" for risk in report["risks"])