Skip to content

feat: new vaults#134

Open
tamtamchik wants to merge 9 commits intomainfrom
feat/new-vault
Open

feat: new vaults#134
tamtamchik wants to merge 9 commits intomainfrom
feat/new-vault

Conversation

@tamtamchik
Copy link
Member

@tamtamchik tamtamchik commented Feb 2, 2026

This pull request adds robust support for YAML configuration files alongside existing JSON support, improves environment variable management, and expands sample and test configurations for Ethereum mainnet vaults. The changes make it easier to manage configurations in different formats and environments, and provide comprehensive examples for various vault deployments.

YAML and JSON configuration support:

  • Added support for loading YAML config files in addition to JSON, updating load_config to detect file extension and use the appropriate parser (yaml.safe_load for YAML, json.load for JSON).
  • Updated directory processing logic to only process files with .json, .yaml, or .yml extensions.
  • The default config path now prioritizes config.json, config.yaml, or config.yml if present.

Environment variable and dependency improvements:

  • Added .env.example with required and optional environment variables for API tokens and RPC URLs.
  • Added python-dotenv dependency and ensured environment variables are loaded automatically at application startup. [1] [2] [3]
  • Added pyyaml as a dependency for YAML parsing.

Sample and test configuration expansion:

  • Added comprehensive Ethereum mainnet sample configs for meta vaults (meta_core_config.yaml, meta_eth_config.yaml, meta_usd_config.yaml) covering various contract addresses, explorer settings, and dependencies. [1] [2] [3]
  • Added full config test fixtures in both JSON and YAML to ensure all properties are exercised and parsed correctly. [1] [2]

@tamtamchik tamtamchik requested a review from Copilot February 12, 2026 20:27
@tamtamchik tamtamchik marked this pull request as ready for review February 12, 2026 20:28
@tamtamchik tamtamchik requested a review from a team as a code owner February 12, 2026 20:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands Diffyscan’s configuration support to include YAML (to enable comments and richer samples), adds new vault configuration samples, and introduces dotenv-based environment variable loading for local developer workflows.

Changes:

  • Add YAML (.yaml/.yml) config support alongside JSON, including directory scanning updates.
  • Add dotenv loading on startup and include a .env.example template.
  • Add test coverage and “full config” fixtures for JSON/YAML parity, plus new YAML config samples for Meta vaults.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
diffyscan/utils/common.py Extend load_config() to parse YAML and validate extension.
diffyscan/utils/constants.py Update default config path selection to prefer existing config.{json,yaml,yml}.
diffyscan/diffyscan.py Load .env on startup; filter config files by supported extensions when scanning directories.
tests/test_configs.py Update sample-config tests to include YAML/YML files.
tests/test_config_loading.py Add unit tests covering JSON/YAML loading behavior and fixtures.
tests/fixtures/full_config.yaml Add comprehensive YAML fixture for loader parity tests.
tests/fixtures/full_config.json Add comprehensive JSON fixture for loader parity tests.
pyproject.toml Add pyyaml and python-dotenv runtime dependencies.
poetry.lock Lockfile updates for new dependencies.
config_samples/ethereum/mainnet/meta/meta_usd_config.yaml Add new YAML sample config for Meta Earn USD vaults.
config_samples/ethereum/mainnet/meta/meta_eth_config.yaml Add new YAML sample config for Meta Earn ETH vault.
config_samples/ethereum/mainnet/meta/meta_core_config.yaml Add new YAML sample config for Meta core implementations/factories.
.env.example Provide example environment variables for tokens, hostnames, and RPC URLs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant