File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: MIT
2+ pragma solidity 0.8.26 ;
3+
4+ import {Script, console} from "forge-std/Script.sol " ;
5+ import {CheckBalance} from "../src/CheckBalance.sol " ;
6+ import {DevOpsTools} from "lib/foundry-devops/src/DevOpsTools.sol " ;
7+
8+ contract GetResponse is Script {
9+ CheckBalance public checkBalance;
10+
11+ function getResponse (address checkBalanceAddress ) public {
12+ checkBalance = CheckBalance (checkBalanceAddress);
13+ vm.startBroadcast ();
14+ uint256 response = checkBalance.getResponse ();
15+ vm.stopBroadcast ();
16+ console.log ("Response: " , response);
17+ }
18+
19+ function run () public {
20+ address mostRecentlyDeployed = DevOpsTools.get_most_recent_deployment (
21+ "CheckBalance " ,
22+ block .chainid
23+ );
24+ console.log ("Most recently deployed address: " , mostRecentlyDeployed);
25+
26+ getResponse (mostRecentlyDeployed);
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments