ddx-python 1.0.6__tar.gz → 1.1.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ddx_python-1.0.6 → ddx_python-1.1.7}/Cargo.lock +3 -1
- {ddx_python-1.0.6 → ddx_python-1.1.7}/PKG-INFO +1 -3
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/error.rs +25 -0
- ddx_python-1.1.7/core/common/src/util/cbor.rs +16 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/util/mod.rs +3 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/macros/src/lib.rs +3 -3
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/Cargo.toml +0 -2
- ddx_python-1.1.7/ddx-operator/core/src/adapter.rs +331 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/constants.rs +0 -6
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/execution/accounting.rs +3 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/execution/test_utils.rs +61 -61
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/execution/validation.rs +1 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/specs/constants.rs +0 -22
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/accounting.rs +3 -3
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/request.rs +1663 -865
- ddx_python-1.1.7/ddx-operator/core/src/util/eip712.rs +925 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/Cargo.toml +3 -1
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/experiments/4443-improve-and-cleanup-unit-tests/3_test_semantics.md +2 -2
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/pyproject.toml +0 -2
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/chaos_strategies/helpers.py +7 -4
- ddx_python-1.1.7/ddx-python/fuzzing/whitebox_fuzzing/legacy/market_maker.py +721 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/market_taker.py +3 -1
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/sample_mm_auditor_bot.py +5 -1
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/market_maker.py +13 -20
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/mocks/price_feed_fuzzer.conf.json.template +0 -18
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/mocks/pyproject.toml +0 -2
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/notebooks/pyproject.toml +0 -2
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/examples/delegated_session_deny_list.py +11 -7
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/affiliate_tests.py +2 -2
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/common_tests/liquidation.py +57 -57
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/common_tests/matching.py +12 -12
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/common_tests/pnl_realization.py +2 -2
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/futures_tests.py +13 -13
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/account.py +13 -10
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/execution/matching.py +1 -1
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/execution/settlement.py +12 -21
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/execution/state.py +18 -31
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/store.py +4 -3
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/perps_tests.py +11 -11
- ddx_python-1.1.7/ddx-python/python/tests/unit/encryption_dependency_tests.py +47 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/src/bin/stub_gen.rs +1 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/src/ddx.rs +117 -1
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/uv.lock +0 -143
- {ddx_python-1.0.6 → ddx_python-1.1.7}/pyproject.toml +1 -3
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/_rust/common/__init__.pyi +18 -1
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/_rust/common/requests/__init__.pyi +3 -3
- ddx_python-1.1.7/python/ddx/_rust/common/requests/intents.pyi +396 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/auditor/README.md +1 -1
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transaction_utils.py +12 -4
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/funding.py +31 -45
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/derivadex_client.py +1 -1
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/clients/on_chain_client.py +0 -5
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/clients/signed_client.py +1 -1
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/tests/signed_client_tests.py +13 -13
- ddx_python-1.1.7/python/ddx/rest_client/utils/encryption_utils.py +9 -0
- ddx_python-1.0.6/ddx-operator/core/src/adapter.rs +0 -196
- ddx_python-1.0.6/ddx-operator/core/src/util/eip712.rs +0 -351
- ddx_python-1.0.6/python/ddx/_rust/common/requests/intents.pyi +0 -637
- ddx_python-1.0.6/python/ddx/rest_client/utils/encryption_utils.py +0 -26
- {ddx_python-1.0.6 → ddx_python-1.1.7}/Cargo.toml +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/Cargo.toml +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/constants.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/global.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/lib.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/types/accounting.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/types/auth.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/types/contract/events.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/types/contract.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/types/exported.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/types/global.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/types/identifiers.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/types/kyc.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/types/mod.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/types/node.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/types/primitives/numbers.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/types/primitives.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/types/state.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/types/transaction.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/util/backoff.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/util/mem.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/util/tokenize.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/common/src/util/tracing.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/crypto/Cargo.toml +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/crypto/src/eip712.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/crypto/src/encryption.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/crypto/src/lib.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/crypto/src/signing.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/crypto/src/test_accounts.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/ethereum/Cargo.toml +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/ethereum/src/checkpoint.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/ethereum/src/event.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/ethereum/src/lib.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/ethereum/src/log.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/macros/Cargo.toml +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/specs/Cargo.toml +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/specs/src/eval.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/specs/src/float_parser.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/specs/src/lib.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/core/specs/src/str_parser.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/execution/error.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/execution/mod.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/lib.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/specs/index_fund.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/specs/pred_market_future.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/specs/quarterly_expiry_future.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/specs/types.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/specs.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/tree/README.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/tree/mod.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/tree/shared_smt.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/tree/shared_store.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/trusted_settings.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/accounting/balance.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/clock.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/contract_events.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/data_source.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/identifiers.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/mod.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/order.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/primitives/product_symbol.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/primitives.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/request/submitted_json.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/settlement.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/state/exported.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/state/tradable_product.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/state/trader.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/state.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/types/transaction.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/util/convert.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/util/env.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/util/ethereum.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/util/mod.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/src/util/serde.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-operator/core/tests/fixtures/signed-request-identity-vectors.json +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/AGENTS.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/build.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/AGENTS.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/Dockerfile +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/admin_cli/README.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/admin_cli/RUNBOOK.comprehension.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/admin_cli/RUNBOOK.planning.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/admin_cli/cli.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/admin_cli/codex_runner.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/admin_cli/comprehension/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/admin_cli/comprehension/cli.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/admin_cli/comprehension/heartbeat.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/admin_cli/comprehension/inbound.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/admin_cli/comprehension/note_edits.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/admin_cli/project.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/compose.yml +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/experiments/4443-improve-and-cleanup-unit-tests/1_matching_vs_risk_decoupling.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/experiments/4443-improve-and-cleanup-unit-tests/2_logic_and_sgx_cryptography_conflation.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/experiments/4443-improve-and-cleanup-unit-tests/engine_test_audit.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/experiments/4443-improve-and-cleanup-unit-tests/issues/4727.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/experiments/4443-improve-and-cleanup-unit-tests/issues/4728.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/experiments/4443-improve-and-cleanup-unit-tests/issues/4729.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/experiments/4443-improve-and-cleanup-unit-tests/specs.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/experiments/blueprint.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/experiments/ddx-whitepaper.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/pyproject.toml +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/sdlc/calendar.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/sdlc/common.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/sdlc/journal.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/sdlc/mentions.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/sdlc/pm-charter.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/sdlc/sync.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/sdlc/team.yml +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/sdlc/time_spent.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/tests/sdlc/conftest.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/tests/test_comprehension_protocol.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/devtools/uv.lock +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/exchange-kpis/README.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/exchange-kpis/exchange_kpis/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/exchange-kpis/exchange_kpis/cli.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/exchange-kpis/exchange_kpis/models.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/exchange-kpis/exchange_kpis/webhooks.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/exchange-kpis/pyproject.toml +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/exchange-kpis/uv.lock +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/README.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/config/marketmaker.conf.json.template +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/event.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/README.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/chaos_bot.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/chaos_strategies/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/chaos_strategies/full_suite.py +3 -3
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/chaos_strategies/large_deposit.py +3 -3
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/chaos_strategies/spawner.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/chaos_strategies/trader_bot.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/chaos_strategies/trader_bot_tests.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/config/chaos.conf.json.template +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/config/marketmaker.conf.json.template +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/config/markettaker.conf.json.template +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/legacy/sample_chaos_bot.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/test_utils/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/test_utils/test_derivadex_client.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/test_utils/test_kyc_client.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/test_utils/test_on_chain_client.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/fuzzing/whitebox_fuzzing/whitebox_derivadex_client.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/mocks/MANIFEST.in +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/mocks/README.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/mocks/mock_kyc.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/mocks/price_feed_fuzzer.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/notebooks/README.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/notebooks/auditor_replay.ipynb +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/notebooks/exchange_dashboard.ipynb +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/notebooks/frontend_dashboard.ipynb +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/notebooks/monitoring_dashboard.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/notebooks/multi_node_diverge.ipynb +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/notebooks/performance_dashboard.ipynb +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/notebooks/state_root_mismatch.ipynb +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/AGENTS.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/README.md +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/examples/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/examples/auditor.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/examples/deposit_usdc.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/examples/rest_quickstart.py +6 -6
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/examples/session_config.json +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/examples/ws_quickstart.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/fuzz-compose.template.ini +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/common_tests/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/common_tests/trade_mining.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/conftest.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Add_000_001.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Add_100_100.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Add_111_111.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Div_100_100.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Div_101_010.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Div_110_000.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Div_111_110.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Div_111_111.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Mul_001_000.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Mul_010_111.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Mul_100_101.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Mul_110_001.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Mul_111_111.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Rem_101_101.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Rem_111_000.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Rem_111_110.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Sub_101_110.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Sub_110_011.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/decimal/Sub_111_111.csv +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/general_tests.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/diagnostics.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/execution/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/execution/block.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/execution/liquidation.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/execution/listing.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/execution/trade_mining.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/execution/trader.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/execution/utils.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/market_data_driver/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/market_data_driver/custom_market_data_driver.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/market_data_driver/exchange_market_data_driver.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/market_data_driver/market_data_driver.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/market_data_driver/tick.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/matchers/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/matchers/account.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/matchers/fuzzed_account.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/matchers/tick.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/matchers/utils.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/order_book.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/harness/wallet.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/mock_transactions.json +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/python_only.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/session_tests.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/test_ddx_common.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/test_decimal.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/test_fuzz_bot_signed_request_contract.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/unit/auditor_driver_tests.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/unit/liquidation_tests.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/tests/unit/package_import_tests.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/utils/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/python/utils/utils.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/scripts/check-release-wheel.bash +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/src/decimal.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/src/h256.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/ddx-python/src/lib.rs +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/__init__.pyi +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/_rust/__init__.pyi +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/_rust/common/accounting.pyi +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/_rust/common/enums.pyi +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/_rust/common/specs.pyi +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/_rust/common/state/__init__.pyi +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/_rust/common/state/keys.pyi +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/_rust/common/transactions.pyi +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/_rust/decimal.pyi +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/_rust/h256.pyi +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/app_config/ethereum/addresses.json +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/auditor/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/auditor/auditor_driver.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/auditor/websocket_message.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/epoch_params.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/fill_context.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/item_utils.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/logging.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/market_aware_account.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/market_specs.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/trade_mining_params.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/advance_epoch.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/advance_settlement_epoch.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/all_price_checkpoints.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/cancel.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/cancel_all.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/complete_fill.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/event.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/fee_distribution.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/futures_expiry.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/genesis.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/inner/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/inner/adl_outcome.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/inner/fill.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/inner/liquidated_position.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/inner/liquidation_entry.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/inner/liquidation_fill.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/inner/outcome.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/inner/trade_fill.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/insurance_fund_update.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/insurance_fund_withdraw.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/liquidation.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/partial_fill.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/pnl_realization.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/post.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/post_order.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/price_checkpoint.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/signer_registered.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/specs_update.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/strategy_update.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/tradable_product_update.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/trade_mining.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/trader_update.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/withdraw.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/transactions/withdraw_ddx.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/common/utils.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/config.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/models/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/models/base.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/py.typed +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/realtime_client/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/realtime_client/config.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/realtime_client/models/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/realtime_client/realtime_client.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/realtime_client/tests/realtime_client_tests.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/clients/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/clients/base_client.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/clients/market_client.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/clients/system_client.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/clients/trade_client.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/constants/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/constants/endpoints.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/contracts/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/contracts/checkpoint/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/contracts/ddx/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/contracts/dummy_token/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/contracts/i_collateral/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/contracts/i_stake/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/exceptions/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/exceptions/exceptions.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/http/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/http/http_client.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/models/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/models/market.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/models/signed.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/models/system.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/models/trade.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/tests/ticker_tests.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/rest_client/utils/__init__.py +0 -0
- {ddx_python-1.0.6 → ddx_python-1.1.7}/python/ddx/utils/__init__.py +0 -0
|
@@ -3129,10 +3129,12 @@ dependencies = [
|
|
|
3129
3129
|
|
|
3130
3130
|
[[package]]
|
|
3131
3131
|
name = "ddx-python"
|
|
3132
|
-
version = "1.
|
|
3132
|
+
version = "1.1.7"
|
|
3133
3133
|
dependencies = [
|
|
3134
3134
|
"core-common",
|
|
3135
|
+
"core-crypto",
|
|
3135
3136
|
"core-ddx",
|
|
3137
|
+
"getrandom 0.3.4",
|
|
3136
3138
|
"pyo3",
|
|
3137
3139
|
"pyo3-stub-gen",
|
|
3138
3140
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ddx-python
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.7
|
|
4
4
|
Classifier: Development Status :: 4 - Beta
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
@@ -31,8 +31,6 @@ Requires-Dist: simplejson>=3.19.2,<4
|
|
|
31
31
|
Requires-Dist: sphinx>=8.0.2,<9
|
|
32
32
|
Requires-Dist: verboselogs>=1.7,<2
|
|
33
33
|
Requires-Dist: btrees>=6.0,<7
|
|
34
|
-
Requires-Dist: ccxt>=4.3.79,<5
|
|
35
|
-
Requires-Dist: coincurve>=20.0.0,<21
|
|
36
34
|
Requires-Dist: dash-bootstrap-components>=1.6.0,<2
|
|
37
35
|
Requires-Dist: python-dotenv>=1.0.1,<2
|
|
38
36
|
Requires-Dist: sexpdata>=1.0.2,<2
|
|
@@ -5,6 +5,13 @@ use std::string::String;
|
|
|
5
5
|
pub enum Error {
|
|
6
6
|
#[error("Error with crypto tooling: {0}")]
|
|
7
7
|
Crypto(String),
|
|
8
|
+
#[error("failed to deserialize {context}: {detail}")]
|
|
9
|
+
Deserialize {
|
|
10
|
+
context: &'static str,
|
|
11
|
+
detail: String,
|
|
12
|
+
},
|
|
13
|
+
#[error("Ecall failed with sgx_status={status} retval={retval}")]
|
|
14
|
+
Ecall { status: String, retval: String },
|
|
8
15
|
#[error(transparent)]
|
|
9
16
|
EnvVar(#[from] std::env::VarError),
|
|
10
17
|
#[error(transparent)]
|
|
@@ -22,6 +29,11 @@ pub enum Error {
|
|
|
22
29
|
Conversion(String),
|
|
23
30
|
#[error(transparent)]
|
|
24
31
|
Regex(#[from] regex::Error),
|
|
32
|
+
#[error("failed to serialize {context}: {detail}")]
|
|
33
|
+
Serialize {
|
|
34
|
+
context: &'static str,
|
|
35
|
+
detail: String,
|
|
36
|
+
},
|
|
25
37
|
#[error("Error with serde serialize/deserialize: {0}")]
|
|
26
38
|
Serde(String),
|
|
27
39
|
#[error("Error with Sparse Merkle Tree tooling: {0}")]
|
|
@@ -32,6 +44,19 @@ pub enum Error {
|
|
|
32
44
|
|
|
33
45
|
pub type Result<T, E = Error> = std::result::Result<T, E>;
|
|
34
46
|
|
|
47
|
+
impl Error {
|
|
48
|
+
pub fn ecall(
|
|
49
|
+
status: impl ToString,
|
|
50
|
+
retval: Option<impl ToString + std::default::Default>,
|
|
51
|
+
) -> Self {
|
|
52
|
+
let retval = retval.unwrap_or_default().to_string();
|
|
53
|
+
Self::Ecall {
|
|
54
|
+
status: status.to_string(),
|
|
55
|
+
retval,
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
35
60
|
impl From<sparse_merkle_tree::error::Error> for Error {
|
|
36
61
|
fn from(e: sparse_merkle_tree::error::Error) -> Self {
|
|
37
62
|
Error::SparseMerkleTree(format!("{e:?}"))
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
use crate::{Error, Result};
|
|
2
|
+
use serde::{Serialize, de::DeserializeOwned};
|
|
3
|
+
|
|
4
|
+
pub fn serialize<T: Serialize>(value: &T, context: &'static str) -> Result<Vec<u8>> {
|
|
5
|
+
cbor4ii::serde::to_vec(vec![], value).map_err(|err| Error::Serialize {
|
|
6
|
+
context,
|
|
7
|
+
detail: err.to_string(),
|
|
8
|
+
})
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
pub fn deserialize<T: DeserializeOwned>(bytes: &[u8], context: &'static str) -> Result<T> {
|
|
12
|
+
cbor4ii::serde::from_slice(bytes).map_err(|err| Error::Deserialize {
|
|
13
|
+
context,
|
|
14
|
+
detail: err.to_string(),
|
|
15
|
+
})
|
|
16
|
+
}
|
|
@@ -4,12 +4,15 @@ use std::time::{Duration, UNIX_EPOCH};
|
|
|
4
4
|
|
|
5
5
|
#[cfg(not(target_family = "wasm"))]
|
|
6
6
|
pub mod backoff;
|
|
7
|
+
pub mod cbor;
|
|
7
8
|
#[cfg(not(target_family = "wasm"))]
|
|
8
9
|
pub mod mem;
|
|
9
10
|
pub mod tokenize;
|
|
10
11
|
#[cfg(not(target_family = "wasm"))]
|
|
11
12
|
pub mod tracing;
|
|
12
13
|
|
|
14
|
+
pub use cbor::{deserialize, serialize};
|
|
15
|
+
|
|
13
16
|
pub fn get_app_share_dir(app_name: &str) -> String {
|
|
14
17
|
let mut share_dir =
|
|
15
18
|
std::env::var("APP_SHARE").expect("APP_SHARE must be set before running operator tooling");
|
|
@@ -124,7 +124,7 @@ pub fn nonced(input: TokenStream) -> TokenStream {
|
|
|
124
124
|
let name = s.ident;
|
|
125
125
|
let expanded = quote! {
|
|
126
126
|
impl Nonced for #name {
|
|
127
|
-
fn
|
|
127
|
+
fn get_nonce(&self) -> Nonce {
|
|
128
128
|
self.nonce
|
|
129
129
|
}
|
|
130
130
|
}
|
|
@@ -137,12 +137,12 @@ pub fn nonced(input: TokenStream) -> TokenStream {
|
|
|
137
137
|
for v in e.variants.into_iter() {
|
|
138
138
|
let vname = v.ident;
|
|
139
139
|
arms.push(parse_quote! {
|
|
140
|
-
#name::#vname(inner) => inner.
|
|
140
|
+
#name::#vname(inner) => inner.get_nonce(),
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
let expanded = quote! {
|
|
144
144
|
impl Nonced for #name {
|
|
145
|
-
fn
|
|
145
|
+
fn get_nonce(&self) -> Nonce {
|
|
146
146
|
match self {
|
|
147
147
|
#(#arms)*
|
|
148
148
|
}
|
|
@@ -13,7 +13,6 @@ default = [
|
|
|
13
13
|
"fixed_expiry_future",
|
|
14
14
|
"index_fund",
|
|
15
15
|
"pred_market_future",
|
|
16
|
-
"private_equity_perp",
|
|
17
16
|
"price_feed_fuzzer",
|
|
18
17
|
]
|
|
19
18
|
alpha1 = []
|
|
@@ -40,7 +39,6 @@ eth-base = ["alloy", "alloy-sol-types"]
|
|
|
40
39
|
multi_strategies = []
|
|
41
40
|
insurance_fund_client_req = []
|
|
42
41
|
index_fund = []
|
|
43
|
-
private_equity_perp = []
|
|
44
42
|
fixed_expiry_future = ["pyo3?/chrono"]
|
|
45
43
|
pred_market_future = ["pyo3?/chrono"]
|
|
46
44
|
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
use crate::{
|
|
2
|
+
ExecutionOutcome,
|
|
3
|
+
types::request::{
|
|
4
|
+
AdvanceEpoch, AdvanceSettlementEpoch, Block, CancelAllIntent, CancelOrderIntent,
|
|
5
|
+
ClientRequest, ClientSequencingOutcome, Cmd, IndexPrice, MarketClose, MintPriceCheckpoint,
|
|
6
|
+
ModifyOrderIntent, OrderIntent, PreProcessedRequest, ProfileUpdateIntent, Receipt, Request,
|
|
7
|
+
RequestWithReceipt, SettlementValue, UpdateProductListings, UpgradeParams,
|
|
8
|
+
WithdrawDDXIntent, WithdrawIntent,
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
use anyhow::Error;
|
|
12
|
+
use core_common::types::{auth::EnrollmentEvent, primitives::StampedTimeValue};
|
|
13
|
+
use serde::{Deserialize, Serialize, de::DeserializeOwned};
|
|
14
|
+
use thiserror::Error;
|
|
15
|
+
|
|
16
|
+
#[derive(Debug, Error)]
|
|
17
|
+
pub enum AdapterError {
|
|
18
|
+
#[error("failed to serialize {context}")]
|
|
19
|
+
Serialize {
|
|
20
|
+
context: &'static str,
|
|
21
|
+
#[source]
|
|
22
|
+
source: Error,
|
|
23
|
+
},
|
|
24
|
+
#[error("failed to deserialize {context}")]
|
|
25
|
+
Deserialize {
|
|
26
|
+
context: &'static str,
|
|
27
|
+
#[source]
|
|
28
|
+
source: Error,
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
fn serialize<T: Serialize>(value: &T, context: &'static str) -> Result<Vec<u8>, AdapterError> {
|
|
33
|
+
cbor4ii::serde::to_vec(vec![], value).map_err(|err| AdapterError::Serialize {
|
|
34
|
+
context,
|
|
35
|
+
source: Error::new(err),
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
fn deserialize<T: DeserializeOwned>(
|
|
40
|
+
bytes: &[u8],
|
|
41
|
+
context: &'static str,
|
|
42
|
+
) -> Result<T, AdapterError> {
|
|
43
|
+
cbor4ii::serde::from_slice(bytes).map_err(|err| AdapterError::Deserialize {
|
|
44
|
+
context,
|
|
45
|
+
source: Error::new(err),
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
|
|
50
|
+
#[serde(tag = "t", content = "c")]
|
|
51
|
+
pub enum RequestWire {
|
|
52
|
+
Order(OrderIntent),
|
|
53
|
+
ModifyOrder(ModifyOrderIntent),
|
|
54
|
+
CancelOrder(CancelOrderIntent),
|
|
55
|
+
CancelAll(CancelAllIntent),
|
|
56
|
+
Withdraw(WithdrawIntent),
|
|
57
|
+
WithdrawDDX(WithdrawDDXIntent),
|
|
58
|
+
#[cfg(feature = "insurance_fund_client_req")]
|
|
59
|
+
InsuranceFundWithdraw(crate::types::request::InsuranceFundWithdrawIntent),
|
|
60
|
+
ProfileUpdate(ProfileUpdateIntent),
|
|
61
|
+
Genesis,
|
|
62
|
+
IndexPrice(IndexPrice),
|
|
63
|
+
MarketClose(MarketClose),
|
|
64
|
+
SettlementValue(SettlementValue),
|
|
65
|
+
Block(Block),
|
|
66
|
+
AdvanceTime(StampedTimeValue),
|
|
67
|
+
AdvanceEpoch(AdvanceEpoch),
|
|
68
|
+
AdvanceSettlementEpoch(AdvanceSettlementEpoch),
|
|
69
|
+
PriceCheckpoint(MintPriceCheckpoint),
|
|
70
|
+
UpdateProductListings(UpdateProductListings),
|
|
71
|
+
UpdateEnrollment(EnrollmentEvent),
|
|
72
|
+
Upgrade(UpgradeParams),
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
|
|
76
|
+
pub struct RequestWithReceiptWire {
|
|
77
|
+
pub request: RequestWire,
|
|
78
|
+
pub receipt: Receipt,
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
impl From<&Request> for RequestWire {
|
|
82
|
+
fn from(value: &Request) -> Self {
|
|
83
|
+
match value {
|
|
84
|
+
Request::ClientRequest(request) => match request {
|
|
85
|
+
ClientRequest::Order(request) => Self::Order(request.clone()),
|
|
86
|
+
ClientRequest::ModifyOrder(request) => Self::ModifyOrder(request.clone()),
|
|
87
|
+
ClientRequest::CancelOrder(request) => Self::CancelOrder(request.clone()),
|
|
88
|
+
ClientRequest::CancelAll(request) => Self::CancelAll(request.clone()),
|
|
89
|
+
ClientRequest::Withdraw(request) => Self::Withdraw(request.clone()),
|
|
90
|
+
ClientRequest::WithdrawDDX(request) => Self::WithdrawDDX(request.clone()),
|
|
91
|
+
#[cfg(feature = "insurance_fund_client_req")]
|
|
92
|
+
ClientRequest::InsuranceFundWithdraw(request) => {
|
|
93
|
+
Self::InsuranceFundWithdraw(request.clone())
|
|
94
|
+
}
|
|
95
|
+
ClientRequest::ProfileUpdate(request) => Self::ProfileUpdate(request.clone()),
|
|
96
|
+
},
|
|
97
|
+
Request::Cmd(cmd) => match cmd {
|
|
98
|
+
Cmd::Genesis => Self::Genesis,
|
|
99
|
+
Cmd::IndexPrice(cmd) => Self::IndexPrice(cmd.clone()),
|
|
100
|
+
Cmd::MarketClose(cmd) => Self::MarketClose(cmd.clone()),
|
|
101
|
+
Cmd::SettlementValue(cmd) => Self::SettlementValue(cmd.clone()),
|
|
102
|
+
Cmd::Block(cmd) => Self::Block(cmd.clone()),
|
|
103
|
+
Cmd::AdvanceTime(cmd) => Self::AdvanceTime(*cmd),
|
|
104
|
+
Cmd::AdvanceEpoch(cmd) => Self::AdvanceEpoch(cmd.clone()),
|
|
105
|
+
Cmd::AdvanceSettlementEpoch(cmd) => Self::AdvanceSettlementEpoch(cmd.clone()),
|
|
106
|
+
Cmd::PriceCheckpoint(cmd) => Self::PriceCheckpoint(cmd.clone()),
|
|
107
|
+
Cmd::UpdateProductListings(cmd) => Self::UpdateProductListings(cmd.clone()),
|
|
108
|
+
Cmd::UpdateEnrollment(cmd) => Self::UpdateEnrollment(cmd.clone()),
|
|
109
|
+
Cmd::Upgrade(cmd) => Self::Upgrade(cmd.clone()),
|
|
110
|
+
},
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
impl From<RequestWire> for Request {
|
|
116
|
+
fn from(value: RequestWire) -> Self {
|
|
117
|
+
match value {
|
|
118
|
+
RequestWire::Order(request) => Self::ClientRequest(ClientRequest::Order(request)),
|
|
119
|
+
RequestWire::ModifyOrder(request) => {
|
|
120
|
+
Self::ClientRequest(ClientRequest::ModifyOrder(request))
|
|
121
|
+
}
|
|
122
|
+
RequestWire::CancelOrder(request) => {
|
|
123
|
+
Self::ClientRequest(ClientRequest::CancelOrder(request))
|
|
124
|
+
}
|
|
125
|
+
RequestWire::CancelAll(request) => {
|
|
126
|
+
Self::ClientRequest(ClientRequest::CancelAll(request))
|
|
127
|
+
}
|
|
128
|
+
RequestWire::Withdraw(request) => Self::ClientRequest(ClientRequest::Withdraw(request)),
|
|
129
|
+
RequestWire::WithdrawDDX(request) => {
|
|
130
|
+
Self::ClientRequest(ClientRequest::WithdrawDDX(request))
|
|
131
|
+
}
|
|
132
|
+
#[cfg(feature = "insurance_fund_client_req")]
|
|
133
|
+
RequestWire::InsuranceFundWithdraw(request) => {
|
|
134
|
+
Self::ClientRequest(ClientRequest::InsuranceFundWithdraw(request))
|
|
135
|
+
}
|
|
136
|
+
RequestWire::ProfileUpdate(request) => {
|
|
137
|
+
Self::ClientRequest(ClientRequest::ProfileUpdate(request))
|
|
138
|
+
}
|
|
139
|
+
RequestWire::Genesis => Self::Cmd(Cmd::Genesis),
|
|
140
|
+
RequestWire::IndexPrice(cmd) => Self::Cmd(Cmd::IndexPrice(cmd)),
|
|
141
|
+
RequestWire::MarketClose(cmd) => Self::Cmd(Cmd::MarketClose(cmd)),
|
|
142
|
+
RequestWire::SettlementValue(cmd) => Self::Cmd(Cmd::SettlementValue(cmd)),
|
|
143
|
+
RequestWire::Block(cmd) => Self::Cmd(Cmd::Block(cmd)),
|
|
144
|
+
RequestWire::AdvanceTime(cmd) => Self::Cmd(Cmd::AdvanceTime(cmd)),
|
|
145
|
+
RequestWire::AdvanceEpoch(cmd) => Self::Cmd(Cmd::AdvanceEpoch(cmd)),
|
|
146
|
+
RequestWire::AdvanceSettlementEpoch(cmd) => Self::Cmd(Cmd::AdvanceSettlementEpoch(cmd)),
|
|
147
|
+
RequestWire::PriceCheckpoint(cmd) => Self::Cmd(Cmd::PriceCheckpoint(cmd)),
|
|
148
|
+
RequestWire::UpdateProductListings(cmd) => Self::Cmd(Cmd::UpdateProductListings(cmd)),
|
|
149
|
+
RequestWire::UpdateEnrollment(cmd) => Self::Cmd(Cmd::UpdateEnrollment(cmd)),
|
|
150
|
+
RequestWire::Upgrade(cmd) => Self::Cmd(Cmd::Upgrade(cmd)),
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
impl From<&RequestWithReceipt> for RequestWithReceiptWire {
|
|
156
|
+
fn from(value: &RequestWithReceipt) -> Self {
|
|
157
|
+
Self {
|
|
158
|
+
request: RequestWire::from(&value.request),
|
|
159
|
+
receipt: value.receipt.clone(),
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
impl From<RequestWithReceiptWire> for RequestWithReceipt {
|
|
165
|
+
fn from(value: RequestWithReceiptWire) -> Self {
|
|
166
|
+
Self {
|
|
167
|
+
request: value.request.into(),
|
|
168
|
+
receipt: value.receipt,
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
pub fn serialize_preprocessed_request(
|
|
174
|
+
request: &PreProcessedRequest,
|
|
175
|
+
) -> Result<Vec<u8>, AdapterError> {
|
|
176
|
+
serialize(request, "pre-processed request")
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
pub fn deserialize_preprocessed_request(bytes: &[u8]) -> Result<PreProcessedRequest, AdapterError> {
|
|
180
|
+
deserialize(bytes, "pre-processed request")
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
pub fn serialize_execution_outcome(outcome: &ExecutionOutcome) -> Result<Vec<u8>, AdapterError> {
|
|
184
|
+
serialize(outcome, "execution outcome")
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
pub fn deserialize_execution_outcome(bytes: &[u8]) -> Result<ExecutionOutcome, AdapterError> {
|
|
188
|
+
deserialize(bytes, "execution outcome")
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
pub fn serialize_request_with_receipt(value: &RequestWithReceipt) -> Result<Vec<u8>, AdapterError> {
|
|
192
|
+
serialize(&RequestWithReceiptWire::from(value), "request with receipt")
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
pub fn deserialize_request_with_receipt(bytes: &[u8]) -> Result<RequestWithReceipt, AdapterError> {
|
|
196
|
+
deserialize::<RequestWithReceiptWire>(bytes, "request with receipt").map(Into::into)
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
pub fn serialize_client_sequencing_outcome(
|
|
200
|
+
value: &ClientSequencingOutcome,
|
|
201
|
+
) -> Result<Vec<u8>, AdapterError> {
|
|
202
|
+
serialize(value, "client sequencing outcome")
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
pub fn deserialize_client_sequencing_outcome(
|
|
206
|
+
bytes: &[u8],
|
|
207
|
+
) -> Result<ClientSequencingOutcome, AdapterError> {
|
|
208
|
+
deserialize(bytes, "client sequencing outcome")
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
pub fn serialize_request(request: &Request) -> Result<Vec<u8>, AdapterError> {
|
|
212
|
+
serialize(&RequestWire::from(request), "request")
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
pub fn deserialize_request(bytes: &[u8]) -> Result<Request, AdapterError> {
|
|
216
|
+
deserialize::<RequestWire>(bytes, "request").map(Into::into)
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
#[cfg(test)]
|
|
220
|
+
mod tests {
|
|
221
|
+
use super::*;
|
|
222
|
+
use crate::{
|
|
223
|
+
ExecutionOutcome,
|
|
224
|
+
types::{
|
|
225
|
+
request::{
|
|
226
|
+
ClientRequest, ClientSequencingOutcome, Cmd, DdxSessionDelegatedPayload,
|
|
227
|
+
OrderIntent, OrderIntentPayload, OrderType, PreProcessedRequest, Receipt, Request,
|
|
228
|
+
RequestWithReceipt, SessionAction,
|
|
229
|
+
},
|
|
230
|
+
transaction::ExecutionOps,
|
|
231
|
+
},
|
|
232
|
+
};
|
|
233
|
+
use core_common::types::primitives::{CompressedKey, OrderSide};
|
|
234
|
+
use core_crypto::eip712::encode_delegated_policy_proof_v2;
|
|
235
|
+
use core_macros::unscaled;
|
|
236
|
+
use std::collections::BTreeSet;
|
|
237
|
+
|
|
238
|
+
fn order_request_with_session_key_signature() -> Request {
|
|
239
|
+
let session_key_signature = encode_delegated_policy_proof_v2(&DdxSessionDelegatedPayload {
|
|
240
|
+
session_signature: Default::default(),
|
|
241
|
+
expiry: 42,
|
|
242
|
+
acl_scope: BTreeSet::from([SessionAction::Order]),
|
|
243
|
+
session_public_key: CompressedKey::from_slice(&[0_u8; 33]),
|
|
244
|
+
})
|
|
245
|
+
.expect("encode delegated payload");
|
|
246
|
+
|
|
247
|
+
Request::ClientRequest(ClientRequest::Order(OrderIntent::new(
|
|
248
|
+
OrderIntentPayload {
|
|
249
|
+
symbol: "ETHP".into(),
|
|
250
|
+
strategy: Default::default(),
|
|
251
|
+
side: OrderSide::Bid,
|
|
252
|
+
order_type: OrderType::Limit { post_only: false },
|
|
253
|
+
amount: unscaled!(10),
|
|
254
|
+
price: unscaled!(200),
|
|
255
|
+
stop_price: Default::default(),
|
|
256
|
+
},
|
|
257
|
+
Default::default(),
|
|
258
|
+
0,
|
|
259
|
+
crate::types::request::DEFAULT_RECV_WINDOW_MS,
|
|
260
|
+
Some(session_key_signature),
|
|
261
|
+
Default::default(),
|
|
262
|
+
)))
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
#[test]
|
|
266
|
+
fn round_trip_preprocessed_request() {
|
|
267
|
+
let request = PreProcessedRequest::AdvanceTime(Default::default());
|
|
268
|
+
let encoded = serialize_preprocessed_request(&request).unwrap();
|
|
269
|
+
let decoded = deserialize_preprocessed_request(&encoded).unwrap();
|
|
270
|
+
assert_eq!(request, decoded);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
#[test]
|
|
274
|
+
fn round_trip_execution_outcome() {
|
|
275
|
+
let outcome = ExecutionOutcome::Success(ExecutionOps::NonStateTransitioning(Vec::new()));
|
|
276
|
+
let encoded = serialize_execution_outcome(&outcome).unwrap();
|
|
277
|
+
let decoded = deserialize_execution_outcome(&encoded).unwrap();
|
|
278
|
+
assert_eq!(format!("{outcome:?}"), format!("{decoded:?}"));
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
#[test]
|
|
282
|
+
fn round_trip_request_with_receipt() {
|
|
283
|
+
let request = RequestWithReceipt {
|
|
284
|
+
request: Request::Cmd(Cmd::AdvanceTime(Default::default())),
|
|
285
|
+
receipt: Receipt::Sequenced {
|
|
286
|
+
nonce: Default::default(),
|
|
287
|
+
request_hash: Default::default(),
|
|
288
|
+
request_index: 1,
|
|
289
|
+
sender: Default::default(),
|
|
290
|
+
enclave_signature: Default::default(),
|
|
291
|
+
},
|
|
292
|
+
};
|
|
293
|
+
let encoded = serialize_request_with_receipt(&request).unwrap();
|
|
294
|
+
let decoded = deserialize_request_with_receipt(&encoded).unwrap();
|
|
295
|
+
assert_eq!(request, decoded);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
#[test]
|
|
299
|
+
fn round_trip_retained_client_sequencing_outcome() {
|
|
300
|
+
let outcome = ClientSequencingOutcome::retained_retry(RequestWithReceipt {
|
|
301
|
+
request: Request::Cmd(Cmd::AdvanceTime(Default::default())),
|
|
302
|
+
receipt: Receipt::Sequenced {
|
|
303
|
+
nonce: Default::default(),
|
|
304
|
+
request_hash: Default::default(),
|
|
305
|
+
request_index: 9,
|
|
306
|
+
sender: Default::default(),
|
|
307
|
+
enclave_signature: Default::default(),
|
|
308
|
+
},
|
|
309
|
+
});
|
|
310
|
+
let encoded = serialize_client_sequencing_outcome(&outcome).unwrap();
|
|
311
|
+
let decoded = deserialize_client_sequencing_outcome(&encoded).unwrap();
|
|
312
|
+
assert_eq!(outcome, decoded);
|
|
313
|
+
assert!(!decoded.is_fresh());
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
#[test]
|
|
317
|
+
fn round_trip_request() {
|
|
318
|
+
let request = Request::Cmd(Cmd::AdvanceTime(Default::default()));
|
|
319
|
+
let encoded = serialize_request(&request).unwrap();
|
|
320
|
+
let decoded = deserialize_request(&encoded).unwrap();
|
|
321
|
+
assert_eq!(request, decoded);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
#[test]
|
|
325
|
+
fn round_trip_order_request_with_session_key_signature() {
|
|
326
|
+
let request = order_request_with_session_key_signature();
|
|
327
|
+
let encoded = serialize_request(&request).unwrap();
|
|
328
|
+
let decoded = deserialize_request(&encoded).unwrap();
|
|
329
|
+
assert_eq!(request, decoded);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
@@ -278,15 +278,9 @@ pub const COINGECKO_ID: &str = "coingecko";
|
|
|
278
278
|
// The current polling threshold is set to 10 minutes.
|
|
279
279
|
pub const COINGECKO_POLL_THRESHOLD: usize = 600;
|
|
280
280
|
|
|
281
|
-
// Gecko terminal Hostname and SPCX contract address
|
|
282
|
-
pub const GECKO_TERMINAL_ID: &str = "gecko-terminal";
|
|
283
|
-
|
|
284
281
|
// Elections Kalshi Hostname and WAS contract address
|
|
285
282
|
pub const ELECTIONS_KALSHI_ID: &str = "kalshi";
|
|
286
283
|
|
|
287
|
-
// Due to rate limit and low liquidity, we need to poll less often for SPCX
|
|
288
|
-
pub const SPCX_POLL_THRESHOLD: usize = 10;
|
|
289
|
-
|
|
290
284
|
// Default limit on strategies a trader can have
|
|
291
285
|
pub const MAX_STRATEGIES: u8 = 10;
|
|
292
286
|
|
|
@@ -243,9 +243,12 @@ pub mod tests {
|
|
|
243
243
|
fn test_calculate_fees() {
|
|
244
244
|
let amount = dec!(10);
|
|
245
245
|
let price = dec!(100);
|
|
246
|
+
let maker_fee = TradeSide::Maker.trading_fee(amount, price);
|
|
246
247
|
let taker_fee = TradeSide::Taker.trading_fee(amount, price);
|
|
247
248
|
let notional = amount * price;
|
|
248
249
|
let fee = notional * *TAKER_FEE_BPS;
|
|
250
|
+
assert_eq!(maker_fee, Decimal::ZERO);
|
|
251
|
+
assert_eq!(taker_fee, dec!(0.5));
|
|
249
252
|
assert_eq!(taker_fee, fee);
|
|
250
253
|
}
|
|
251
254
|
|