Cyfrin / foundry-nft-cu

22 stars 25 forks source link

Can't mint basicNft on sepolia network #9

Closed cjh20000613 closed 1 year ago

cjh20000613 commented 1 year ago

can anyone help me

Interactions.s.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.18;

import {Script, console} from "forge-std/Script.sol"; import {BasicNft} from "../src/BasicNft.sol"; import {DevOpsTools} from "../lib/foundry-devops/src/DevOpsTools.sol";

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();
}

}

foundry.toml

[profile.default] src = "src" out = "out" libs = ["lib"] remappings = ['@Openzeppelin/=lib/openzeppelin-contracts/'] ffi = true

error

[⠰] Compiling... No files changed, compilation skipped Traces: [639098] → new DevOpsTools@0x1Ecb7AA22C29DeB63d1D588A76cE6F60251C8370 └─ ← 3192 bytes of code

[249308] → new MintBasicNft@0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519 └─ ← 1024 bytes of code

[49120] MintBasicNft::run() ├─ [25127] DevOpsTools::e374cdf1(00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000000000000000000000000000000000000000000842617369634e6674000000000000000000000000000000000000000000000000) [delegatecall] │ ├─ [0] VM::ffi([pwd]) │ │ └─ ← "Failed to execute command: program not found" │ └─ ← 0x0bc445030000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002c4661696c656420746f206578656375746520636f6d6d616e643a2070726f6772616d206e6f7420666f756e640000000000000000000000000000000000000000 └─ ← "Failed to execute command: program not found"

Error: Failed to execute command: program not found