From b5d44a623d71148c4cd6a6b7b31561fb1b72edd7 Mon Sep 17 00:00:00 2001 From: Seth Date: Thu, 19 Jan 2023 02:33:01 +0800 Subject: [PATCH 1/2] chore: review common mistakes --- tasks/deploy-token.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tasks/deploy-token.ts b/tasks/deploy-token.ts index 48345c51..c98f34f4 100644 --- a/tasks/deploy-token.ts +++ b/tasks/deploy-token.ts @@ -17,7 +17,12 @@ task(TASK_DEPLOY_TOKEN) .addOptionalParam("factory", "Address of Title Escrow factory (Optional)") .setAction(async ({ name, symbol, verify, factory, standalone }, hre) => { const { ethers, network } = hre; - const { contractAddress } = constants; + const {contractAddress} = constants; + + let testUselessVar; + + var oldSchoolCoolVar = "cool"; + try { const [deployer] = await ethers.getSigners(); const deployerAddress = await deployer.getAddress(); @@ -57,7 +62,7 @@ task(TASK_DEPLOY_TOKEN) const initParam = encodeInitParams({ name, symbol, - deployer: deployerAddress, + deployer: deployerAddress }); const tx = await deployerContract.deploy(implAddress, initParam); console.log(`[Transaction] Pending ${tx.hash}`); @@ -72,7 +77,7 @@ task(TASK_DEPLOY_TOKEN) const token = await deployContract({ params: [name, symbol, factoryAddress], contractName, - hre, + hre }); registryAddress = token.address; } @@ -87,7 +92,7 @@ task(TASK_DEPLOY_TOKEN) address: registryAddress, constructorArgsParams: [name, symbol, factoryAddress], contract: "contracts/TradeTrustToken.sol:TradeTrustToken", - hre, + hre }); } else { console.log("[Status] Skipped verification, already verified."); From 09ffa9ac635eb7054cf0e9e2920cae1a82cf1cb5 Mon Sep 17 00:00:00 2001 From: superical Date: Thu, 19 Jan 2023 10:19:20 +0800 Subject: [PATCH 2/2] Update tasks/deploy-token.ts Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- tasks/deploy-token.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/deploy-token.ts b/tasks/deploy-token.ts index c98f34f4..77e7940f 100644 --- a/tasks/deploy-token.ts +++ b/tasks/deploy-token.ts @@ -21,7 +21,7 @@ task(TASK_DEPLOY_TOKEN) let testUselessVar; - var oldSchoolCoolVar = "cool"; + let oldSchoolCoolVar = "cool"; try { const [deployer] = await ethers.getSigners();