Files
smom-dbis-138/scripts/ccip-deployment/deploy-ccip-logger.js
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

56 lines
2.2 KiB
JavaScript
Executable File

const { ethers } = require("hardhat");
require("dotenv").config();
/**
* Deploy CCIPLogger to Ethereum Mainnet
* This contract receives and logs Chain-138 transactions via CCIP
*/
async function main() {
const [deployer] = await ethers.getSigners();
console.log("Deploying CCIPLogger with account:", deployer.address);
console.log("Account balance:", (await ethers.provider.getBalance(deployer.address)).toString());
// Get configuration from environment
const routerAddress = process.env.CCIP_ETH_ROUTER || "0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D"; // Official Chainlink CCIP Router on Mainnet
const authorizedSigner = process.env.AUTHORIZED_SIGNER || ethers.ZeroAddress;
const sourceChainSelector = process.env.CHAIN138_SELECTOR || "0x000000000000008a"; // Chain-138 selector (update with actual value from CCIP Directory)
console.log("\nConfiguration:");
console.log(" Router:", routerAddress);
console.log(" Authorized Signer:", authorizedSigner);
console.log(" Source Chain Selector:", sourceChainSelector);
// Deploy CCIPLogger
const CCIPLogger = await ethers.getContractFactory("CCIPLogger");
console.log("\nDeploying CCIPLogger...");
const logger = await CCIPLogger.deploy(
routerAddress,
authorizedSigner,
sourceChainSelector
);
await logger.waitForDeployment();
const loggerAddress = await logger.getAddress();
console.log("\n✅ CCIPLogger deployed to:", loggerAddress);
console.log("\nDeployment details:");
console.log(" Router:", await logger.getRouter());
console.log(" Authorized Signer:", await logger.authorizedSigner());
console.log(" Source Chain Selector:", await logger.expectedSourceChainSelector());
console.log(" Owner:", await logger.owner());
console.log("\n📝 Next steps:");
console.log(" 1. Verify contract on Etherscan:");
console.log(` npx hardhat verify --network mainnet ${loggerAddress} "${routerAddress}" "${authorizedSigner}" "${sourceChainSelector}"`);
console.log(" 2. Update .env with CCIP_LOGGER_ETH_ADDRESS=" + loggerAddress);
console.log(" 3. Deploy CCIPTxReporter to Chain-138 with this address as destination");
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});