Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-dydx-ops committed Nov 25, 2024
1 parent fe71cd5 commit 42677ad
Show file tree
Hide file tree
Showing 12 changed files with 520 additions and 311 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validate_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ jobs:
- name: Validate JSON Files
run: |
python import_json.py dydx_env.json dos_env.json
python env_config_validator.py dydx_env.json dos_env.json
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/src/validation/__pycache__/
/src/__pycache__/
305 changes: 0 additions & 305 deletions import_json.py

This file was deleted.

6 changes: 1 addition & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pip install rich

2. Run validation:
```bash
python import_json.py reference_env.json validation_env.json
python env_config_validator.py reference_env.json validation_env.json
```

## Validation Rules
Expand All @@ -37,10 +37,6 @@ The validator provides detailed error information including:
- Value mismatches
- Context for expected values

## License

MIT License

## Contributing

1. Fork the repository
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rich==13.6.0 # For console rendering
14 changes: 14 additions & 0 deletions src/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Critical paths for validation
CRITICAL_PATHS = {
"wallets.*.signTypedDataAction",
"wallets.*.signTypedDataDomainName",
"governance.*.newMarketProposal.initialDepositAmount",
"governance.*.newMarketProposal.delayBlocks",
}

# Patterns to identify mainnet-related keys
MAINNET_PATTERNS = [
"[mainnet chain id]",
"dydx-mainnet-1",
"dydxprotocol-mainnet",
]
Loading

0 comments on commit 42677ad

Please sign in to comment.