generated from huff-language/huff-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from PraneshASP/feat/deploy-script
🚀 Deployment script
- Loading branch information
Showing
4 changed files
with
51 additions
and
2 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,2 @@ | ||
PRIVATE_KEY= | ||
INFURA_URL= |
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
Submodule foundry-huff
updated
10 files
+1 −1 | README.md | |
+207 −109 | src/HuffConfig.sol | |
+79 −4 | src/HuffDeployer.sol | |
+55 −53 | src/depreciated/StatefulDeployer.sol | |
+49 −47 | src/depreciated/StatefulDeployer.t.sol | |
+34 −14 | src/test/HuffConfig.t.sol | |
+145 −105 | src/test/HuffDeployer.t.sol | |
+63 −38 | src/test/Logging.t.sol | |
+6 −0 | src/test/contracts/ConstOverride.huff | |
+16 −0 | src/test/contracts/ConstructorNeedsValue.huff |
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,34 @@ | ||
// SPDX-License-Identifier: Unlicense | ||
pragma solidity ^0.8.15; | ||
|
||
import "foundry-huff/HuffDeployer.sol"; | ||
import "forge-std/Script.sol"; | ||
|
||
import {Huffbound} from "../src/interfaces/IHuffbound.sol"; | ||
|
||
contract Deploy is Script { | ||
string nameString = "Huffbound"; | ||
string symbolString = "HBTKN"; | ||
// Sample URI | ||
string uriString = | ||
"ipfs://QmPMc4tcBsMqLRuCQtPmPe84bpSjrC3Ky7t3JWuHXYB4aS/0"; | ||
|
||
function run() public returns (Huffbound huffbound) { | ||
bytes memory name = bytes(nameString); | ||
bytes memory symbol = bytes(symbolString); | ||
bytes memory uri = bytes(uriString); | ||
|
||
bytes memory args = bytes.concat( | ||
bytes32(name), | ||
bytes32(symbol), | ||
bytes32(uri), | ||
abi.encode(address(this)) | ||
); | ||
//vm.startBroadcast(); | ||
huffbound = Huffbound( | ||
HuffDeployer.broadcast_with_args("Soulbound", args) | ||
); | ||
//vm.stopBroadcast(); | ||
console2.log("Huffbound contract deployed to: ", address(huffbound)); | ||
} | ||
} |