Files
smom-dbis-138/script/deploy/vault/DeployCREATE2FactoryIfNeeded.s.sol
defiQUGandCursor 651fb59786 Add mainnet checkpoint stack: ISO attestation, participant Etherscan surface, and services.
Ship AddressActivityRegistry V1/V2, ISO20022IntakeGateway, Chain138ParticipantSurface,
checkpoint hub contracts, checkpoint-core package, aggregator/indexer/sdk services,
relay profile guards, M00 diamond bridge facet, and OMNL compliance contracts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 21:54:05 -07:00

22 lines
806 B
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {Script, console2} from "forge-std/Script.sol";
import {CREATE2Factory} from "../../../contracts/utils/CREATE2Factory.sol";
/// @notice Deploy CREATE2Factory when missing on target chain (one-time CREATE).
contract DeployCREATE2FactoryIfNeeded is Script {
function run() external {
address existing = vm.envOr("CREATE2_FACTORY_ADDRESS", address(0));
if (existing != address(0) && existing.code.length > 0) {
console2.log("CREATE2Factory already live:", existing);
return;
}
vm.startBroadcast(vm.envUint("PRIVATE_KEY"));
CREATE2Factory factory = new CREATE2Factory();
vm.stopBroadcast();
console2.log("CREATE2Factory deployed:", address(factory));
}
}