File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11// SPDX-License-Identifier: MIT
22pragma solidity 0.8.26 ;
33
4- import {Script} from "forge-std/Script.sol " ;
4+ import {Script, console } from "forge-std/Script.sol " ;
55import {AmoyReceiver} from "../src/AmoyReceiver.sol " ;
6+ import {DevOpsTools} from "lib/foundry-devops/src/DevOpsTools.sol " ;
67
78contract DeployAmoyReceiver is Script {
89 address constant AMOY_ROUTER = 0x9C32fCB86BF0f4a1A8921a9Fe46de3198bb884B2 ;
910
1011 function run () public {
12+ address mostRecentlyDeployed = DevOpsTools.get_most_recent_deployment (
13+ "AmoyTokenTransfer " ,
14+ block .chainid
15+ );
16+ console.log ("Most recently deployed address: " , mostRecentlyDeployed);
1117 AmoyReceiver amoyReceiver;
1218
1319 vm.startBroadcast ();
14- amoyReceiver = new AmoyReceiver (AMOY_ROUTER);
20+ amoyReceiver = new AmoyReceiver (AMOY_ROUTER, mostRecentlyDeployed );
1521 vm.stopBroadcast ();
1622 }
1723}
You can’t perform that action at this time.
0 commit comments