Skip to content

Commit

Permalink
new script to deploy nft primary sale without allowlist contract
Browse files Browse the repository at this point in the history
  • Loading branch information
SivaramPg committed Feb 16, 2024
1 parent 8fce613 commit 45d93eb
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions script/DeployNFTPrimarySaleWithoutAllowlist.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import {NFTPrimarySaleWithoutAllowlist} from "../src/example/NFTPrimarySaleWithoutAllowlist.sol";
import "forge-std/Script.sol";

// Forge script deployment
// forge script script/DeployNFTPrimarySaleWithoutAllowlist.s.sol:NFTPrimarySaleWithoutAllowListScript --rpc-url <RPC_URL> --broadcast --verify <ETHERSCAN_API_KEY> -vvvv

contract NFTPrimarySaleWithoutAllowlistScript is Script {
uint256 private constant _WAD = 1000000000000000000;

function run() external {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);

string memory name = "DN404";
string memory symbol = "DN";
uint256 maxMint = 10;
uint120 publicPrice = 0.02 ether;
uint96 initialSupply = uint96(1000 * _WAD);
address owner = address(vm.addr(deployerPrivateKey));

NFTPrimarySaleWithoutAllowlist cntrct = new NFTPrimarySaleWithoutAllowlist(
name, symbol, maxMint, publicPrice, initialSupply, owner
);

// Set token base URI prior to going live
cntrct.setBaseURI("");

// Make contract live once deployed
cntrct.toggleLive();

vm.stopBroadcast();
}
}

0 comments on commit 45d93eb

Please sign in to comment.