// File: lib/registry/src/Registry.sol



// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.19;
import { Owned } from "../lib/solmate/src/auth/Owned.sol";

contract Registry is Owned {
    event Registered(string key, bytes value);

    mapping(string key => bytes value) private _registry;

    constructor(address owner_) Owned (owner_){ }

    function set(string memory key, bytes memory value) external onlyOwner {
        _registry[key] = value;
        emit Registered(key, value);
    }

    function get(string calldata key) external view returns (bytes memory) {
        return _registry[key];
    }
}

// File: lib/registry/lib/solmate/src/auth/Owned.sol



// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Simple single owner authorization mixin.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol)
abstract contract Owned {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event OwnershipTransferred(address indexed user, address indexed newOwner);

    /*//////////////////////////////////////////////////////////////
                            OWNERSHIP STORAGE
    //////////////////////////////////////////////////////////////*/

    address public owner;

    modifier onlyOwner() virtual {
        require(msg.sender == owner, "UNAUTHORIZED");

        _;
    }

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(address _owner) {
        owner = _owner;

        emit OwnershipTransferred(address(0), _owner);
    }

    /*//////////////////////////////////////////////////////////////
                             OWNERSHIP LOGIC
    //////////////////////////////////////////////////////////////*/

    function transferOwnership(address newOwner) public virtual onlyOwner {
        owner = newOwner;

        emit OwnershipTransferred(msg.sender, newOwner);
    }
}