foundry-template/script/DeployFoo.s.sol

23 lines
623 B
Solidity
Raw Normal View History

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 {
address internal deployer;
2022-07-16 14:36:29 +03:00
Foo internal foo;
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 {
vm.startBroadcast(deployer);
2022-07-16 14:36:29 +03:00
foo = new Foo();
vm.stopBroadcast();
}
}