NFT Lesson: Unable to run the Mint function, (but able to Deploy on Testnet) #202
Answered
by
alymurtazamemon
Glow-in-the-dark
asked this question in
Q&A
-
This is my interactions script: // SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {Script} from "forge-std/Script.sol";
import {DevOpsTools} from "lib/foundry-devops/src/DevOpsTools.sol";
import {BasicNft} from "../src/BasicNft.sol";
import {Console} from "
contract MintBasicNft is Script {
string public constant PUG = "ipfs://bafybeig37ioir76s7mg5oobetncojcm3c3hxasyd4rvid4jqhy4gkaheg4/?filename=0-PUG.json";
function run() external {
address mostRecentlyDeployed = DevOpsTools.get_most_recent_deployment("BasicNft",block.chainid);
mintNftOnContract(mostRecentlyDeployed);
}
function mintNftOnContract(address contractAddress) public {
vm.startBroadcast();
BasicNft(contractAddress).mintNft(PUG);
vm.stopBroadcast();
}
} If required, this is my github Repo: |
Beta Was this translation helpful? Give feedback.
Answered by
alymurtazamemon
Jun 30, 2023
Replies: 1 comment 1 reply
-
@Glow-in-the-dark please check out this #169 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Glow-in-the-dark
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Glow-in-the-dark please check out this #169