- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
41 lines
1.4 KiB
Solidity
41 lines
1.4 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.19;
|
|
|
|
import {Script, console} from "forge-std/Script.sol";
|
|
import {Aggregator} from "../contracts/oracle/Aggregator.sol";
|
|
import {Proxy} from "../contracts/oracle/Proxy.sol";
|
|
|
|
contract DeployOracle is Script {
|
|
function run() external {
|
|
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
|
|
address deployer = vm.addr(deployerPrivateKey);
|
|
|
|
string memory description = vm.envOr("ORACLE_DESCRIPTION", string("ETH/USD Price Feed"));
|
|
uint256 heartbeat = vm.envOr("ORACLE_HEARTBEAT", uint256(60));
|
|
uint256 deviationThreshold = vm.envOr("ORACLE_DEVIATION_THRESHOLD", uint256(50));
|
|
|
|
console.log("Deploying Oracle with address:", deployer);
|
|
console.log("Description:", description);
|
|
console.log("Heartbeat:", heartbeat);
|
|
console.log("Deviation Threshold:", deviationThreshold);
|
|
|
|
vm.startBroadcast(deployerPrivateKey);
|
|
|
|
// Deploy Aggregator implementation
|
|
Aggregator aggregator = new Aggregator(
|
|
description,
|
|
deployer,
|
|
heartbeat,
|
|
deviationThreshold
|
|
);
|
|
console.log("Aggregator deployed at:", address(aggregator));
|
|
|
|
// Deploy Proxy
|
|
Proxy proxy = new Proxy(address(aggregator), deployer);
|
|
console.log("Proxy deployed at:", address(proxy));
|
|
|
|
vm.stopBroadcast();
|
|
}
|
|
}
|
|
|