| // SPDX-License-Identifier: (Apache-2.0 OR AGPL-3.0 OR BSL-1.1) | |
| // Copyright 2026 Bel Esprit D'Accord Irrevocable Trust (EIN: 42-697643) | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // OR | |
| // | |
| // Licensed under the GNU Affero General Public License, Version 3.0 | |
| // (the "AGPL"); you may not use this file except in compliance with the AGPL. | |
| // You may obtain a copy of the AGPL at | |
| // | |
| // https://www.gnu.org/licenses/agpl-3.0.html | |
| // | |
| // OR | |
| // | |
| // Licensed under the Business Source License 1.1 (BSL-1.1); | |
| // converts to Apache-2.0 after 4 years. See LICENSE-BSL for terms. | |
| pragma solidity ^0.8.24; | |
| import {Script, console2} from "forge-std/Script.sol"; | |
| import {AlgorithmEngineAnchor} from "../src/AlgorithmEngineAnchor.sol"; | |
| /// @title ALGORITHM_ENGINE Deployment Script | |
| /// @notice Deploys Anchor contract for Ledge SDK integration | |
| contract DeployEngineScript is Script { | |
| function run() external { | |
| // Retrieve deployer private key from environment | |
| uint256 deployerPrivateKey = vm.envUint("SOVEREIGN_DEPLOYER_KEY"); | |
| vm.startBroadcast(deployerPrivateKey); | |
| // 1. Deploy Anchor contract (verifier address can be set later) | |
| // Note: In production, deploy Groth16Verifier first and link it | |
| AlgorithmEngineAnchor anchor = new AlgorithmEngineAnchor(address(0)); | |
| console2.log("AlgorithmEngineAnchor deployed at:", address(anchor)); | |
| // 2. Deploy Groth16Verifier (placeholder - replace with actual from snarkjs) | |
| // Groth16Verifier verifier = new Groth16Verifier(); | |
| // anchor.setVerifier(address(verifier)); | |
| vm.stopBroadcast(); | |
| } | |
| } |