24 lines
539 B
Solidity
24 lines
539 B
Solidity
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity 0.8.18;
|
|
|
|
import {Script} from "forge-std/Script.sol";
|
|
import {FundMe} from "../src/FundMe.sol";
|
|
import {HelperConfig} from "./HelperConfig.s.sol";
|
|
|
|
contract DeployFundMe is Script {
|
|
|
|
function run() external returns (FundMe) {
|
|
// simulation-tx
|
|
HelperConfig helperConfig = new HelperConfig();
|
|
address ethUsdPriceFeed = helperConfig.activeNetworkConfig();
|
|
|
|
// real-tx
|
|
vm.startBroadcast();
|
|
FundMe fundMe = new FundMe(ethUsdPriceFeed);
|
|
vm.stopBroadcast();
|
|
return fundMe;
|
|
}
|
|
|
|
}
|