35 lines
1.2 KiB
Solidity
35 lines
1.2 KiB
Solidity
|
|
// SPDX-License-Identifier: MIT
|
||
|
|
pragma solidity ^0.8.19;
|
||
|
|
|
||
|
|
import {Script, console} from "forge-std/Script.sol";
|
||
|
|
import {CCIPReceiver} from "../contracts/ccip/CCIPReceiver.sol";
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @title DeployCCIPReceiver
|
||
|
|
* @notice Deploy CCIPReceiver contract for receiving cross-chain messages
|
||
|
|
*/
|
||
|
|
contract DeployCCIPReceiver is Script {
|
||
|
|
function run() external {
|
||
|
|
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
|
||
|
|
address deployer = vm.addr(deployerPrivateKey);
|
||
|
|
|
||
|
|
// Load environment variables
|
||
|
|
address ccipRouter = vm.envAddress("CCIP_ROUTER_ADDRESS");
|
||
|
|
|
||
|
|
console.log("Deploying CCIPReceiver with deployer:", vm.toString(deployer));
|
||
|
|
console.log("CCIP Router:", vm.toString(ccipRouter));
|
||
|
|
|
||
|
|
vm.startBroadcast(deployerPrivateKey);
|
||
|
|
|
||
|
|
CCIPReceiver receiver = new CCIPReceiver(ccipRouter);
|
||
|
|
console.log("CCIPReceiver deployed at:", vm.toString(address(receiver)));
|
||
|
|
|
||
|
|
vm.stopBroadcast();
|
||
|
|
|
||
|
|
console.log("\n=== Deployment Summary ===");
|
||
|
|
console.log("CCIPReceiver:", vm.toString(address(receiver)));
|
||
|
|
console.log("CCIP Router:", vm.toString(ccipRouter));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|