Consider refactoring Pausable API
Đang mở
standards
- Ngôn ngữ chính
- Rust
- Star
- 132
- Fork
- 167
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 110
Mô tả
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`.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.