get things kinda working
parent
57d207bbce
commit
7987f80e15
@ -0,0 +1,17 @@
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
pragma solidity ^0.8.13;
|
||||
|
||||
import "forge-std/Script.sol";
|
||||
import "../src/NFT.sol";
|
||||
|
||||
contract MyScript is Script {
|
||||
// function run() external {
|
||||
// uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
|
||||
// vm.startBroadcast(deployerPrivateKey);
|
||||
// NFT nft = new NFT();
|
||||
// vm.stopBroadcast();
|
||||
// }
|
||||
function run() public {
|
||||
vm.broadcast();
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
pragma solidity ^0.8.13;
|
||||
|
||||
import "solmate/tokens/ERC721.sol";
|
||||
import "openzeppelin-contracts/utils/Strings.sol";
|
||||
|
||||
contract NFT is ERC721 {
|
||||
uint256 public currentTokenId;
|
||||
|
||||
constructor() ERC721("NFT", "NFT") {}
|
||||
|
||||
function mint(address r, uint256 mintAmount) external {
|
||||
for(uint256 i; i < mintAmount; i++) {
|
||||
currentTokenId += 1;
|
||||
_safeMint(r, currentTokenId);
|
||||
}
|
||||
}
|
||||
|
||||
function tokenURI(uint256 id) public view virtual override returns (string memory) {
|
||||
return Strings.toString(id);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue