Make enterCatastrophicFailure callable by any authorized address

This commit is contained in:
Amir Bandeali
2019-09-20 11:37:55 -07:00
parent e1c57cf0af
commit a14ddbfac2

View File

@@ -18,7 +18,7 @@
pragma solidity ^0.5.9;
import "@0x/contracts-utils/contracts/src/Ownable.sol";
import "@0x/contracts-utils/contracts/src/Authorizable.sol";
import "@0x/contracts-utils/contracts/src/LibRichErrors.sol";
import "../libs/LibStakingRichErrors.sol";
import "../interfaces/IVaultCore.sol";
@@ -36,7 +36,7 @@ import "../interfaces/IVaultCore.sol";
/// a vault cannot be reset to normal mode; this prevents corruption of related
/// status in the staking contract.
contract MixinVaultCore is
Ownable,
Authorizable,
IVaultCore
{
// Address of staking contract
@@ -71,6 +71,14 @@ contract MixinVaultCore is
_;
}
/// @dev Sets the vault owner and adds owner as an authorized address.
constructor()
public
Ownable()
{
_addAuthorizedAddress(owner);
}
/// @dev Sets the address of the StakingProxy contract.
/// Note that only the contract owner can call this function.
/// @param _stakingProxyAddress Address of Staking proxy contract.
@@ -87,7 +95,7 @@ contract MixinVaultCore is
/// Note that only the contract owner can call this function.
function enterCatastrophicFailure()
external
onlyOwner
onlyAuthorized
{
isInCatastrophicFailure = true;
emit InCatastrophicFailureMode(msg.sender);