11import { DeployFunction } from "hardhat-deploy/types" ;
22import { L1_ADDRESS_MAP } from "./consts" ;
33import { HardhatRuntimeEnvironment } from "hardhat/types" ;
4- import { ZERO_ADDRESS } from "@uma/common" ;
54
65const func : DeployFunction = async function ( hre : HardhatRuntimeEnvironment ) {
76 const { deployments, getNamedAccounts, getChainId } = hre ;
@@ -11,24 +10,23 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
1110
1211 const chainId = parseInt ( await getChainId ( ) ) ;
1312
14- await deploy ( "Polygon_Adapter" , {
13+ const args = [
14+ L1_ADDRESS_MAP [ chainId ] . polygonRootChainManager ,
15+ L1_ADDRESS_MAP [ chainId ] . polygonFxRoot ,
16+ L1_ADDRESS_MAP [ chainId ] . polygonDepositManager ,
17+ L1_ADDRESS_MAP [ chainId ] . polygonERC20Predicate ,
18+ L1_ADDRESS_MAP [ chainId ] . matic ,
19+ L1_ADDRESS_MAP [ chainId ] . weth ,
20+ L1_ADDRESS_MAP [ chainId ] . usdc ,
21+ L1_ADDRESS_MAP [ chainId ] . cctpTokenMessenger ,
22+ ] ;
23+ const instance = await deploy ( "Polygon_Adapter" , {
1524 from : deployer ,
1625 log : true ,
1726 skipIfAlreadyDeployed : false ,
18- args : [
19- L1_ADDRESS_MAP [ chainId ] . polygonRootChainManager ,
20- L1_ADDRESS_MAP [ chainId ] . polygonFxRoot ,
21- L1_ADDRESS_MAP [ chainId ] . polygonDepositManager ,
22- L1_ADDRESS_MAP [ chainId ] . polygonERC20Predicate ,
23- L1_ADDRESS_MAP [ chainId ] . matic ,
24- L1_ADDRESS_MAP [ chainId ] . weth ,
25- L1_ADDRESS_MAP [ chainId ] . usdc ,
26- // L1_ADDRESS_MAP[chainId].cctpTokenMessenger,
27- // For now, we are not using the CCTP bridge and can disable by setting
28- // the cctpTokenMessenger to the zero address.
29- ZERO_ADDRESS ,
30- ] ,
27+ args,
3128 } ) ;
29+ await run ( "verify:verify" , { address : instance . address , constructorArguments : args } ) ;
3230} ;
3331
3432module . exports = func ;
0 commit comments