Add Oracle Aggregator and CCIP Integration
- 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.
This commit is contained in:
57
script/Deploy.s.sol
Normal file
57
script/Deploy.s.sol
Normal file
@@ -0,0 +1,57 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.8.19;
|
||||
|
||||
import {Script, console} from "forge-std/Script.sol";
|
||||
import {WETH} from "../contracts/tokens/WETH.sol";
|
||||
import {Multicall} from "../contracts/utils/Multicall.sol";
|
||||
import {CREATE2Factory} from "../contracts/utils/CREATE2Factory.sol";
|
||||
import {Aggregator} from "../contracts/oracle/Aggregator.sol";
|
||||
import {Proxy} from "../contracts/oracle/Proxy.sol";
|
||||
|
||||
contract Deploy is Script {
|
||||
function run() external {
|
||||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
|
||||
address deployer = vm.addr(deployerPrivateKey);
|
||||
|
||||
console.log("Deploying contracts with address:", deployer);
|
||||
console.log("Chain ID:", block.chainid);
|
||||
|
||||
vm.startBroadcast(deployerPrivateKey);
|
||||
|
||||
// Deploy WETH
|
||||
WETH weth = new WETH();
|
||||
console.log("WETH deployed at:", address(weth));
|
||||
|
||||
// Deploy Multicall
|
||||
Multicall multicall = new Multicall();
|
||||
console.log("Multicall deployed at:", address(multicall));
|
||||
|
||||
// Deploy CREATE2 Factory
|
||||
CREATE2Factory create2Factory = new CREATE2Factory();
|
||||
console.log("CREATE2Factory deployed at:", address(create2Factory));
|
||||
|
||||
// Deploy Oracle Aggregator
|
||||
Aggregator aggregator = new Aggregator(
|
||||
"ETH/USD Price Feed",
|
||||
deployer,
|
||||
60, // heartbeat: 60 seconds
|
||||
50 // deviationThreshold: 0.5% (50 basis points)
|
||||
);
|
||||
console.log("Aggregator deployed at:", address(aggregator));
|
||||
|
||||
// Deploy Proxy for Aggregator
|
||||
Proxy proxy = new Proxy(address(aggregator), deployer);
|
||||
console.log("Proxy deployed at:", address(proxy));
|
||||
|
||||
vm.stopBroadcast();
|
||||
|
||||
// Log deployment addresses
|
||||
console.log("\n=== Deployment Summary ===");
|
||||
console.log("WETH:", address(weth));
|
||||
console.log("Multicall:", address(multicall));
|
||||
console.log("CREATE2Factory:", address(create2Factory));
|
||||
console.log("Aggregator:", address(aggregator));
|
||||
console.log("Proxy:", address(proxy));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user