Files
smom-dbis-138/script/DeployAddressMapper.s.sol
defiQUG 1fb7266469 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.
2025-12-12 14:57:48 -08:00

53 lines
2.1 KiB
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import {Script, console} from "forge-std/Script.sol";
import {AddressMapper} from "../contracts/utils/AddressMapper.sol";
/**
* @title DeployAddressMapper
* @notice Deploy the AddressMapper contract to provide address mapping
*/
contract DeployAddressMapper is Script {
function run() external {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
address deployer = vm.addr(deployerPrivateKey);
console.log("Deploying AddressMapper with deployer:", vm.toString(deployer));
vm.startBroadcast(deployerPrivateKey);
AddressMapper mapper = new AddressMapper();
console.log("AddressMapper deployed at:", vm.toString(address(mapper)));
// Verify mappings
address weth9Genesis = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address weth9Deployed = 0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6;
address weth10Genesis = 0xf4BB2e28688e89fCcE3c0580D37d36A7672E8A9F;
address weth10Deployed = 0x105F8A15b819948a89153505762444Ee9f324684;
address mappedWETH9 = mapper.getDeployedAddress(weth9Genesis);
address mappedWETH10 = mapper.getDeployedAddress(weth10Genesis);
console.log("\n=== Mapping Verification ===");
console.log("WETH9 Genesis:", vm.toString(weth9Genesis));
console.log("WETH9 Mapped:", vm.toString(mappedWETH9));
console.log("WETH9 Expected:", vm.toString(weth9Deployed));
require(mappedWETH9 == weth9Deployed, "WETH9 mapping incorrect");
console.log("WETH10 Genesis:", vm.toString(weth10Genesis));
console.log("WETH10 Mapped:", vm.toString(mappedWETH10));
console.log("WETH10 Expected:", vm.toString(weth10Deployed));
require(mappedWETH10 == weth10Deployed, "WETH10 mapping incorrect");
console.log("\nOK: All mappings verified!");
vm.stopBroadcast();
console.log("\n=== Deployment Summary ===");
console.log("AddressMapper:", vm.toString(address(mapper)));
console.log("Owner:", vm.toString(mapper.owner()));
}
}