-
Notifications
You must be signed in to change notification settings - Fork 950
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
foundry: separate out your contract deployments (#898)
- Loading branch information
1 parent
e1b39d0
commit 8e0dd0c
Showing
2 changed files
with
39 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.19; | ||
|
||
import "../contracts/YourContract.sol"; | ||
import "./DeployHelpers.s.sol"; | ||
|
||
contract DeployYourContract is ScaffoldETHDeploy { | ||
function run() external { | ||
uint256 deployerPrivateKey = setupLocalhostEnv(); | ||
vm.startBroadcast(deployerPrivateKey); | ||
|
||
YourContract yourContract = new YourContract(vm.addr(deployerPrivateKey)); | ||
console.logString( | ||
string.concat( | ||
"YourContract deployed at: ", vm.toString(address(yourContract)) | ||
) | ||
); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters