cyclofinance / cyclofinance/cyclo.sol
Tooling: foundry script to refresh hardcoded oracle prices in prod tests
- Dominant language
- Solidity
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
`testProdCycloPythOraclePrice` (and any future per-oracle price-pin tests) hardcodes 18-decimal prices at the current Arbitrum pin. Every pin bump means 12 prices become stale and need manual recapture — fragile and easy to miss.
Add a foundry script (e.g. `script/RefreshOracleTestPrices.s.sol`) that forks at the configured pin, calls each `IPriceOracleV2.price()`, and either prints the fresh assertions or rewrites the test file. For oracles that are stale at the pin, emit `vm.expectRevert(StalePrice())` blocks instead.
A `make refresh-oracle-prices` (or similar) target makes this a one-command refresh whenever the pin moves.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with testProdCycloPythOraclePrice and the configured Arbitrum fork pin, then inspect how the existing tests call each IPriceOracleV2.price(). Add the refresh script and a make refresh-oracle-prices target; done means fresh assertions are emitted or rewritten and stale oracles produce StalePrice() expectations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- testing, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100