Skip to content

Commit f5cf1cd

Browse files
committed
deploy
1 parent ac22052 commit f5cf1cd

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

script/Deploy.s.sol

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.19;
3+
4+
import "forge-std/Script.sol";
5+
import "../src/HammerSupplyChain.sol";
6+
7+
contract DeployScript is Script {
8+
function run() external {
9+
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
10+
vm.startBroadcast(deployerPrivateKey);
11+
12+
HammerSupplyChainFactory factory = new HammerSupplyChainFactory();
13+
14+
// Deploy the supply chain with initial values
15+
factory.deploySupplyChain(
16+
// Handle parameters
17+
"Wood", "Premium", 0.05 ether, 20,
18+
// Shaft parameters
19+
"Metal", "Standard", 0.08 ether, 20,
20+
// Head parameters
21+
"Steel", "Heavy-Duty", 0.12 ether, 20
22+
);
23+
24+
vm.stopBroadcast();
25+
}
26+
}

0 commit comments

Comments
 (0)