-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathMessagingBase.sol
44 lines (36 loc) · 2.66 KB
/
MessagingBase.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
// ══════════════════════════════ LIBRARY IMPORTS ══════════════════════════════
import {ChainContext} from "../libs/ChainContext.sol";
// ═════════════════════════════ INTERNAL IMPORTS ══════════════════════════════
import {MultiCallable} from "./MultiCallable.sol";
import {Versioned} from "./Version.sol";
// ═════════════════════════════ EXTERNAL IMPORTS ══════════════════════════════
import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol";
/**
* @notice Base contract for all messaging contracts.
* - Provides context on the local chain's domain.
* - Provides ownership functionality.
* - Will be providing pausing functionality when it is implemented.
*/
abstract contract MessagingBase is MultiCallable, Versioned, Ownable2StepUpgradeable {
// ════════════════════════════════════════════════ IMMUTABLES ═════════════════════════════════════════════════════
/// @notice Domain of the local chain, set once upon contract creation
uint32 public immutable localDomain;
// @notice Domain of the Synapse chain, set once upon contract creation
uint32 public immutable synapseDomain;
// ══════════════════════════════════════════════════ STORAGE ══════════════════════════════════════════════════════
/// @dev gap for upgrade safety
uint256[50] private __GAP; // solhint-disable-line var-name-mixedcase
constructor(string memory version_, uint32 synapseDomain_) Versioned(version_) {
localDomain = ChainContext.chainId();
synapseDomain = synapseDomain_;
}
// TODO: Implement pausing
/**
* @dev Should be impossible to renounce ownership;
* we override OpenZeppelin OwnableUpgradeable's
* implementation of renounceOwnership to make it a no-op
*/
function renounceOwnership() public override onlyOwner {} //solhint-disable-line no-empty-blocks
}