0xMiden / 0xMiden/protocol

Consider refactoring Pausable API

オープン
#3,104 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
standards
主要言語
Rust
スター
132
フォーク
167
平均マージ
1日 23時間
マージ済み PR(30日)
110

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。