mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 04:08:01 -05:00
* 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>
37 lines
1.1 KiB
TypeScript
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"];
|