Verified contractPartial
IssuanceManagerFactory
Address0xcc9428c0f4f4c42224bfa899392abc5ef20cde2c
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.8.28
- Same code
1 more contract
Details
- Compiler
- solc 0.8.28+commit.7893614a
- Language
- solidity
- Optimization
- Yes, 15 runs
- EVM version
- prague
- Via IR
- yes
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,300,440
- Creation transaction
- 0x8dda5dda6e…7aa86a0f97
- Main copy (most transactions)
- 0x0eae5f47…b57fcc74
69 files
The source code is large: one file is shown at a time. Choose a file in the list.
- src/IssuanceManagerFactory.solmain10.48 KB
- dependencies/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol9.28 KB
- dependencies/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol6.57 KB
- dependencies/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol12.22 KB
- dependencies/openzeppelin-contracts-upgradeable/contracts/token/ERC721/ERC721Upgradeable.sol18.15 KB
- dependencies/openzeppelin-contracts-upgradeable/contracts/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol8.85 KB
- dependencies/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol1.19 KB
- dependencies/openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165Upgradeable.sol1.18 KB
- dependencies/openzeppelin-contracts/contracts/access/Ownable.sol3.1 KB
- dependencies/openzeppelin-contracts/contracts/interfaces/IERC1967.sol636 B
- dependencies/openzeppelin-contracts/contracts/interfaces/IERC20.sol181 B
- dependencies/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol881 B
- dependencies/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol6.54 KB
- dependencies/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol1.72 KB
- dependencies/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Utils.sol6.24 KB
- dependencies/openzeppelin-contracts/contracts/proxy/Proxy.sol2.67 KB
- dependencies/openzeppelin-contracts/contracts/proxy/beacon/BeaconProxy.sol2.31 KB
- dependencies/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol472 B
- dependencies/openzeppelin-contracts/contracts/proxy/beacon/UpgradeableBeacon.sol2.22 KB
- dependencies/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol2.78 KB
- dependencies/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol684 B
- dependencies/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol4.93 KB
- dependencies/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol997 B
- dependencies/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Enumerable.sol1.04 KB
- dependencies/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol792 B
- dependencies/openzeppelin-contracts/contracts/token/ERC721/utils/ERC721Utils.sol1.92 KB
- dependencies/openzeppelin-contracts/contracts/utils/Address.sol6.05 KB
- dependencies/openzeppelin-contracts/contracts/utils/Context.sol963 B
- dependencies/openzeppelin-contracts/contracts/utils/Create2.sol4.47 KB
- dependencies/openzeppelin-contracts/contracts/utils/Errors.sol896 B
- dependencies/openzeppelin-contracts/contracts/utils/Panic.sol1.97 KB
- dependencies/openzeppelin-contracts/contracts/utils/StorageSlot.sol4.18 KB
- dependencies/openzeppelin-contracts/contracts/utils/Strings.sol18.95 KB
- dependencies/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol870 B
- dependencies/openzeppelin-contracts/contracts/utils/math/Math.sol32.15 KB
- dependencies/openzeppelin-contracts/contracts/utils/math/SafeCast.sol34.94 KB
- dependencies/openzeppelin-contracts/contracts/utils/math/SignedMath.sol2.61 KB
- src/CyberCorpConstants.sol6.57 KB
- src/CyberScrip.sol12.31 KB
- src/IssuanceManager.sol34.12 KB
- src/LedgerEntryToken.sol37.02 KB
- src/creds/storage/lexchexBadgeStorage.sol8.27 KB
- src/interfaces/IAuthAdapter.sol3.91 KB
- src/interfaces/ICertificateConverter.sol1.08 KB
- src/interfaces/ICondition.sol3.85 KB
- src/interfaces/ICyberAgreementRegistry.sol7.81 KB
- src/interfaces/ICyberCorp.sol5.86 KB
- src/interfaces/ICyberScrip.sol1.85 KB
- src/interfaces/IERC5484.sol670 B
- src/interfaces/IIssuanceManager.sol14.27 KB
- src/interfaces/IIssuanceManagerFactory.sol4.37 KB
- src/interfaces/ILedgerEntryToken.sol15.73 KB
- src/interfaces/ILexChexBadge.sol14.47 KB
- src/interfaces/ISecondaryTradeStorage.sol17.6 KB
- src/interfaces/ITransferRestrictionHook.sol5.25 KB
- src/interfaces/IUriBuilder.sol6.55 KB
- src/libs/FactoryDeploymentLib.sol1.29 KB
- src/libs/JsonLib.sol7.29 KB
- src/libs/ProportionalVaultMath.sol2.4 KB
- src/libs/auth.sol9.6 KB
- src/libs/policies/LookThroughPolicy.sol3.31 KB
- src/libs/policies/USJurisdictionPolicy.sol873 B
- src/storage/CyberScripStorage.sol4.65 KB
- src/storage/IssuanceManagerFactoryStorage.sol3.64 KB
- src/storage/IssuanceManagerStorage.sol66.21 KB
- src/storage/LedgerEntryTokenStorage.sol59.07 KB
- src/storage/extensions/FundInterestExtensionV3.sol19.79 KB
- src/storage/extensions/ICertificateExtension.sol6.2 KB
- src/storage/extensions/ScopedDataLayerLib.sol2.93 KB
src/IssuanceManagerFactory.sol
/* .o.
.888.
.8"888.
.8' `888.
.88ooo8888.
.8' `888.
o88o o8888o
ooo ooooo . ooooo ooooooo ooooo
`88. .888' .o8 `888' `8888 d8'
888b d'888 .ooooo. .o888oo .oooo. 888 .ooooo. Y888..8P
8 Y88. .P 888 d88' `88b 888 `P )88b 888 d88' `88b `8888'
8 `888' 888 888ooo888 888 .oP"888 888 888ooo888 .8PY888.
8 Y 888 888 .o 888 . d8( 888 888 o 888 .o d8' `888b
o8o o888o `Y8bod8P' "888" `Y888""8o o888ooooood8 `Y8bod8P' o888o o88888o
.oooooo. .o8 .oooooo.
d8P' `Y8b "888 d8P' `Y8b
888 oooo ooo 888oooo. .ooooo. oooo d8b 888 .ooooo. oooo d8b oo.ooooo.
888 `88. .8' d88' `88b d88' `88b `888""8P 888 d88' `88b `888""8P 888' `88b
888 `88..8' 888 888 888ooo888 888 888 888 888 888 888 888
`88b ooo `888' 888 888 888 .o 888 `88b ooo 888 888 888 888 888 .o.
`Y8bood8P' .8' `Y8bod8P' `Y8bod8P' d888b `Y8bood8P' `Y8bod8P' d888b 888bod8P' Y8P
.o..P' 888
`Y8P' o888o
_______________________________________________________________________________________________________
All software, documentation and other files and information in this repository (collectively, the "Software")
are copyright MetaLeX Labs, Inc., a Delaware corporation.
All rights reserved.
The Software is proprietary and shall not, in part or in whole, be used, copied, modified, merged, published,
distributed, transmitted, sublicensed, sold, or otherwise used in any form or by any means, electronic or
mechanical, including photocopying, recording, or by any information storage and retrieval system,
except with the express prior written permission of the copyright holder.*/
pragma solidity 0.8.28;
import "openzeppelin-contracts/utils/Create2.sol";
import "openzeppelin-contracts/proxy/ERC1967/ERC1967Proxy.sol";
import "./IssuanceManager.sol";
import "./LedgerEntryToken.sol";
import "./CyberScrip.sol";
import "./libs/auth.sol";
import {FactoryDeploymentLib} from "./libs/FactoryDeploymentLib.sol";
import "./storage/IssuanceManagerFactoryStorage.sol";
import "./interfaces/IIssuanceManagerFactory.sol";
contract IssuanceManagerFactory is BorgAuthACL, UUPSUpgradeable, IIssuanceManagerFactory
{
error InvalidSalt();
error DeploymentFailed();
error ZeroAddress();
event IssuanceManagerDeployed(address issuanceManager);
event RefImplementationSet(address refImplementation, string version);
event CyberCertPrinterRefImplementationSet(address refImplementation, string version);
event CyberScripRefImplementationSet(address refImplementation, string version);
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
function initialize(
address _auth,
address refImplementation,
address cyberCertPrinterRefImplementation,
address cyberScripRefImplementation
) public initializer {
// Initialize BorgAuthACL
__BorgAuthACL_init(_auth);
IssuanceManagerFactoryStorage.getStorageData().refImplementation = refImplementation;
IssuanceManagerFactoryStorage.getStorageData().cyberCertPrinterRefImplementation = cyberCertPrinterRefImplementation;
IssuanceManagerFactoryStorage.getStorageData().cyberScripRefImplementation = cyberScripRefImplementation;
emit RefImplementationSet(refImplementation, IssuanceManager(refImplementation).DEPLOY_VERSION());
emit CyberCertPrinterRefImplementationSet(cyberCertPrinterRefImplementation, LedgerEntryToken(cyberCertPrinterRefImplementation).DEPLOY_VERSION());
emit CyberScripRefImplementationSet(cyberScripRefImplementation, CyberScrip(cyberScripRefImplementation).DEPLOY_VERSION());
}
/// @notice Salt used by a particular caller in this component factory.
function deploymentSalt(bytes32 salt, address deployer) public pure returns (bytes32) {
return FactoryDeploymentLib.deploymentSalt(salt, deployer);
}
function deployIssuanceManager(bytes32 _salt) public returns (address) {
if (_salt == bytes32(0)) revert InvalidSalt();
_salt = deploymentSalt(_salt, msg.sender);
// Create proxy deployment bytecode
bytes memory proxyBytecode = _getBytecode();
// Deploy using CREATE2
address issuanceManagerProxy = Create2.deploy(0, _salt, proxyBytecode);
if(issuanceManagerProxy == address(0)) revert DeploymentFailed();
emit IssuanceManagerDeployed(issuanceManagerProxy);
return issuanceManagerProxy;
}
/// @notice Computes the deterministic address for an IssuanceManagerBeaconProxy
/// @param _salt Salt used for CREATE2
/// @return computedAddress The precomputed address of the proxy
function computeIssuanceManagerAddress(bytes32 _salt) external view returns (address) {
return computeIssuanceManagerAddress(_salt, msg.sender);
}
/// @notice Predict a deployment by an explicit factory or individual caller.
function computeIssuanceManagerAddress(bytes32 _salt, address deployer) public view returns (address) {
bytes memory proxyBytecode = _getBytecode();
return Create2.computeAddress(deploymentSalt(_salt, deployer), keccak256(proxyBytecode));
}
/// @notice Gets the bytecode for creating new IssuanceManager proxies
/// @dev Internal function used by deployIssuanceManager
/// @return bytecode The proxy contract creation bytecode
function _getBytecode() private view returns (bytes memory bytecode) {
bytes memory sourceCodeBytes = type(ERC1967Proxy).creationCode;
bytecode = abi.encodePacked(sourceCodeBytes, abi.encode(IssuanceManagerFactoryStorage.getStorageData().refImplementation, ""));
}
/// @notice Get the reference implementation contract for the next deployments
/// @return Current reference implementation contract address
function getRefImplementation() public view returns(address) {
return IssuanceManagerFactoryStorage.getStorageData().refImplementation;
}
/// @notice Set the reference implementation contract for the next deployments
/// @dev Only callable by addresses with the admin role
/// @param _newImplementation Address of the new implementation
function setRefImplementation(address _newImplementation) public onlyOwner {
IssuanceManagerFactoryStorage.getStorageData().refImplementation = _newImplementation;
emit RefImplementationSet(_newImplementation, IssuanceManager(_newImplementation).DEPLOY_VERSION());
}
/// @notice Get the reference implementation contract for the next `LedgerEntryToken` deployments
/// @return Current reference implementation contract address
function getCyberCertPrinterRefImplementation() external view returns(address) {
return IssuanceManagerFactoryStorage.getStorageData().cyberCertPrinterRefImplementation;
}
/// @notice Set the reference implementation contract for the next `LedgerEntryToken` deployments
/// @dev Only callable by addresses with the admin role
/// @param _newImplementation Address of the new implementation
function setCyberCertPrinterRefImplementation(address _newImplementation) public onlyOwner {
IssuanceManagerFactoryStorage.getStorageData().cyberCertPrinterRefImplementation = _newImplementation;
emit CyberCertPrinterRefImplementationSet(_newImplementation, LedgerEntryToken(_newImplementation).DEPLOY_VERSION());
}
/// @notice Get the reference implementation contract for the next `CyberScrip` deployments
/// @return Current reference implementation contract address
function getCyberScripRefImplementation() external view returns(address) {
return IssuanceManagerFactoryStorage.getStorageData().cyberScripRefImplementation;
}
/// @notice Set the reference implementation contract for the next `CyberScrip` deployments
/// @dev Only callable by addresses with the admin role
/// @param _newImplementation Address of the new implementation
function setCyberScripRefImplementation(address _newImplementation) public onlyOwner {
IssuanceManagerFactoryStorage.getStorageData().cyberScripRefImplementation = _newImplementation;
emit CyberScripRefImplementationSet(_newImplementation, CyberScrip(_newImplementation).DEPLOY_VERSION());
}
function _authorizeUpgrade(
address newImplementation
) internal override onlyOwner {}
}
Compiler settingsShow
{
"viaIR": true,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"optimizer": {
"runs": 15,
"enabled": true
},
"evmVersion": "prague",
"remappings": [
"openzeppelin-contracts/=dependencies/openzeppelin-contracts/contracts/",
"openzeppelin-contracts-upgradeable/=dependencies/openzeppelin-contracts-upgradeable/contracts/",
"erc721a/=dependencies/erc721a-4.3.0/",
"forge-std/=dependencies/forge-std/src/",
"ConditionManager/=dependencies/ConditionManager/src/",
"@openzeppelin/contracts-upgradeable/=dependencies/openzeppelin-contracts-upgradeable/contracts/",
"@openzeppelin/contracts/=dependencies/openzeppelin-contracts/contracts/",
"erc4626-tests/=dependencies/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"halmos-cheatcodes/=dependencies/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.