FSM Governance Interface
1. Summary
This governance interface allows token holders to stop() FSM-like contracts in case of an oracle attack.
2. Contract Variables & Functions
Variables
owner- the address of the contract's owner. Meant to setFSMaddressesonlyOwner- modifier that checks whether theownercalls a functionauthority- contract authority, able only to stop anFSMfsms[collateralType: bytes32]- mapping of OSM-like contracts
Modifiers
isAuthorized- modifier that checks whether msg.sender can call a specific functiononlyOwner- modifiers that ensures only theownercan call a specific function
Functions
canCall- checks whether an address can call a functionsetFsm(bytes32: collateralType, address: fsm)- set the address of anFSMfor a specific collateral typesetOwner(address: owner]- change the contract's ownersetAuthority(address: authority)- change the contract's authoritystop(bytes32: collateralType)- stop a collateral type'sFSM
3. Walkthrough
The owner and the authority can be changed using setOwner and setAuthority. The owner can setFsms for each collateral type and any authed address (be it the owner, authority or another address that was whitelisted in the authority contract) can stop any FSM.