- 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.
55 lines
2.0 KiB
Solidity
55 lines
2.0 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.20;
|
|
|
|
import "forge-std/Script.sol";
|
|
import "../../contracts/reserve/ReserveSystem.sol";
|
|
import "../../contracts/reserve/ReserveTokenIntegration.sol";
|
|
import "@emoney/interfaces/ITokenFactory138.sol";
|
|
|
|
/**
|
|
* @title DeployReserveSystem
|
|
* @notice Deployment script for Reserve System on ChainID 138
|
|
*/
|
|
contract DeployReserveSystem is Script {
|
|
function run() external {
|
|
uint256 chainId = block.chainid;
|
|
require(chainId == 138, "This script is for ChainID 138 only");
|
|
|
|
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
|
|
vm.startBroadcast(deployerPrivateKey);
|
|
|
|
address deployer = vm.addr(deployerPrivateKey);
|
|
console.log("=== Reserve System Deployment (ChainID 138) ===");
|
|
console.log("Deployer:", deployer);
|
|
console.log("");
|
|
|
|
// Load addresses from environment
|
|
address admin = vm.envOr("RESERVE_ADMIN", deployer);
|
|
address tokenFactory = vm.envAddress("TOKEN_FACTORY");
|
|
|
|
console.log("Deploying ReserveSystem...");
|
|
ReserveSystem reserveSystem = new ReserveSystem(admin);
|
|
console.log("ReserveSystem deployed at:", address(reserveSystem));
|
|
|
|
console.log("Deploying ReserveTokenIntegration...");
|
|
ReserveTokenIntegration integration = new ReserveTokenIntegration(
|
|
admin,
|
|
address(reserveSystem),
|
|
tokenFactory
|
|
);
|
|
console.log("ReserveTokenIntegration deployed at:", address(integration));
|
|
|
|
console.log("");
|
|
console.log("=== Deployment Summary ===");
|
|
console.log("ReserveSystem:", address(reserveSystem));
|
|
console.log("ReserveTokenIntegration:", address(integration));
|
|
console.log("");
|
|
console.log("=== Export to .env ===");
|
|
console.log("export RESERVE_SYSTEM=", vm.toString(address(reserveSystem)));
|
|
console.log("export RESERVE_INTEGRATION=", vm.toString(address(integration)));
|
|
|
|
vm.stopBroadcast();
|
|
}
|
|
}
|
|
|