@@ -0,0 +1,43 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.19;
|
||||
|
||||
import {Script} from "forge-std/Script.sol";
|
||||
import {DevOpsTools} from "lib/foundry-devops/src/DevOpsTools.sol";
|
||||
import {BasicNft} from "src/BasicNft.sol";
|
||||
|
||||
contract MintBasicNft is Script {
|
||||
// Here Use CIDv1 start with bafy...
|
||||
// Option after open via Google browser with IPFS companion
|
||||
string public constant IPS_HOELEE =
|
||||
"ipfs://bafybeiduhlzl7miq2lhjuof67cppkayeqncyw2mgctczntkyfqeakcd7ey/?filename=hoeleev2.json";
|
||||
string public constant IPS_HOELEE1 =
|
||||
"https://ipfs.io/ipfs/bafybeiduhlzl7miq2lhjuof67cppkayeqncyw2mgctczntkyfqeakcd7ey/?filename=hoeleev2.json";
|
||||
|
||||
string public constant PUG_URI =
|
||||
"ipfs://bafybeig37ioir76s7mg5oobetncojcm3c3hxasyd4rvid4jqhy4gkaheg4/?filename=0-PUG.json";
|
||||
|
||||
string public TEST =
|
||||
"ipfs://QmY2NYJGnR2XYr51PBBAhdKLWLgiURdUueDGfBomvEAB4C?filename=test.json";
|
||||
|
||||
function run() external {
|
||||
address mostRecentDeployed = DevOpsTools.get_most_recent_deployment(
|
||||
"BasicNft",
|
||||
block.chainid
|
||||
);
|
||||
|
||||
// Sepolia - 0x0Ec993041F1e473bCC5230fE943e7Dc2160a7aa3
|
||||
//https://sepolia.etherscan.io/address/0x0ec993041f1e473bcc5230fe943e7dc2160a7aa3
|
||||
|
||||
//mintNftOnContract(0x95304310e2c55e83E9f43EC5487a656e8BF28990); // Sepolia
|
||||
//mintNftOnContract(0x5FbDB2315678afecb367f032d93F642f64180aa3); // Anvil
|
||||
mintNftOnContract(mostRecentDeployed);
|
||||
}
|
||||
|
||||
function mintNftOnContract(address contractAddress) public {
|
||||
vm.startBroadcast();
|
||||
BasicNft basicNft = BasicNft(contractAddress);
|
||||
basicNft.mintNft(IPS_HOELEE);
|
||||
vm.stopBroadcast();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user