ipor-fusion 4.2.1.dev6__tar.gz → 4.2.1.dev44__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.
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.github/workflows/python-build.yml +4 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/AGENTS.md +7 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/PKG-INFO +1 -1
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/examples/CONTRIBUTING.md +3 -3
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/examples/README.md +3 -2
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/examples/advanced_compound_v3_institutional_usdc_ethereum.py +12 -9
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/examples/advanced_euler_v2_credit_market_base.py +29 -14
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/examples/advanced_euler_v2_looping_arbitrum.py +4 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/examples/crosschain_ccip_usdc_arbitrum_hyperevm.py +5 -3
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/examples/external_state_margin_leg_base.py +129 -69
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/examples/hypercore_vault_official_deployment_hyperevm.py +14 -7
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/examples/simple_aave_v3_supply_base.py +30 -17
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/pyproject.toml +1 -1
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/guide/architecture.md +4 -3
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_euler_v2.py +8 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_live.py +7 -8
- ipor_fusion-4.2.1.dev44/tests/_rpc_cache.py +353 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/conftest.py +18 -1
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_examples_vaults.py +18 -21
- ipor_fusion-4.2.1.dev44/tests/test_rpc_cache.py +699 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_euler_v2_batch_base.py +2 -2
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_euler_v2_credit_market_base.py +2 -2
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_euler_v2_swap_deploy_base.py +2 -3
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_euler_v2_swap_reconfigure_base.py +2 -2
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_euler_v2_swap_registry_base.py +2 -2
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_vault_from_scratch_base.py +5 -5
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_vault_reconciliation_onchain_base.py +6 -20
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.claude-plugin/marketplace.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.claude-plugin/plugin.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.env.example +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.gemini/settings.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.git-blame-ignore-revs +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.github/workflows/cd.yml +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.github/workflows/ci.yml +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.github/workflows/commit-lint.yml +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.github/workflows/notify-slack.yml +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.github/workflows/python-publish.yml +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.github/workflows/release.yml +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.github/workflows/report-slack.yml +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.gitignore +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.mcp.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.pre-commit-config.yaml +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/.python-version +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/CHANGELOG.md +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/CLAUDE.md +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/CODEOWNERS +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/LICENSE +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/MIGRATION_4.md +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/README.md +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/build.sh +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/pytest.ini +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/scripts/commit-check.sh +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/scripts/fusion_error_signatures.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/skills/ipor-deploy-vault/SKILL.md +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/__init__.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/about.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cache.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/chains.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/__init__.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/address_cmd.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/changelog_cmd.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/config_cmd.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/config_store.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/fuse_cmd.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/main.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/market_cmd.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/options.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/oracle_mapping_view.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/preflight_cmd.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/vault_cmd.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/vault_health.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/vault_info_view.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/vault_markets_view.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/cli/vault_rendering.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/config/__init__.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/config/roles.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/__init__.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/access.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/address.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/context.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/context_manager.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/contract.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/erc20.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/external_state_executor.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/fee_manager.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/fuse.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/fuse_action.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/fuse_decoding.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/fusion_factory.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/logs.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/multicall.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/oracle.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/plasma_vault.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/rewards_manager.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/simulation.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/simulation_result.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/core/withdraw_manager.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/__init__.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/ccip/__init__.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/ccip/chainlink.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/ccip/codec.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/ccip/contracts.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/ccip/events.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/ccip/indexer.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/ccip/lane.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/ccip/quote.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/ccip/transport.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/contracts.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/discovery.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/errors.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/fuses/__init__.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/fuses/base.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/fuses/ccip.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/fuses/stargate.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/lane.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/logs.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/messages.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/simulation.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/stargate/__init__.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/stargate/contracts.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/stargate/lane.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/stargate/layerzero.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/stargate/transport.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/crosschain/transport.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/dependency_graph.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/entry_cli.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/entry_mcp.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/errors.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/explorer.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/field_docs.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuse_whitelist.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/__init__.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/aave_v3.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/async_action.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/base.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/compound_v3.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/erc4626.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/euler_v2.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/events.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/external_state.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/external_state_event_decoding.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/fluid_instadapp.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/gearbox_v3.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/hypercore.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/hypercore_event_decoding.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/hypercore_pre_hooks.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/merkl.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/morpho.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/ramses_v2.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/uniswap_v3.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fuses/universal.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/fusion_errors.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/guide/__init__.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/guide/glossary.md +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/guide/invariants.md +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/guide/quickstart.md +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/hypercore/__init__.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/market_ids.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/market_info.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/mcp/__init__.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/mcp/guide.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/mcp/models.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/mcp/server.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/morpho_api.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/onchain_text.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/preflight.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/py.typed +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/__init__.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/aave_v3.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/aave_v4.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/compound_v3.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/euler_v2.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/hypercore.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/hypercore_outcome.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/lending_health.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/morpho.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/oracle_mapping.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/oracle_mapping_nodes.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/oracle_mapping_reader.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/position_manager.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/ramses_v2.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/uniswap_v3.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/readers/unpriceable.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/redaction.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/registry.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/substrates.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/types.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/validation.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/vault_data.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/vault_erc20.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/vault_info.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/vault_managers.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/vault_positions.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/src/ipor_fusion/vault_reads.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/UniswapV3UniversalRouter.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_addresses.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_crosschain.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_crosschain_lifecycle.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_crosschain_recovery.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_event_args.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_fake_rpc.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_foundry.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_golden.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_guide.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_hypercore_model.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_hypercore_shadow.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_multicall.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_oracle_mapping_fake.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_simulate.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/_validation.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/addresses.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/constants.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/hypercore_hip3_flow.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/hypercore_market55.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/hypercore_official.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/market_golden/meta_morpho_v1.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/market_golden/meta_morpho_v1.mcp.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/market_golden/meta_morpho_v2.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/market_golden/meta_morpho_v2.mcp.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/market_golden/morpho_api/market.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/market_golden/morpho_api/vault_v1.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/market_golden/morpho_api/vault_v2.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/market_golden/morpho_api/vault_v2_not_found.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/market_golden/morpho_blue.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/market_golden/morpho_blue.mcp.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/market_golden/morpho_blue_api_error.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/market_golden/morpho_blue_api_error.mcp.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/market_golden/morpho_blue_no_api.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/market_golden/morpho_blue_no_api.mcp.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/oracle_mapping_golden/mapping.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/oracle_mapping_golden/mapping.mcp.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/simulate_v1_request.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/vault_info_golden/clean.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/vault_info_golden/clean.mcp.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/vault_info_golden/clean.txt +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/vault_info_golden/deployment_error.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/vault_info_golden/deployment_error.mcp.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/vault_info_golden/deployment_error.txt +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/vault_info_golden/fetched.cli.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/vault_info_golden/fetched.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/vault_info_golden/fetched.mcp.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/vault_info_golden/full.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/vault_info_golden/full.mcp.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/vault_info_golden/full.txt +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/vault_info_golden/rich.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/vault_info_golden/rich.mcp.json +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/fixtures/vault_info_golden/rich.txt +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_about.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_access_manager.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_addresses_helper.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cache.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_ccip_read_disabled.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_chains.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_address.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_changelog.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_commands.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_config_store.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_helpers.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_hypercore.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_lending_health.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_market_golden.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_market_morpho_blue.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_mcp_fuse_whitelist.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_mcp_parity.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_oracle_mapping.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_oracle_mapping_golden.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_pending_requests_scan.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_preflight.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_role_accounts.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_vault_info_golden.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_vault_predates_getters.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_cli_vault_validate.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_contract_call.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_contract_encoder.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_crosschain_ccip_events.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_crosschain_ccip_indexer.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_crosschain_ccip_quote.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_crosschain_chainlink.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_crosschain_contracts.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_crosschain_encoding.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_crosschain_errors.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_crosschain_lane.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_crosschain_layering.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_crosschain_transport.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_docs_typing.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_erc20.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_error_hierarchy.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_examples_compound_v3_ethereum.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_examples_crosschain.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_examples_euler_looping_arbitrum.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_examples_hypercore_hyperevm.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_explorer.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_external_state_events.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_external_state_executor.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_fee_manager.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_fuse_decoding.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_fuse_encoding.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_fuse_whitelist.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_fusion_errors.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_fusion_instance.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_governance_wrappers.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_guide.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_hypercore_deployment.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_hypercore_events.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_hypercore_flow.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_hypercore_live.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_hypercore_outcome.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_hypercore_pre_hooks.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_hypercore_readers.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_hypercore_simulation.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_lending_health_compound_v3_onchain.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_logs.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_mcp_address.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_mcp_hypercore.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_mcp_models.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_mcp_preflight.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_mcp_server.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_mcp_vault_validate.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_multicall.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_onchain_text.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_oracle.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_oracle_mapping.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_plasma_vault.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_preflight.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_provider_url_redaction.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_public_api.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_public_type_reachability.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_reader_encoding.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_registry.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_revert_decoding.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_rewards_manager.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_roles.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_sdk_layering.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_borrow_aave_v3_mainnet.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_claim_merkl_wrapper_base.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_claim_morpho_rewards.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_compound_v3_institutional_usdc.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_crosschain_hyperevm.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_examples_arbitrum.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_examples_base.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_examples_crosschain.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_examples_ethereum.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_examples_hyperevm.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_external_state_executor_base.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_fusion_factory_clone_base.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_looping_aave_v3_base.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_looping_morpho_blue_base.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_morpho_blue.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_pilot_v3.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_pilot_v4_uniswap.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_pilot_v5_ramses.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_pilot_v5_scheduled.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_plasma_vault_setters_base.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_preflight_base.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_readers_integration.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_release_funds.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_swap_on_base.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulate_timelock_base.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulation_errors.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_simulation_observation.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_solidity_compiler.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_solidity_mirrors.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_substrates.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_types_and_events.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_unpriceable_tokens.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_validation.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_vault_data_block.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_vault_dep_graph.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_vault_info_fetched_golden.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_vault_info_onchain_base.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_vault_info_onchain_base_no_withdraw_manager.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_vault_simulator_blocks.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_web3_context.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/test_withdraw_manager.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/typed_client/consumer.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/tests/typed_client/rejected.py +0 -0
- {ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/uv.lock +0 -0
|
@@ -95,6 +95,10 @@ jobs:
|
|
|
95
95
|
run: uv build
|
|
96
96
|
id: build
|
|
97
97
|
|
|
98
|
+
# The tests serve RPC responses cached under ~/.cache/ipor-fusion/tests/
|
|
99
|
+
# (tests/_rpc_cache.py) without checking them: if that directory is ever
|
|
100
|
+
# restored from a cache, restore only entries saved by runs on main, never
|
|
101
|
+
# by a pull request. `enable-cache` above is uv's package cache, not this.
|
|
98
102
|
- name: Tests
|
|
99
103
|
if: inputs.test-enabled
|
|
100
104
|
run: |
|
|
@@ -70,6 +70,13 @@ public Solidity sources from GitHub). Skip only for an unavailable source; an
|
|
|
70
70
|
exception from the
|
|
71
71
|
SDK is a test failure, never a skip. Never print `.env` or a provider URL: they
|
|
72
72
|
embed API keys, so skip and fail messages carry the exception type only.
|
|
73
|
+
The `web3_*` fixtures and the contexts `_live.archive_context` builds cache
|
|
74
|
+
responses to reads at finalized blocks in
|
|
75
|
+
`$XDG_CACHE_HOME/ipor-fusion/tests/rpc/<format>/` (`tests/_rpc_cache.py`), so a
|
|
76
|
+
rerun of the tests on them refetches only reads that can still change; a bare
|
|
77
|
+
`Web3Context.from_url` client and JSON-RPC batch requests are not cached.
|
|
78
|
+
`IPOR_FUSION_TEST_RPC_CACHE=0` turns it off; `pytest --rpc-cache-clear` empties
|
|
79
|
+
`$XDG_CACHE_HOME/ipor-fusion/tests/` before the run.
|
|
73
80
|
`HYPEREVM_PROVIDER_URL` is used by the Arbitrum → HyperEVM rehearsal and the
|
|
74
81
|
HyperCore tests; general PR CI does not supply it.
|
|
75
82
|
`test_simulate_crosschain_hyperevm.py` rehearses Arbitrum → HyperEVM on pinned blocks
|
|
@@ -91,8 +91,8 @@ keep in sync. Keep its section order:
|
|
|
91
91
|
4. Inlined helpers.
|
|
92
92
|
5. Pure builders -- functions that construct calldata / fuse actions with no chain access, so they
|
|
93
93
|
can be unit-tested offline.
|
|
94
|
-
6. The simulation function -- builds, funds, executes and observes the flow in one batch
|
|
95
|
-
ordered transaction plan, then asserts the outcome.
|
|
94
|
+
6. The simulation function -- builds, funds, executes and observes the flow in one batch (or more,
|
|
95
|
+
where the example says why), prints an ordered transaction plan, then asserts the outcome.
|
|
96
96
|
7. `main()` plus an `if __name__ == "__main__":` guard.
|
|
97
97
|
|
|
98
98
|
## 5. Real, provenance-verified addresses
|
|
@@ -158,7 +158,7 @@ per line, no reliance on 2D layout.
|
|
|
158
158
|
recommended governance delays, protocol parameters, an address registry. A reader cannot check
|
|
159
159
|
those from the file, and they change independently of this repo. Do **not** cite for anything the
|
|
160
160
|
code demonstrates on its own; that link is decoration, and it rots. Prefer a documentation path
|
|
161
|
-
(`
|
|
161
|
+
(`ipor.io/docs -> build-on-fusion -> atomists -> ...`) over a bare URL, so a moved page stays
|
|
162
162
|
findable.
|
|
163
163
|
|
|
164
164
|
## 10. Tests and CI
|
|
@@ -40,7 +40,8 @@ transaction.
|
|
|
40
40
|
its operation and balance fuses, grants the typed substrates that market needs
|
|
41
41
|
(asset, one permitted call, a balance account, two custodians, four guards),
|
|
42
42
|
parks USDC at an off-chain venue through the per-vault executor, has two
|
|
43
|
-
custodians propose and confirm the off-venue value
|
|
43
|
+
custodians propose and confirm the off-venue value, venue PnL included, so the
|
|
44
|
+
NAV moves by that PnL,
|
|
44
45
|
brings the margin home and releases it for a user's scheduled withdrawal, then
|
|
45
46
|
demonstrates the executor rejecting a confirmation that does not match its
|
|
46
47
|
proposal.
|
|
@@ -160,6 +161,6 @@ real funds. (Writing an example? The full scope rules are in
|
|
|
160
161
|
running bot lives there.
|
|
161
162
|
- [IPOR deployments and ABIs](https://github.com/IPOR-Labs/ipor-abi) -- the
|
|
162
163
|
source of provenance for every address used here.
|
|
163
|
-
- [IPOR Fusion documentation](https://
|
|
164
|
+
- [IPOR Fusion documentation](https://ipor.io/docs/build-on-fusion)
|
|
164
165
|
-- concepts referenced by the examples: access management, substrates, and the
|
|
165
166
|
price oracle middleware.
|
|
@@ -306,20 +306,23 @@ def run_simulation(web3: Web3) -> SimulationResult:
|
|
|
306
306
|
slot=erc20_balance_slot(web3, ETHEREUM_USDC, block=PINNED_BLOCK),
|
|
307
307
|
)
|
|
308
308
|
|
|
309
|
-
# The clone MUST be the first queued call
|
|
310
|
-
#
|
|
309
|
+
# The clone MUST be the first queued call. The sub-factories deploy each
|
|
310
|
+
# component with plain CREATE (`Clones.clone`), so its address follows the
|
|
311
|
+
# sub-factory's nonce, not the clone's arguments: any earlier call that makes
|
|
312
|
+
# them deploy anything shifts every address previewed above.
|
|
311
313
|
sim.add_call(
|
|
312
314
|
call=factory.clone(**clone_args()), from_=OWNER, label="clone", gas=CLONE_GAS
|
|
313
315
|
)
|
|
314
316
|
plan.append("deploy the vault stack (clone)")
|
|
315
317
|
|
|
316
|
-
# Role bootstrap order: a fresh clone grants OWNER only OWNER_ROLE.
|
|
317
|
-
#
|
|
318
|
-
#
|
|
319
|
-
#
|
|
320
|
-
# simulation legible; production governance often puts a
|
|
321
|
-
# timelock -- on the sensitive roles. ALPHA must stay a
|
|
322
|
-
# OWNER in production: a compromised alpha key must not
|
|
318
|
+
# Role bootstrap order: a fresh clone grants OWNER only OWNER_ROLE. OWNER
|
|
319
|
+
# administers ATOMIST, and ATOMIST the operational roles, so OWNER must
|
|
320
|
+
# self-grant ATOMIST before it can grant the ones this example needs:
|
|
321
|
+
# FUSE_MANAGER, ALPHA and WHITELIST. Each grant uses Period(0) (no execution
|
|
322
|
+
# delay) to keep the simulation legible; production governance often puts a
|
|
323
|
+
# nonzero delay -- a timelock -- on the sensitive roles. ALPHA must stay a
|
|
324
|
+
# separate address from OWNER in production: a compromised alpha key must not
|
|
325
|
+
# equal governance.
|
|
323
326
|
for role, holder in (
|
|
324
327
|
(Roles.ATOMIST_ROLE, OWNER),
|
|
325
328
|
(Roles.FUSE_MANAGER_ROLE, OWNER),
|
{ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/examples/advanced_euler_v2_credit_market_base.py
RENAMED
|
@@ -143,9 +143,10 @@ BASE_CBETH_WHALE = parse_checksum_address("0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37E
|
|
|
143
143
|
# multisig. (A fresh clone forces OWNER to self-grant ATOMIST, so owner
|
|
144
144
|
# and atomist coincide during bootstrap; in production the atomist may
|
|
145
145
|
# be delegated to a separate address.)
|
|
146
|
-
# ALPHA -- the online operator; drives execute()
|
|
147
|
-
# (update_markets_balances)
|
|
148
|
-
#
|
|
146
|
+
# ALPHA -- the online operator; drives execute(), refreshes market balances
|
|
147
|
+
# (update_markets_balances) and releases withdrawal requests
|
|
148
|
+
# (WithdrawManager.releaseFunds) -- least-privilege, it cannot
|
|
149
|
+
# reconfigure the vault. Collapsing it into OWNER means a
|
|
149
150
|
# compromised alpha key becomes full governance control.
|
|
150
151
|
# (There is no depositor role here: this example funds collateral directly and
|
|
151
152
|
# focuses on the credit lifecycle rather than the deposit -> shares path.)
|
|
@@ -381,7 +382,8 @@ def run_simulation(web3: Web3) -> SimulationResult:
|
|
|
381
382
|
)
|
|
382
383
|
factory = FusionFactory(BASE_FUSION_FACTORY)
|
|
383
384
|
|
|
384
|
-
# 1.
|
|
385
|
+
# 1. Predict the stack's addresses (eth_call, no gas, no state change). The
|
|
386
|
+
# prediction holds only if no other clone lands first; see below.
|
|
385
387
|
preview = factory.clone(**clone_args()).call(ctx)
|
|
386
388
|
log.info(
|
|
387
389
|
"predicted vault=%s access_manager=%s price_manager=%s (index=%d)",
|
|
@@ -406,21 +408,33 @@ def run_simulation(web3: Web3) -> SimulationResult:
|
|
|
406
408
|
# (or X.calldata to a multisig / timelock).
|
|
407
409
|
# - sim.execute([action]) -> plasma_vault.execute([action]).send(ctx) by the alpha.
|
|
408
410
|
# - read = sim.observe(X), then read.value -> X.call(ctx), a plain read.
|
|
411
|
+
# SIMULATION ONLY (per-call senders): `from_` lets one process act as both
|
|
412
|
+
# actors, because in simulation they are addresses with no keys. In production
|
|
413
|
+
# they are two separate signers on separate systems, and that separation is
|
|
414
|
+
# what keeps a compromised alpha key from becoming governance.
|
|
409
415
|
sim = VaultSimulator(
|
|
410
416
|
web3=web3, vault=preview.plasma_vault, alpha=ALPHA, block=PINNED_BLOCK
|
|
411
417
|
)
|
|
412
418
|
plan: list[str] = []
|
|
413
419
|
|
|
414
|
-
# The clone MUST be the first queued call
|
|
415
|
-
#
|
|
420
|
+
# The clone MUST be the first queued call. The sub-factories deploy each
|
|
421
|
+
# component with plain CREATE (`Clones.clone`), so its address follows the
|
|
422
|
+
# sub-factory's nonce, not the clone's arguments: any earlier call that makes
|
|
423
|
+
# them deploy anything shifts every address previewed above.
|
|
416
424
|
sim.add_call(call=factory.clone(**clone_args()), from_=OWNER, label="clone")
|
|
417
425
|
plan.append("deploy the vault stack (clone)")
|
|
418
426
|
|
|
419
|
-
# Role bootstrap order: a fresh clone grants OWNER only OWNER_ROLE.
|
|
420
|
-
#
|
|
421
|
-
#
|
|
422
|
-
#
|
|
423
|
-
#
|
|
427
|
+
# Role bootstrap order: a fresh clone grants OWNER only OWNER_ROLE. OWNER
|
|
428
|
+
# administers ATOMIST, and ATOMIST the operational roles, so OWNER must
|
|
429
|
+
# self-grant ATOMIST before it can grant the ones this example needs: ALPHA,
|
|
430
|
+
# FUSE_MANAGER and UPDATE_MARKETS_BALANCES. OWNER is its own admin, and
|
|
431
|
+
# `clone` leaves ADMIN_ROLE -- the one role that could re-point it -- unheld:
|
|
432
|
+
# OWNER is the root of the vault, and a lost owner key has no higher
|
|
433
|
+
# authority to recover it. (`cloneSupervised` gives ADMIN_ROLE to its
|
|
434
|
+
# caller.) Role admins: ipor.io/docs -> build-on-fusion -> atomists ->
|
|
435
|
+
# vault-configuration-step-by-step -> access-management. ADMIN_ROLE on a
|
|
436
|
+
# clone: ipor-fusion, contracts/factory/lib/FusionFactoryLogicLib.sol,
|
|
437
|
+
# _resolveAdmins.
|
|
424
438
|
# ALPHA must stay a separate address from OWNER in production:
|
|
425
439
|
# a compromised alpha key must not equal governance. Each grant uses Period(0)
|
|
426
440
|
# (no execution delay) to keep the simulation legible; production governance
|
|
@@ -429,9 +443,10 @@ def run_simulation(web3: Web3) -> SimulationResult:
|
|
|
429
443
|
call=access_manager.grant_role(Roles.ATOMIST_ROLE, OWNER, Period(0)),
|
|
430
444
|
from_=OWNER,
|
|
431
445
|
)
|
|
432
|
-
# FUSE_MANAGER
|
|
433
|
-
#
|
|
434
|
-
#
|
|
446
|
+
# FUSE_MANAGER installs fuses, and a malicious fuse can drain the vault: it is
|
|
447
|
+
# as sensitive as ATOMIST. Colocating it on the owner adds no power the owner
|
|
448
|
+
# lacks; the documented preference is a dedicated time-locked account, since
|
|
449
|
+
# fuses shape the strategy. Never an online key.
|
|
435
450
|
sim.add_call(
|
|
436
451
|
call=access_manager.grant_role(Roles.FUSE_MANAGER_ROLE, OWNER, Period(0)),
|
|
437
452
|
from_=OWNER,
|
{ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/examples/advanced_euler_v2_looping_arbitrum.py
RENAMED
|
@@ -353,6 +353,10 @@ def run_simulation(web3: Web3) -> SimulationResult:
|
|
|
353
353
|
alpha=ALPHA,
|
|
354
354
|
block=PINNED_BLOCK,
|
|
355
355
|
)
|
|
356
|
+
# The clone MUST be the first queued call. The sub-factories deploy each
|
|
357
|
+
# component with plain CREATE (`Clones.clone`), so its address follows the
|
|
358
|
+
# sub-factory's nonce, not the clone's arguments: any earlier call that makes
|
|
359
|
+
# them deploy anything shifts every address previewed above.
|
|
356
360
|
sim.add_call(call=factory.clone(**clone_args()), from_=OWNER, label="clone")
|
|
357
361
|
|
|
358
362
|
# OWNER is governance; ALPHA is a separate online operator. A production
|
|
@@ -293,9 +293,11 @@ CROSSCHAIN_MARKET = IporFusionMarkets.CROSSCHAIN
|
|
|
293
293
|
# VAULT_OWNER -- owner/atomist of both vaults, the executor's creator and its
|
|
294
294
|
# rescue admin; can reconfigure everything. A cold key or a
|
|
295
295
|
# multisig.
|
|
296
|
-
# ALPHA -- the online operator; drives execute()
|
|
297
|
-
# balances
|
|
298
|
-
#
|
|
296
|
+
# ALPHA -- the online operator; drives execute(), refreshes market
|
|
297
|
+
# balances and releases withdrawal requests
|
|
298
|
+
# (WithdrawManager.releaseFunds). Collapsing it into VAULT_OWNER
|
|
299
|
+
# means a compromised alpha key becomes full governance
|
|
300
|
+
# control.
|
|
299
301
|
# DEPOSITOR -- an end user; only ever holds and deposits funds.
|
|
300
302
|
# BALANCE_PROPOSER / BALANCE_APPROVER -- the two attestation keys; the
|
|
301
303
|
# executor refuses to be created with one address for both,
|
{ipor_fusion-4.2.1.dev6 → ipor_fusion-4.2.1.dev44}/examples/external_state_margin_leg_base.py
RENAMED
|
@@ -20,8 +20,9 @@ This example shows the whole lifecycle an alpha drives, end to end:
|
|
|
20
20
|
6. a user deposits USDC;
|
|
21
21
|
7. the alpha enters the market: USDC moves vault -> executor -> venue, and the
|
|
22
22
|
executor books it against a balance account;
|
|
23
|
-
8.
|
|
24
|
-
alpha refreshes the vault's cached NAV
|
|
23
|
+
8. the position earns PnL at the venue; custodian A proposes its value,
|
|
24
|
+
custodian B confirms it, and the alpha refreshes the vault's cached NAV,
|
|
25
|
+
which moves by that PnL;
|
|
25
26
|
9. the user files a scheduled-withdrawal request;
|
|
26
27
|
10. the alpha exits the market -- the venue returns the cash, the executor hands
|
|
27
28
|
it back to the vault -- and releases funds for that request;
|
|
@@ -30,7 +31,7 @@ This example shows the whole lifecycle an alpha drives, end to end:
|
|
|
30
31
|
A scheduled withdrawal takes three steps and two parties: the user calls
|
|
31
32
|
``requestShares``, the alpha calls ``releaseFunds`` once the money is back, and
|
|
32
33
|
the user then calls ``redeemFromRequest`` to take it. Steps 9 and 10 above are
|
|
33
|
-
the first two. The two-step shape exists for exactly the situation
|
|
34
|
+
the first two. The two-step shape exists for exactly the situation modeled
|
|
34
35
|
here -- the vault's assets are not all in the vault, so the request is what
|
|
35
36
|
gives the alpha notice and time to unwind the venue position.
|
|
36
37
|
|
|
@@ -161,8 +162,9 @@ BASE_EXTERNAL_STATE_BALANCE_FUSE = parse_fuse_address(
|
|
|
161
162
|
# every substrate grant below. A cold key or multisig. (A fresh
|
|
162
163
|
# clone forces OWNER to self-grant ATOMIST, so owner and atomist
|
|
163
164
|
# coincide during bootstrap.)
|
|
164
|
-
# ALPHA -- the online operator; drives execute()
|
|
165
|
-
# balances
|
|
165
|
+
# ALPHA -- the online operator; drives execute(), refreshes market
|
|
166
|
+
# balances and releases withdrawal requests
|
|
167
|
+
# (WithdrawManager.releaseFunds). Collapsing it into OWNER means a
|
|
166
168
|
# compromised alpha key becomes full governance control -- and
|
|
167
169
|
# the TARGET grant below makes that especially costly here.
|
|
168
170
|
# DEPOSITOR -- an end user; only ever holds, deposits and requests funds.
|
|
@@ -193,7 +195,7 @@ CUSTODIAN_B = parse_checksum_address("0x90F79bf6EB2c4f870365E785982E1f101E93b906
|
|
|
193
195
|
#
|
|
194
196
|
# VENUE_BALANCE_ACCOUNT is a label. No money is ever sent to it. It is the key of
|
|
195
197
|
# a mapping on the executor, granted as the BALANCE_ACCOUNT substrate, and the
|
|
196
|
-
# address the custodians name when they attest "this bucket holds
|
|
198
|
+
# address the custodians name when they attest "this bucket holds 918 USDC".
|
|
197
199
|
# On a venue that credits deposits by sender, the natural label is the EXECUTOR's
|
|
198
200
|
# own address, since that is the identity the venue assigns -- which needs
|
|
199
201
|
# createExecutor() and syncSubstrates() before the first enter, so this example
|
|
@@ -228,6 +230,13 @@ PINNED_BLOCK = 51169852 # Base, ~2026-09-11
|
|
|
228
230
|
DEPOSIT_AMOUNT = Amount(1_000_000_000) # 1,000 USDC (6 decimals)
|
|
229
231
|
# What the alpha parks at the venue. The rest stays idle in the vault.
|
|
230
232
|
MARGIN_AMOUNT = Amount(900_000_000) # 900 USDC
|
|
233
|
+
# What the position earns at the venue before the custodians attest it; they
|
|
234
|
+
# attest the margin plus this. The attestation has to differ from what the enter
|
|
235
|
+
# booked: an attestation of MARGIN_AMOUNT alone would leave NAV where it already
|
|
236
|
+
# is, and prove nothing about the balance fuse carrying a new value into it. 2%
|
|
237
|
+
# of the margin stays inside BIG_CHANGE_BPS.
|
|
238
|
+
VENUE_PNL = Amount(18_000_000) # 18 USDC
|
|
239
|
+
ATTESTED_AMOUNT = Amount(MARGIN_AMOUNT + VENUE_PNL) # 918 USDC
|
|
231
240
|
# What the depositor asks to withdraw on the scheduled path.
|
|
232
241
|
WITHDRAW_REQUEST_AMOUNT = Amount(500_000_000) # 500 USDC
|
|
233
242
|
# NAV must be conserved across the round trip up to oracle-conversion dust.
|
|
@@ -520,7 +529,8 @@ def market_substrates() -> list[bytes]:
|
|
|
520
529
|
|
|
521
530
|
That is the concrete reason the alpha key here is hot, least-privilege, and
|
|
522
531
|
must never share an address with the owner/atomist: the alpha can move the
|
|
523
|
-
parked asset, and only the atomist decides
|
|
532
|
+
parked asset, and only FUSE_MANAGER (administered by the atomist) decides
|
|
533
|
+
which asset that is.
|
|
524
534
|
|
|
525
535
|
(Margining in an asset the vault does not otherwise hold would narrow the
|
|
526
536
|
blast radius to whatever is on hand in that asset -- but only while no
|
|
@@ -590,13 +600,16 @@ def build_exit_action(amount: Amount) -> FuseAction:
|
|
|
590
600
|
the executor before it can hand them over, and it is the venue -- not the
|
|
591
601
|
vault -- that sends them (see the staging step in ``run_simulation``).
|
|
592
602
|
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
the
|
|
603
|
+
The executor tracks the balance in underlying units, and the exit converts
|
|
604
|
+
``amount`` of ``asset`` into them through the price oracle, whose prices
|
|
605
|
+
carry 18 decimals, so for USDC the conversion floors twice and is exact
|
|
606
|
+
only when ``amount * price`` is a multiple of 10**6. The attested amount
|
|
607
|
+
here is whole USDC, so exiting it empties the tracked balance to the unit;
|
|
608
|
+
a fractional one can leave a unit behind. With an asset other than the
|
|
609
|
+
underlying the two prices move independently, the converted value can round
|
|
610
|
+
above what the executor tracks, and ``removeBalance`` reverts. Either way,
|
|
611
|
+
an exit meant to empty the balance is sized from the tracked balance read
|
|
612
|
+
back at the exit's block, or leaves a small buffer.
|
|
600
613
|
"""
|
|
601
614
|
return ExternalStateOperationFuse(BASE_EXTERNAL_STATE_OPERATION_FUSE).exit(
|
|
602
615
|
asset=BASE_USDC,
|
|
@@ -634,6 +647,7 @@ class _Reads(NamedTuple):
|
|
|
634
647
|
executor_nonce: SimulationObservation[int]
|
|
635
648
|
tracked_after_confirm: SimulationObservation[Amount]
|
|
636
649
|
last_updated_after_confirm: SimulationObservation[Timestamp]
|
|
650
|
+
market_value_before_refresh: SimulationObservation[Amount]
|
|
637
651
|
market_value_after_confirm: SimulationObservation[Amount]
|
|
638
652
|
total_assets_after_confirm: SimulationObservation[Amount]
|
|
639
653
|
request_after_filing: SimulationObservation[WithdrawRequestInfo]
|
|
@@ -662,26 +676,30 @@ def _queue_bootstrap(
|
|
|
662
676
|
identical -- the executor address the discovery pass learns is only valid for
|
|
663
677
|
the lifecycle batch if nothing before the enter differs.
|
|
664
678
|
"""
|
|
665
|
-
# The clone MUST be the first queued call.
|
|
666
|
-
#
|
|
667
|
-
#
|
|
668
|
-
#
|
|
669
|
-
# in run_simulation.
|
|
679
|
+
# The clone MUST be the first queued call. The sub-factories deploy each
|
|
680
|
+
# component with plain CREATE (`Clones.clone`), so its address follows the
|
|
681
|
+
# sub-factory's nonce, not the clone's arguments: any earlier call that makes
|
|
682
|
+
# them deploy anything shifts every address previewed in run_simulation.
|
|
670
683
|
sim.add_call(call=factory.clone(**clone_args()), from_=OWNER, label="clone")
|
|
671
684
|
plan.append("deploy the vault stack (clone)")
|
|
672
685
|
|
|
673
|
-
# Role bootstrap order: a fresh clone grants OWNER only OWNER_ROLE.
|
|
674
|
-
#
|
|
675
|
-
#
|
|
676
|
-
#
|
|
677
|
-
#
|
|
678
|
-
#
|
|
686
|
+
# Role bootstrap order: a fresh clone grants OWNER only OWNER_ROLE. OWNER
|
|
687
|
+
# administers ATOMIST, and ATOMIST the operational roles, so OWNER must
|
|
688
|
+
# self-grant ATOMIST before it can grant the ones this example needs: ALPHA,
|
|
689
|
+
# FUSE_MANAGER, WHITELIST and UPDATE_MARKETS_BALANCES. OWNER is its own
|
|
690
|
+
# admin, and `clone` leaves ADMIN_ROLE -- the one role that could re-point
|
|
691
|
+
# it -- unheld: OWNER is the root of the vault, and a lost owner key has no
|
|
692
|
+
# higher authority to recover it. (`cloneSupervised` gives ADMIN_ROLE to its
|
|
693
|
+
# caller.) Role admins: ipor.io/docs -> build-on-fusion -> atomists ->
|
|
694
|
+
# vault-configuration-step-by-step -> access-management. ADMIN_ROLE on a
|
|
695
|
+
# clone: ipor-fusion, contracts/factory/lib/FusionFactoryLogicLib.sol,
|
|
696
|
+
# _resolveAdmins.
|
|
679
697
|
#
|
|
680
698
|
# Every grant here passes Period(0) -- no execution delay -- to keep the
|
|
681
699
|
# simulation legible. Production differs per role: 14 days on OWNER, 3 days
|
|
682
700
|
# on ATOMIST, 0 on GUARDIAN so it can cancel a queued malicious action
|
|
683
701
|
# instantly. Delays can be raised at once but only lowered after the full
|
|
684
|
-
# notice period. Figures from
|
|
702
|
+
# notice period. Figures from ipor.io/docs -> build-on-fusion -> atomists ->
|
|
685
703
|
# vault-configuration-step-by-step -> timelocks-and-execution-delays.
|
|
686
704
|
#
|
|
687
705
|
# A delayed role does not merely wait: it must schedule() an operation and
|
|
@@ -691,11 +709,10 @@ def _queue_bootstrap(
|
|
|
691
709
|
call=access_manager.grant_role(Roles.ATOMIST_ROLE, OWNER, Period(0)),
|
|
692
710
|
from_=OWNER,
|
|
693
711
|
)
|
|
694
|
-
# FUSE_MANAGER installs fuses, and a malicious fuse can drain the vault
|
|
695
|
-
#
|
|
696
|
-
#
|
|
697
|
-
#
|
|
698
|
-
# Either way, never an online key.
|
|
712
|
+
# FUSE_MANAGER installs fuses, and a malicious fuse can drain the vault: it is
|
|
713
|
+
# as sensitive as ATOMIST. Colocating it on the owner adds no power the owner
|
|
714
|
+
# lacks; the documented preference is a dedicated time-locked account, since
|
|
715
|
+
# fuses shape the strategy. Never an online key.
|
|
699
716
|
sim.add_call(
|
|
700
717
|
call=access_manager.grant_role(Roles.FUSE_MANAGER_ROLE, OWNER, Period(0)),
|
|
701
718
|
from_=OWNER,
|
|
@@ -746,7 +763,7 @@ def _queue_bootstrap(
|
|
|
746
763
|
# Two mechanisms, and the difference decides what a revocation actually
|
|
747
764
|
# does. The operation fuse reads TARGET, ASSET and BALANCE_ACCOUNT LIVE from
|
|
748
765
|
# the vault on every call, so those grants take effect and stop taking
|
|
749
|
-
# effect the instant
|
|
766
|
+
# effect the instant FUSE_MANAGER re-grants the set. The executor additionally
|
|
750
767
|
# keeps its own CACHE -- the custodian list, the balance accounts, the
|
|
751
768
|
# dust-checked assets, the guard values -- populated at deployment and
|
|
752
769
|
# refreshed only by syncSubstrates() on the executor.
|
|
@@ -881,7 +898,9 @@ def run_simulation(web3: Web3) -> SimulationResult:
|
|
|
881
898
|
|
|
882
899
|
factory = FusionFactory(BASE_FUSION_FACTORY)
|
|
883
900
|
|
|
884
|
-
# 1.
|
|
901
|
+
# 1. Predict the stack's addresses (eth_call, no gas, no state change). The
|
|
902
|
+
# prediction holds only if no other clone lands first; see
|
|
903
|
+
# _queue_bootstrap.
|
|
885
904
|
preview = factory.clone(**clone_args()).call(ctx)
|
|
886
905
|
log.info(
|
|
887
906
|
"predicted vault=%s access_manager=%s withdraw_manager=%s (index=%d)",
|
|
@@ -953,7 +972,21 @@ def run_simulation(web3: Web3) -> SimulationResult:
|
|
|
953
972
|
# can be compared.
|
|
954
973
|
tracked_after_enter = sim.observe(executor.balances(VENUE_BALANCE_ACCOUNT))
|
|
955
974
|
|
|
975
|
+
# ── The position earns PnL at the venue ──────────────────────────────────
|
|
976
|
+
# SIMULATION ONLY (venue PnL): the position earned VENUE_PNL while it sat at
|
|
977
|
+
# the venue. Nothing on Base trades it, so the whale pays the venue address
|
|
978
|
+
# directly. In production no transaction does this: the custodians read the
|
|
979
|
+
# grown position off the venue, and their attestation is how NAV learns it.
|
|
980
|
+
sim.next_block().with_block_time_shift(PROPOSE_OFFSET)
|
|
981
|
+
sim.add_call(
|
|
982
|
+
call=usdc.transfer(VENUE_DEPOSIT_ADDRESS, VENUE_PNL), from_=BASE_USDC_WHALE
|
|
983
|
+
)
|
|
984
|
+
plan.append("the venue position earns 18 USDC")
|
|
985
|
+
|
|
956
986
|
# ── Custodian A proposes the off-venue value ─────────────────────────────
|
|
987
|
+
# The propose runs in the block opened above, at PROPOSE_OFFSET, which
|
|
988
|
+
# proposed_at below is computed from.
|
|
989
|
+
#
|
|
957
990
|
# Two calls, from two addresses, is the production shape: custodian A's
|
|
958
991
|
# service proposes, custodian B's service confirms, and neither can do the
|
|
959
992
|
# other's half. That is the entire security property of this market.
|
|
@@ -962,13 +995,12 @@ def run_simulation(web3: Web3) -> SimulationResult:
|
|
|
962
995
|
# driven from this one process. In a real deployment they live in separate
|
|
963
996
|
# systems -- if one process can send both, a single compromise moves the
|
|
964
997
|
# vault's NAV and the two-party design has bought nothing.
|
|
965
|
-
sim.next_block().with_block_time_shift(PROPOSE_OFFSET)
|
|
966
998
|
sim.add_call(
|
|
967
|
-
call=executor.propose_balance(VENUE_BALANCE_ACCOUNT,
|
|
999
|
+
call=executor.propose_balance(VENUE_BALANCE_ACCOUNT, ATTESTED_AMOUNT),
|
|
968
1000
|
from_=CUSTODIAN_A,
|
|
969
1001
|
label="propose",
|
|
970
1002
|
)
|
|
971
|
-
plan.append("custodian A proposes the off-venue value (
|
|
1003
|
+
plan.append("custodian A proposes the off-venue value (918 USDC)")
|
|
972
1004
|
|
|
973
1005
|
# ── Custodian B confirms it ──────────────────────────────────────────────
|
|
974
1006
|
# The confirm quotes the proposal's hash, which binds the executor, the
|
|
@@ -979,11 +1011,14 @@ def run_simulation(web3: Web3) -> SimulationResult:
|
|
|
979
1011
|
# assertions below check exactly that against the emitted log rather than
|
|
980
1012
|
# trusting the arithmetic.
|
|
981
1013
|
#
|
|
982
|
-
# Production has two reads,
|
|
983
|
-
#
|
|
984
|
-
#
|
|
985
|
-
#
|
|
986
|
-
#
|
|
1014
|
+
# Production has two reads, equally safe for different reasons. Both return
|
|
1015
|
+
# the same BalanceProposal. pending_proposals reads the executor's pending
|
|
1016
|
+
# slot and computes the hash from those fields, so it has nothing to reject:
|
|
1017
|
+
# what it returns is what is on-chain. find_balance_proposed parses a receipt,
|
|
1018
|
+
# so it must reject: it skips a log another contract emitted and raises on one
|
|
1019
|
+
# whose hash is not the hash of its own fields. confirmBalance re-derives the
|
|
1020
|
+
# hash from the pending slot either way, so neither route can make B attest
|
|
1021
|
+
# to a proposal A did not actually put on-chain:
|
|
987
1022
|
# pending_proposals(account) -- reads the slot, so B needs nothing from
|
|
988
1023
|
# A but the account address.
|
|
989
1024
|
# find_balance_proposed(logs, account) -- reads the same proposal out of the
|
|
@@ -1004,7 +1039,7 @@ def run_simulation(web3: Web3) -> SimulationResult:
|
|
|
1004
1039
|
executor=executor_address,
|
|
1005
1040
|
chain_id=BASE_CHAIN_ID,
|
|
1006
1041
|
balance_account=VENUE_BALANCE_ACCOUNT,
|
|
1007
|
-
value=
|
|
1042
|
+
value=ATTESTED_AMOUNT,
|
|
1008
1043
|
proposer=CUSTODIAN_A,
|
|
1009
1044
|
proposed_at=proposed_at,
|
|
1010
1045
|
nonce=1, # a fresh executor's first proposal; asserted against the log
|
|
@@ -1022,7 +1057,11 @@ def run_simulation(web3: Web3) -> SimulationResult:
|
|
|
1022
1057
|
# execute() refreshes the markets it touched in a post-execute hook -- which
|
|
1023
1058
|
# is why the market value was already right after the enter -- but the confirm
|
|
1024
1059
|
# is a direct call to the executor, so nothing tells the vault anything
|
|
1025
|
-
# changed. This is the call that makes it look
|
|
1060
|
+
# changed. This is the call that makes it look; the read before it shows the
|
|
1061
|
+
# cache still holding the enter's figure.
|
|
1062
|
+
market_value_before_refresh = sim.observe(
|
|
1063
|
+
plasma_vault.total_assets_in_market(EXTERNAL_STATE_MARKET),
|
|
1064
|
+
)
|
|
1026
1065
|
sim.add_call(
|
|
1027
1066
|
call=plasma_vault.update_markets_balances([EXTERNAL_STATE_MARKET]), from_=ALPHA
|
|
1028
1067
|
)
|
|
@@ -1054,21 +1093,23 @@ def run_simulation(web3: Web3) -> SimulationResult:
|
|
|
1054
1093
|
call=withdraw_manager.request_shares(requested_shares), from_=DEPOSITOR
|
|
1055
1094
|
)
|
|
1056
1095
|
request_after_filing = sim.observe(withdraw_manager.request_info(DEPOSITOR))
|
|
1057
|
-
plan.append("user requests a scheduled withdrawal worth 500 USDC")
|
|
1096
|
+
plan.append("user requests a scheduled withdrawal of the shares worth 500 USDC")
|
|
1058
1097
|
|
|
1059
1098
|
# ── The alpha brings the margin back and releases it ─────────────────────
|
|
1060
1099
|
# SIMULATION ONLY: this transfer impersonates the venue. The exit pulls USDC
|
|
1061
1100
|
# from the executor to the vault, so the funds must be back on the executor
|
|
1062
1101
|
# first -- and it is the venue that sends them. In production the alpha
|
|
1063
1102
|
# requests a withdrawal at the venue and waits for it to land; nothing the
|
|
1064
|
-
# vault signs can make it happen.
|
|
1103
|
+
# vault signs can make it happen. The whole attested position comes back,
|
|
1104
|
+
# margin and PnL.
|
|
1065
1105
|
sim.next_block().with_block_time_shift(RELEASE_OFFSET)
|
|
1066
1106
|
sim.add_call(
|
|
1067
|
-
call=usdc.transfer(executor_address,
|
|
1107
|
+
call=usdc.transfer(executor_address, ATTESTED_AMOUNT),
|
|
1108
|
+
from_=VENUE_DEPOSIT_ADDRESS,
|
|
1068
1109
|
)
|
|
1069
|
-
plan.append("the venue returns the margin to the executor")
|
|
1110
|
+
plan.append("the venue returns the margin and PnL to the executor")
|
|
1070
1111
|
|
|
1071
|
-
sim.execute([build_exit_action(
|
|
1112
|
+
sim.execute([build_exit_action(ATTESTED_AMOUNT)])
|
|
1072
1113
|
vault_usdc_after_exit = sim.observe(usdc.balance_of(preview.plasma_vault))
|
|
1073
1114
|
venue_usdc_after_exit = sim.observe(usdc.balance_of(VENUE_DEPOSIT_ADDRESS))
|
|
1074
1115
|
tracked_after_exit = sim.observe(executor.balances(VENUE_BALANCE_ACCOUNT))
|
|
@@ -1132,6 +1173,7 @@ def run_simulation(web3: Web3) -> SimulationResult:
|
|
|
1132
1173
|
executor_nonce=executor_nonce,
|
|
1133
1174
|
tracked_after_confirm=tracked_after_confirm,
|
|
1134
1175
|
last_updated_after_confirm=last_updated_after_confirm,
|
|
1176
|
+
market_value_before_refresh=market_value_before_refresh,
|
|
1135
1177
|
market_value_after_confirm=market_value_after_confirm,
|
|
1136
1178
|
total_assets_after_confirm=total_assets_after_confirm,
|
|
1137
1179
|
request_after_filing=request_after_filing,
|
|
@@ -1256,7 +1298,7 @@ def _assert_attestation(
|
|
|
1256
1298
|
proposed_at: int,
|
|
1257
1299
|
confirmed_at: int,
|
|
1258
1300
|
) -> None:
|
|
1259
|
-
"""The custodians' figure is what the contract recorded, and NAV
|
|
1301
|
+
"""The custodians' figure is what the contract recorded, and NAV took it."""
|
|
1260
1302
|
# The SDK's own reader, over the propose call's logs. It accepts only logs
|
|
1261
1303
|
# this executor emitted, and only a payload whose proposal_hash is the hash
|
|
1262
1304
|
# of its own other fields, so what comes back is a self-consistent proposal
|
|
@@ -1275,8 +1317,8 @@ def _assert_attestation(
|
|
|
1275
1317
|
logged.nonce == 1, f"first proposal carried nonce {logged.nonce}, expected 1"
|
|
1276
1318
|
)
|
|
1277
1319
|
_check(
|
|
1278
|
-
logged.value ==
|
|
1279
|
-
f"custodian A proposed {logged.value}, expected {
|
|
1320
|
+
logged.value == ATTESTED_AMOUNT,
|
|
1321
|
+
f"custodian A proposed {logged.value}, expected {ATTESTED_AMOUNT}",
|
|
1280
1322
|
)
|
|
1281
1323
|
_check(
|
|
1282
1324
|
logged.proposer == CUSTODIAN_A,
|
|
@@ -1302,36 +1344,43 @@ def _assert_attestation(
|
|
|
1302
1344
|
f"the account's last update reads "
|
|
1303
1345
|
f"{reads.last_updated_after_confirm.value}, expected {confirmed_at}",
|
|
1304
1346
|
)
|
|
1305
|
-
# The custodians attested
|
|
1306
|
-
#
|
|
1307
|
-
#
|
|
1308
|
-
#
|
|
1347
|
+
# The custodians attested the margin plus the venue's PnL. The executor takes
|
|
1348
|
+
# the new figure at once, the vault only after the refresh, and then NAV
|
|
1349
|
+
# moves by the PnL, up to oracle dust. (The move stays inside BIG_CHANGE_BPS, but this
|
|
1350
|
+
# vault would not act on a breach -- see the guard-constant note above -- so
|
|
1351
|
+
# that is not asserted here.)
|
|
1309
1352
|
_check(
|
|
1310
|
-
reads.tracked_after_confirm.value ==
|
|
1353
|
+
reads.tracked_after_confirm.value == ATTESTED_AMOUNT,
|
|
1311
1354
|
f"confirmed balance is {reads.tracked_after_confirm.value}",
|
|
1312
1355
|
)
|
|
1313
1356
|
_check(
|
|
1314
|
-
reads.
|
|
1357
|
+
reads.market_value_before_refresh.value == MARGIN_AMOUNT,
|
|
1358
|
+
f"market 50 took the attestation before the refresh: "
|
|
1359
|
+
f"{reads.market_value_before_refresh.value}",
|
|
1360
|
+
)
|
|
1361
|
+
_check(
|
|
1362
|
+
reads.market_value_after_confirm.value == ATTESTED_AMOUNT,
|
|
1315
1363
|
f"market 50 values the attested position at "
|
|
1316
1364
|
f"{reads.market_value_after_confirm.value}",
|
|
1317
1365
|
)
|
|
1366
|
+
nav_move = (
|
|
1367
|
+
reads.total_assets_after_confirm.value
|
|
1368
|
+
- reads.bootstrap.total_assets_after_deposit.value
|
|
1369
|
+
)
|
|
1318
1370
|
_check(
|
|
1319
|
-
abs(
|
|
1320
|
-
|
|
1321
|
-
- reads.bootstrap.total_assets_after_deposit.value
|
|
1322
|
-
)
|
|
1323
|
-
<= NAV_DUST_TOLERANCE,
|
|
1324
|
-
f"the attestation moved NAV: {reads.bootstrap.total_assets_after_deposit.value} -> "
|
|
1325
|
-
f"{reads.total_assets_after_confirm.value}",
|
|
1371
|
+
abs(nav_move - VENUE_PNL) <= NAV_DUST_TOLERANCE,
|
|
1372
|
+
f"the attestation moved NAV by {nav_move}, expected {VENUE_PNL}",
|
|
1326
1373
|
)
|
|
1327
1374
|
|
|
1328
1375
|
|
|
1329
1376
|
def _assert_unwind(reads: _Reads) -> None:
|
|
1330
|
-
"""
|
|
1377
|
+
"""Margin and PnL came home, the market emptied, the request is releasable."""
|
|
1331
1378
|
_check(
|
|
1332
|
-
reads.vault_usdc_after_exit.value == DEPOSIT_AMOUNT,
|
|
1379
|
+
reads.vault_usdc_after_exit.value == DEPOSIT_AMOUNT + VENUE_PNL,
|
|
1333
1380
|
f"vault holds {reads.vault_usdc_after_exit.value} USDC after the exit",
|
|
1334
1381
|
)
|
|
1382
|
+
# The venue paid back what it received, the PnL included, so it ends where
|
|
1383
|
+
# it started.
|
|
1335
1384
|
_check(
|
|
1336
1385
|
reads.venue_usdc_after_exit.value
|
|
1337
1386
|
== reads.bootstrap.venue_usdc_before_enter.value,
|
|
@@ -1346,15 +1395,23 @@ def _assert_unwind(reads: _Reads) -> None:
|
|
|
1346
1395
|
reads.market_value_after_exit.value == 0,
|
|
1347
1396
|
f"market 50 still values {reads.market_value_after_exit.value}",
|
|
1348
1397
|
)
|
|
1398
|
+
# The exit only converts market-50 value back into idle USDC, so NAV keeps
|
|
1399
|
+
# the PnL the attestation added and nothing else.
|
|
1349
1400
|
_check(
|
|
1350
1401
|
abs(
|
|
1351
|
-
reads.total_assets_after_exit.value
|
|
1352
|
-
- reads.bootstrap.total_assets_after_deposit.value
|
|
1402
|
+
reads.total_assets_after_exit.value - reads.total_assets_after_confirm.value
|
|
1353
1403
|
)
|
|
1354
1404
|
<= NAV_DUST_TOLERANCE,
|
|
1355
|
-
f"the
|
|
1405
|
+
f"the exit moved NAV: {reads.total_assets_after_confirm.value} -> "
|
|
1356
1406
|
f"{reads.total_assets_after_exit.value}",
|
|
1357
1407
|
)
|
|
1408
|
+
# Each step above allows NAV_DUST_TOLERANCE; the end state gets its own.
|
|
1409
|
+
expected_nav = reads.bootstrap.total_assets_after_deposit.value + VENUE_PNL
|
|
1410
|
+
_check(
|
|
1411
|
+
abs(reads.total_assets_after_exit.value - expected_nav) <= NAV_DUST_TOLERANCE,
|
|
1412
|
+
f"NAV ended at {reads.total_assets_after_exit.value}, "
|
|
1413
|
+
f"expected deposit plus PnL {expected_nav}",
|
|
1414
|
+
)
|
|
1358
1415
|
# The request survives the round trip: it is filed before the margin comes
|
|
1359
1416
|
# home and still carries the same shares after, only now withdrawable. The
|
|
1360
1417
|
# depositor's own redemption is the next step, and out of scope here.
|
|
@@ -1373,6 +1430,9 @@ def _assert_unwind(reads: _Reads) -> None:
|
|
|
1373
1430
|
released.can_withdraw,
|
|
1374
1431
|
"release_funds did not make the request withdrawable",
|
|
1375
1432
|
)
|
|
1433
|
+
# Equal only because a fresh clone has no request fee. With one,
|
|
1434
|
+
# requestShares records the shares minus the fee, while release_funds above
|
|
1435
|
+
# still releases all of requested_shares, so the two differ by the fee.
|
|
1376
1436
|
_check(
|
|
1377
1437
|
reads.shares_released.value == released.shares,
|
|
1378
1438
|
f"released {reads.shares_released.value} shares, requested {released.shares}",
|