Commit 13382dc5 authored by Mark Tyneway's avatar Mark Tyneway

lint: fix

lint: fix
parent 5e4a33b4
......@@ -8,8 +8,9 @@ import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
/**
* @title CrossDomainOwnable3
* @notice This contract extends the OpenZeppelin `Ownable` contract for L2 contracts to be owned
* by contracts on either L1 or L2. Note that this contract is meant to be used with systems that use
* the CrossDomainMessenger system. It will not work if the OptimismPortal is used directly.
* by contracts on either L1 or L2. Note that this contract is meant to be used with systems
* that use the CrossDomainMessenger system. It will not work if the OptimismPortal is
* used directly.
*/
abstract contract CrossDomainOwnable3 is Ownable {
/**
......@@ -28,6 +29,21 @@ abstract contract CrossDomainOwnable3 is Ownable {
bool isLocal
);
/**
* @notice Allows for ownership to be transferred with specifying the locality.
* @param _owner The new owner of the contract.
* @param _isLocal Configures the locality of the ownership.
*/
function transferOwnership(address _owner, bool _isLocal) external onlyOwner {
require(_owner != address(0), "CrossDomainOwnable3: new owner is the zero address");
address oldOwner = owner();
_transferOwnership(_owner);
isLocal = _isLocal;
emit OwnershipTransferred(oldOwner, _owner, _isLocal);
}
/**
* @notice Overrides the implementation of the `onlyOwner` modifier to check that the unaliased
* `xDomainMessageSender` is the owner of the contract. This value is set to the caller
......@@ -52,19 +68,4 @@ abstract contract CrossDomainOwnable3 is Ownable {
);
}
}
/**
* @notice Allows for ownership to be transferred with specifying the locality.
* @param _owner The new owner of the contract.
* @param _isLocal Configures the locality of the ownership.
*/
function transferOwnership(address _owner, bool _isLocal) external onlyOwner {
require(_owner != address(0), "CrossDomainOwnable3: new owner is the zero address");
address oldOwner = owner();
_transferOwnership(_owner);
isLocal = _isLocal;
emit OwnershipTransferred(oldOwner, _owner, _isLocal);
}
}
......@@ -181,7 +181,7 @@ contract CrossDomainOwnable3_Test is Messenger_Initializer {
* @notice The existing transferOwnership(address) method
* still exists on the contract
*/
function test_transferOwnership_noLocal_succeeds() public {
function test_transferOwnershipNoLocal_succeeds() public {
bool isLocal = setter.isLocal();
vm.expectEmit(true, true, true, true, address(setter));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment