NFT Lesson 17: FlipMoodNFT Interactions error #2933
-
Hello there I am trying to get an additional interaction that is not covered in the lessons to work. After successfully running the MintMoodNFT script on a forked Sepolia chain, I can't run the FlipMoodNFT one. It doesn't even seem like I get a definite error. Here is the error from my terminal Then there are some traces and the revert error I tried cleaning the project with contract FlipMoodNFT is Script {
uint256 public constant TOKEN_ID_TO_FLIP = 0;
function run() external {
address mostRecentlyDeployedMoodNft = DevOpsTools.get_most_recent_deployment("MoodNFT", block.chainid);
flipMoodOnContract(mostRecentlyDeployedMoodNft);
}
function flipMoodOnContract(address moodNftAddress) public {
vm.startBroadcast();
MoodNFT(moodNftAddress).flipMood(TOKEN_ID_TO_FLIP);
vm.stopBroadcast();
}
}
You can find my repo hereAnd the script file hereIf someone knows how to fix this please let me know Thank you in advance ❤️ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
Hello @mikechaban, What happens if you run an actual sepolia chain and not a forked chain? |
Beta Was this translation helpful? Give feedback.
The token can be flipped by the owner or by any other address the owner has approved. Why not just call the
FlipMood
function with the private key that minted the token instead of removing that check?