ritual/projects/hello-world/contracts/script/Deploy.s.sol
vvzvlad 1fc54cf829
Update Deploy.s.sol
Signed-off-by: vvzvlad <github@vvzvlad.xyz>
2024-06-08 20:04:41 +03:00

27 lines
797 B
Solidity

// SPDX-License-Identifier: BSD-3-Clause-Clear
pragma solidity ^0.8.13;
import {Script, console2} from "forge-std/Script.sol";
import {SaysGM} from "../src/SaysGM.sol";
contract Deploy is Script {
function run() public {
// Setup wallet
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);
// Log address
address deployerAddress = vm.addr(deployerPrivateKey);
console2.log("Loaded deployer: ", deployerAddress);
address registry = 0x8D871Ef2826ac9001fB2e33fDD6379b6aaBF449c;
// Create consumer
SaysGM saysGm = new SaysGM(registry);
console2.log("Deployed SaysHello: ", address(saysGm));
// Execute
vm.stopBroadcast();
vm.broadcast();
}
}