The home for Hyperlane core contracts, sdk packages, and other infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hyperlane-monorepo/solidity/contracts/middleware/libs/OwnableMulticall.sol

32 lines
723 B

// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.13;
// ============ Internal Imports ============
import {CallLib} from "./Call.sol";
/*
* @title OwnableMulticall
* @dev Permits immutable owner address to execute calls with value to other contracts.
*/
contract OwnableMulticall {
address public immutable owner;
constructor(address _owner) {
owner = _owner;
}
modifier onlyOwner() {
require(msg.sender == owner, "!owner");
_;
}
function multicall(
CallLib.Call[] calldata calls
) external payable onlyOwner {
return CallLib.multicall(calls);
}
// solhint-disable-next-line no-empty-blocks
receive() external payable {}
}