-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from datachainlab/upgradeable
Add upgradeable LCP Client Signed-off-by: Jun Kimura <[email protected]>
- Loading branch information
Showing
10 changed files
with
831 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "lib/forge-std"] | ||
path = lib/forge-std | ||
url = https://github.com/foundry-rs/forge-std | ||
[submodule "lib/openzeppelin-foundry-upgrades"] | ||
path = lib/openzeppelin-foundry-upgrades | ||
url = https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.12; | ||
|
||
import {LCPClientBase} from "./LCPClientBase.sol"; | ||
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; | ||
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; | ||
|
||
/// @custom:oz-upgrades-unsafe-allow external-library-linking | ||
contract LCPClientOwnableUpgradeable is LCPClientBase, UUPSUpgradeable, OwnableUpgradeable { | ||
/// @custom:oz-upgrades-unsafe-allow constructor | ||
constructor(address ibcHandler, bool developmentMode) LCPClientBase(ibcHandler, developmentMode) {} | ||
|
||
function initialize(bytes memory rootCACert) public initializer { | ||
initializeRootCACert(rootCACert); | ||
__UUPSUpgradeable_init(); | ||
__Ownable_init(msg.sender); | ||
} | ||
|
||
function _authorizeUpgrade(address newImplementation) internal virtual override onlyOwner {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule openzeppelin-foundry-upgrades
added at
b70222
Oops, something went wrong.