Files
linea-monorepo/contracts/deploy/12_deploy_CallForwardingProxy.ts
The Dark Jester 4405f315a9 [Chore] - standardise contract deploy logs (#460)
* standardise contract deploy logs

* apply standardization to hardhat deploy scripts

* Update contracts/common/helpers/deployments.ts

Co-authored-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* fix copy paste issues

* use refactored deployment logger

* add a lint space

---------

Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Co-authored-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>
2024-12-18 07:13:56 -08:00

37 lines
1.1 KiB
TypeScript

import { ethers } from "hardhat";
import { DeployFunction } from "hardhat-deploy/types";
import { deployFromFactory } from "../scripts/hardhat/utils";
import {
LogContractDeployment,
getRequiredEnvVar,
tryStoreAddress,
tryVerifyContractWithConstructorArgs,
} from "../common/helpers";
import { HardhatRuntimeEnvironment } from "hardhat/types";
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const contractName = "CallForwardingProxy";
const provider = ethers.provider;
// This should be the LineaRollup
const targetAddress = getRequiredEnvVar("LINEA_ROLLUP_ADDRESS");
const contract = await deployFromFactory(contractName, provider, targetAddress);
await LogContractDeployment(contractName, contract);
const contractAddress = await contract.getAddress();
await tryStoreAddress(hre.network.name, contractName, contractAddress, contract.deploymentTransaction()!.hash);
const args = [targetAddress];
await tryVerifyContractWithConstructorArgs(
contractAddress,
"contracts/lib/CallForwardingProxy.sol:CallForwardingProxy",
args,
);
};
export default func;
func.tags = ["CallForwardingProxy"];