Files
onchain-id/test/helpers/ClaimIssuerHelper.sol
Mohamad HammoudandGitHub f290366435 Feature/bt 1496 identity setup single transaction (#142)
* 💥 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
2026-04-08 15:52:08 +03:00

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));
}
}