0xMiden / 0xMiden/protocol

Add `last_updated` felt to `get_conversion_rate`

Abierto
#3,842 0 comentarios 0 reacciones 0 asignados Ver en GitHub
standards
Lenguaje dominante
Rust
Estrellas
132
Forks
167
Merge medio
1 d 23 h
PR fusionados (30 d)
110

Descripción

In the price oracle added in #3561, the rate provider decides when its data is too old and returns `has_conversion_rate = 0` for a stale pair. The caller sees only that flag, never when the price was written.

A caller that needs fresher data has no way to enforce it. It either accepts whatever the rate
provider accepts. With `last_updated` it can compare against `tx::get_block_timestamp` and apply its own bound.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.