Files
onchain-id/contracts/proxy/ImplementationAuthority.sol
zeekay 31890b66ad fix: constructor Ownable(msg.sender) for OZ v5
OpenZeppelin v5 requires explicit owner in Ownable constructor. Required
for solc 0.8.31 + OZ v5 build (see liquidityio/contracts foundry.toml).

2 files: IdFactory, ImplementationAuthority.
2026-05-04 11:11:36 -07:00

35 lines
1.1 KiB
Solidity

// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.17;
import "../interface/IImplementationAuthority.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract ImplementationAuthority is IImplementationAuthority, Ownable {
// the address of implementation of ONCHAINID
address internal _implementation;
constructor(address implementation) Ownable(msg.sender) {
require(implementation != address(0), "invalid argument - zero address");
_implementation = implementation;
emit UpdatedImplementation(implementation);
}
/**
* @dev See {IImplementationAuthority-updateImplementation}.
*/
function updateImplementation(address _newImplementation) external override onlyOwner {
require(_newImplementation != address(0), "invalid argument - zero address");
_implementation = _newImplementation;
emit UpdatedImplementation(_newImplementation);
}
/**
* @dev See {IImplementationAuthority-getImplementation}.
*/
function getImplementation() external override view returns(address) {
return _implementation;
}
}