@@ -5,6 +5,7 @@ import { CIRCLE_DOMAIN_IDs, L1_ADDRESS_MAP, USDC, ZERO_ADDRESS } from "./consts"
55import { CCTP_NO_DOMAIN } from "@across-protocol/constants" ;
66import { CIRCLE_UNINITIALIZED_DOMAIN_ID } from "./consts" ;
77import assert from "assert" ;
8+ import { getDeployedAddress } from "../src/DeploymentUtils" ;
89
910const func : DeployFunction = async function ( hre : HardhatRuntimeEnvironment ) {
1011 const { SPOKE_CHAIN_ID } = process . env ;
@@ -15,23 +16,24 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
1516
1617 // Warning: re-using the same HubPoolStore for different L2's is only safe if the L2 spoke pools have
1718 // unique addresses, since the relayed message `targets` are part of the unique data hash.
18- const hubPoolStore = await hre . deployments . get ( "HubPoolStore" ) ;
19+ const hubPoolStore = getDeployedAddress ( "HubPoolStore" , chainId ) ;
1920
2021 // todo: implement similar treatment to `CIRCLE_DOMAIN_IDs`
2122 const oftDstEid = getOftEid ( Number ( SPOKE_CHAIN_ID ) ) ;
2223 const oftFeeCap = toWei ( "1" ) ; // 1 eth transfer fee cap
24+ const adapterStore = getDeployedAddress ( "AdapterStore" , chainId ) ;
2325
2426 const cctpDomainId = CIRCLE_DOMAIN_IDs [ Number ( SPOKE_CHAIN_ID ) ] ?? CCTP_NO_DOMAIN ;
2527 const args = [
26- hubPoolStore . address ,
28+ hubPoolStore ,
2729 USDC [ chainId ] ,
2830 cctpDomainId === CCTP_NO_DOMAIN ? ZERO_ADDRESS : L1_ADDRESS_MAP [ chainId ] . cctpTokenMessenger ,
2931 cctpDomainId === CCTP_NO_DOMAIN ? CIRCLE_UNINITIALIZED_DOMAIN_ID : cctpDomainId ,
30- L1_ADDRESS_MAP [ chainId ] . adapterStore ,
32+ adapterStore ,
3133 oftDstEid ,
3234 oftFeeCap ,
3335 ] ;
34- const instance = await deployments . deploy ( "Universal_Adapter" , {
36+ const instance = await hre . deployments . deploy ( "Universal_Adapter" , {
3537 from : deployer ,
3638 log : true ,
3739 skipIfAlreadyDeployed : false ,
0 commit comments