chore: sync submodule state (parent ref update)
Made-with: Cursor
This commit is contained in:
24
script/deploy/DeployChainRegistry.s.sol
Normal file
24
script/deploy/DeployChainRegistry.s.sol
Normal file
@@ -0,0 +1,24 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
import "forge-std/Script.sol";
|
||||
import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
|
||||
import "../../contracts/registry/ChainRegistry.sol";
|
||||
|
||||
contract DeployChainRegistry is Script {
|
||||
function run() external {
|
||||
uint256 pk = vm.envUint("PRIVATE_KEY");
|
||||
address admin = vm.addr(pk);
|
||||
|
||||
vm.startBroadcast(pk);
|
||||
|
||||
ChainRegistry impl = new ChainRegistry();
|
||||
bytes memory initData = abi.encodeCall(ChainRegistry.initialize, (admin));
|
||||
ERC1967Proxy proxy = new ERC1967Proxy(address(impl), initData);
|
||||
address proxyAddr = address(proxy);
|
||||
|
||||
vm.stopBroadcast();
|
||||
|
||||
console.log("CHAIN_REGISTRY_ADDRESS_138=", proxyAddr);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user