2022-07-16 14:36:29 +03:00
|
|
|
// SPDX-License-Identifier: UNLICENSED
|
2023-02-05 13:06:26 +02:00
|
|
|
pragma solidity >=0.8.18;
|
2022-07-16 14:36:29 +03:00
|
|
|
|
|
|
|
import { Script } from "forge-std/Script.sol";
|
|
|
|
import { Foo } from "../src/Foo.sol";
|
|
|
|
|
|
|
|
/// @dev See the Solidity Scripting tutorial: https://book.getfoundry.sh/tutorials/solidity-scripting
|
2023-02-05 13:09:47 +02:00
|
|
|
contract DeployFoo is Script {
|
2023-02-05 14:07:12 +02:00
|
|
|
address internal deployer;
|
2022-07-16 14:36:29 +03:00
|
|
|
Foo internal foo;
|
|
|
|
|
2023-02-05 14:07:12 +02:00
|
|
|
function setUp() public virtual {
|
|
|
|
string memory mnemonic = vm.envString("MNEMONIC");
|
|
|
|
(deployer,) = deriveRememberKey(mnemonic, 0);
|
|
|
|
}
|
|
|
|
|
2022-07-16 14:36:29 +03:00
|
|
|
function run() public {
|
2023-02-05 14:07:12 +02:00
|
|
|
vm.startBroadcast(deployer);
|
2022-07-16 14:36:29 +03:00
|
|
|
foo = new Foo();
|
|
|
|
vm.stopBroadcast();
|
|
|
|
}
|
|
|
|
}
|