0xMiden / 0xMiden/protocol

Consider refactoring Pausable API

Abierto
#3,104 1 comentario 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

Currently, every fungible faucet account installs the `is_paused` storage slot via `Pausable` and the `pause / unpause` admin procedures `PausableManager` as two separate `.with_component()` calls, which creates an issue forgetting the manager: The slot exists but pause is unreachable, or the procedures exist but the slot is missing and they panic at runtime.

The two components are practically inseparable. We can follow the same convention already used by `AccessControl::Ownable2Step` and `AccessControl::Rbac`, which expand into multiple components with a single `.with_components()` call, by having:

`Pausable` implements `IntoIterator`.

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.