From 4405f315a9cdbb13bb718a26b0c6f7e9b74321b4 Mon Sep 17 00:00:00 2001 From: The Dark Jester Date: Wed, 18 Dec 2024 15:13:56 +0000 Subject: [PATCH] [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 * fix copy paste issues * use refactored deployment logger * add a lint space --------- Signed-off-by: The Dark Jester Co-authored-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com> --- contracts/common/helpers/deployments.ts | 21 +++++++- contracts/deploy/01_deploy_PlonkVerifier.ts | 19 +++---- contracts/deploy/02_deploy_Timelock.ts | 11 ++-- contracts/deploy/03_deploy_LineaRollup.ts | 11 ++-- contracts/deploy/03_deploy_LineaRollupV5.ts | 10 ++-- .../deploy/04_deploy_L2MessageService.ts | 12 ++--- .../04_deploy_L2MessageServiceV1Deployed.ts | 17 +++--- contracts/deploy/05_deploy_BridgedToken.ts | 24 +++++---- contracts/deploy/06_deploy_TokenBridge.ts | 12 ++--- contracts/deploy/07_deploy_LXPToken.ts | 12 ++--- contracts/deploy/07_deploy_SurgeXPToken.ts | 13 ++--- .../deploy/08_deploy_CustomBridgedToken.ts | 19 +++---- contracts/deploy/09_deploy_TestEIP4844.ts | 10 +--- contracts/deploy/10_deploy_RecoverFunds.ts | 17 +++--- contracts/deploy/11_deploy_TestERC20.ts | 21 ++++---- .../deploy/12_deploy_CallForwardingProxy.ts | 19 ++++--- .../deployBridgedTokenAndTokenBridge.ts | 53 +++++++++++-------- .../deployL2MessageService.ts | 37 +++++++------ .../deployLondonEvmTestingFramework.ts | 49 ++++++++--------- .../deployPlonkVerifierAndLineaRollupV5.ts | 29 ++++------ .../deployPlonkVerifierAndLineaRollupV6.ts | 31 +++++------ .../deployTestERC20.ts | 15 +++--- .../MakefileContractDeploymentHelper.kt | 4 +- .../MakefileContractDeploymentHelperKtTest.kt | 8 +-- 24 files changed, 237 insertions(+), 237 deletions(-) diff --git a/contracts/common/helpers/deployments.ts b/contracts/common/helpers/deployments.ts index 4b2dab75..104010aa 100644 --- a/contracts/common/helpers/deployments.ts +++ b/contracts/common/helpers/deployments.ts @@ -1,4 +1,4 @@ -import { ethers, AbstractSigner, Interface, InterfaceAbi } from "ethers"; +import { ethers, AbstractSigner, Interface, InterfaceAbi, BaseContract } from "ethers"; export function getInitializerData(contractAbi: InterfaceAbi, initializerFunctionName: string, args: unknown[]) { const contractInterface = new Interface(contractAbi); @@ -12,6 +12,7 @@ export function getInitializerData(contractAbi: InterfaceAbi, initializerFunctio } export async function deployContractFromArtifacts( + contractName: string, abi: ethers.InterfaceAbi, bytecode: ethers.BytesLike, wallet: AbstractSigner, @@ -20,5 +21,21 @@ export async function deployContractFromArtifacts( ) { const factory = new ethers.ContractFactory(abi, bytecode, wallet); const contract = await factory.deploy(...args); - return contract.waitForDeployment(); + + await LogContractDeployment(contractName, contract); + + return contract; +} + +export async function LogContractDeployment(contractName: string, contract: BaseContract) { + const txReceipt = await contract.deploymentTransaction()?.wait(); + if (!txReceipt) { + throw "Deployment transaction not found."; + } + + const contractAddress = await contract.getAddress(); + const chainId = (await contract.deploymentTransaction()!.provider.getNetwork()).chainId; + console.log( + `contract=${contractName} deployed: address=${contractAddress} blockNumber=${txReceipt.blockNumber} chainId=${chainId}`, + ); } diff --git a/contracts/deploy/01_deploy_PlonkVerifier.ts b/contracts/deploy/01_deploy_PlonkVerifier.ts index 86b0e48e..3e1307ec 100644 --- a/contracts/deploy/01_deploy_PlonkVerifier.ts +++ b/contracts/deploy/01_deploy_PlonkVerifier.ts @@ -2,7 +2,13 @@ import { ethers } from "hardhat"; import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; import { deployFromFactory } from "../scripts/hardhat/utils"; -import { tryVerifyContract, getDeployedContractAddress, tryStoreAddress, getRequiredEnvVar } from "../common/helpers"; +import { + tryVerifyContract, + getDeployedContractAddress, + tryStoreAddress, + getRequiredEnvVar, + LogContractDeployment, +} from "../common/helpers"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; @@ -18,17 +24,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`Deploying new version, NB: ${existingContractAddress} will be overwritten if env SAVE_ADDRESS=true.`); } const contract = await deployFromFactory(contractName, provider); + + await LogContractDeployment(contractName, contract); const contractAddress = await contract.getAddress(); - console.log(`${contractName} deployed at ${contractAddress}`); process.env.PLONKVERIFIER_ADDRESS = contractAddress; - - const deployTx = contract.deploymentTransaction(); - if (!deployTx) { - throw "Deployment transaction not found."; - } - - await tryStoreAddress(hre.network.name, contractName, contractAddress, deployTx.hash); + await tryStoreAddress(hre.network.name, contractName, contractAddress, contract.deploymentTransaction()!.hash); await tryVerifyContract(contractAddress); }; diff --git a/contracts/deploy/02_deploy_Timelock.ts b/contracts/deploy/02_deploy_Timelock.ts index 85c70483..7a0980d0 100644 --- a/contracts/deploy/02_deploy_Timelock.ts +++ b/contracts/deploy/02_deploy_Timelock.ts @@ -4,6 +4,7 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { deployFromFactory } from "../scripts/hardhat/utils"; import { get1559Fees } from "../scripts/utils"; import { + LogContractDeployment, getDeployedContractAddress, getRequiredEnvVar, tryStoreAddress, @@ -43,16 +44,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { adminAddress, await get1559Fees(provider), ); + + await LogContractDeployment(contractName, contract); const contractAddress = await contract.getAddress(); - console.log(`${contractName} deployed at ${contractAddress}`); + await tryStoreAddress(hre.network.name, contractName, contractAddress, contract.deploymentTransaction()!.hash); - const deployTx = contract.deploymentTransaction(); - if (!deployTx) { - throw "Deployment transaction not found."; - } - - await tryStoreAddress(hre.network.name, contractName, contractAddress, deployTx.hash); const args = [minDelay, timeLockProposers?.split(","), timelockExecutors?.split(","), adminAddress]; await tryVerifyContractWithConstructorArgs( diff --git a/contracts/deploy/03_deploy_LineaRollup.ts b/contracts/deploy/03_deploy_LineaRollup.ts index fc0f1c56..5eb5cd7b 100644 --- a/contracts/deploy/03_deploy_LineaRollup.ts +++ b/contracts/deploy/03_deploy_LineaRollup.ts @@ -8,6 +8,7 @@ import { tryVerifyContract, getDeployedContractAddress, tryStoreAddress, + LogContractDeployment, } from "../common/helpers"; import { LINEA_ROLLUP_INITIALIZE_SIGNATURE, @@ -75,15 +76,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { unsafeAllow: ["constructor"], }, ); + + await LogContractDeployment(contractName, contract); const contractAddress = await contract.getAddress(); - const txReceipt = await contract.deploymentTransaction()?.wait(); - if (!txReceipt) { - throw "Contract deployment transaction receipt not found."; - } - console.log(`${contractName} deployed: address=${contractAddress} blockNumber=${txReceipt.blockNumber}`); - - await tryStoreAddress(hre.network.name, contractName, contractAddress, txReceipt.hash); + await tryStoreAddress(hre.network.name, contractName, contractAddress, contract.deploymentTransaction()!.hash); await tryVerifyContract(contractAddress); }; diff --git a/contracts/deploy/03_deploy_LineaRollupV5.ts b/contracts/deploy/03_deploy_LineaRollupV5.ts index fcb251e9..e5478c4e 100644 --- a/contracts/deploy/03_deploy_LineaRollupV5.ts +++ b/contracts/deploy/03_deploy_LineaRollupV5.ts @@ -2,6 +2,7 @@ import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; import { deployUpgradableFromFactory } from "../scripts/hardhat/utils"; import { + LogContractDeployment, getDeployedContractAddress, getRequiredEnvVar, tryStoreAddress, @@ -60,15 +61,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }, ); + await LogContractDeployment(contractName, contract); const contractAddress = await contract.getAddress(); - const txReceipt = await contract.deploymentTransaction()?.wait(); - if (!txReceipt) { - throw "Contract deployment transaction receipt not found."; - } - console.log(`${contractName} deployed: address=${contractAddress} blockNumber=${txReceipt.blockNumber}`); - - await tryStoreAddress(hre.network.name, contractName, contractAddress, txReceipt.hash); + await tryStoreAddress(hre.network.name, contractName, contractAddress, contract.deploymentTransaction()!.hash); await tryVerifyContract(contractAddress); }; diff --git a/contracts/deploy/04_deploy_L2MessageService.ts b/contracts/deploy/04_deploy_L2MessageService.ts index 7851faa0..ff50e17b 100644 --- a/contracts/deploy/04_deploy_L2MessageService.ts +++ b/contracts/deploy/04_deploy_L2MessageService.ts @@ -8,6 +8,7 @@ import { tryVerifyContract, getDeployedContractAddress, tryStoreAddress, + LogContractDeployment, } from "../common/helpers"; import { L1_L2_MESSAGE_SETTER_ROLE, @@ -59,14 +60,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { unsafeAllow: ["constructor"], }, ); - const contractAddress = await contract.getAddress(); - const txReceipt = await contract.deploymentTransaction()?.wait(); - if (!txReceipt) { - throw "Contract deployment transaction receipt not found."; - } - console.log(`${contractName} deployed: address=${contractAddress} blockNumber=${txReceipt.blockNumber}`); - await tryStoreAddress(hre.network.name, contractName, contractAddress, txReceipt.hash); + await LogContractDeployment(contractName, contract); + const contractAddress = await contract.getAddress(); + + await tryStoreAddress(hre.network.name, contractName, contractAddress, contract.deploymentTransaction()!.hash); await tryVerifyContract(contractAddress); }; diff --git a/contracts/deploy/04_deploy_L2MessageServiceV1Deployed.ts b/contracts/deploy/04_deploy_L2MessageServiceV1Deployed.ts index 36293793..5574e555 100644 --- a/contracts/deploy/04_deploy_L2MessageServiceV1Deployed.ts +++ b/contracts/deploy/04_deploy_L2MessageServiceV1Deployed.ts @@ -4,7 +4,13 @@ import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; import path from "path"; import { deployUpgradableWithAbiAndByteCode } from "../scripts/hardhat/utils"; -import { tryVerifyContract, getDeployedContractAddress, tryStoreAddress, getRequiredEnvVar } from "../common/helpers"; +import { + tryVerifyContract, + getDeployedContractAddress, + tryStoreAddress, + getRequiredEnvVar, + LogContractDeployment, +} from "../common/helpers"; import { abi, bytecode } from "./V1/L2MessageServiceV1Deployed.json"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { @@ -54,15 +60,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }, ); + await LogContractDeployment(contractName, contract); const contractAddress = await contract.getAddress(); - const txReceipt = await contract.deploymentTransaction()?.wait(); - if (!txReceipt) { - throw "Contract deployment transaction receipt not found."; - } - console.log(`${contractName} deployed at ${contractAddress}`); - - await tryStoreAddress(hre.network.name, contractName, contractAddress, txReceipt.hash); + await tryStoreAddress(hre.network.name, contractName, contractAddress, contract.deploymentTransaction()!.hash); await tryVerifyContract(contractAddress); diff --git a/contracts/deploy/05_deploy_BridgedToken.ts b/contracts/deploy/05_deploy_BridgedToken.ts index 7cffafed..b6b65b81 100644 --- a/contracts/deploy/05_deploy_BridgedToken.ts +++ b/contracts/deploy/05_deploy_BridgedToken.ts @@ -2,7 +2,12 @@ import { ethers, network, upgrades } from "hardhat"; import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; import { BridgedToken } from "../typechain-types"; -import { tryVerifyContract, getDeployedContractAddress, tryStoreAddress } from "../common/helpers"; +import { + tryVerifyContract, + getDeployedContractAddress, + tryStoreAddress, + LogContractDeployment, +} from "../common/helpers"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; @@ -23,19 +28,18 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const BridgedToken = await ethers.getContractFactory(contractName); const bridgedToken = (await upgrades.deployBeacon(BridgedToken)) as unknown as BridgedToken; - await bridgedToken.waitForDeployment(); + + await LogContractDeployment(contractName, bridgedToken); const bridgedTokenAddress = await bridgedToken.getAddress(); process.env.BRIDGED_TOKEN_ADDRESS = bridgedTokenAddress; - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - const deployTx = bridgedToken.deployTransaction; - if (!deployTx) { - throw "Contract deployment transaction receipt not found."; - } - - await tryStoreAddress(network.name, contractName, bridgedTokenAddress, deployTx.hash); + await tryStoreAddress( + hre.network.name, + contractName, + bridgedTokenAddress, + bridgedToken.deploymentTransaction()!.hash, + ); if (process.env.TOKEN_BRIDGE_L1 === "true") { console.log(`L1 BridgedToken beacon deployed on ${network.name}, at address:`, bridgedTokenAddress); diff --git a/contracts/deploy/06_deploy_TokenBridge.ts b/contracts/deploy/06_deploy_TokenBridge.ts index 324be19c..e6f07ac0 100644 --- a/contracts/deploy/06_deploy_TokenBridge.ts +++ b/contracts/deploy/06_deploy_TokenBridge.ts @@ -14,6 +14,7 @@ import { tryStoreAddress, tryStoreProxyAdminAddress, getRequiredEnvVar, + LogContractDeployment, } from "../common/helpers"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { @@ -100,15 +101,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }, ]); - await tokenBridge.waitForDeployment(); + await LogContractDeployment(contractName, tokenBridge); + const tokenBridgeAddress = await tokenBridge.getAddress(); - - const deployTx = tokenBridge.deploymentTransaction(); - if (!deployTx) { - throw "Contract deployment transaction receipt not found."; - } - - await tryStoreAddress(network.name, contractName, tokenBridgeAddress, deployTx.hash); + await tryStoreAddress(hre.network.name, contractName, tokenBridgeAddress, tokenBridge.deploymentTransaction()!.hash); const proxyAdminAddress = await upgrades.erc1967.getAdminAddress(tokenBridgeAddress); diff --git a/contracts/deploy/07_deploy_LXPToken.ts b/contracts/deploy/07_deploy_LXPToken.ts index 07221633..5ffe7896 100644 --- a/contracts/deploy/07_deploy_LXPToken.ts +++ b/contracts/deploy/07_deploy_LXPToken.ts @@ -8,6 +8,7 @@ import { getDeployedContractAddress, tryStoreAddress, getRequiredEnvVar, + LogContractDeployment, } from "../common/helpers"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { @@ -25,16 +26,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`Deploying new version, NB: ${existingContractAddress} will be overwritten if env SAVE_ADDRESS=true.`); } const contract = await deployFromFactory(contractName, provider, adminAddress, await get1559Fees(provider)); + + await LogContractDeployment(contractName, contract); const contractAddress = await contract.getAddress(); - console.log(`${contractName} deployed at ${contractAddress}`); - - const deployTx = contract.deploymentTransaction(); - if (!deployTx) { - throw "Contract deployment transaction receipt not found."; - } - - await tryStoreAddress(hre.network.name, contractName, contractAddress, deployTx.hash); + await tryStoreAddress(hre.network.name, contractName, contractAddress, contract.deploymentTransaction()!.hash); const args = [adminAddress]; diff --git a/contracts/deploy/07_deploy_SurgeXPToken.ts b/contracts/deploy/07_deploy_SurgeXPToken.ts index 27b60198..6469f622 100644 --- a/contracts/deploy/07_deploy_SurgeXPToken.ts +++ b/contracts/deploy/07_deploy_SurgeXPToken.ts @@ -8,6 +8,7 @@ import { getDeployedContractAddress, tryStoreAddress, getRequiredEnvVar, + LogContractDeployment, } from "../common/helpers"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { @@ -35,19 +36,13 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { transferAddresses, await get1559Fees(provider), ); + + await LogContractDeployment(contractName, contract); const contractAddress = await contract.getAddress(); - console.log(`${contractName} deployed at ${contractAddress}`); - - const deployTx = contract.deploymentTransaction(); - if (!deployTx) { - throw "Contract deployment transaction receipt not found."; - } - - await tryStoreAddress(hre.network.name, contractName, contractAddress, deployTx.hash); + await tryStoreAddress(hre.network.name, contractName, contractAddress, contract.deploymentTransaction()!.hash); const args = [adminAddress, minterAddress, transferAddresses]; - await tryVerifyContractWithConstructorArgs(contractAddress, "contracts/token/LineaSurgeXP.sol:LineaSurgeXP", args); }; export default func; diff --git a/contracts/deploy/08_deploy_CustomBridgedToken.ts b/contracts/deploy/08_deploy_CustomBridgedToken.ts index 54026a7f..c3584a53 100644 --- a/contracts/deploy/08_deploy_CustomBridgedToken.ts +++ b/contracts/deploy/08_deploy_CustomBridgedToken.ts @@ -34,19 +34,20 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }, ); - await customBridgedToken.waitForDeployment(); - const customBridgedTokenAddress = await customBridgedToken.getAddress(); - - const deployTx = customBridgedToken.deploymentTransaction(); - if (!deployTx) { - throw "Contract deployment transaction receipt not found."; + const txReceipt = await customBridgedToken.deploymentTransaction()?.wait(); + if (!txReceipt) { + throw "Deployment transaction not found."; } - await tryStoreAddress(network.name, contractName, customBridgedTokenAddress, deployTx.hash); + const contractAddress = await customBridgedToken.getAddress(); - console.log(`CustomBridgedToken deployed on ${network.name}, at address:`, customBridgedTokenAddress); + console.log( + `contract=${contractName} deployed: address=${contractAddress} blockNumber=${txReceipt.blockNumber} chainId=${chainId}`, + ); - await tryVerifyContract(customBridgedTokenAddress); + await tryStoreAddress(network.name, contractName, contractAddress, txReceipt.hash); + await tryVerifyContract(contractAddress); }; + export default func; func.tags = ["CustomBridgedToken"]; diff --git a/contracts/deploy/09_deploy_TestEIP4844.ts b/contracts/deploy/09_deploy_TestEIP4844.ts index 6b02c44f..f8c53cf3 100644 --- a/contracts/deploy/09_deploy_TestEIP4844.ts +++ b/contracts/deploy/09_deploy_TestEIP4844.ts @@ -2,6 +2,7 @@ import { ethers } from "hardhat"; import { DeployFunction } from "hardhat-deploy/types"; import { deployFromFactory } from "../scripts/hardhat/utils"; import { get1559Fees } from "../scripts/utils"; +import { LogContractDeployment } from "contracts/common/helpers"; const func: DeployFunction = async function () { const contractName = "TestEIP4844"; @@ -9,14 +10,7 @@ const func: DeployFunction = async function () { const provider = ethers.provider; const contract = await deployFromFactory(contractName, provider, await get1559Fees(provider)); - const contractAddress = await contract.getAddress(); - - console.log(`${contractName} deployed at ${contractAddress}`); - - const deployTx = contract.deploymentTransaction(); - if (!deployTx) { - throw "Contract deployment transaction receipt not found."; - } + await LogContractDeployment(contractName, contract); }; export default func; func.tags = ["TestEIP4844"]; diff --git a/contracts/deploy/10_deploy_RecoverFunds.ts b/contracts/deploy/10_deploy_RecoverFunds.ts index 586131e7..47bc470d 100644 --- a/contracts/deploy/10_deploy_RecoverFunds.ts +++ b/contracts/deploy/10_deploy_RecoverFunds.ts @@ -1,7 +1,13 @@ import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; import { deployUpgradableFromFactory } from "../scripts/hardhat/utils"; -import { tryVerifyContract, getDeployedContractAddress, tryStoreAddress, getRequiredEnvVar } from "../common/helpers"; +import { + tryVerifyContract, + getDeployedContractAddress, + tryStoreAddress, + getRequiredEnvVar, + LogContractDeployment, +} from "../common/helpers"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; @@ -30,15 +36,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }, ); + await LogContractDeployment(contractName, contract); const contractAddress = await contract.getAddress(); - const txReceipt = await contract.deploymentTransaction()?.wait(); - if (!txReceipt) { - throw "Contract deployment transaction receipt not found."; - } - console.log(`${contractName} deployed: address=${contractAddress} blockNumber=${txReceipt.blockNumber}`); - - await tryStoreAddress(hre.network.name, contractName, contractAddress, txReceipt.hash); + await tryStoreAddress(hre.network.name, contractName, contractAddress, contract.deploymentTransaction()!.hash); await tryVerifyContract(contractAddress); }; diff --git a/contracts/deploy/11_deploy_TestERC20.ts b/contracts/deploy/11_deploy_TestERC20.ts index 2064a0b1..e29f9fcd 100644 --- a/contracts/deploy/11_deploy_TestERC20.ts +++ b/contracts/deploy/11_deploy_TestERC20.ts @@ -1,7 +1,13 @@ -import { ethers, network } from "hardhat"; +import { ethers } from "hardhat"; import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { getRequiredEnvVar, tryVerifyContract, tryStoreAddress, getDeployedContractAddress } from "../common/helpers"; +import { + getRequiredEnvVar, + tryVerifyContract, + tryStoreAddress, + getDeployedContractAddress, + LogContractDeployment, +} from "../common/helpers"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; @@ -22,18 +28,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const TestERC20Factory = await ethers.getContractFactory(contractName); const contract = await TestERC20Factory.deploy(tokenName, tokenSymbol, ethers.parseEther(initialSupply)); - await contract.waitForDeployment(); + await LogContractDeployment(contractName, contract); const contractAddress = await contract.getAddress(); - const deployTx = contract.deploymentTransaction(); - if (!deployTx) { - throw "Deployment transaction not found."; - } + await tryStoreAddress(hre.network.name, contractName, contractAddress, contract.deploymentTransaction()!.hash); - await tryStoreAddress(network.name, contractName, contractAddress, deployTx.hash); - - const chainId = (await ethers.provider.getNetwork()).chainId; - console.log(`${contractName} deployed on ${network.name}, chainId=${chainId}, at address: ${contractAddress}`); await tryVerifyContract(contractAddress); }; diff --git a/contracts/deploy/12_deploy_CallForwardingProxy.ts b/contracts/deploy/12_deploy_CallForwardingProxy.ts index b5a8814d..3dbb435d 100644 --- a/contracts/deploy/12_deploy_CallForwardingProxy.ts +++ b/contracts/deploy/12_deploy_CallForwardingProxy.ts @@ -1,9 +1,15 @@ import { ethers } from "hardhat"; import { DeployFunction } from "hardhat-deploy/types"; import { deployFromFactory } from "../scripts/hardhat/utils"; -import { getRequiredEnvVar, tryVerifyContractWithConstructorArgs } from "../common/helpers"; +import { + LogContractDeployment, + getRequiredEnvVar, + tryStoreAddress, + tryVerifyContractWithConstructorArgs, +} from "../common/helpers"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; -const func: DeployFunction = async function () { +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const contractName = "CallForwardingProxy"; const provider = ethers.provider; @@ -12,14 +18,11 @@ const func: DeployFunction = async function () { const targetAddress = getRequiredEnvVar("LINEA_ROLLUP_ADDRESS"); const contract = await deployFromFactory(contractName, provider, targetAddress); + + await LogContractDeployment(contractName, contract); const contractAddress = await contract.getAddress(); - console.log(`${contractName} deployed at ${contractAddress}`); - - const deployTx = contract.deploymentTransaction(); - if (!deployTx) { - throw "Deployment transaction not found."; - } + await tryStoreAddress(hre.network.name, contractName, contractAddress, contract.deploymentTransaction()!.hash); const args = [targetAddress]; diff --git a/contracts/local-deployments-artifacts/deployBridgedTokenAndTokenBridge.ts b/contracts/local-deployments-artifacts/deployBridgedTokenAndTokenBridge.ts index f2774e5c..0e4570e5 100644 --- a/contracts/local-deployments-artifacts/deployBridgedTokenAndTokenBridge.ts +++ b/contracts/local-deployments-artifacts/deployBridgedTokenAndTokenBridge.ts @@ -1,7 +1,20 @@ -import { abi as ProxyAdminAbi, bytecode as ProxyAdminBytecode } from "./static-artifacts/ProxyAdmin.json"; -import { abi as BridgedTokenAbi, bytecode as BridgedTokenBytecode } from "./dynamic-artifacts/BridgedToken.json"; -import { abi as TokenBridgeAbi, bytecode as TokenBridgeBytecode } from "./dynamic-artifacts/TokenBridge.json"; import { + contractName as ProxyAdminContractName, + abi as ProxyAdminAbi, + bytecode as ProxyAdminBytecode, +} from "./static-artifacts/ProxyAdmin.json"; +import { + contractName as BridgedTokenContractName, + abi as BridgedTokenAbi, + bytecode as BridgedTokenBytecode, +} from "./dynamic-artifacts/BridgedToken.json"; +import { + contractName as TokenBridgeContractName, + abi as TokenBridgeAbi, + bytecode as TokenBridgeBytecode, +} from "./dynamic-artifacts/TokenBridge.json"; +import { + contractName as UpgradeableBeaconContractName, abi as UpgradeableBeaconAbi, bytecode as UpgradeableBeaconBytecode, } from "./static-artifacts/UpgradeableBeacon.json"; @@ -23,8 +36,6 @@ import { deployContractFromArtifacts, getInitializerData } from "../common/helpe async function main() { const ORDERED_NONCE_POST_L2MESSAGESERVICE = 3; const ORDERED_NONCE_POST_LINEAROLLUP = 4; - const bridgedTokenName = "BridgedToken"; - const tokenBridgeName = "TokenBridge"; const l2MessageServiceAddress = process.env.L2MESSAGESERVICE_ADDRESS; const lineaRollupAddress = process.env.LINEA_ROLLUP_ADDRESS; @@ -55,10 +66,18 @@ async function main() { } } + const tokenBridgeContractImplementationName = "tokenBridgeContractImplementation"; + const [bridgedToken, tokenBridgeImplementation, proxyAdmin] = await Promise.all([ - deployContractFromArtifacts(BridgedTokenAbi, BridgedTokenBytecode, wallet, { nonce: walletNonce }), - deployContractFromArtifacts(TokenBridgeAbi, TokenBridgeBytecode, wallet, { nonce: walletNonce + 1 }), - deployContractFromArtifacts(ProxyAdminAbi, ProxyAdminBytecode, wallet, { nonce: walletNonce + 2 }), + deployContractFromArtifacts(BridgedTokenContractName, BridgedTokenAbi, BridgedTokenBytecode, wallet, { + nonce: walletNonce, + }), + deployContractFromArtifacts(tokenBridgeContractImplementationName, TokenBridgeAbi, TokenBridgeBytecode, wallet, { + nonce: walletNonce + 1, + }), + deployContractFromArtifacts(ProxyAdminContractName, ProxyAdminAbi, ProxyAdminBytecode, wallet, { + nonce: walletNonce + 2, + }), ]); const bridgedTokenAddress = await bridgedToken.getAddress(); @@ -67,12 +86,10 @@ async function main() { const chainId = (await provider.getNetwork()).chainId; - console.log(`${bridgedTokenName} contract deployed at ${bridgedTokenAddress}`); - console.log(`${tokenBridgeName} Implementation contract deployed at ${tokenBridgeImplementationAddress}`); - console.log(`L1 ProxyAdmin deployed: address=${proxyAdminAddress}`); console.log(`Deploying UpgradeableBeacon: chainId=${chainId} bridgedTokenAddress=${bridgedTokenAddress}`); const beaconProxy = await deployContractFromArtifacts( + UpgradeableBeaconContractName, UpgradeableBeaconAbi, UpgradeableBeaconBytecode, wallet, @@ -114,7 +131,8 @@ async function main() { }, ]); - const proxyContract = await deployContractFromArtifacts( + await deployContractFromArtifacts( + TokenBridgeContractName, TransparentUpgradeableProxyAbi, TransparentUpgradeableProxyBytecode, wallet, @@ -122,17 +140,6 @@ async function main() { proxyAdminAddress, initializer, ); - - const proxyContractAddress = await proxyContract.getAddress(); - const txReceipt = await proxyContract.deploymentTransaction()?.wait(); - - if (!txReceipt) { - throw "Contract deployment transaction receipt not found."; - } - - console.log( - `${tokenBridgeName} deployed: chainId=${chainId} address=${proxyContractAddress} blockNumber=${txReceipt.blockNumber}`, - ); } main().catch((error) => { diff --git a/contracts/local-deployments-artifacts/deployL2MessageService.ts b/contracts/local-deployments-artifacts/deployL2MessageService.ts index 6fc5289f..913c83d4 100644 --- a/contracts/local-deployments-artifacts/deployL2MessageService.ts +++ b/contracts/local-deployments-artifacts/deployL2MessageService.ts @@ -1,10 +1,15 @@ import { ethers } from "ethers"; import * as dotenv from "dotenv"; import { + contractName as L2MessageServiceContractName, abi as L2MessageServiceAbi, bytecode as L2MessageServiceBytecode, } from "./dynamic-artifacts/L2MessageService.json"; -import { abi as ProxyAdminAbi, bytecode as ProxyAdminBytecode } from "./static-artifacts/ProxyAdmin.json"; +import { + contractName as ProxyAdminContractName, + abi as ProxyAdminAbi, + bytecode as ProxyAdminBytecode, +} from "./static-artifacts/ProxyAdmin.json"; import { abi as TransparentUpgradeableProxyAbi, bytecode as TransparentUpgradeableProxyBytecode, @@ -38,16 +43,26 @@ async function main() { walletNonce = parseInt(process.env.L2_NONCE); } + const l2MessageServiceContractImplementationName = "L2MessageServiceImplementation"; + const [l2MessageServiceImplementation, proxyAdmin] = await Promise.all([ - deployContractFromArtifacts(L2MessageServiceAbi, L2MessageServiceBytecode, wallet, { nonce: walletNonce }), - deployContractFromArtifacts(ProxyAdminAbi, ProxyAdminBytecode, wallet, { nonce: walletNonce + 1 }), + deployContractFromArtifacts( + l2MessageServiceContractImplementationName, + L2MessageServiceAbi, + L2MessageServiceBytecode, + wallet, + { + nonce: walletNonce, + }, + ), + deployContractFromArtifacts(ProxyAdminContractName, ProxyAdminAbi, ProxyAdminBytecode, wallet, { + nonce: walletNonce + 1, + }), ]); const proxyAdminAddress = await proxyAdmin.getAddress(); const l2MessageServiceImplementationAddress = await l2MessageServiceImplementation.getAddress(); - console.log(`L2 ProxyAdmin deployed: address=${proxyAdminAddress}`); - const pauseTypeRoles = getEnvVarOrDefault("L2MSGSERVICE_PAUSE_TYPE_ROLES", L2_MESSAGE_SERVICE_PAUSE_TYPES_ROLES); const unpauseTypeRoles = getEnvVarOrDefault( "L2MSGSERVICE_UNPAUSE_TYPE_ROLES", @@ -69,7 +84,8 @@ async function main() { unpauseTypeRoles, ]); - const proxyContract = await deployContractFromArtifacts( + await deployContractFromArtifacts( + L2MessageServiceContractName, TransparentUpgradeableProxyAbi, TransparentUpgradeableProxyBytecode, wallet, @@ -77,15 +93,6 @@ async function main() { proxyAdminAddress, initializer, ); - - const proxyContractAddress = await proxyContract.getAddress(); - const txReceipt = await proxyContract.deploymentTransaction()?.wait(); - - if (!txReceipt) { - throw "Contract deployment transaction receipt not found."; - } - - console.log(`${messageServiceName} deployed: address=${proxyContractAddress} blockNumber=${txReceipt.blockNumber}`); } main().catch((error) => { diff --git a/contracts/local-deployments-artifacts/deployLondonEvmTestingFramework.ts b/contracts/local-deployments-artifacts/deployLondonEvmTestingFramework.ts index da3ecf6f..49a4244b 100644 --- a/contracts/local-deployments-artifacts/deployLondonEvmTestingFramework.ts +++ b/contracts/local-deployments-artifacts/deployLondonEvmTestingFramework.ts @@ -1,6 +1,14 @@ import { ethers } from "ethers"; -import { abi as londonEvmYulAbi, bytecode as londonEvmYulBytecode } from "./static-artifacts/LondonEvmCodes.json"; -import { abi as opcodeTesterAbi, bytecode as opcodeTesterBytecode } from "./static-artifacts/OpcodeTester.json"; +import { + contractName as londonEvmYulName, + abi as londonEvmYulAbi, + bytecode as londonEvmYulBytecode, +} from "./static-artifacts/LondonEvmCodes.json"; +import { + contractName as opcodeTesterName, + abi as opcodeTesterAbi, + bytecode as opcodeTesterBytecode, +} from "./static-artifacts/OpcodeTester.json"; import { deployContractFromArtifacts } from "../common/helpers/deployments"; async function main() { @@ -8,36 +16,35 @@ async function main() { const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider); console.log(`Deploying London EVM Yul based contract with verbatim bytecode`); - const londonEvmYulAddress = await deployLondonEvmYul(wallet, provider); + const londonEvmYulAddress = await deployLondonEvmYul(wallet); console.log(`Deploying the main OPCODE tester with yul contract at ${londonEvmYulAddress}`); - await deployOpcodeTester(wallet, provider, londonEvmYulAddress); + await deployOpcodeTester(wallet, londonEvmYulAddress); } -async function deployLondonEvmYul(wallet: ethers.Wallet, provider: ethers.JsonRpcApiProvider): Promise { +async function deployLondonEvmYul(wallet: ethers.Wallet): Promise { const walletNonce = await wallet.getNonce(); - const londonEvmYul = await deployContractFromArtifacts(londonEvmYulAbi, londonEvmYulBytecode, wallet, { - nonce: walletNonce, - }); + const londonEvmYul = await deployContractFromArtifacts( + londonEvmYulName, + londonEvmYulAbi, + londonEvmYulBytecode, + wallet, + { + nonce: walletNonce, + }, + ); const londonEvmYulAddress = await londonEvmYul.getAddress(); - const chainId = (await provider.getNetwork()).chainId; - - console.log(`londonEvmYulAddress deployed: address=${londonEvmYulAddress} chainId=${chainId}`); - return londonEvmYulAddress; } -async function deployOpcodeTester( - wallet: ethers.Wallet, - provider: ethers.JsonRpcApiProvider, - londonEvmYulAddress: string, -) { +async function deployOpcodeTester(wallet: ethers.Wallet, londonEvmYulAddress: string) { const walletNonce = await wallet.getNonce(); - const opcodeTester = await deployContractFromArtifacts( + await deployContractFromArtifacts( + opcodeTesterName, opcodeTesterAbi, opcodeTesterBytecode, wallet, @@ -46,12 +53,6 @@ async function deployOpcodeTester( nonce: walletNonce, }, ); - - const opcodeTesterAddress = await opcodeTester.getAddress(); - - const chainId = (await provider.getNetwork()).chainId; - - console.log(`opcodeTesterAddress deployed: address=${opcodeTesterAddress} chainId=${chainId}`); } main().catch((error) => { diff --git a/contracts/local-deployments-artifacts/deployPlonkVerifierAndLineaRollupV5.ts b/contracts/local-deployments-artifacts/deployPlonkVerifierAndLineaRollupV5.ts index 8ff0d6a7..6b704750 100644 --- a/contracts/local-deployments-artifacts/deployPlonkVerifierAndLineaRollupV5.ts +++ b/contracts/local-deployments-artifacts/deployPlonkVerifierAndLineaRollupV5.ts @@ -3,7 +3,11 @@ import fs from "fs"; import path from "path"; import * as dotenv from "dotenv"; import { abi as LineaRollupV5Abi, bytecode as LineaRollupV5Bytecode } from "./dynamic-artifacts/LineaRollupV5.json"; -import { abi as ProxyAdminAbi, bytecode as ProxyAdminBytecode } from "./static-artifacts/ProxyAdmin.json"; +import { + contractName as ProxyAdminContractName, + abi as ProxyAdminAbi, + bytecode as ProxyAdminBytecode, +} from "./static-artifacts/ProxyAdmin.json"; import { abi as TransparentUpgradeableProxyAbi, bytecode as TransparentUpgradeableProxyBytecode, @@ -46,7 +50,7 @@ async function main() { const lineaRollupTateLimitAmountInWei = getRequiredEnvVar("LINEA_ROLLUP_RATE_LIMIT_AMOUNT"); const lineaRollupGenesisTimestamp = getRequiredEnvVar("LINEA_ROLLUP_GENESIS_TIMESTAMP"); const lineaRollupName = "LineaRollupV5"; - + const lineaRollupImplementationName = "LineaRollupV5Implementation"; const verifierArtifacts = findContractArtifacts(path.join(__dirname, "./dynamic-artifacts"), verifierName); const provider = new ethers.JsonRpcProvider(process.env.RPC_URL); @@ -63,15 +67,15 @@ async function main() { } const [verifier, lineaRollupImplementation, proxyAdmin] = await Promise.all([ - deployContractFromArtifacts(verifierArtifacts.abi, verifierArtifacts.bytecode, wallet, { + deployContractFromArtifacts(verifierName, verifierArtifacts.abi, verifierArtifacts.bytecode, wallet, { nonce: walletNonce, gasPrice, }), - deployContractFromArtifacts(LineaRollupV5Abi, LineaRollupV5Bytecode, wallet, { + deployContractFromArtifacts(lineaRollupImplementationName, LineaRollupV5Abi, LineaRollupV5Bytecode, wallet, { nonce: walletNonce + 1, gasPrice, }), - deployContractFromArtifacts(ProxyAdminAbi, ProxyAdminBytecode, wallet, { + deployContractFromArtifacts(ProxyAdminContractName, ProxyAdminAbi, ProxyAdminBytecode, wallet, { nonce: walletNonce + 2, gasPrice, }), @@ -81,9 +85,6 @@ async function main() { const verifierAddress = await verifier.getAddress(); const lineaRollupImplementationAddress = await lineaRollupImplementation.getAddress(); - console.log(`${verifierName} deployed: address=${verifierAddress}`); - console.log(`L1 ProxyAdmin deployed: address=${proxyAdminAddress}`); - const initializer = getInitializerData(LineaRollupV5Abi, "initialize", [ lineaRollupInitialStateRootHash, lineaRollupInitialL2BlockNumber, @@ -95,7 +96,8 @@ async function main() { lineaRollupGenesisTimestamp, ]); - const proxyContract = await deployContractFromArtifacts( + await deployContractFromArtifacts( + lineaRollupName, TransparentUpgradeableProxyAbi, TransparentUpgradeableProxyBytecode, wallet, @@ -104,15 +106,6 @@ async function main() { initializer, { gasPrice }, ); - - const proxyContractAddress = await proxyContract.getAddress(); - const txReceipt = await proxyContract.deploymentTransaction()?.wait(); - - if (!txReceipt) { - throw "Contract deployment transaction receipt not found."; - } - - console.log(`${lineaRollupName} deployed: address=${proxyContractAddress} blockNumber=${txReceipt.blockNumber}`); } main().catch((error) => { diff --git a/contracts/local-deployments-artifacts/deployPlonkVerifierAndLineaRollupV6.ts b/contracts/local-deployments-artifacts/deployPlonkVerifierAndLineaRollupV6.ts index de02b5ef..9c982b75 100644 --- a/contracts/local-deployments-artifacts/deployPlonkVerifierAndLineaRollupV6.ts +++ b/contracts/local-deployments-artifacts/deployPlonkVerifierAndLineaRollupV6.ts @@ -3,7 +3,11 @@ import fs from "fs"; import path from "path"; import * as dotenv from "dotenv"; import { abi as LineaRollupV6Abi, bytecode as LineaRollupV6Bytecode } from "./dynamic-artifacts/LineaRollupV6.json"; -import { abi as ProxyAdminAbi, bytecode as ProxyAdminBytecode } from "./static-artifacts/ProxyAdmin.json"; +import { + contractName as ProxyAdminContractName, + abi as ProxyAdminAbi, + bytecode as ProxyAdminBytecode, +} from "./static-artifacts/ProxyAdmin.json"; import { abi as TransparentUpgradeableProxyAbi, bytecode as TransparentUpgradeableProxyBytecode, @@ -54,6 +58,7 @@ async function main() { const lineaRollupGenesisTimestamp = getRequiredEnvVar("LINEA_ROLLUP_GENESIS_TIMESTAMP"); const multiCallAddress = "0xcA11bde05977b3631167028862bE2a173976CA11"; const lineaRollupName = "LineaRollupV6"; + const lineaRollupImplementationName = "LineaRollupV6Implementation"; const pauseTypeRoles = getEnvVarOrDefault("LINEA_ROLLUP_PAUSE_TYPE_ROLES", LINEA_ROLLUP_PAUSE_TYPES_ROLES); const unpauseTypeRoles = getEnvVarOrDefault("LINEA_ROLLUP_UNPAUSE_TYPE_ROLES", LINEA_ROLLUP_UNPAUSE_TYPES_ROLES); @@ -79,24 +84,24 @@ async function main() { } const [verifier, lineaRollupImplementation, proxyAdmin] = await Promise.all([ - deployContractFromArtifacts(verifierArtifacts.abi, verifierArtifacts.bytecode, wallet, { + deployContractFromArtifacts(verifierName, verifierArtifacts.abi, verifierArtifacts.bytecode, wallet, { nonce: walletNonce, gasPrice, }), - deployContractFromArtifacts(LineaRollupV6Abi, LineaRollupV6Bytecode, wallet, { + deployContractFromArtifacts(lineaRollupImplementationName, LineaRollupV6Abi, LineaRollupV6Bytecode, wallet, { nonce: walletNonce + 1, gasPrice, }), - deployContractFromArtifacts(ProxyAdminAbi, ProxyAdminBytecode, wallet, { nonce: walletNonce + 2, gasPrice }), + deployContractFromArtifacts(ProxyAdminContractName, ProxyAdminAbi, ProxyAdminBytecode, wallet, { + nonce: walletNonce + 2, + gasPrice, + }), ]); const proxyAdminAddress = await proxyAdmin.getAddress(); const verifierAddress = await verifier.getAddress(); const lineaRollupImplementationAddress = await lineaRollupImplementation.getAddress(); - console.log(`${verifierName} deployed: address=${verifierAddress}`); - console.log(`L1 ProxyAdmin deployed: address=${proxyAdminAddress}`); - const initializer = getInitializerData(LineaRollupV6Abi, "initialize", [ { initialStateRootHash: lineaRollupInitialStateRootHash, @@ -113,7 +118,8 @@ async function main() { }, ]); - const proxyContract = await deployContractFromArtifacts( + await deployContractFromArtifacts( + lineaRollupName, TransparentUpgradeableProxyAbi, TransparentUpgradeableProxyBytecode, wallet, @@ -122,15 +128,6 @@ async function main() { initializer, { gasPrice }, ); - - const proxyContractAddress = await proxyContract.getAddress(); - const txReceipt = await proxyContract.deploymentTransaction()?.wait(); - - if (!txReceipt) { - throw "Contract deployment transaction receipt not found."; - } - - console.log(`${lineaRollupName} deployed: address=${proxyContractAddress} blockNumber=${txReceipt.blockNumber}`); } main().catch((error) => { diff --git a/contracts/local-deployments-artifacts/deployTestERC20.ts b/contracts/local-deployments-artifacts/deployTestERC20.ts index 051e9683..d240fb8b 100644 --- a/contracts/local-deployments-artifacts/deployTestERC20.ts +++ b/contracts/local-deployments-artifacts/deployTestERC20.ts @@ -1,5 +1,9 @@ import { ethers } from "ethers"; -import { abi as TestERC20Abi, bytecode as TestERC20Bytecode } from "./static-artifacts/TestERC20.json"; +import { + contractName as TestERC20ContractName, + abi as TestERC20Abi, + bytecode as TestERC20Bytecode, +} from "./static-artifacts/TestERC20.json"; import { deployContractFromArtifacts } from "../common/helpers/deployments"; import { get1559Fees } from "../scripts/utils"; import { getRequiredEnvVar } from "../common/helpers/environment"; @@ -35,7 +39,8 @@ async function main() { } } - const testERC20 = await deployContractFromArtifacts( + await deployContractFromArtifacts( + TestERC20ContractName, TestERC20Abi, TestERC20Bytecode, wallet, @@ -47,12 +52,6 @@ async function main() { gasPrice, }, ); - - const testERC20Address = await testERC20.getAddress(); - - const chainId = (await provider.getNetwork()).chainId; - - console.log(`testERC20 deployed: address=${testERC20Address} chainId=${chainId}`); } main().catch((error) => { diff --git a/coordinator/ethereum/test-utils/src/main/kotlin/net/consensys/zkevm/ethereum/MakefileContractDeploymentHelper.kt b/coordinator/ethereum/test-utils/src/main/kotlin/net/consensys/zkevm/ethereum/MakefileContractDeploymentHelper.kt index 7225ba50..cded915f 100644 --- a/coordinator/ethereum/test-utils/src/main/kotlin/net/consensys/zkevm/ethereum/MakefileContractDeploymentHelper.kt +++ b/coordinator/ethereum/test-utils/src/main/kotlin/net/consensys/zkevm/ethereum/MakefileContractDeploymentHelper.kt @@ -75,10 +75,10 @@ fun executeCommand( } internal val lineaRollupAddressPattern = Pattern.compile( - "^LineaRollup(?:.*)? deployed: address=(0x[0-9a-fA-F]{40}) blockNumber=(\\d+)" + "^contract=LineaRollup(?:.*)? deployed: address=(0x[0-9a-fA-F]{40}) blockNumber=(\\d+)" ) internal val l2MessageServiceAddressPattern = Pattern.compile( - "^L2MessageService(?:.*)? deployed: address=(0x[0-9a-fA-F]{40}) blockNumber=(\\d+)" + "^contract=L2MessageService(?:.*)? deployed: address=(0x[0-9a-fA-F]{40}) blockNumber=(\\d+)" ) data class DeployedContract( diff --git a/coordinator/ethereum/test-utils/src/test/kotlin/net/consensys/zkevm/ethereum/MakefileContractDeploymentHelperKtTest.kt b/coordinator/ethereum/test-utils/src/test/kotlin/net/consensys/zkevm/ethereum/MakefileContractDeploymentHelperKtTest.kt index 62f8ed1f..270b1a61 100644 --- a/coordinator/ethereum/test-utils/src/test/kotlin/net/consensys/zkevm/ethereum/MakefileContractDeploymentHelperKtTest.kt +++ b/coordinator/ethereum/test-utils/src/test/kotlin/net/consensys/zkevm/ethereum/MakefileContractDeploymentHelperKtTest.kt @@ -11,7 +11,7 @@ class MakefileContractDeploymentHelperKtTest { getDeployedAddress( listOf( "L2MessageService artifact has been deployed in 1.2659626659999998s ", - "L2MessageService deployed: address=0xFE48d65B84AA0E23594Fd585c11cAD831F90AcB6 blockNumber=8", + "contract=L2MessageService deployed: address=0xFE48d65B84AA0E23594Fd585c11cAD831F90AcB6 blockNumber=8", "" ), l2MessageServiceAddressPattern @@ -24,7 +24,7 @@ class MakefileContractDeploymentHelperKtTest { getDeployedAddress( listOf( "L2MessageServiceV1.2.3 artifact has been deployed in 1.2659626659999998s ", - "L2MessageServiceV1.2.3 deployed: address=0xFE48d65B84AA0E23594Fd585c11cAD831F90AcB6 blockNumber=8", + "contract=L2MessageServiceV1.2.3 deployed: address=0xFE48d65B84AA0E23594Fd585c11cAD831F90AcB6 blockNumber=8", "" ), l2MessageServiceAddressPattern @@ -40,7 +40,7 @@ class MakefileContractDeploymentHelperKtTest { getDeployedAddress( listOf( "LineaRollup artifact has been deployed in 1.855172125s ", - "LineaRollup deployed: address=0x8613180dF1485B8b87DEE3BCf31896659eb1a092 blockNumber=1414", + "contract=LineaRollup deployed: address=0x8613180dF1485B8b87DEE3BCf31896659eb1a092 blockNumber=1414", "" ), lineaRollupAddressPattern @@ -53,7 +53,7 @@ class MakefileContractDeploymentHelperKtTest { getDeployedAddress( listOf( "LineaRollupV5.2.1 artifact has been deployed in 1.855172125s ", - "LineaRollupV5.2.1 deployed: address=0x8613180dF1485B8b87DEE3BCf31896659eb1a092 blockNumber=1414", + "contract=LineaRollupV5.2.1 deployed: address=0x8613180dF1485B8b87DEE3BCf31896659eb1a092 blockNumber=1414", "" ), lineaRollupAddressPattern