JPYC.unAllowlist
名称・種別
- 名称:
JPYC.unAllowlist - 種別: def
- モジュール:
JpycFormalVerification.AccessControl - ソース:
JpycFormalVerification/AccessControl.lean:219-223 - 概要: unAllowlist(account):account の許可登録を解除する関数(allowlister 限定)。
- 仕様: 対象外
型シグネチャ
lean
JPYC.State → JPYC.CallContext → JPYC.Address → Except JPYC.Error JPYC.StateState・CallContext・対象 account を受け取り、許可リスト管理者が指定アカウントを許可リストから外す関数です。
和訳 docstring
account を許可リストから削除する(v2/FiatTokenV2.sol:629-632)。
解説
何を述べているか。 FiatTokenV2.unAllowlist です。onlyAllowlister を通過した呼び出しが、allowlisted[account] を 0 に戻します。
直感。 allowlist の対で、大口送金の特権を剝奪します。解除後、そのアカウントは上限額を超える送金ができなくなります。
なぜ安全性に効くか。 特権の付与・剝奪を同一の管理者に集約します。allowlist と違い whenNotPaused を課さないので、停止中でも 特権の剝奪は可能です。権限は unAllowlist_auth、効果は unAllowlist_clears が保証します。
図解
Lean ソースコード
lean
/-- `unAllowlist(account)` — `v2/FiatTokenV2.sol:629-632`. -/
def unAllowlist (s : State) (ctx : CallContext) (account : Address) :
Except Error State := do
onlyAllowlister s ctx
pure (s.setAllowlisted account 0)対応 Solidity ソースコード
reference/JPYCv2/contracts/v2/FiatTokenV2.sol:629-632
solidity
function unAllowlist(address _account) external onlyAllowlister {
allowlisted[_account] = 0;
emit UnAllowlisted(_account);
}