Files
smom-dbis-138/script/z-chain/DeployZChainEmoney.s.sol

36 lines
1.2 KiB
Solidity
Raw Normal View History

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "forge-std/Script.sol";
import "forge-std/console.sol";
import "../../contracts/z-chain/ZChainUSDC.sol";
import "../../contracts/emoney/AccountWalletRegistry.sol";
/**
* @title DeployZChainEmoney
* @notice Deploys cUSDC + AccountWalletRegistry on Z Chain (900002)
*/
contract DeployZChainEmoney is Script {
function run() external {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
address deployer = vm.addr(deployerPrivateKey);
string memory rpcUrl = vm.envOr("CHAIN_900002_RPC_URL", string("http://127.0.0.1:8546"));
console.log("Deployer:", deployer);
console.log("RPC URL:", rpcUrl);
console.log("Chain ID: 900002");
vm.startBroadcast(deployerPrivateKey);
ZChainUSDC cUsdc = new ZChainUSDC(deployer);
AccountWalletRegistry registry = new AccountWalletRegistry(deployer);
vm.stopBroadcast();
console.log("\n=== Z Chain deployment ===");
console.log("cUSDC:", address(cUsdc));
console.log("AccountWalletRegistry:", address(registry));
console.log("\nUpdate config/z-chain-deployed.v1.json and hybx-omnl-cross-chain-lines.json chains.900002");
}
}