Enhance exchange support and testing framework

- Added a new test suite for exchange contracts to ensure consistency and functionality across supported exchanges.
- Refactored exchange ID handling to utilize a centralized list of supported exchanges, improving maintainability.
- Updated CLI argument parsing and help documentation to reflect the new exchange structure.
- Introduced utility functions for validating supported exchanges and their display names.
- Enhanced the BasisApp and strategy runner to leverage the new exchange validation logic.
- Added a new test command for running exchange-related tests.
This commit is contained in:
discountry
2026-02-27 11:32:20 +08:00
parent 98c58727c7
commit 27abeb9fa4
8 changed files with 376 additions and 109 deletions
+1
View File
@@ -7,6 +7,7 @@
"dev": "bun run index.ts",
"start": "bun run index.ts",
"test": "bun x vitest run",
"test:exchange-contract": "bun x vitest run tests/exchange-contract-suite.test.ts tests/exchange-factory.test.ts tests/config.test.ts tests/basis-arb-engine.test.ts",
"test:watch": "bun x vitest",
"start:trend:silent": "bun run index.ts --strategy trend --silent",
"start:maker:silent": "bun run index.ts --strategy maker --silent",