Skip to content

Commit b4c0a4e

Browse files
committed
fix build issue
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
1 parent bed4d6d commit b4c0a4e

File tree

5 files changed

+8
-21
lines changed

5 files changed

+8
-21
lines changed

deploy/023_deploy_spoke_pool_verifier.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { DeployFunction } from "hardhat-deploy/types";
22
import { HardhatRuntimeEnvironment } from "hardhat/types";
3-
import { verifyContract } from "../utils/utils.hre";
43

54
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
65
const { deployer } = await hre.getNamedAccounts();
@@ -12,7 +11,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
1211
deterministicDeployment: "0x1234", // Salt for the create2 call.
1312
});
1413
console.log(`Deployed at block ${deployment.receipt.blockNumber} (tx: ${deployment.transactionHash})`);
15-
await verifyContract(deployment.address, []);
14+
await hre.run("verify:verify", { address: deployment.address, constructorArguments: [] });
1615
};
1716

1817
module.exports = func;
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import { DeployFunction } from "hardhat-deploy/types";
22
import { HardhatRuntimeEnvironment } from "hardhat/types";
3-
import { verifyContract } from "../utils/utils.hre";
43

54
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
65
const { deployer } = await hre.getNamedAccounts();
76

87
// @note if deploying this contract on a chain like Linea that only supports up to
98
// solc 0.8.19, the hardhat.config solc version needs to be overridden and this
109
// contract needs to be recompiled.
11-
const deployment = await hre.deployments.deploy("Multicallhandler", {
10+
await hre.deployments.deploy("Multicallhandler", {
1211
contract: "MulticallHandler",
1312
from: deployer,
1413
log: true,
@@ -17,7 +16,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
1716
deterministicDeployment: "0x12345678", // Salt for the create2 call. This will deploy this contract
1817
// at the same address on all chains except ZkSync and Linea which are not EVM equivalent.
1918
});
20-
await verifyContract(deployment.address, []);
2119
};
2220
module.exports = func;
2321
func.tags = ["Multicallhandler"];

deploy/110_deploy_universal_adapter.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { CCTP_NO_DOMAIN } from "@across-protocol/constants";
66
import { CIRCLE_UNINITIALIZED_DOMAIN_ID } from "./consts";
77
import assert from "assert";
88
import { getDeployedAddress } from "../src/DeploymentUtils";
9-
import { verifyContract } from "../utils/utils.hre";
109

1110
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
1211
const { SPOKE_CHAIN_ID } = process.env;
@@ -35,14 +34,13 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
3534
oftDstEid,
3635
oftFeeCap,
3736
];
38-
console.log(`Deploying new Universal Adapter on ${SPOKE_CHAIN_ID} with args:`, args);
3937
const instance = await hre.deployments.deploy("Universal_Adapter", {
4038
from: deployer,
4139
log: true,
4240
skipIfAlreadyDeployed: false,
4341
args,
4442
});
45-
await verifyContract(instance.address, args);
43+
await hre.run("verify:verify", { address: instance.address, constructorArguments: args });
4644
};
4745

4846
module.exports = func;

deploy/112_deploy_spokepool_periphery.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { DeployFunction } from "hardhat-deploy/types";
22
import { HardhatRuntimeEnvironment } from "hardhat/types";
33
import { L1_ADDRESS_MAP, L2_ADDRESS_MAP } from "./consts";
44
import { CHAIN_IDs } from "@across-protocol/constants";
5-
import { verifyContract } from "../utils/utils.hre";
65

76
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
87
const contractName = "SpokePoolPeriphery";
@@ -27,7 +26,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
2726
args: constructorArgs,
2827
});
2928

30-
await verifyContract(deployment.address, constructorArgs);
29+
await hre.run("verify:verify", {
30+
address: deployment.address,
31+
constructorArguments: constructorArgs,
32+
});
3133
};
3234
module.exports = func;
3335
func.tags = ["SpokePoolPeriphery"];

utils/utils.hre.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,7 @@ export async function deployNewProxy(
9292
// to the implementation's ABI on etherscan.
9393
// https://docs.openzeppelin.com/upgrades-plugins/1.x/api-hardhat-upgrades#verify
9494
const contract = `contracts/${name}.sol:${name}`;
95-
await verifyContract(instance, constructorArgs, contract);
96-
}
97-
98-
export async function verifyContract(address: string, constructorArguments: any[], contract?: string) {
99-
const { run, getChainId } = hre;
100-
const chainId = Number(await getChainId());
101-
if (hre.config.blockscout.enabled && hre.config.blockscout.customChains.some((chain) => chain.chainId === chainId)) {
102-
await run("verify:blockscout", { address, constructorArguments, contract });
103-
} else {
104-
await run("verify:verify", { address, constructorArguments, contract });
105-
}
95+
await run("verify:verify", { address: instance, constructorArguments: constructorArgs, contract });
10696
}
10797

10898
export { hre };

0 commit comments

Comments
 (0)