Commit 8d838aa
committed
refactor(scripts): remove oracle refresh logic and use feed prices directly
- Remove `ORACLE_REFRESH_SECONDS` config and the `refreshOracles()` function that periodically updated PushOracles on the local chain
- Replace oracle-based pricing with direct calls to the app's `/api/price` endpoint via new `corridorPrice()` function
- Change corridor configuration to use address key arrays with fallback support instead of single oracle addresses, allowing flexible token deployments
- Add `pickAddress()` helper to resolve the first deployed token from a list of address keys
- Move feed availability check to startup initialization before corridor resolution, ensuring the price endpoint is reachable before sizing any orders
- Update error messages to clarify that tokens must be deployed and corridors registered in the database
- Improve messaging for missing corridors to guide users toward seeding or manual registration1 parent 3e6e9a3 commit 8d838aa
5 files changed
Lines changed: 113 additions & 195 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments