Remove payable fallback from IStakingProxy, fix linting errors
This commit is contained in:
@@ -92,6 +92,7 @@ contract StakingProxy is
|
||||
external
|
||||
onlyAuthorized
|
||||
{
|
||||
// solhint-disable-next-line not-rely-on-time
|
||||
uint96 timestamp = block.timestamp.downcastToUint96();
|
||||
if (shouldSetReadOnlyMode) {
|
||||
stakingContract = readOnlyProxy;
|
||||
|
@@ -36,7 +36,7 @@ contract ZrxVaultBackstop {
|
||||
/// @param _stakingProxyAddress Address of stakingProxy.
|
||||
/// @param _zrxVaultAddress Address of zrxVault.
|
||||
constructor(
|
||||
address payable _stakingProxyAddress,
|
||||
address _stakingProxyAddress,
|
||||
address _zrxVaultAddress
|
||||
)
|
||||
public
|
||||
@@ -59,7 +59,9 @@ contract ZrxVaultBackstop {
|
||||
);
|
||||
|
||||
// Ensure that the stakingProxy has been in read-only mode for a long enough time
|
||||
// TODO: Ensure correct value is set in production
|
||||
require(
|
||||
// solhint-disable-next-line not-rely-on-time
|
||||
block.timestamp.safeSub(readOnlyState.lastSetTimestamp) >= 40 days,
|
||||
"READ_ONLY_MODE_DURATION_TOO_SHORT"
|
||||
);
|
||||
|
@@ -22,8 +22,7 @@ pragma experimental ABIEncoderV2;
|
||||
import "./IStructs.sol";
|
||||
|
||||
|
||||
contract IStakingProxy /* is IStaking */
|
||||
{
|
||||
contract IStakingProxy {
|
||||
|
||||
/// @dev Emitted by StakingProxy when a staking contract is attached.
|
||||
/// @param newStakingContractAddress Address of newly attached staking contract.
|
||||
@@ -40,12 +39,6 @@ contract IStakingProxy /* is IStaking */
|
||||
uint96 timestamp
|
||||
);
|
||||
|
||||
/// @dev Delegates calls to the staking contract, if it is set.
|
||||
// solhint-disable no-complex-fallback
|
||||
function ()
|
||||
external
|
||||
payable;
|
||||
|
||||
/// @dev Attach a staking contract; future calls will be delegated to the staking contract.
|
||||
/// Note that this is callable only by an authorized address.
|
||||
/// @param _stakingContract Address of staking contract.
|
||||
|
Reference in New Issue
Block a user