0xMiden / 0xMiden/protocol

Consider refactoring Pausable API

Ouverte
#3,104 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
standards
Langage dominant
Rust
Étoiles
132
Forks
167
Merge moyen
1 j 23 h
PR mergées (30 j)
110

Description

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`.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.