43 lines
1.5 KiB
Solidity
43 lines
1.5 KiB
Solidity
|
|
// SPDX-License-Identifier: MIT
|
||
|
|
pragma solidity ^0.8.19;
|
||
|
|
|
||
|
|
import {Script, console} from "forge-std/Script.sol";
|
||
|
|
import {CCIPWETH9Bridge} from "../contracts/ccip/CCIPWETH9Bridge.sol";
|
||
|
|
import {WETH} from "../contracts/tokens/WETH.sol";
|
||
|
|
|
||
|
|
contract DeployCCIPWETH9Bridge is Script {
|
||
|
|
function run() external {
|
||
|
|
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
|
||
|
|
address deployer = vm.addr(deployerPrivateKey);
|
||
|
|
|
||
|
|
// Get configuration from environment
|
||
|
|
address ccipRouter = vm.envAddress("CCIP_ROUTER");
|
||
|
|
// Use canonical Mainnet WETH9 address (predeployed in genesis)
|
||
|
|
address weth9 = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
|
||
|
|
address feeToken = vm.envAddress("CCIP_FEE_TOKEN"); // LINK token
|
||
|
|
|
||
|
|
console.log("Deploying CCIPWETH9Bridge with:");
|
||
|
|
console.log(" Deployer:", deployer);
|
||
|
|
console.log(" CCIP Router:", ccipRouter);
|
||
|
|
console.log(" WETH9:", weth9);
|
||
|
|
console.log(" Fee Token:", feeToken);
|
||
|
|
|
||
|
|
vm.startBroadcast(deployerPrivateKey);
|
||
|
|
|
||
|
|
CCIPWETH9Bridge bridge = new CCIPWETH9Bridge(
|
||
|
|
ccipRouter,
|
||
|
|
weth9,
|
||
|
|
feeToken
|
||
|
|
);
|
||
|
|
|
||
|
|
console.log("CCIPWETH9Bridge deployed at:", address(bridge));
|
||
|
|
console.log(" CCIP Router:", address(bridge.ccipRouter()));
|
||
|
|
console.log(" WETH9:", bridge.weth9());
|
||
|
|
console.log(" Fee Token:", bridge.feeToken());
|
||
|
|
console.log(" Admin:", bridge.admin());
|
||
|
|
|
||
|
|
vm.stopBroadcast();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|