Update onlyProxyOwner modifier to onlyIfOwnerOfProxy
This commit is contained in:
parent
ac0e671aeb
commit
b25c25ccae
|
@ -127,7 +127,7 @@ contract BasicBridge is EternalStorage, Validatable, Ownable, OwnedUpgradeabilit
|
|||
return executionDailyLimit() >= nextLimit && _amount <= executionMaxPerTx();
|
||||
}
|
||||
|
||||
function claimTokens(address _token, address _to) public onlyProxyOwner {
|
||||
function claimTokens(address _token, address _to) public onlyIfOwnerOfProxy {
|
||||
require(_to != address(0));
|
||||
if (_token == address(0)) {
|
||||
_to.transfer(address(this).balance);
|
||||
|
|
|
@ -10,7 +10,7 @@ contract OverdrawManagement is EternalStorage, OwnedUpgradeability {
|
|||
|
||||
event UserRequestForSignature(address recipient, uint256 value);
|
||||
|
||||
function fixAssetsAboveLimits(bytes32 txHash, bool unlockOnForeign) external onlyProxyOwner {
|
||||
function fixAssetsAboveLimits(bytes32 txHash, bool unlockOnForeign) external onlyIfOwnerOfProxy {
|
||||
require(!fixedAssets(txHash));
|
||||
address recipient;
|
||||
uint256 value;
|
||||
|
|
|
@ -9,7 +9,8 @@ contract OwnedUpgradeability {
|
|||
return IOwnedUpgradeabilityProxy(this).proxyOwner();
|
||||
}
|
||||
|
||||
modifier onlyProxyOwner() {
|
||||
// Avoid using onlyProxyOwner name to prevent issues with implementation from proxy contract
|
||||
modifier onlyIfOwnerOfProxy() {
|
||||
require(msg.sender == upgradeabilityAdmin());
|
||||
_;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ contract ForeignBridgeErcToErc is BasicBridge, BasicForeignBridge {
|
|||
return bytes4(keccak256(abi.encodePacked("erc-to-erc-core")));
|
||||
}
|
||||
|
||||
function claimTokens(address _token, address _to) public onlyProxyOwner {
|
||||
function claimTokens(address _token, address _to) public onlyIfOwnerOfProxy {
|
||||
require(_token != address(erc20token()));
|
||||
super.claimTokens(_token, _to);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ contract ForeignBridgeErcToNative is BasicBridge, BasicForeignBridge {
|
|||
return bytes4(keccak256(abi.encodePacked("erc-to-native-core")));
|
||||
}
|
||||
|
||||
function claimTokens(address _token, address _to) public onlyProxyOwner {
|
||||
function claimTokens(address _token, address _to) public onlyIfOwnerOfProxy {
|
||||
require(_token != address(erc20token()));
|
||||
super.claimTokens(_token, _to);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ contract ForeignBridgeNativeToErc is ERC677Receiver, BasicBridge, BasicForeignBr
|
|||
return bytes4(keccak256(abi.encodePacked("native-to-erc-core")));
|
||||
}
|
||||
|
||||
function claimTokensFromErc677(address _token, address _to) external onlyProxyOwner {
|
||||
function claimTokensFromErc677(address _token, address _to) external onlyIfOwnerOfProxy {
|
||||
erc677token().claimTokens(_token, _to);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue