mirror of
https://github.com/luxfi/onchain-id.git
synced 2026-10-30 15:23:49 +00:00
* 💥 identity added claim signers at setup * 💥 adde claim_Adder purpose * 💥 added identity types lib and rename variables * 🚨 fix lint * ♻️ renamed claim adder * 💥 resolved claim adder just add claims in execute * 🚨 fix add name selector * 💥 added AI_AGENT type * 🔧 updated the husky files * Removed __ClaimIssuer_init
23 lines
979 B
Solidity
23 lines
979 B
Solidity
// SPDX-License-Identifier: GPL-3.0
|
|
pragma solidity ^0.8.27;
|
|
|
|
import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
|
|
import { ClaimIssuer } from "contracts/ClaimIssuer.sol";
|
|
import { IdentityTypes } from "contracts/libraries/IdentityTypes.sol";
|
|
|
|
/// @notice Helper library for deploying ClaimIssuer contracts with proxy
|
|
library ClaimIssuerHelper {
|
|
|
|
/// @notice Deploys a ClaimIssuer behind an ERC1967Proxy
|
|
/// @param initialManagementKey The management key for the claim issuer
|
|
/// @return claimIssuer The ClaimIssuer contract at the proxy address
|
|
function deployWithProxy(address initialManagementKey) internal returns (ClaimIssuer) {
|
|
ClaimIssuer impl = new ClaimIssuer(initialManagementKey);
|
|
ERC1967Proxy proxy = new ERC1967Proxy(
|
|
address(impl), abi.encodeCall(ClaimIssuer.initialize, (initialManagementKey, IdentityTypes.CLAIM_ISSUER))
|
|
);
|
|
return ClaimIssuer(address(proxy));
|
|
}
|
|
|
|
}
|