-
Notifications
You must be signed in to change notification settings - Fork 39
/
IBCHandler.sol
46 lines (40 loc) · 1.35 KB
/
IBCHandler.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
45
46
pragma solidity ^0.8.27;
import "../24-host/IBCStore.sol";
import "../02-client/IBCClient.sol";
import "../03-connection/IBCConnection.sol";
import "../04-channel/IBCChannel.sol";
import "../04-channel/IBCPacket.sol";
import "@openzeppelin-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/utils/Context.sol";
/**
* @dev IBCHandler is a contract that implements [ICS-25](https://github.com/cosmos/ibc/tree/main/spec/core/ics-025-handler-interface).
*/
abstract contract IBCHandler is
Initializable,
UUPSUpgradeable,
OwnableUpgradeable,
IBCStore,
IBCClient,
IBCConnectionImpl,
IBCChannelImpl,
IBCPacketImpl
{
constructor() {
_disableInitializers();
}
function initialize(
address admin
) public virtual initializer {
__Ownable_init(admin);
__UUPSUpgradeable_init();
commitments[nextClientSequencePath] = bytes32(uint256(1));
commitments[nextChannelSequencePath] = bytes32(uint256(1));
commitments[nextConnectionSequencePath] = bytes32(uint256(1));
}
function _authorizeUpgrade(
address newImplementation
) internal override onlyOwner {}
}