here is my integration script.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {Script, console} from "forge-std/Script.sol";
import {DevOpsTools} from "lib/foundry-devops/src/DevOpsTools.sol";
import {FundMe} from "../src/FundMe.sol";
contract FundFundMe is Script {
uint256 SEND_VALUE = .1 ether;
function fundFundMe(address mostrecentDeployment) public {
FundMe(payable(mostrecentDeployment)).fund{value: SEND_VALUE}();
console.log("EgtgGE%s", SEND_VALUE);
}
function run() external {
address mostrecentDeployment = DevOpsTools.get_most_recent_deployment(
"FundMe",
block.chainid
);
console.log("ugh9uq3r9grtgqegffuuuefbufueu");
vm.startBroadcast();
fundFundMe(mostrecentDeployment);
vm.stopBroadcast();
}
}
here is trace
└─ ← 5692 bytes of code
[277305] → new FundFundMe@0x34A1D3fff3958843C43aD80F30b94c510645C316
└─ ← 1164 bytes of code
[57509] FundFundMe::run()
├─ [33494] DevOpsTools::get_most_recent_deployment("FundMe", 31337 [3.133e4]) [delegatecall]
│ ├─ [0] VM::readDir("./broadcast", 3) [staticcall]
│ │ └─ ← [("IO error for operation on /home/kalmrigaya/hello_foundry/foundry-fund-me/broadcast: No such file or directory (os error 2)", "/home/kalmrigaya/hello_foundry/foundry-fund-me/broadcast", 0, false, false)]
│ ├─ [0] VM::toString(31337 [3.133e4]) [staticcall]
│ │ └─ ← "31337"
│ └─ ← revert: No run-latest.json file found for specified chain
└─ ← revert: No run-latest.json file found for specified chain
Gas used: 57509
Error:
script failed: revert: No run-latest.json file found for specified chain