Skip to content

Commit

Permalink
CERT 7877 Split address validation providers (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
nivcertora authored Dec 29, 2024
1 parent 04a1569 commit cf820a2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Quorum/checks/price_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __check_price_feed_address(self, address: str) -> dict | None:
return price_feed.model_dump()

pp.pretty_print(
f"Address {address} not found in any price feed provider: {[p.get_name() for p in self.providers]}",
f"Address {address} not found in any address validation provider: {[p.get_name() for p in self.providers]}",
pp.Colors.INFO
)
return None
Expand Down
3 changes: 2 additions & 1 deletion Quorum/ground_truth.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"https://github.com/aave-dao/aave-v3-origin"
],
"review_repo": "https://github.com/bgd-labs/aave-proposals-v3",
"price_feed_providers": ["Chainlink", "Coingecko"]
"price_feed_providers": ["Chainlink"],
"token_validation_providers": ["Coingecko"]
}
}
1 change: 1 addition & 0 deletions Quorum/utils/config_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def load_customer_config(customer: str) -> Dict[str, any]:
pp.pretty_print(f"Customer {customer} not found in ground truth data.", pp.Colors.FAILURE)
raise ValueError(f"Customer {customer} not found in ground truth data.")
providers = customer_config.get("price_feed_providers", [])
providers += customer_config.get("token_validation_providers", [])
unsupported = set(providers) - SUPPORTED_PROVIDERS
if unsupported:
pp.pretty_print(f"Unsupported providers for {customer}: {', '.join(unsupported)}", pp.Colors.FAILURE)
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,19 @@ Example `ground_truth.json`:
"https://github.com/aave-dao/aave-v3-origin"
],
"review_repo": "https://github.com/bgd-labs/aave-proposals-v3",
"price_feed_providers": ["Chainlink", "Coingecko"]
"price_feed_providers": ["Chainlink"],
"token_validation_providers": ["Coingecko"]
}
}
```

This configuration is used by the tool to manage the ground truth information for each customer. The `dev_repos` array contains the URLs of the repositories associated with the customer. The `review_repo` field specifies the repository to compare against when checking proposals. The `price_feed_providers` array lists the feed price providers to check against.
This configuration is used by the tool to manage the ground truth information for each customer. The `dev_repos` array contains the URLs of the repositories associated with the customer. The `review_repo` field specifies the repository to compare against when checking proposals. The `price_feed_providers` array lists the feed price providers to check against (e.g., "Chainlink", "Chronicle"). The `token_validation_providers` array lists the token validation providers to check against (e.g., "Coingecko").

### current supported price feed providers are
- Chainlink
- Chronicle

## Current supported token validation providers are
- Coingecko

## Artifacts Structure
Expand Down

0 comments on commit cf820a2

Please sign in to comment.